SphereCommunity
attr_can_decay help - Printable Version

+- SphereCommunity (https://forum.spherecommunity.net)
+-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d)
+--- Forum: Script Help (/Forum-Script-Help)
+--- Thread: attr_can_decay help (/Thread-attr-can-decay-help)



attr_can_decay help - Osi - 02-09-2015 10:05 PM

[ITEMDEF i_test2]
NAME=Super Duper Wand of Fire and Brimstone !turbo!
ID=i_wand_1
TYPE=t_wand

RESOURCES=i_wand,10 i_scroll_flamestrike
ERROR:(test.scp,359)Undefined symbol 'i_wand'
ERROR:(test.scp,359)Bad resource list id 'i_wand,10 i_scroll_flamestrike' ??

RESOURCES=i_wand_1,10 i_scroll_flamestrike what I did and why its working Lol ?


ON=@Create
ATTR=attr_magic
MOREX=s_flamestrike
MOREY=50.0
MORE2=10

Code:
on=@Timer
ATTR=attr_can_decay 10 (10 sec?)
IF (<@equip <src.timer <= 0> remove.src.i_test2>)
&&
Code:
ON=@Create
ATTR=attr_magic|attr_decay
MOREX=s_flamestrike
MOREY=50.0
MORE2=10
timer 100

on=@equip
timer 10

on=@timer
RETURN 1



RE: attr_can_decay help - Jim - 02-10-2015 04:53 PM

You can use "i_wand_1", because there is a item that use "i_wand_1" as the DEFNAME in your script pack.
But there is NOT a item that use "i_wand" as the DEFNAME in your script pack.
Unless you define a new item and use the "i_wand" as the defname.

And about the decay, if you use the "RETURN 1" in @timer trigger, then item will NOT decay when the timer reach Zero