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
Khaos
Master
**

Posts: 595
Likes Given: 166
Likes Received: 83 in 51 posts
Joined: Mar 2012
Reputation: 11



Post: #19
RE: putting cooldown on scrolls
Code:
[SKILLCLASS 23]

DEFNAME=Class_human_arch_mage
NAME=Arch Mage
//EVENTS=e_human_arch_mage
STATSUM=260
SKILLSUM=10000.0
STR=70
INT=95
DEX=90
Alchemy=100.0
Anatomy=100.0
AnimalLore=100.0
ItemId=100.0
ArmsLore=100.0
Parrying=100.0
Begging=100.0
Blacksmithing=100.0
Bowcraft=100.0
Peacemaking=100.0
Camping=100.0
Carpentry=100.0
Cartography=100.0
Cooking=100.0
DetectingHidden=100.0
Enticement=100.0
EvaluatingIntel=100.0
Healing=100.0
Fishing=100.0
Forensics=100.0
Herding=100.0
Hiding=100.0
Provocation=100.0
Inscription=100.0
LockPicking=100.0
Magery=100.0
MagicResistance=100.0
Tactics=100.0
Snooping=100.0
Musicianship=100.0
Poisoning=100.0
Archery=100.0
SpiritSpeak=100.0
Stealing=100.0
Tailoring=100.0
Taming=100.0
TasteId=100.0
Tinkering=100.0
Tracking=100.0
Veterinary=100.0
Swordsmanship=100.0
Macefighting=100.0
Fencing=100.0
Wrestling=100.0
Lumberjacking=100.0
Mining=100.0
Meditation=100.0
Stealth=100.0
RemoveTrap=100.0
Necromancy=100.0
Focus=100.0
Chivalry=100.0
Bushido=100.0
Ninjitsu=100.0
Spellweaving=100.0
Mysticism=100.0
Imbuing=100.0
Throwing=100.0

ON=@ItemEquipTest
if (<act.tdata3> == 1||3||4||5)
src.smsg You can't equip this armor.
return 1
endif

on=@SpellCast
if (<argo.type> == t_spellbook)
if (<argn1> == 0||25||26||30)
smsg You do not know how that magic works.
return 1
endif
endif

if (<argo.type> == t_scroll)
if (<findlayer.layer_memory.baseid> == i_memory_scroll_cooldown)
  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)
  serv.newitem i_memory_scroll_cooldown,,<uid>
  new.timer = 5
endif
if (<argn1> == s_poison)
  serv.newitem i_memory_scroll_cooldown,,<uid>
  new.timer = 7
endif
endif


try this

You were running 2 @SpellCast triggers which the first one was exiting off the second call with return 1 and return 0. I also cleaned up your allowed spells as well. This should run smoother. Let me know if there are any errors.

Added another check for spellbook casting versus scroll.

Added spell check for spell 0 to not be allowed.
(This post was last modified: 02-18-2016 01:37 PM by Khaos.)
02-18-2016 11:49 AM
Find all posts by this user Like Post Quote this message in a reply
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: 6 Guest(s)