Jump to content
  • 0

ItemScript Sample


Question

Posted

Hi, 

I want to add a rental item like scrolls, For example Tao Gunka Scroll but with modified effect. What i did is just copy the script from Tao Gunka Card and paste it like this below: But it doesn't seems to work.. Can some one point me into the right direction to execute this kind of script.

Modified

TaogunkaS,Tao Gunka Scroll,2,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_ITEMSCRIPT,180000, bonus bMaxHPrate,80; bonus bDef,-30; bonus bMdef,-30; ; },{},{}  

 

Original Script

TaogunkaS,Tao Gunka Scroll,2,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_ITEMSCRIPT,180000,4302; },{},{} 

4 answers to this question

Recommended Posts

  • 0
Posted

Try this, 

1. Make a custom card with modified itemscript tao gunka you wanted.

2. Change 4302 to the id of custom card that your modified bonus.

Let say i make the new custom card and register it as id 4401. 

sc_start SC_ITEMSCRIPT,180000,4302;

Replace 4302 to 4401.  Reloaditem and try.

 

 

  • 0
Posted
4 hours ago, Feedback said:

@Arok You just removed the tao gunka effect...

 

What i want is to use the tao gunka effect but modified..

You'd probably be better off using bonus_script.
https://github.com/rathena/rathena/blob/master/doc/script_commands.txt#L5491

Have you tried just spawning the Tao card as a rental item. I can't remember if that works.

If all else fails.

if( player_tick > gettimetick(2) ){ bonus bMaxHPrate,80; bonus bDef,-30; bonus bMdef,-30; } else player_tick = 0;

Then when you give the players the card set player tick.

player_tick = gettimetick(2) + 60 * 60 * 24; //24 hours.

That's all I can think of right now but there's probably something I'm missing. :) 

  • -1
Posted (edited)

test this

 

TaogunkaS,Tao Gunka Scroll,2,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_ITEMSCRIPT,180000,4302; bonus bMaxHPrate,80; bonus bDef,-30; bonus bMdef,-30;},{},{} 

Edited by Arok

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