SphereCommunity
Sendpacket question - Printable Version

+- SphereCommunity (https://forum.spherecommunity.net)
+-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d)
+--- Forum: Script Help (/Forum-Script-Help)
+--- Thread: Sendpacket question (/Thread-Sendpacket-question)



Sendpacket question - Jonaleth - 08-11-2014 09:45 PM

I am not sure if this is the place to ask this question, but...

I am working with some custom spells and trying to create good looking effects. When it comes to effect such as meteor shower or other effects involving objects falling from above.

This is a script I found that made me very interested in how it works;

Code:
[EVENTS e_hellcaller]
ON=@HITTRY
SRC.damage <EVAL {5 8}>,0001,<UID>,Fire
SRC.column_fire {colors_green 1 colors_red 1 colors_yellow 1 colors_black 1}
RETURN 1

[FUNCTION column_fire]
VAR.Y1=<EVAL <P.Y>+-8>
VAR.X1=<EVAL <P.X>+-8>
VAR.Z1=<EVAL <P.Z>+40>
var.column_args=i_fx_fireball,<ARGV[0]>,020,0,0,0,0
CASTER_Column_effect 1,-1,-1,10
CASTER_Column_effect 1,-1,1,10
CASTER_Column_effect 1,-1,0,10
CASTER_Column_effect 2,-1,-1,10
CASTER_Column_effect 2,-1,1,10
CASTER_Column_effect 2,-1,0,10
CASTER_Column_effect 3,-1,-1,10
CASTER_Column_effect 3,-1,1,10
CASTER_Column_effect 3,-1,0,10
CASTER_Column_effect 4,0,0,10
CASTER_Column_effect 4,0,1,10
CASTER_Column_effect 4,0,-1,10
CASTER_Column_effect 5,0,0,10
CASTER_Column_effect 5,0,1,10
CASTER_Column_effect 5,0,-1,10
CASTER_Column_effect 6,0,0,10
CASTER_Column_effect 6,0,1,10
CASTER_Column_effect 6,0,-1,10
CASTER_Column_effect 7,1,0,10
CASTER_Column_effect 7,1,-1,10
CASTER_Column_effect 7,1,1,10
CASTER_Column_effect 8,1,0,10
CASTER_Column_effect 8,1,-1,10
CASTER_Column_effect 8,1,1,10
CASTER_Column_effect 9,1,0,10
CASTER_Column_effect 9,1,-1,10
CASTER_Column_effect 9,1,1,10
VAR.Y1=<EVAL <P.Y>>
VAR.X1=<EVAL <P.X>>
VAR.Z1=<EVAL <P.Z>+4>
var.column_args=i_fire,<ARGV[0]>,020,0,0,0,0
CASTER_Column_effect 1,-3,-3,10
CASTER_Column_effect 1,-3,-1,10
CASTER_Column_effect 1,2,-3,10
CASTER_Column_effect 1,2,-1,10
CASTER_Column_effect 1,-1,1,10
CASTER_Column_effect 1,-1,0,10
CASTER_Column_effect 1,1,0,10
CASTER_Column_effect 1,1,1,10
CASTER_Column_effect 1,0,3,10
CASTER_Column_effect 1,0,-2,10
CASTER_Column_effect 1,-2,1,10
CASTER_Column_effect 1,-2,-1,10
CASTER_Column_effect 1,3,-2,10
CASTER_Column_effect 1,3,0,10
var.column_args=
VAR.Y1=
VAR.X1=
VAR.Z1=

[FUNCTION CASTER_Column_effect]
Column_Effect <var.column_args>,<ARGV[0]>,<EVAL <P.Y>+<ARGV[1]>>,<EVAL <P.X>+<ARGV[2]>>,<EVAL <P.Z>+<ARGV[3]>>

[FUNCTION Column_Effect]
forclients 8
sendpacket 0c0 00 D<argv[5]> D<argv[3]> W<argv[0]> W<EVAL <VAR.X1>> W<eval <VAR.Y1>> B<EVAL <VAR.Z1>> W<EVAL <ARGV[9]>> W<EVAL <ARGV[8]>> B<EVAL <ARGV[10]>> B<argv[7]> B<argv[2]> 00 00 00 B<qval 0<argv[6]>?<argv[6]>:0> D<hval <argv[1]> - 1> D<argv[4]>
endfor

I've found some effects by sendpacket which looks very nice, and would like to learn how to work with it. But I can't figure it out. Is there somewhere you (I) can read and learn or someone who can explain how the sendpacket works?


RE: Sendpacket question - darksun84 - 08-11-2014 10:04 PM

http://wiki.sphere.torfo.org/index.php/Sendpacket