Shield with magic reflect @equip - Printable Version +- SphereCommunity (https://forum.spherecommunity.net) +-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d) +--- Forum: Script Help (/Forum-Script-Help) +--- Thread: Shield with magic reflect @equip (/Thread-Shield-with-magic-reflect-equip) |
Shield with magic reflect @equip - Aeldaven - 08-07-2014 02:01 PM Hi, sorry for my easy question but i'm noob and i found no result in search. i need to add magic reflect spell, @equip @dclick on order shield. This is my shield [ITEMDEF 01bc4] DEFNAME=i_shield_order TYPE=t_shield VALUE=220000 FLIP=1 RESOURCES=4 i_ingot_silver, 8 i_ingot_blackrock, 2 i_ingot_gold WEIGHT=1 ARMOR=30 REQSTR=0 DUPELIST=01bc5 CATEGORY=Provisions - Armor SUBSECTION=Shields DESCRIPTION=Order Shield ON=@Create ATTR=attr_magic|attr_move_always // no smelting. HITPOINTS={101 115} ON=@EQUIP TIMERD=1 ON=@TIMER IF !(<TOPOBJ.NPC>) && (<TOPOBJ.ISCHAR>) && (0<TOPOBJ.UID>) && (0<CONT.UID>) IF (<TOPOBJ.GM>) RETURN 1 ENDIF IF (0<TOPOBJ.MEMORYFINDTYPE.memory_guild.UID>) IF (<TOPOBJ.MEMORYFINDTYPE.memory_guild.LINK.ALIGN>==1) TOPOBJ.SOUND=SND_SPELL_EXPLOSION ELSE TOPOBJ.SOUND=SND_SPELL_LIGHTNING TOPOBJ.EFFECT=1,1 VAR.X=<EVAL <TOPOBJ.HITPOINTS> /2> TOPOBJ.DAMAGE=<VAR.X> 0001 <TOPOBJ.UID> TOPOBJ.SYSMESSAGE=Your guild alignment must be Order to wear this shield. CONT=<TOPOBJ.FINDLAYER.(21).UID> ENDIF ELSE TOPOBJ.SOUND=SND_SPELL_LIGHTNING TOPOBJ.EFFECT=1,1 VAR.X=<EVAL <TOPOBJ.HITPOINTS> /2> TOPOBJ.DAMAGE=<VAR.X> 0001 <CONT.UID> TOPOBJ.SYSMESSAGE=You need to be part of an Order guild to wear this shield. CONT=<TOPOBJ.FINDLAYER.(21).UID> ENDIF RETURN 1 ENDIF tnx all RE: Shield with magic reflect @equip - XuN - 08-07-2014 05:28 PM Maybe you can explain yourself a little better, I don't get what do you want ... this shield to give magic reflection spell when you @equip and double click it? RE: Shield with magic reflect @equip - Aeldaven - 08-07-2014 07:42 PM yes Xun, i speak a bad english i know... i need the shield cast magic reflect @equip RE: Shield with magic reflect @equip - XuN - 08-07-2014 08:30 PM Look at the code from the shield in the default script pack: Code: ON=@EquipTest //You do checks here BEFORE equipping it, so anyone wich is not in ORDER guild can NOT equip it With this code you can remove your timerd=1 in the @Create and the whole @Timer trigger. And here you have what you want ... ON=@Equip SRC.SpellEffect=s_magic_reflection,100.0,<uid> Additionally you can make it to only cast the spell once each X seconds: Code: ON=@Equip RE: Shield with magic reflect @equip - Aeldaven - 08-08-2014 09:27 PM it's perfect now tnx |