[REQUEST] teleport / move using packets

11/05/2012 19:17 nonosocr1986#16
Quote:
Originally Posted by hehepwnz View Post
i also dont get it with range.
my function "teleport"-function works without that range thing :P
can you share it with us if you don't mind ?
11/06/2012 13:56 hehepwnz#17
hm i told you everything how to do it on first site.
its not hard...
xtimes=(ownposx - finalx) / 40 (if you want to do each move "40", 127 wont work as far as i know)
xrest=(ownposx-finalx) % 40;
(if negative value)
{ *(-1)}
now you just have to sendyourpaket(0x14?,"bbb",40,0,0) xtimes and after that one time sendpacket(0x14,"bbb",xrest,0,0)...
same for y and z.
and it wouldnt be bad if you send x,y,z at the "same" time or at least after every move paket x->y->z->x->y->z->..... and so on while(done)
instead of doing all steps of x first then all steps of y and then all steps of x.
but its up to you, just think about it.
11/06/2012 19:28 mohm195#18
This way is for the win! :D
Thanks so much :>
11/08/2012 23:02 pamz12#19
I'm sorry to dig this thread, but i'm a bit confused here.
Is this right?
Quote:
Mob[i].X=*(DWORD*)&szBuffer[9];
Mob[i].Y=*(DWORD*)&szBuffer[13];
and what would be the difference if it's written like this: ?
Mob[i].Y=*(DWORD*)&szBuffer[9+4];
11/08/2012 23:22 hehepwnz#20
yes.
there is no difference.
its just for you, so you see how the informations of that paket are splitted and for better overview.
i like to use it like chBuffer+3+4+2+4, but everyone got his own opinion :)
11/09/2012 06:42 pamz12#21
i see, thanks