[Need Help]Character movement[B021]

01/03/2012 17:26 mss29#1
Hello
I added a coordinate finder for my program(good working B021) but it works only once and it doesnt update while the character walks.I want to see the update in the textbox and how can I do this.

I have written an algorithm but move speed is not synchronized with the character speed.
How can I synchronous algorithm move speed and character speed

Thanks.

c# source
01/06/2012 17:06 mss29#2
up
01/06/2012 17:38 Nocturne33#3
[C -> S][7021]
01 ................
A8 60 .`..............
1C 07 ................
D9 FF ................
A3 03 ................

byte (can be 1 or 0) if its 0, its sky click. or if its 1, its normal click (to ground)
byte(x section)
byte(y section)
word(x coordinate)
word(z coordinate)
word(y coordinate)


[S -> C][B021]
80 D9 08 00 ................
01 ................
A8 60 .`..............
1C 07 ................
D9 FF ................
A3 03 ................
01 ................
A8 60 .`..............
5E 42 ^B..............
BE ED
27 C2
1A 27 .'..............

dword(character id)
byte (can be 1 or 0) if its 0, its sky click. or if its 1, its normal click (to ground)
byte (x section)
byte (y section)
word(x coordinate)
word(z coordinate)
word(y coordinate)
byte destination
if destination is 1, you have to add coordinates to packet about where from char comes
byte (x section)
byte (y section)
word(x coordinate)
word(z coordinate)
word(y coordinate)


that's all with packets.

so you have to calculate the character's poses by a formula. you can find that formula from the arcane project's source codes.
01/07/2012 19:06 Schickl#4
What are the last 2 bytes used for?

Oh and the offsets of the position the player came from always contains some "random" numbers
At least i don't know what they mean -.-

Let's take this example:
Code:
05BB6400//id
01          //has destination
A8          //x sector
62          //y sector
CB03       //x offset
2800       //z offset
8802       //y offset
01          //has origin
A8          //x sector
62          //y sector
AD25      //x offset
2A80      //z offset
B841      //y offset
9113      //???
so this would mean in my example that the destination X coordinate is 6.433,1 and the X coordinate he came from is 7.300,5
something can't be right there...
01/07/2012 19:47 kevin_owner#5
no idea what the last 2 byets are for but the packet doesn't contain "random" numbers the thing you said about the destination and source x coordinate isn't correct.

Both of the positions came from the same region and the difference from the destination x offset and x offset is the distance at that region not the ingame X coordinate.
01/07/2012 19:56 Schickl#6
Quote:
Originally Posted by kevin_owner View Post
no idea what the last 2 byets are for but the packet doesn't contain "random" numbers the thing you said about the destination and source x coordinate isn't correct.

Both of the positions came from the same region and the difference from the destination x offset and x offset is the distance at that region not the ingame X coordinate.
ofc they are not random xD
it just looked like it to me

could you explain it using my example, please?
It would help me, because i don't really get it atm xD
01/08/2012 13:51 srutownik#7
That last two bytes tell about character angle. You can use that formula if you want to get angle in degrees:
Code:
x - angle from packet converted to decimal
x * 360 / 65536
Do you know how can I get postion of character from groupsawn packet?
In that opcode positon is in dword (4 bytes).
01/08/2012 16:52 zeteris#8
Quote:
Originally Posted by srutownik View Post
That last two bytes tell about character angle. You can use that formula if you want to get angle in degrees:
Code:
x - angle from packet converted to decimal
x * 360 / 65536
Do you know how can I get postion of character from groupsawn packet?
In that opcode positon is in dword (4 bytes).
It's not dword it's single (float). The coordinate of character is right after UniqueID.
01/08/2012 19:50 mss29#9
Thank you for your reply .Your explanatıon partly helped me but I mıght need your help again.
03/19/2012 16:39 rowni18#10
I Already found the formula for x- and y-coordinates from other threads, but not for z-coordinate. need help! They've said that z-coordinate corresponds to elevation.

What is the computation/formula for the z-coordinate? How can I found the in-game elevation, assuming that I am going to reverse engineer the [7021] packet? [7021] is not the same as the [B021] since the latter contains source and destination. While [7021] contains only destination. The "destination z-coordinate" is not always the same with the "source z-coordinate".

Need Help! A.S.A.P.
04/01/2012 12:56 vutle#11
Just for your reference.
Cave coordinate sometimes use int values.
E.g. Jangan Cave

A8 //x sector
62 //y sector
int //x offset
int //z offset
int //y offset

Took me 1/2 of afternoon to make the script work in cave.

Cheers.