Jump to content

Question

Posted

hello any body i dont know if im in right room to discuss this problem if not ppls transfer me, 
please help me how to put bonus on this in my item_db??

Increase All Stats by 20%

any body help plsss

 

5 answers to this question

Recommended Posts

  • 1
Posted
bonus bStr,readparam(bStr)*20/100;
bonus bAgi,readparam(bAgi)*20/100;
bonus bVit,readparam(bVit)*20/100;
bonus bInt,readparam(bInt)*20/100;
bonus bDex,readparam(bDex)*20/100;
bonus bLuk,readparam(bLuk)*20/100;

 

 

18 hours ago, alexander03 said:

sir thank u for your reply, really appreciated, may i ask question more sir what is the meaning of 100? this number *20/100 <== this number sir 100 whats that means ?

  • Convert the problem to an equation using the percentage formula: (Percent * NUM = M) / 100  = Answer
  • Percent is 20, NUM is readparam(bStr), so the equation is 20% * 100%(let's say your Str is 100) = M
  • So in the equation: 20 * 100 = (M becomes 2000) / 100 = Answer
  • Answer = 20
  • So 20% of 100 is 20

This one is easy if rAthena can use float but the sad thing is.. The script only accept integers.. Easiest way is readparam(bStr)*0.20 wherein 0.20 is float.

  • MVP 1
  • 0
Posted
1 hour ago, Haruka Mayumi said:

bonus bStr,readparam(bStr)*20/100;
bonus bAgi,readparam(bAgi)*20/100;
bonus bVit,readparam(bVit)*20/100;
bonus bInt,readparam(bInt)*20/100;
bonus bDex,readparam(bDex)*20/100;
bonus bLuk,readparam(bLuk)*20/100;

 

sir thank u for your reply, really appreciated, may i ask question more sir what is the meaning of 100? this number *20/100 <== this number sir 100 whats that means ?

  • 0
Posted
7 hours ago, Haruka Mayumi said:
  • Convert the problem to an equation using the percentage formula: (Percent * NUM = M) / 100  = Answer
  • Percent is 20, NUM is readparam(bStr), so the equation is 20% * 100%(let's say your Str is 100) = M
  • So in the equation: 20 * 100 = (M becomes 2000) / 100 = Answer
  • Answer = 20
  • So 20% of 100 is 20

This one is easy if rAthena can use float but the sad thing is.. The script only accept integers.. Easiest way is readparam(bStr)*0.20 wherein 0.20 is float.

how about this one sir how to put in item_db 
if refine +8 and above increase damage to demihuman monster by 8%

 

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