Khaos 
Master
 
Posts: 595
Likes Given: 166
Likes Received: 83 in 51 posts
Joined: Mar 2012
Reputation: 11
![]()
|
RE: putting cooldown on scrolls
Code:
on=@SpellCast
if (<argo.type> == t_spellbook) // Make sure the spell is being cast from a spellbook,
if (<argn1> == 0||25||26||30) // Spell numbers which your script omitted, which led me to believe you didn't want them used
smsg You do not know how that magic works.
return 1
endif
endif
Code:
if (<argo.type> == t_scroll) // checks to be sure a scroll is being used.
if (<findlayer.layer_memory.baseid> == i_memory_scroll_cooldown) // check for cooldown memory (This section parses if there is one)
src.smsg You cannot use a scroll again til <findlayer.layer_memory.baseid.i_memory_scroll_cooldown.timer> seconds.
return 1
endif
if (<argn1> == s_flamestrike||s_fireball) // sample spells you asked for to provide a cooldown
serv.newitem i_memory_scroll_cooldown,,<uid> // adds a cooldown
new.timer = 5 // timer of cooldown
endif
if (<argn1> == s_poison) // other test spell from scroll.
serv.newitem i_memory_scroll_cooldown,,<uid> // adds cooldown
new.timer = 7 // timer of cool down
endif
endif
What errors are you getting? And do you have anything else affecting @SpellCast in another script. Just the original you had @SpellCast trigger twice in ONE script.
|
|
02-19-2016 09:39 AM |
|
|