Khaos 
Master
 
Posts: 595
Likes Given: 166
Likes Received: 83 in 51 posts
Joined: Mar 2012
Reputation: 11
![]()
|
RE: putting cooldown on scrolls
Set the server into debug mode and grab me the information from that when you attempt to try this. By the looks of things, it should be working. Going to go into your github and take a look and see if I can find anything else calling @SpellCast. Because it feels like something else is overwriting the trigger, especially if you are not getting any errors in casting, triggers, or memory item creation. The code is no different than what anyone else has tried giving you, just a bit cleaner.
Try this as well
Code:
[typedef t_scroll]
on=@DClick
if (<src.findlayer.layer_special.baseid> == i_memory_scroll_cooldown)
src.smsg You cannot use a scroll again til <src.findlayer.layer_special.baseid.i_memory_scroll_cooldown.timer> seconds.
return 1
endif
if (<morex> == 57) // We are going to try to pull the spell from the # itself to make sure defname isn't being bypassed.
serv.newitem i_memory_scroll_cooldown,,<src.uid>
new.timer = 30
endif
Also, when you dclick the scroll. Use .EDIT and target whoever is doing it. Look for the memory item of i_memory_scroll_cooldown and make sure it is getting added to the character using the scroll. Then double check the timer.
shadowrealmdefs.scp
Not sure how you can test anything when you have the entire t_scroll section of code commented out. That would be a huge reason it won't work.
Also, you don't need to comment out all those lines when you want to temp remove something. Just change [typedef t_scroll] to [comment typedef t_scroll]
(This post was last modified: 02-20-2016 01:59 PM by Khaos.)
|
|
02-20-2016 01:42 PM |
|
|