Entity Movement

06/15/2011 06:20 phize#1
These are the results from a quick sniffing session:

; west (x--, y++)
18 00 15 27 71 00 00 00 XX XX XX XX 01 00 00 00 DF 8D 47 04 00 00 00 00

; north west (x--)
18 00 15 27 22 00 00 00 XX XX XX XX 01 00 00 00 D5 01 48 04 00 00 00 00

; north (x--, y--)
18 00 15 27 03 00 00 00 XX XX XX XX 01 00 00 00 ED A6 48 04 00 00 00 00

; north east (y--)
18 00 15 27 94 00 00 00 XX XX XX XX 01 00 00 00 DE 19 49 04 00 00 00 00

; east (x++, y--)
18 00 15 27 1D 00 00 00 XX XX XX XX 01 00 00 00 EB 80 49 04 00 00 00 00

; south east (x++)
18 00 15 27 BE 00 00 00 XX XX XX XX 01 00 00 00 64 2D 4A 04 00 00 00 00

; south (x++, y++)
18 00 15 27 3F 00 00 00 XX XX XX XX 01 00 00 00 6F 02 4B 04 00 00 00 00

; south west (y++)
18 00 15 27 60 00 00 00 XX XX XX XX 01 00 00 00 D7 3B 4B 04 00 00 00 00

XX XX XX XX = Player ID

How do you interpret the 4th offset? It looks random to me.. did I miss something?
06/15/2011 06:53 Lateralus#2
4th offset % 8 gives you the direction the character is moving in.
06/15/2011 07:07 phize#3
Thanks, that did it.
06/15/2011 16:04 pro4never#4
Quote:
Originally Posted by Lateralus View Post
4th offset % 8 gives you the direction the character is moving in.
Actually.... that changed back in 5165 yet no one ever changed it which is why steed walk has always been fucked up on every public source.


[Only registered and activated users can see links. Click Here To Register...]


Fang removed the actual full guide to how it's setup because of harrassment but the picture he made is still in the thread.

Basically the speed 'bool' is no longer a bool and now controls walking running and riding. The directions now allow for more values to let riding cover more than 1 direction at once.

Because of that you use % 24 not % 8 like everyone has been using for ages.


As dev states a few posts into the thread... the (by FAR) most efficient/simplest way to write this is using an array holding the coords themselves.


That way you can just pull direction via dir = direction % 24 and then select from the array via...

X += deltax[dir];
Y += deltay[dir];


with some dmap checks obviously.
06/15/2011 19:55 Lateralus#5
Oh, my bad. I'm unfamiliar with current stuff.
06/15/2011 20:22 phize#6
Well, it still is % 8 for non-mounted movement.
06/15/2011 21:12 pro4never#7
Quote:
Originally Posted by Synsia View Post
Well, it still is % 8 for non-mounted movement.
Yupp, either works just fine for most things... as fang said to me every time I showed him my walk codes "doing it right the first time just saves you that much time down the road". Maybe someday I'll listen to that ahaha.