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
Checking for spell casting
Author Message
karma
Moderator
****

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



Post: #7
RE: Checking for spell casting
In my server i added a TDATA3 property to each armor piece (you can also use a TAG if you wish):
0: cloth
1: leather
2: studded
3: ringmail
4: chainmail
5: plate
6: bone
7: dragon
etc..

Then you can check for the TDATA3 inside the SKILLCLASS block:
Code:
ON=@ItemEquipTest
IF (<SRC.TDATA3>==5)
SRC.SYSMESSAGE You can't equip this armor.
RETURN 1
ENDIF
You can also put the trigger directly inside the SKILLCLASS block without having to attach an event to it.


For the spell, you can dynamically get the number from the defname this way:
Code:
[FUNCTION spellNo] //ARGS=defname of the spell
RETURN <HVAL <ARGS>&(~0ca000000)>
(This post was last modified: 02-16-2016 08:59 PM by karma.)
02-16-2016 08:57 PM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Messages In This Thread
Checking for spell casting - dunnetott - 02-16-2016, 10:11 AM
RE: Checking for spell casting - Kanibal - 02-16-2016, 10:31 AM
RE: Checking for spell casting - dunnetott - 02-16-2016, 10:34 AM
RE: Checking for spell casting - Kanibal - 02-16-2016, 10:44 AM
RE: Checking for spell casting - Llirik - 02-16-2016, 04:16 PM
RE: Checking for spell casting - dunnetott - 02-16-2016, 07:06 PM
RE: Checking for spell casting - karma - 02-16-2016 08:57 PM
RE: Checking for spell casting - dunnetott - 02-16-2016, 09:04 PM
RE: Checking for spell casting - karma - 02-16-2016, 10:11 PM
RE: Checking for spell casting - dunnetott - 02-16-2016, 10:13 PM
RE: Checking for spell casting - Kanibal - 02-16-2016, 10:29 PM
RE: Checking for spell casting - dunnetott - 02-16-2016, 10:33 PM
RE: Checking for spell casting - karma - 02-16-2016, 11:55 PM
RE: Checking for spell casting - Llirik - 02-17-2016, 09:33 AM
RE: Checking for spell casting - Khaos - 02-17-2016, 04:31 PM
RE: Checking for spell casting - Llirik - 02-17-2016, 05:49 PM
RE: Checking for spell casting - Llirik - 02-18-2016, 12:01 AM
RE: Checking for spell casting - Khaos - 02-18-2016, 09:00 AM

Forum Jump:


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