Jump to content

Suggest to add a script command run item script inside npc script


Recommended Posts

Posted (edited)

for example

itemscript <duration tick> ,"{script...}";

We can use this script command to run item script inside npc script or item-used script (....,{here},{},{})

without disappeared when character is recalculated status until the duration tick expire.

Edited by QQfoolsorellina
Posted

http://rathena.org/wiki/Enable_items

/hmm

EDIT:

you mean enable to run *bonus inside npc script ....

I thought that should be done using sc_start ...

Thx, I dont knonw this way before you tell me .

14597,PhreeoniS,Phreeoni Scroll,2,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_ITEMSCRIPT,180000,4121; },{},{}

thank for the example

http://rathena.org/b...racters-status/

you should at least output topic link so people can understand o.O

IMHO, I don't even think that would be relative topic,just think a way to run

item script inside npc script before Annie and EvilPuncker tell me the 'sc_itemscript'

but if ra has a script can run additional item script without creating new item

that would be more convenient :lol:

Posted

I still think there should be the addition of this "new" command. Because currently:

sc_start sc_itemscript,<duration>,<item_id>;

Only allows you to run scripts already existant in an item, if i'm not mistaken. Even though, sc_start is useable via NPC, your still limited to pre-existing scripts.

I suggest, that this command be created+implemented because then, we can add things on the fly. Granted something similar can be achieved via functions, there is still the issue with adding/resetting stats. So, atleast with this command, we can eliminate the need to do an infinite loop to make sure the effect stays.

  • 1 year later...
Posted

Implemented 99098c1

*bonus_script "<script code>",<duration>{,<flag>{,<type>{,<char_id>}}};
 
This command attachs script to player within specified 'duration' in second.
 
flag:
&1: Remove when dead
&2: Removable by dispell
&4: Removable by clearance
[TODO] &8: Save script when player logout and continue when player login back
 
type:
0 = Buff
1 = Debuff
 
NOTE:
- Cannot stack same bonus
- Max. bonus_script for a player is 10 (pc.h MAX_PC_BONUS_SCRIPT)
 
Example:
- Apple gives you +5 Str bonus for 1 minute when it's consumed.
  512,Apple,Apple,0,15,,20,,,,,0xFFFFFFFF,63,2,,,,,,{ bonus_script "{ bonus bStr,5; }",60; },{},{}
  • Upvote 1
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...