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

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.   Restore formatting

  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.

Loading...
Sign in to follow this  

×
×
  • Create New...

Important Information

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