karma
Moderator
Posts: 178
Likes Given: 17
Likes Received: 32 in 29 posts
Joined: Jul 2012
Reputation: 3
|
RE: putting cooldown on scrolls
Instead of creating a new spell each time, you can create an event and use @SpellSelect:
Code:
ON=@SpellSelect
IF (<ARGO.TYPE>==t_scroll)
ARGN2 /= 2 //50% mana
ENDIF
When you drink a potion, a memory is created and placed in the layer_flag_potionused. If you already have the memory, you can't drink. The memory has a TIMER, when it reaches 0 the memory is removed and you can drink again. Potions won't stack probably because they have not the correct flag in tiledata.mul. Be ware that if you stack the potions, the MORE2 (potency of the spell casted) will change (it will be the mean value of the MORE2 of the two items?)
If you want to set the cooldown for every scroll regardless to the spell casted you can do this:
Code:
[ITEMDEF i_memory_scroll_cooldown]
ID=i_memory
TYPE=t_eq_script
NAME=Memory scroll cooldown
ON=@Timer
REMOVE
RETURN 1
[TYPEDEF t_scroll]
IF (<SRC.RESTEST 1 i_memory_scroll_cooldown>)
SRC.SYSMESSAGE You can't use a scroll yet!
RETURN 1
ENDIF
SERV.NEWITEM i_memory_scroll_cooldown,1,<SRC.UID>
NEW.TIMER = 5 //your cooldown
|
|
02-18-2016 01:57 AM |
|
The following 1 user Likes karma's post:1 user Likes karma's post
Khaos (02-18-2016)
|