Jump to content
  • 0

Item script (bonus per refine rate)


sietse11

Question


  • Group:  Members
  • Topic Count:  44
  • Topics Per Day:  0.01
  • Content Count:  127
  • Reputation:   7
  • Joined:  02/10/13
  • Last Seen:  

Hey, i wanne test an item script I still have to write.

problem one, item_bonus.txt cant find refine.

 

So im taking this problem here.

 

I want this bonus,

 

increase matk by # x refinement lvl

decrease cast time by # x refinement lvl

 

so i need to use like

 

{bonus bFixedcastrate,(2xrefinementlvl), bonus bVariableCastrate,(2xrefinementlvl), bonus bMatk,(4xrefinementlvl)}{}{}

How do I make it check refinement lvl?

Edited by sietse11
Link to comment
Share on other sites

12 answers to this question

Recommended Posts


  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  

bonus bFixedCastrate,2*getrefine(), bonus bVariableCastrate,2*getrefine(), bonus bMatk,4*getrefine();

should be

bonus bFixedCastrate,2*getrefine(); bonus bVariableCastrate,2*getrefine(); bonus bMatk,4*getrefine();
  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  28
  • Topics Per Day:  0.01
  • Content Count:  353
  • Reputation:   70
  • Joined:  07/14/12
  • Last Seen:  

getrefine();

 

getrefine();

here's a good example

 

1644,Piercing_Staff_M,Staff of Piercing,4,20,,500,80:145,,1,0,0x00018314,2,2,2,3,70,1,10,{ bonus bInt,4; bonus bIgnoreMdefRate,10+getrefine(); },{},{}

 

 

so according to your statement above it should be like this

 

 

{ bonus bFixedcastrate,2*getrefine(), bonus bVariableCastrate,2*getrefine(), bonus bMatk,4*getrefine(); }{}{}
Edited by icabit
  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  44
  • Topics Per Day:  0.01
  • Content Count:  127
  • Reputation:   7
  • Joined:  02/10/13
  • Last Seen:  

many thx, didnt get anywhere myself, only found examples of if refinement is higher then Y.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  28
  • Topics Per Day:  0.01
  • Content Count:  353
  • Reputation:   70
  • Joined:  07/14/12
  • Last Seen:  

many thx, didnt get anywhere myself, only found examples of if refinement is higher then Y.

 

i learned item scripting via copying item scripts from normal items then modifying them to the one i need

 

check this for item effect list

https://rathena.svn.sourceforge.net/svnroot/rathena/trunk/doc/item_bonus.txt

Edited by icabit
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  44
  • Topics Per Day:  0.01
  • Content Count:  127
  • Reputation:   7
  • Joined:  02/10/13
  • Last Seen:  

Oh lordy im getting an error.....

 

[Error] itemdb_readdb: invallid format (Script column) in line 16 of "db/item_db2.txt" (item with ID 31008), skipping....

hate those lines

If im reading this right im made an error in the script. inside {}

 

31008,ab_c,ab c,4,10,5,50,45:120,,1,2,0x02000000,15,2,,45,1,1,{ bonus bFixedCastrate,2*getrefine(), bonus bVariableCastrate,2*getrefine(), bonus bMatk,4*getrefine();},{},{}
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  44
  • Topics Per Day:  0.01
  • Content Count:  127
  • Reputation:   7
  • Joined:  02/10/13
  • Last Seen:  

haha yeah just found that one out, also forgot 1, and item equip location. works like a charm now. thanks =D

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  28
  • Topics Per Day:  0.01
  • Content Count:  353
  • Reputation:   70
  • Joined:  07/14/12
  • Last Seen:  

xD i missed 2 of these ;

i just copy pasted it from TS anyway there u go :D

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.00
  • Content Count:  326
  • Reputation:   47
  • Joined:  04/01/12
  • Last Seen:  

bonus bFixedCastrate,2*getrefine(), bonus bVariableCastrate,2*getrefine(), bonus bMatk,4*getrefine();

should be

bonus bFixedCastrate,2*getrefine(); bonus bVariableCastrate,2*getrefine(); bonus bMatk,4*getrefine();

 

are you guys adding more varcastrate? i think its

 

 

"bonus bVariableCastrate,-2*getrefine()"

 

 

might confuse him lol

 

Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  

You're right he must put a - for decrease the cast time

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  44
  • Topics Per Day:  0.01
  • Content Count:  127
  • Reputation:   7
  • Joined:  02/10/13
  • Last Seen:  

Haha yeah about that.

 

I tested this

bonus bFixedCastrate,2*getrefine(), bonus bVariableCastrate,2*getrefine(), bonus bMatk,4*getrefine();

And changed it into this

bonus bFixedCastrate,2*getrefine(); bonus bVariableCastrate,2*getrefine(); bonus bMatk,4*getrefine();

Did a live test, cast time was so epicly long - specially since I had 2 items +20 equiped with this effect

So I did this

bonus bFixedCastrate,-5*getrefine(); bonus bVariableCastrate,-5*getrefine(); bonus bMatk,4*getrefine();

But on my +20 gear this resulted in insta cast madness

So I tested this

bonus bFixedCastrate,2.5*getrefine(); bonus bVariableCastrate,2.5*getrefine(); bonus bMatk,4*getrefine();

Offcourse mapserver now tells me I cant use .

So I changed it to this

bonus bFixedCastrate,-5*getrefine()/2; bonus bVariableCastrate,-5*getrefine()/2; bonus bMatk,4*getrefine();

Works like a charm

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.00
  • Content Count:  326
  • Reputation:   47
  • Joined:  04/01/12
  • Last Seen:  

bonus bVariableCastrate,-5*getrefine()/2

do take note that

(-5*1)/2 = -2 not 2.5

(-5*3)/2 = -7 not 7.5

they are rounded off

just a tip /gawi

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  44
  • Topics Per Day:  0.01
  • Content Count:  127
  • Reputation:   7
  • Joined:  02/10/13
  • Last Seen:  

haha good to know. i was wondering if they got converted to doubles.

Still the end result should be 50% redux, so my math still works out as intended.

 

Eventually I want to release this as a custom ninja weapon.

But im just not sure, since they can dual wield now.

I made this way to OP to actually implement, but its funny as GM gear :D

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