RanXerox 
Master
 
Posts: 550
Likes Given: 1
Likes Received: 12 in 9 posts
Joined: Dec 2010
Reputation: 19
![]()
|
RE: Nice Effects (spells and more) collection.
Here is another Meteor Swarm example. To use it in-game type:
.f_meteor_swarm X
...where X is a number from 0 to 8.
The major problem with this script (and any script that uses packet 0c0) is that they don't work on maps other than 0 and 1 for some reason...
Code:
//////////////////
// Meteor Swarm //
//////////////////
[DEFNAME meteor_swarm_settings]
MeteorType0_Name=Rock
MeteorType0_Radius=10
MeteorType0_FallingID=01363//i_trap_boulder
MeteorType0_FallingAmount=30
MeteorType0_FallenID=random_rock
MeteorType0_DamageType=dam_general|dam_magic
MeteorType0_DamageAmount=6,25
MeteorType1_Name=Fire
MeteorType1_Radius=10
MeteorType1_FallingID=i_fx_fireball
MeteorType1_FallingAmount=30
MeteorType1_FallenID={ 0398c 1 03996 1 }
MeteorType1_DamageType=dam_fire|dam_magic
MeteorType1_DamageAmount=6,25
MeteorType2_Name=Poison
MeteorType2_Radius=10
MeteorType2_FallingID=fx_fireball_yellow
MeteorType2_FallingAmount=30
MeteorType2_FallenID={ 03915 1 03920 1 }
MeteorType2_DamageType=dam_poison|dam_magic
MeteorType2_DamageAmount=6,25
MeteorType3_Name=Energy
MeteorType3_Radius=10
MeteorType3_FallingID=fx_fireball_blue
MeteorType3_FallingAmount=30
MeteorType3_FallenID={ 03946 1 03956 1 03967 1 03979 1 }
MeteorType3_DamageType=dam_energy|dam_magic
MeteorType3_DamageAmount=6,25
MeteorType4_Name=Blades
MeteorType4_Radius=10
MeteorType4_FallingID=037c4
MeteorType4_FallingAmount=30
MeteorType4_FallenID={ 08fe 1 08ff 1 0900 1 0901 1 0902 1 0904 1 0907 1 0908 1 090a 1 090b 1 090c 1 0f43 1 0f44 1 0f45 1 0f46 1 0f47 1 0f48 1 0f49 1 0f4a 1 0f4b 1 0f4c 1 0f4d 1 0f4e 1 0f51 1 0f52 1 0f5e 1 0f5f 1 0f60 1 0f61 1 0f62 1 0f63 1 013fa 1 013fb 1 013fe 1 013ff 1 01400 1 01401 1 01402 1 01403 1 01404 1 01405 1 02554 1 02558 1 0255b 1 0255d 1 0255e 1 0255f 1 02560 1 02564 1 02567 1 02570 1 02572 1 02573 1 02574 1 02575 1 02576 1 02577 1 02578 1 02579 1 0257a 1 0257b 1 0257c 1 0257d 1 0257e 1 0257f 1 026ba 1 026bb 1 026bc 1 026bd 1 026be 1 026bf 1 026c0 1 026c1 1 026c4 1 026c5 1 026c6 1 026c7 1 026c8 1 026c9 1 026ca 1 026cb 1 026ce 1 026cf 1 027a2 1 027a4 1 027a7 1 027ed 1 027ef 1 027f2 1 02d20 1 02d21 1 02d22 1 02d23 1 02d27 1 02d28 1 02d29 1 02d2c 1 02d2d 1 02d2e 1 02d2f 1 02d32 1 02d33 1 02d34 1 02d35 1 0406a 1 0406b 1 0406c 1 0406d 1 04071 1 04072 1 04073 1 04074 1 04075 1 04076 1 }
MeteorType4_DamageType=dam_physical|dam_magic
MeteorType4_DamageAmount=6,25
MeteorType5_Name=Blood
MeteorType5_Radius=10
MeteorType5_FallingID=0122a
MeteorType5_FallingAmount=30
MeteorType5_FallenID={ 0122a 1 0122b 1 0122c 1 0122d 1 0122e 1 01cf1 1 01cf2 1 01cf3 1 01cf4 1 01cf5 1 01cf6 1 01cf7 1 01cf8 1 01cf9 1 01cfa 1 01cfb 1 01cfc 1 01cfd 1 01cfe 1 01cff 1 01d00 1 01d01 1 01d02 1 01d03 1 01d04 1 01d05 1 01d06 1 01d07 1 01d08 1 01d09 1 01d0a 1 01d0b 1 01d0c 1 01d0d 1 01d0e 1 01d0f 1 01d10 1 01d11 1 01d12 1 }
MeteorType5_DamageType=dam_cold|dam_magic
MeteorType5_DamageAmount=1,5
MeteorType6_Name=Candy
MeteorType6_Radius=10
MeteorType6_FallingID=036f4
MeteorType6_FallingAmount=30
MeteorType6_FallenID={ i_cake 1 i_candycane_red 1 i_candycane_green 1 i_gingerbreadman 1 i_jellybeans 1 i_lollypop_red 1 i_lollypop_yellow 1 i_lollypop_green 1 i_candy_nougat 1 i_candy_taffy 1 i_candy_wrapped 1 i_cake_2 1 }
MeteorType6_DamageType=dam_cold|dam_magic
MeteorType6_DamageAmount=1,5
MeteorType7_Name=Crystal
MeteorType7_Radius=10
MeteorType7_FallingID=03660
MeteorType7_FallingAmount=30
MeteorType7_FallenID={ 0223b 1 0223c 1 0223d 1 0223e 1 0223f 1 02240 1 02241 1 02242 1 02243 1 02244 1 02245 1 02246 1 02247 1 02248 1 02249 1 }
MeteorType7_FallenID2={ 02206 1 02207 1 02208 1 02209 1 0220a 1 0220b 1 0220c 1 0220d 1 0220e 1 02210 1 02211 1 02212 1 02213 1 02214 1 02215 1 02216 1 02217 1 02218 1 0221a 1 0221b 1 0221c 1 0221d 1 0221e 1 0221f 1 02220 1 02221 1 02222 1 02224 1 02225 1 02226 1 02227 1 02228 1 02229 1 0222a 1 0222b 1 0222c 1 }
MeteorType7_DamageType=dam_cold|dam_magic
MeteorType7_DamageAmount=6,25
MeteorType8_Name=Runes
MeteorType8_Radius=10
MeteorType8_FallingID=03789
MeteorType8_FallingAmount=30
MeteorType8_FallenID={ 0483b 1 0483e 1 04841 1 04844 1 04847 1 0484a 1 0484d 1 04850 1 04853 1 04856 1 04859 1 0485c 1 0485f 1 04862 1 04865 1 04868 1 0486b 1 0486e 1 04871 1 04871 1 04874 1 04877 1 0487a 1 0487d 1 04880 1 04883 1 }
MeteorType8_DamageType=dam_magic
MeteorType8_DamageAmount=10,25
[FUNCTION f_meteor_swarm]
SERV.NEWITEM=i_meteor_swarm_timer
NEW.P=<P>
NEW.LINK=<UID>
NEW.TAG.MeteorType=<ARGV[0]>
IF !(<ISITEM>)
ANIM=16
NEW.MORE=<DEF.MeteorType<dARGV[0]>_FallingAmount>
ENDIF
NEW.TRIGGER @Timer
[ITEMDEF i_meteor_swarm_timer]
ID=i_rune_meteor_swarm
NAME=Meteor Swarm Timer
TYPE=t_eq_script
ON=@Create
COLOR=021
ATTR=attr_invis|attr_move_never
ON=@Click
RETURN 1
ON=@Timer
IF !(<MORE>)
REMOVE
RETURN 1
ENDIF
f_meteor_fall <LINK>,<TAG0.MeteorType>
MORE -= 1
TIMERD=4
RETURN 1
[FUNCTION f_meteor_fall]
LOCAL.FireballID=<DEF.MeteorType<dARGV[1]>_FallingID>
SERV.NEWITEM=i_target_tile
NEW.MOVENEAR <UID>,<DEF.MeteorType<dARGV[1]>_Radius>
NEW.TAG.MeteorType=<ARGV[1]>
NEW.TYPE=t_meteor_target
NEW.ATTR=attr_invis|attr_decay|attr_can_decay
NEW.LINK=<ARGV[0]>
NEW.TIMERD=6
LOCAL.FromX=<EVAL <NEW.P.X>-4>
LOCAL.FromY=<EVAL <NEW.P.Y>-7>
LOCAL.FromZ=<EVAL <NEW.P.Z>+50>
LOCAL.ToX=<NEW.P.X>
LOCAL.ToY=<NEW.P.Y>
LOCAL.ToZ=<NEW.P.Z>
FLEXEFFECT 0,<LOCAL.FireballID>,9,16,0,0,0,4,<dLOCAL.FromX>,<dLOCAL.FromY>,<dLOCAL.FromZ>,<dLOCAL.ToX>,<dLOCAL.ToY>,<dLOCAL.ToZ>,10
RETURN 1
[TYPEDEF t_meteor_target]
ON=@Timer
SERV.NEWITEM=i_target_tile
NEW.TAG.MeteorType=<TAG0.MeteorType>
NEW.TYPE=t_meteor_object
NEW.ATTR=attr_move_never|attr_decay|attr_can_decay
NEW.P=<P>
NEW.LINK=<LINK>
NEW.MORE1=1
NEW.TIMERD=1
NEW.f_meteor_swarm <TAG0.MeteorType>
SERV.NEWITEM=<DEF.MeteorType<dTAG0.MeteorType>_fallenID>
NEW.TYPE=t_normal
NEW.P=<P>
NEW.ATTR=attr_decay|attr_can_decay
NEW.LINK=<LINK>
NEW.TIMER=4
NEW.TAG.MeteorType=<LOCAL.MeteorType>
REMOVE
RETURN 1
[TYPEDEF t_meteor_object]
ON=@Step
IF !(<LINK>==<SRC.UID>)
LOCAL.DamageFlags=<EVAL <DEF.MeteorType<dTAG0.MeteorType>_DamageType>>
LOCAL.DamageAmount=<R<DEF.MeteorType<dTAG0.MeteorType>_DamageAmount>>
SERV.LOG Step Damage Amount=<dLOCAL.DamageAmount>
SRC.DAMAGE <dLOCAL.DamageAmount> <LOCAL.DamageFlags> <LINK>
ENDIF
ON=@Timer
IF (<MORE1>)
DORAND 11
SOUND=284
SOUND=285
SOUND=286
SOUND=287
SOUND=774
SOUND=775
SOUND=776
SOUND=777
ENDDO
TIMER=2
MORE1=0
LOCAL.DamageSource=<LINK>
FORCHARS 2
f_meteor_damage <LOCAL.DamageSource> <TAG0.MeteorType>
ENDFOR
RETURN 1
ENDIF
REMOVE
RETURN 1
[FUNCTION f_meteor_damage]
IF !(<ARGV[0]>==<UID>)
LOCAL.DamageFlags=<EVAL <DEF.MeteorType<dARGV[1]>_DamageType>>
LOCAL.DamageAmount=<R<DEF.MeteorType<dARGV[1]>_DamageAmount>>
SERV.LOG Hit Damage Amount=<dLOCAL.DamageAmount>
SRC.DAMAGE <LOCAL.DamageAmount> <LOCAL.DamageFlags> <ARGV[0]>
ENDIF
[FUNCTION flexeffect]
FORCHARS <ARGV[14]>
IF !(<BRAIN>)
SENDPACKET 0c0 <argv[0]> d0 d0 w<argv[1]> w<argv[8]> w<argv[9]> <argv[10]> w<argv[11]> w<argv[12]> <argv[13]> <argv[2]> <argv[3]> w0 <argv[6]> <argv[4]> d<argv[5]> d<argv[7]>
ENDIF
ENDFOR
It's not the map that causes problems with packet 0c0... I think the packet has issues with negative Z values. Anyone else noticed that and/or solved it?
(This post was last modified: 04-08-2013 05:46 AM by RanXerox.)
|
|
04-08-2013 05:04 AM |
|
|