![]() |
Checking for spell casting - Printable Version +- SphereCommunity (https://forum.spherecommunity.net) +-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d) +--- Forum: Script Help (/Forum-Script-Help) +--- Thread: Checking for spell casting (/Thread-Checking-for-spell-casting) Pages: 1 2 |
Checking for spell casting - dunnetott - 02-16-2016 10:11 AM im trying to check for a spell during casting so i can allow the spell depending on what spell is cast did something like this ON=@SPELLCAST if (<src.cast> == S_BLESS) return 0 else return 1 endif RE: Checking for spell casting - Kanibal - 02-16-2016 10:31 AM Code: on=@spellcast RE: Checking for spell casting - dunnetott - 02-16-2016 10:34 AM oh nice that works Thanks alot ^^ you dont happen to know how to disable a [skillclass x] to not be able to use say like a platemail? RE: Checking for spell casting - Kanibal - 02-16-2016 10:44 AM (02-16-2016 10:34 AM)dunnetott Wrote: you dont happen to know how to disable a [skillclass x] to not be able to use say like a platemail? ![]() Code: [skillclass x] UPD RE: Checking for spell casting - Llirik - 02-16-2016 04:16 PM on=@itemequiptest if <src.findid.i_ring_gold> say My precious! src.str += 1 endif ![]() Use this: ON=@Login if <src.skillclass>==x src.events e_class_x endif RE: Checking for spell casting - dunnetott - 02-16-2016 07:06 PM there is no way i could do something like on=@itemequiptest if (<src.findtype.t_armor_plate>) say you cannot wear that. endif or do i have to add items invidual ? RE: Checking for spell casting - karma - 02-16-2016 08:57 PM 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 For the spell, you can dynamically get the number from the defname this way: Code: [FUNCTION spellNo] //ARGS=defname of the spell RE: Checking for spell casting - dunnetott - 02-16-2016 09:04 PM how do i define tdata3? sorry just started to relearn sphere scripting been 12 years since i last used it. RE: Checking for spell casting - karma - 02-16-2016 10:11 PM In the definition of the item [ITEMDEF 0xxxx] DEFNAME=i_bone_chest //Example NAME=bone chest .. TDATA3=6 You have to put it before any trigger RE: Checking for spell casting - dunnetott - 02-16-2016 10:13 PM Code: [ITEMDEF 013bb] and i put this under the skillclass Code: ON=@ItemEquipTest and i get a console output Can't resolve <SRC.TDATA3> Undefined symbol |