Jump to content
  • 0

Item_DB characters allowed.


Question

Posted (edited)

Hello community,

I have a question: Is there any way that I can enlarge the characters allowed on the item_db.txt? Beause I intend to give some bonuses to a player if he has different variables but for some reason when I put too many, the console shows me an error and does not recognize the item anymore.

Is there any work around on this?

For example, this is the code that I am working on.

When the player is top 1, his bonuses will be doubled but since there are many words on the script the emulator just shows an error.

25439,Protector,Protector,4,0,,0,,0,,0,0xFFFFFFFF,63,2,8192,,1,0,1004,{ query_sql( "SELECT `points`, 1 + (SELECT COUNT(1) FROM `top_ranking` t1 WHERE t1.`points` > t2.`points`) FROM `top_ranking` t2 WHERE `char_id` = "+ getcharid(0), .@points, .@top); if (.@top == 1 && godtier >= 6) { bonus bAtkRate,10; bonus bMatkRate,10; bonus bMdefRate,10; bonus bDefRate,10; bonus bMaxHPrate,10; bonus bMaxSPrate,10; bonus bAllStats,10; } else if (.@top == 1 && godtier >= 5) { bonus bAtkRate,10; bonus bMatkRate,10; bonus bMdefRate,10; bonus bDefRate,10; bonus bMaxHPrate,10; bonus bMaxSPrate,10; } else if (.@top == 1 && godtier == 4) { bonus bAtkRate,10; bonus bMatkRate,10; bonus bMdefRate,10; bonus bDefRate,10; } else if (.@top == 1 && godtier == 3) { bonus bAtkRate,10; bonus bMatkRate,10; } else if ( godtier == 6 ) { bonus bAtkRate,3; bonus bMatkRate,3; bonus bMdefRate,3; bonus bDefRate,3; bonus bMaxHPrate,3; bonus bMaxSPrate,3; bonus bAllStats,5; } else if ( godtier == 5 ) { bonus bAtkRate,5; bonus bMatkRate,5; bonus bMdefRate,5; bonus bDefRate,5; bonus bMaxHPrate,5; bonus bMaxSPrate,5; } else if ( godtier == 4 ) { bonus bAtkRate,5; bonus bMatkRate,5; bonus bMdefRate,5; bonus bDefRate,5; } else if ( godtier == 3 ) { bonus bAtkRate,5; bonus bMatkRate,5; } },{},{}

Do you think there is a way to make it shorter?

 

Thank you.

Edited by GMHelios

1 answer to this question

Recommended Posts

  • 0
Posted

change to:
 

25439,Protector,Protector,4,0,,0,,0,,0,0xFFFFFFFF,63,2,8192,,1,0,1004,{ callfunc "Func_godtier",0; },{},{}

Script:

-	script	Func_godtier	-1,{

// Makes fuction SQL
query_sql( "SELECT `points`, 1 + (SELECT COUNT(1) FROM `top_ranking` t1 WHERE t1.`points` > t2.`points`) FROM `top_ranking` t2 WHERE `char_id` = "+ getcharid(0), .@points, .@top);

if (.@top == 1 && godtier >= 6) {
	bonus bAtkRate,10;
	 bonus bMatkRate,10;
	  bonus bMdefRate,10;
	   bonus bDefRate,10;
	    bonus bMaxHPrate,10;
	     bonus bMaxSPrate,10;
	      bonus bAllStats,10;

} else if (.@top == 1 && godtier >= 5) {
 bonus bAtkRate,10;
  bonus bMatkRate,10;
   bonus bMdefRate,10;
    bonus bDefRate,10;
     bonus bMaxHPrate,10;
      bonus bMaxSPrate,10;

} else if (.@top == 1 && godtier == 4) {
 bonus bAtkRate,10;
  bonus bMatkRate,10;
   bonus bMdefRate,10;
    bonus bDefRate,10;

} else if (.@top == 1 && godtier == 3) {
 bonus bAtkRate,10;
  bonus bMatkRate,10;

} else if ( godtier == 6 ) {
 bonus bAtkRate,3;
  bonus bMatkRate,3;
   bonus bMdefRate,3;
    bonus bDefRate,3;
     bonus bMaxHPrate,3;
      bonus bMaxSPrate,3;
       bonus bAllStats,5;

 } else if ( godtier == 5 ) {
  bonus bAtkRate,5;
   bonus bMatkRate,5;
    bonus bMdefRate,5;
     bonus bDefRate,5;
      bonus bMaxHPrate,5;
       bonus bMaxSPrate,5;

} else if ( godtier == 4 ) {
 bonus bAtkRate,5;
  bonus bMatkRate,5;
   bonus bMdefRate,5;
    bonus bDefRate,5;

   } else if ( godtier == 3 ) {
     bonus bAtkRate,5;
      bonus bMatkRate,5;
     }
}


Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...