Jump to content

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


QQfoolsorellina

Recommended Posts


  • Group:  Members
  • Topic Count:  40
  • Topics Per Day:  0.01
  • Content Count:  587
  • Reputation:   104
  • Joined:  11/19/11
  • Last Seen:  

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


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

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

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  19
  • Topics Per Day:  0.00
  • Content Count:  713
  • Reputation:   70
  • Joined:  11/08/11
  • Last Seen:  

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

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

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

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

Edited by AnnieRuru
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  40
  • Topics Per Day:  0.01
  • Content Count:  587
  • Reputation:   104
  • Joined:  11/19/11
  • Last Seen:  

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:

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  19
  • Topics Per Day:  0.00
  • Content Count:  713
  • Reputation:   70
  • Joined:  11/08/11
  • Last Seen:  

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

that would be more convenient :lol:

sc_start can be used inside any script, not only in items ^^

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  31
  • Topics Per Day:  0.01
  • Content Count:  666
  • Reputation:   93
  • Joined:  04/27/12
  • Last Seen:  

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.

Link to comment
Share on other sites

  • 1 year later...

  • Group:  Developer
  • Topic Count:  153
  • Topics Per Day:  0.04
  • Content Count:  2285
  • Reputation:   745
  • Joined:  06/16/12
  • Last Seen:  

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

×
×
  • Create New...