Jump to content
  • 0

Bonus Percent


alexander03

Question


  • Group:  Members
  • Topic Count:  46
  • Topics Per Day:  0.03
  • Content Count:  154
  • Reputation:   0
  • Joined:  01/03/20
  • Last Seen:  

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

 

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 1

  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  477
  • Reputation:   269
  • Joined:  06/13/17
  • Last Seen:  

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
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  46
  • Topics Per Day:  0.03
  • Content Count:  154
  • Reputation:   0
  • Joined:  01/03/20
  • Last Seen:  

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 ?

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  46
  • Topics Per Day:  0.03
  • Content Count:  154
  • Reputation:   0
  • Joined:  01/03/20
  • Last Seen:  

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%

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  477
  • Reputation:   269
  • Joined:  06/13/17
  • Last Seen:  

if( getrefine()>=8 ){ bonus2 bAddRace,RC_Player,8; bonus2 bAddRace,RC_DemiHuman,8; }

 

  • Upvote 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  46
  • Topics Per Day:  0.03
  • Content Count:  154
  • Reputation:   0
  • Joined:  01/03/20
  • Last Seen:  

30 minutes ago, Haruka Mayumi said:

if( getrefine()>=8 ){ bonus2 bAddRace,RC_Player,8; bonus2 bAddRace,RC_DemiHuman,8; }

 

is this the refine +8 and above sir?

 

Link to comment
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.   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.

×
×
  • Create New...