![]() |
Weap with spelleffect lightning - Printable Version +- SphereCommunity (https://forum.spherecommunity.net) +-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d) +--- Forum: Script Help (/Forum-Script-Help) +--- Thread: Weap with spelleffect lightning (/Thread-Weap-with-spelleffect-lightning) |
Weap with spelleffect lightning - Aeldaven - 08-27-2014 10:17 AM Hello, i try to upgrade this old tus script on sphere 56c. this is the old script working good on Tus [6014] NAME= Gold Halbert of Lightning //Halberd //Using Sword type below ID=143e TYPE=13 DAM=50-75 HITPOINTS=31-80 SPEED=20 SKILL=Swordsmanship REQSTR=45 TWOHANDS=Y BUYVALUE=64-82 SELLVALUE=32-41 MATERIALS=20 ingots MATERIALS=20 WEIGHT=5 COLOR=05d ATTR=21 MOREP=0,7,0 ONTRIGGER=DAMAGE VAR.X=RAND(4) IF X==1 SOUND=SPELL_LIGHTNING SRC.SPELLEFFECT 30 550 ENDIF RETURN 0 CATEGORY=+Helios+ Items SUBSECTION=Light Weapons DESCRIPTION=Halbert _________________________________________________ This is my test with no lightning and no message [ITEMDEF i_light_Halberd] ID=i_halberd DEFNAME=i_light_Halberd TYPE=t_weapon_sword DAM=50,75 FLIP=1 SKILL=Swordsmanship SPEED=20 VALUE=50000 WEIGHT=5.0 TWOHANDS=Y RESOURCES=20 i_ingot_iron,2 i_board SKILLMAKE=Blacksmithing 75.0 ON=@Create HITPOINTS=100 COLOR = 05d NAME=Halberd of Lightning ATTR = 21 MOREY = 7 on=@Equip src.message Il potere del Fulmine scorre nelle tue mani! on=@Hit IF (rand(4)) == 1 SRC.SpellEffect=s_lightning,100.0,<uid> SOUND=snd_SPELL_LIGHTNING MESSAGE test ok!!! Return 1 Endif CATEGORY=+Helios+ Items SUBSECTION=Armi Light DESCRIPTION=Halberd ______________________________________________ I need a +7 magic halberd, with lightning cast at 25% random. Tnx all for reply. RE: Weap with spelleffect lightning - Extreme - 08-27-2014 10:42 AM +7 => MOREY=47 ON=@DAMAGE IF <R4> SRC.SpellEffect=s_lightning,100.0,<uid> SRC.SOUND=snd_SPELL_LIGHTNING MESSAGE test ok!!! Return 1 Endif RE: Weap with spelleffect lightning - Aeldaven - 08-27-2014 11:24 AM on=@Damage IF !<R4> SRC.SpellEffect=s_lightning,100.0,<CONT.uid> SRC.SOUND=snd_SPELL_LIGHTNING SRC.MESSAGE test ok!!! Return 1 Endif This should work. RE: Weap with spelleffect lightning - XuN - 08-27-2014 04:36 PM @Damage trigger is fired when the weapon RECEIVE damage, which not always happen in the hit proccess, use @Hit. If you mean the visual effect of the lightning add this line to the trigger: src.effect 1,1 RE: Weap with spelleffect lightning - Aeldaven - 08-27-2014 05:21 PM Working now ^_^ ty Code: ON=@Damage @XuN i have try with @hit trig, but not work Code: ON=@Hit Tnx all for helping!!! RE: Weap with spelleffect lightning - Rizz - 08-27-2014 05:58 PM (08-27-2014 05:21 PM)Aeldaven Wrote: Working now ^_^ ty http://wiki.sphere.torfo.org/index.php/@Hit This trigger fires when a character hits someone using a combat skill. So you have to use @hit inside an [EVENTS] and add it to all of your chars. RE: Weap with spelleffect lightning - Aeldaven - 08-27-2014 11:31 PM @Rizz tnx better now. Code: [events e_light_weap] tnx tnx tnx ^_^ |