Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Checking for spell casting
Author Message
Khaos
Master
**

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



Post: #18
RE: Checking for spell casting
Again,

Code:
on=@EquipTest
if (<src.skillclass> == <whatever_class>) && (<src.npc> == 0)
src.smsg You can't equip this armor.
return 1
endif

You missed my point. @Equip is fired AFTER @EquipTest, which @EquipTest is used to see if an item can be equipped or not. @Equip says it is already equipped and now we are processing what we are going to do now it is equipped.

No point in saying sorry if you didn't understand the point I was trying to make. Triggers parse in a specified order. Each trigger has its own functionality. Which I outlined what @EquipTest and @Equip do and the order they go in.

This could be handled on the skillclass itself:
Code:
[skillclass 42]
....

on=@ItemEquipTest
if (<act.type> == t_armor||t_leather_armor) && (<act.tdata3> == 3) // Just using the example above of the person who set the armor type in the tdata3.
src.smsg You can't equip this armor.
return 1
endif

Anyone who has this skillclass won't be able to use said item that way.

Edited this a few times. The original code I redid now checks for brain_player and skillclass. The second one is fired from the player on their skillclass.

The first is fired on every item using that trigger if it is equipped (player and npc). The second only fires on players equipping items (though it will check every armor they equip). The first is OPTIMAL if you don't have your Mobiles equipping a lot of armor. If you have mobiles equipping armor on your server, you might just want to parse it on the player instead.
(This post was last modified: 02-18-2016 09:34 AM by Khaos.)
02-18-2016 09:00 AM
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: 2 Guest(s)