The following warnings occurred:
Warning [2] Use of undefined constant SAPI_NAME - assumed 'SAPI_NAME' (this will throw an Error in a future version of PHP) - Line: 3388 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3388 errorHandler->error
/showthread.php 116 build_archive_link
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/inc/functions.php 3324 build_forum_breadcrumb
/showthread.php 195 build_forum_breadcrumb
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/showthread.php 195 build_forum_breadcrumb






Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
putting cooldown on scrolls
Author Message
karma
Moderator
****

Posts: 178
Likes Given: 17
Likes Received: 32 in 29 posts
Joined: Jul 2012
Reputation: 3



Post: #2
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
Find all posts by this user Like Post Quote this message in a reply
[+] 1 user Likes karma's post
Post Reply 


Messages In This Thread
putting cooldown on scrolls - dunnetott - 02-18-2016, 01:37 AM
RE: putting cooldown on scrolls - karma - 02-18-2016 01:57 AM
RE: putting cooldown on scrolls - karma - 02-18-2016, 02:11 AM
RE: putting cooldown on scrolls - karma - 02-18-2016, 02:24 AM
RE: putting cooldown on scrolls - karma - 02-18-2016, 03:02 AM
RE: putting cooldown on scrolls - karma - 02-18-2016, 03:27 AM
RE: putting cooldown on scrolls - karma - 02-18-2016, 04:23 AM
RE: putting cooldown on scrolls - Khaos - 02-18-2016, 08:04 AM
RE: putting cooldown on scrolls - Khaos - 02-18-2016, 08:32 AM
RE: putting cooldown on scrolls - karma - 02-18-2016, 08:44 AM
RE: putting cooldown on scrolls - Khaos - 02-18-2016, 08:52 AM
RE: putting cooldown on scrolls - Khaos - 02-18-2016, 11:49 AM
RE: putting cooldown on scrolls - Khaos - 02-19-2016, 09:39 AM
RE: putting cooldown on scrolls - Khaos - 02-19-2016, 11:35 AM
RE: putting cooldown on scrolls - Khaos - 02-19-2016, 12:20 PM
RE: putting cooldown on scrolls - Khaos - 02-19-2016, 01:01 PM
RE: putting cooldown on scrolls - Khaos - 02-20-2016, 01:42 PM
RE: putting cooldown on scrolls - Khaos - 02-21-2016, 09:36 AM

Forum Jump:


User(s) browsing this thread: 2 Guest(s)