Jump to content
  • 0
Sign in to follow this  
Kas

[Help] about getrefine script

Question

hi everyone. Exmap, i will make custom item with this effect

 

if refined

0 : str +5, agi +5, max sp +10%

1 : str +10 agi +5 max sp +12%

2 : str +11 dex +7 max hp/sp +15%

 

 

can someone tell me how for this script ?

 

 

sorry for my bad english.

 

 

thanks

Share this post


Link to post
Share on other sites

2 answers to this question

Recommended Posts

  • 0

In a nutshell:

switch (getrefine()) { case 1: bonus bStr, 10; bonus bAgi, 5; bonus bMaxSPrate, 12; break; case 2: bonus bStr, 11; bonus bDex, 7; bonus bMaxHPrate, 15; bonus bMaxSPrate, 15; break; default: bonus bStr, 5; bonus bAgi, 5; bonus bMaxSPrate, 10; }

 

Cleaner readout (don't paste this into your db lol):

switch (getrefine()){    case 1:        bonus bStr, 10;        bonus bAgi, 5;        bonus bMaxSPrate, 12;        break;            case 2:        bonus bStr, 11;        bonus bDex, 7;        bonus bMaxHPrate, 15;        bonus bMaxSPrate, 15;        break;            default:        bonus bStr, 5;        bonus bAgi, 5;        bonus bMaxSPrate, 10;}

 

The case number would be the refine level; if no case is defined (typically, 0), it will use default instead. I'd only recommend using this method if you wanted very specific bonusesfor each refine; keep in mind that because the way this is written, the item will have the same effect as +0 when refined to +3, unless you add a new case label for each refine; if you want two refines to have the same effect, just stack the labels next to each other (i.e. case 1: case 2: bonus bStr, 10; break;) If you have an algorithmic way of increasing the bonuses given, this can be written differently.

Share this post


Link to post
Share on other sites
  • 0

like this sir ? 
 

 

id,item,item,1,2,3,4,5,6,7,8,98,9,0,0000,{ switch (getrefine()) { case 1: bonus bStr, 10; bonus bAgi, 5; bonus bMaxSPrate, 12; break; case 2: bonus bStr, 11; bonus bDex, 7; bonus bMaxHPrate, 15; bonus bMaxSPrate, 15; break; default: bonus bStr, 5; bonus bAgi, 5; bonus bMaxSPrate, 10; },{},{}

 

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.