karma 
Moderator
   
Posts: 178
Likes Given: 17
Likes Received: 32 in 29 posts
Joined: Jul 2012
Reputation: 3
![]()
|
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 |
|
|