• Welcome to Valhalla Legends Archive.
 
Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - lokis

#1
thanks for the tip
:D
i'll work in a solution
#2
hmmm, ok
but I guess the others random maps I can't generate right? they are all generated by this seed?
like cold plains in act1..
#3
Is there any way to know what map my char is when I logon?
I mean, imagine if I'm in act1, there are 3 possible maps, how is determinated which map you're supposed to draw? Is this send by any packet?
#4
Thanks for the help, Now I know what's the problem. I'll try to fix :D

Yeah, you are right, there was a mistake when I receive the packets... Apparently I received 4 compressed packets in 1 packet.
So, I would have a 1400+ lengh packet and I treated it as only 1 packet, and forgot the rest.
I'm fixing it now, thanks :D
#5
Yeah, I'm noticing that. The last 0x00 bytes are nothing. this is just because my "logger" writes a whole line. If the packet ended before the line. It writes 0x00.

I've implemented a better logger now:

First packet: OK!
Packet before decompression
E6 1F 7F FF FF FF C5 D0 DB B0 29 2B 52 52 19 0B
3F FF 82 18 6D CC 95 8B A1 99 B3 A1 BE 1B 70 22
8C 36 FB AF 77 B8 4B B8 4C B8 4D B8 4E B9 FB 87
38 6D C2 6D C1 F4 39 C3 6E 12 EE 0F A3 0B FE F7
F7 77 7B FB F7 7F C7 02 52 1F BF FF FF FF FF FF
FF FF FF FF FF FF F0 FB AD AD AD 90 15 B5 BC EE
40 72 02 40 56 D6 F3 BE B7 AD 90 12 03 EB 6B 6B
7F E4 07 D6 D6 D6 D6 D6 D6 FF FE 63 0D B8 C4 FC
E6 66 72 ED 1C AE D1 C9 F2 3A 84 51 25 41 85 A5
06 30 04 72 64 E0 54 8C D1 A0 D4 F9 A4 81 8C A8
EB 50 9B 9F 5C 0A 91 9A 34 00 8F 9A 48 18 CA 8D
75 A8 4D CF AE 05 48 CD 1A 0D 6F 9A 48 18 CA 8D
02 D4 26 E7 D7 02 A4 66 8D 06 C7 CD 24 0C 65 46
85 6A 13 73 EB 81 54 0D 1A 0D AF 9A 48 18 CB 1A
C5 21 24 49 42 B8 00 00 00 00 00 00 00 00 00 00
C5 21 24 49 42


Packets after decompression
8F 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 59 1B 00 00 00 05 42 69 67 4D 61 63 00 00 00
00 00 00 00 00 00 00 00 00 00 00 AA 00 1B 00 00
00 0C 69 59 F9 FF 1F 76 00 1B 00 00 00 94 08 1B
00 00 00 00 00 01 02 00 01 01 00 01 D9 00 01 DA
00 01 DB 00 01 DC 00 01 03 00 01 22 00 00 1B 00
00 00 DB 00 01 CB 00 22 00 00 1B 00 00 00 D9 00
01 CB 00 5E 01 00 00 00 00 00 00 01 00 01 00 00
00 00 01 01 01 01 00 01 00 00 00 00 01 00 00 00
01 01 00 00 00 00 00 00 77 28 06 00 00 00 00 00
01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
29 00 00 00 80 00 80 00 80 00 A0 00 80 00 80 00
00 00 20 00 A0 00 00 00 A0 00 A0 00 80 00 80 00
00 00 20 00 00 00 80 00 00 00 80 00 A0 00 A0 00
00 00 00 00 80 00 80 00 80 00 00 00 00 00 00 00
00 00 A0 00 00 00 00 00 80 00 80 00 80 00 80 00
80 00 80 00 00 00 00 00 00 00 00 00 00 00 00 00
00 0B 00 1B 00 00 00 5F 01 00 00 00 1D 00 0F 1D
01 14 1D 02 14 1D 03 19 1E 07 00 37 1E 09 00 14
1E 0B 00 54 1D 0C 01 9C 0E 14 10 70 01 00 00 10
00 A2 00 65 08 00 80 06 17 03 02 9C 0E 14 10 71
01 00 00 10 00 A2 00 65 08 02 80 06 17 03 02 9C
0E 14 10 72 01 00 00 10 00 A2 00 65 08 04 80 06
17 03 02 9C 0E 14 10 73 01 00 00 10 00 A2 00 65
08 06 80 06 17 03 02 9C 04 14 10 74 01 00 00 10
00 A2 00 65 00 72 42 37 37 06 02 00 00 00 00 00

Parsing
Packet [0x8F]
8F 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
Packet [0x59]
59 1B 00 00 00 05 42 69 67 4D 61 63 00 00 00 00 00 00 00 00 00 00 00 00 00 00
Packet [0xAA]
AA 00 1B 00 00 00 0C 69 59 F9 FF 1F
Packet [0x76]
76 00 1B 00 00 00
Packet [0x94]
94 08 1B 00 00 00 00 00 01 02 00 01 01 00 01 D9 00 01 DA 00 01 DB 00 01 DC 00 01 03 00 01
Packet [0x22]
22 00 00 1B 00 00 00 DB 00 01 CB 00
Packet [0x22]
22 00 00 1B 00 00 00 D9 00 01 CB 00
Packet [0x5E]
5E 01 00 00 00 00 00 00 01 00 01 00 00 00 00 01 01 01 01 00 01 00 00 00 00 01 00 00 00 01 01 00 00 00 00 00 00 77
Packet [0x0B]
0B 00 1B 00 00 00
Packet [0x5F]
5F 01 00 00 00
Packet [0x1D]
1D 00 0F
Packet [0x1D]
1D 01 14
Packet [0x1D]
1D 02 14
Packet [0x1D]
1D 03 19
Packet [0x1E]
1E 07 00 37
Packet [0x1E]
1E 09 00 14
Packet [0x1E]
1E 0B 00 54
Packet [0x1D]
1D 0C 01
Packet [0x9c]
9C 0E 14 10 70 01 00 00 10 00 A2 00 65 08 00 80 06 17 03 02
Packet [0x9c]
9C 0E 14 10 71 01 00 00 10 00 A2 00 65 08 02 80 06 17 03 02
Packet [0x9c]
9C 0E 14 10 72 01 00 00 10 00 A2 00 65 08 04 80 06 17 03 02
Packet [0x9c]
9C 0E 14 10 73 01 00 00 10 00 A2 00 65 08 06 80 06 17 03 02
Packet [0x9c]
9C 04 14 10 74 01 00 00 10 00 A2 00 65 00 72 42 37 37 06 02


Second packet: OK!
Packet before decompression
F1 6D 02 A8 1A 34 1B 9F 34 90 31 96 54 02 02 40
92 85 70 2C 85 43 03 7B F0 DB 9A C7 98 CA 01 91
92 C1 C8 78 84 79 5A B4 78 0A 42 80 16 42 76 88
70 7E 1B 73 58 F3 19 40 DA 43 B2 B0 92 84 79 5B
74 28 5B 70 EA 1B 77 DB 6D B6 C3 A8 6D FB 6D B6
D9 CC CC E5 DA 39 5D A3 93 E4 75 08 A2 4A 83 0B
4A 0C 60 08 E4 C9 CB A2 4D 25 3F F3 F6 C3 F1 4C
54 78 A8 45 05 26 45 B3 FC 81 2A 74 4A 90 0F E8
1D 10 C6 80 B8 81 74 43 1A 01 FD 03 82 34 7C 09
C2 EA 76 8D D6 91 9C 10 BA 3E 64 AC 5D 0C CD 9D
2C 47 C2 EA 76 8D D6 9E 2E 67 C7 0A E6 CE 6E BC
F1 72 37 24 C3 22 74 A6 EB CF 17 4B C9 32 25 39
20 DD 7A 25 48 0B 88 17 44 31 A0 20 10 39 E2 E6
5C 3B 86 24 E1 C1 BE 78 B9 8F 24 C8 A4 E2 11 BA
F3 C5 D2 72 4D 01 B0 76 6E BD 10 D4 80 B8 81 74
4A 90 0F E8 1C 11 A4 E3 FC 43 36 33 37 5A 46 70
42 E9 39 92 B1 74 33 36 74 B1 27 10 CD 8C CD D6
82 33 0E 3F CC CD 8C 8D D6 91 9C 10 B9 87 32 56
2E 86 66 CE 96 18 73 33 63 23 75 A7 8B B3 C9 31
0C D8 33 9B 2F 3C 5D 37 24 D4 1B 18 9B AF 3C 5C
D7 98 B9 18 D8 E8 DF 3C 5C D3 92 66 E6 C6 C6 EB
C5 D7 E8 4A 83 49 60 65 1A C6 D1 A4 68 19 3F A7
36 50 6E 37 3F 6D B0 05 F3 B7 E4 F2 D7 F1 D1 3B
36 50 6E 37 3F 6D B0 05 F3 B7 E4


Packets after decompression
9C 04 14 10 75 01 00 00 10 00 A2 00 65 00 52 92
36 37 06 02 9D 06 1E 05 76 01 00 00 00 1B 00 00
00 11 00 82 00 65 84 08 30 C6 26 06 82 80 80 81
E1 3F 9D 06 20 07 77 01 00 00 00 1B 00 00 00 11
00 82 00 65 A4 0A 20 56 37 06 82 80 00 01 06 06
FF 01 23 00 1B 00 00 00 01 00 00 FF FF FF FF 23
00 1B 00 00 00 00 00 00 FF FF FF FF 1D 00 0F 1D
01 14 1D 02 14 1D 03 19 1E 07 00 37 1E 09 00 14
1E 0B 00 54 1D 0C 01 95 37 00 0A 00 15 00 00 00
00 00 00 00 03 00 FF 2A 44 46 01 00 46 F0 E1 13
53 03 00 00 00 A2 52 00 00 00 07 68 04 98 04 01
07 60 04 90 04 02 07 60 04 98 04 01 AC 08 00 00
00 9A 00 EE 15 14 17 80 0E 01 AA 01 08 00 00 00
0C 69 59 F9 FF 1F 6D 08 00 00 00 EE 15 14 17 80
51 02 0F 00 00 00 77 00 02 16 01 17 02 00 51 02
0E 00 00 00 25 00 F6 15 0D 17 02 00 51 02 0D 00
00 00 25 00 E8 15 1A 17 02 00 07 68 04 90 04 02
07 60 04 A0 04 01 51 02 0C 00 00 00 24 00 F4 15
21 17 00 00 51 02 0B 00 00 00 25 00 F0 15 2D 17
02 00 51 02 0A 00 00 00 25 00 04 16 24 17 02 00
07 70 04 90 04 02 07 68 04 98 04 01 AC 0A 00 00
00 98 00 2E 16 0F 17 80 0E 01 AA 01 0A 00 00 00
0C 69 59 F9 FF 1F 6D 0A 00 00 00 2E 16 0F 17 80
AC 09 00 00 00 98 00 0F 16 0C 17 80 0E 01 AA 01
09 00 00 00 0C 69 59 F9 FF 1F 6D 09 00 00 00 0F
16 0C 17 80 51 02 13 00 00 00 25 00 2E 16 FA 16
02 00 51 02 12 00 00 00 25 00 1E 16 0B 17 02 00
51 02 11 00 00 00 0B 01 0E 16 1F 17 00 00 51 02
10 00 00 00 25 00 17 16 16 17 02 00 59 01 00 00
00 06 52 6F 62 65 72 74 6F 6E 61 00 00 00 00 00
00 00 15 16 1E 17 75 01 00 00 00 FF FF 54 00 00
00 00 00 20 01 00 00 00 43 64 00 00 00 00 00 00


Parsing
Packet [0x9c]
9C 04 14 10 75 01 00 00 10 00 A2 00 65 00 52 92 36 37 06 02
Packet [0x9d]
9D 06 1E 05 76 01 00 00 00 1B 00 00 00 11 00 82 00 65 84 08 30 C6 26 06 82 80 80 81 E1 3F
Packet [0x9d]
9D 06 20 07 77 01 00 00 00 1B 00 00 00 11 00 82 00 65 A4 0A 20 56 37 06 82 80 00 01 06 06 FF 01
Packet [0x23]
23 00 1B 00 00 00 01 00 00 FF FF FF FF
Packet [0x23]
23 00 1B 00 00 00 00 00 00 FF FF FF FF
Packet [0x1D]
1D 00 0F
Packet [0x1D]
1D 01 14
Packet [0x1D]
1D 02 14
Packet [0x1D]
1D 03 19
Packet [0x1E]
1E 07 00 37
Packet [0x1E]
1E 09 00 14
Packet [0x1E]
1E 0B 00 54
Packet [0x1D]
1D 0C 01
Packet [0x95]
95 37 00 0A 00 15 00 00 00 00 00 00 00
Packet03
03 00 FF 2A 44 46 01 00 46 F0 E1 13
Packet [0x53]
53 03 00 00 00 A2 52 00 00 00
Packet [0x07]
07 68 04 98 04 01
Packet [0x07]
07 60 04 90 04 02
Packet [0x07]
07 60 04 98 04 01
Packet [0xAC]
AC 08 00 00 00 9A 00 EE 15 14 17 80 0E 01
Packet [0xAA]
AA 01 08 00 00 00 0C 69 59 F9 FF 1F
Packet [0x6D]
6D 08 00 00 00 EE 15 14 17 80
Packet [0x51]
51 02 0F 00 00 00 77 00 02 16 01 17 02 00
Packet [0x51]
51 02 0E 00 00 00 25 00 F6 15 0D 17 02 00
Packet [0x51]
51 02 0D 00 00 00 25 00 E8 15 1A 17 02 00
Packet [0x07]
07 68 04 90 04 02
Packet [0x07]
07 60 04 A0 04 01
Packet [0x51]
51 02 0C 00 00 00 24 00 F4 15 21 17 00 00
Packet [0x51]
51 02 0B 00 00 00 25 00 F0 15 2D 17 02 00
Packet [0x51]
51 02 0A 00 00 00 25 00 04 16 24 17 02 00
Packet [0x07]
07 70 04 90 04 02
Packet [0x07]
07 68 04 98 04 01
Packet [0xAC]
AC 0A 00 00 00 98 00 2E 16 0F 17 80 0E 01
Packet [0xAA]
AA 01 0A 00 00 00 0C 69 59 F9 FF 1F
Packet [0x6D]
6D 0A 00 00 00 2E 16 0F 17 80
Packet [0xAC]
AC 09 00 00 00 98 00 0F 16 0C 17 80 0E 01
Packet [0xAA]
AA 01 09 00 00 00 0C 69 59 F9 FF 1F
Packet [0x6D]
6D 09 00 00 00 0F 16 0C 17 80
Packet [0x51]
51 02 13 00 00 00 25 00 2E 16 FA 16 02 00
Packet [0x51]
51 02 12 00 00 00 25 00 1E 16 0B 17 02 00
Packet [0x51]
51 02 11 00 00 00 0B 01 0E 16 1F 17 00 00
Packet [0x51]
51 02 10 00 00 00 25 00 17 16 16 17 02 00
Packet [0x59]
59 01 00 00 00 06 52 6F 62 65 72 74 6F 6E 61 00 00 00 00 00 00 00 15 16 1E 17
Packet [0x75]
75 01 00 00 00 FF FF 54 00 00 00 00 00
Packet [0x20]
20 01 00 00 00 43 64 00 00 00


Third packet: ERROR! He tries to read a 0x2E packet!!!

Packet before decompression
32 56 2E 86 66 CE 96 31 C4 23 61 0C DD 68 23 43
C0 A4 D8 D8 39 37 5A 46 70 42 E8 79 92 B1 74 33
36 74 B1 0F 36 36 0E 4D D6 9E 2E C7 1E 1C EC D8
40 37 C1 1A 0E 60 E7 66 C1 F1 BA D2 33 82 17 41
40


Packets after decompression
69 59 F9 FF 1F 6D 05 00 00 00 2D 16 2E 17 80 AC
06 00 00 00 9B 00 16 16 22 17 80 0E 01 AA 01 06
00 00 00 0C 69 59 F9 FF 1F 6D 06 00 00 00 16 16
22 17 80 51 02 05 00 00 00 81 01 20 16 2B 17 00


Parsing
Packet [0x69]
69 59 F9 FF 1F 6D 05 00 00 00 2D 16

Here it tryes to read a packet 0x2E, that doesn't exist


[Kp edit: killed long lines that broke the table layout.  Learn to use line breaks in your hex dumps.]
#6
I don't have that packets before decompressed :/

But, I have this one, for decompress test:
F1 6B 02 A8 1A 34 57 CD 24 0C 65 95 00 80 90 24
A1 5C 0B 21 50 C0 CF E8 F9 AC 79 8C A0 19 19 2C
1C 87 88 47 95 AB 47 80 A4 28 01 64 27 68 8B 7E
8F 9A C7 98 CA 06 D2 1D 95 84 94 23 CA DB A1 42
DB 87 54 7D F6 DB 6D B0 EA 8F F6 DB 6D B3 99 99
CB B4 72 BB 47 27 C8 EA 11 44 95 06 16 94 18 C0
11 C9 93 97 44 9A 4A 7F E7 ED 87 E2 98 A8 F1 50
8A 0A 4C 8B 6B F0 C8 51 E8 95 20 1F D0 3A 21 8D
01 71 02 E8 86 34 03 FA 07 04 68 F8 13 85 E4 E9
4D D6 91 9C 10 BA 3E 64 AC 5D 0C CD 9D 2C 47 C2
F2 74 A6 EB 4F 17 33 E3 85 73 67 37 5E 78 B9 1B
92 61 91 3A 53 75 E7 8B A5 E4 99 12 9C 90 6E BD
12 A4 05 C4 0B A2 18 D0 10 08 1C F1 73 2E 1D C3
12 70 E0 DF 3C 5C C7 92 64 52 71 08 DD 79 E2 E9
39 26 80 D8 3B 37 5E 88 6A 40 5C 40 BA 25 48 07
F4 0E 08 D2 71 FE 21 9B 19 9B AD 23 38 21 74 9C
C9 58 BA 19 9B 3A 58 93 88 66 C6 66 EB 41 19 87
1F E6 66 C6 46 EB 48 CE 08 5C C3 99 2B 17 43 33
67 4B 0C 39 99 B1 91 BA D3 C5 D9 E4 98 86 6C 19
CD 97 9E 2E 9B 92 6A 0D 8C 4D D7 9E 2E 6B CC 5C
8C 6C 74 6F 9E 2E 69 C9 33 73 63 63 75 E2 EB F4
25 41 A4 B0 32 8D 63 68 D2 34 0C 9F D3 9B 28 37
1B 9F B6 D8 02 F9 DB F2 79 6B 80 F1 D1 3B 7E 29
1B 9F B6 D8 02 F9 DB F2 79


My decompressor generate this:
9C 04 14 10 69 00 00 00 10 00 A2 00 65 00 52 92
36 37 06 02 9D 06 1E 05 6A 00 00 00 00 08 00 00
00 11 00 82 00 65 84 08 30 C6 26 06 82 80 80 81
E1 3F 9D 06 20 07 6B 00 00 00 00 08 00 00 00 11
00 82 00 65 A4 0A 20 56 37 06 82 80 00 01 06 06
FF 01 23 00 08 00 00 00 01 00 00 FF FF FF FF 23
00 08 00 00 00 00 00 00 FF FF FF FF 1D 00 0F 1D
01 14 1D 02 14 1D 03 19 1E 07 00 37 1E 09 00 14
1E 0B 00 54 1D 0C 01 95 37 00 0A 00 15 00 00 00
00 00 00 00 03 00 FF 2A 44 46 01 00 46 F0 E1 13
53 02 00 00 00 F6 4C 00 00 00 07 68 04 98 04 01
07 60 04 90 04 02 07 60 04 98 04 01 AC 08 00 00
00 9A 00 EF 15 0D 17 80 0E 01 AA 01 08 00 00 00
0C 69 59 F9 FF 1F 6D 08 00 00 00 EF 15 0D 17 80
51 02 0F 00 00 00 77 00 02 16 01 17 02 00 51 02
0E 00 00 00 25 00 F6 15 0D 17 02 00 51 02 0D 00
00 00 25 00 E8 15 1A 17 02 00 07 68 04 90 04 02
07 60 04 A0 04 01 51 02 0C 00 00 00 24 00 F4 15
21 17 00 00 51 02 0B 00 00 00 25 00 F0 15 2D 17
02 00 51 02 0A 00 00 00 25 00 04 16 24 17 02 00
07 70 04 90 04 02 07 68 04 98 04 01 AC 0A 00 00
00 98 00 2E 16 0F 17 80 0E 01 AA 01 0A 00 00 00
0C 69 59 F9 FF 1F 6D 0A 00 00 00 2E 16 0F 17 80
AC 09 00 00 00 98 00 0F 16 0C 17 80 0E 01 AA 01
09 00 00 00 0C 69 59 F9 FF 1F 6D 09 00 00 00 0F
16 0C 17 80 51 02 13 00 00 00 25 00 2E 16 FA 16
02 00 51 02 12 00 00 00 25 00 1E 16 0B 17 02 00
51 02 11 00 00 00 0B 01 0E 16 1F 17 00 00 51 02
10 00 00 00 25 00 17 16 16 17 02 00 59 01 00 00
00 06 52 6F 62 65 72 74 6F 6E 61 00 00 00 00 00
00 00 15 16 1E 17 75 01 00 00 00 FF FF 54 00 00
00 00 00 20 01 00 00 00 43 64 00 00 00 00 00 00



I'm using this decompressor code: http://forum.valhallalegends.com/index.php?topic=15601.msg157328#msg157328

This code is reliable? Do you have any others decompressor codes?
I'm using c# but I know others languages, if you have another code. In c++ would be good, so I could build a .dll to use in my C# program
#7
yeah, I'm logging the whole packet before it's parsed, then I log what my parser class did, and I check the whole packet that was logged to see if it's right

Here's the packet where I extracted de 0x0D packets:

0D 05 00 01 06 00 0F 13 00 00 0D 00 2E 00 00 5A
11 43 12 80 AC 03 00 00 00 98 00 73 11 44 12 80
10 11 08 00 AA 01 03 00 00 00 0C 69 59 F9 FF 1F
6D 03 00 00 00 73 11 44 12 80 51 02 06 00 00 00
4E 00 6B 11 23 12 00 00 51 02 05 00 00 00 25 00
79 11 43 12 02 00 51 02 04 00 00 00 23 00 6C 11
40 12 00 00 51 02 03 00 00 00 27 00 7D 11 22 12
00 00


Here's what I done

0D 05 00 01 06 00 0F 13 00 00
0D 00 2E 00 00 5A 11 43 12 80

AC 03 00 00 00 98 00 73 11 44 12 80 10 11 08 00

AA 01 03 00 00 00 0C 69 59 F9 FF 1F

6D 03 00 00 00 73 11 44 12 80

51 02 06 00 00 00 4E 00 6B 11 23 12 00 00
51 02 05 00 00 00 25 00 79 11 43 12 02 00
51 02 04 00 00 00 23 00 6C 11 40 12 00 00
51 02 03 00 00 00 27 00 7D 11 22 12 00 00

This is right?


Here's the whole packet that i got the 0x51:
51 00 00 28 00 00 59 F9 FF 1F 6D 06 00 00 00 5A
11 43 12 80 AC 03 00 00 00 98 00 73 11 44 12 80
10 11 08 00 AA 01 03 00 00 00 0C 69 59 F9 FF 1F
6D 03 00 00 00 73 11 44 12 80 51 02 06 00 00 00
4E 00 6B 11 23 12 00 00 51 02 05 00 00 00 25 00
79 11 43 12 02 00 51 02 04 00 00 00 23 00 6C 11
40 12 00 00 51 02 03 00 00 00 27 00 7D 11 22 12
00 00 07 80 03 A0 03 01 51 02 02 00 00 00 81 01
84 11 21 12 00 00 AC 02 00 00 00 09 01 80 11 25
12 80 0E 01 AA 01 02 00 00 00 0C 69 59 F9 FF 1F


I splitted like this:

51 00 00 28 00 00 59 F9 FF 1F

6D 06 00 00 00 5A 11 43 12 80
AC 03 00 00 00 98 00 73 11 44 12 80 10 11 08 00
AA 01 03 00 00 00 0C 69 59 F9 FF 1F
6D 03 00 00 00 73 11 44 12 80

51 02 06 00 00 00 4E 00 6B 11 23 12 00 00
51 02 05 00 00 00 25 00 79 11 43 12 02 00
51 02 04 00 00 00 23 00 6C 1140 12 00 00
51 02 03 00 00 00 27 00 7D 11 22 12 00 00

07 80 03 A0 03 01

51 02 02 00 00 00 81 01 84 11 21 12 00 00

AC 02 00 00 00 09 01 80 11 25 12 80 0E 01

AA 01 02 00 00 00 0C 69 59 F9 FF 1F

For me, everything's appear to be right, but that initial 0x51 packet doesn't make sense to me, I mean, there are others 0x51 packets and they are not that way
#8
Well, I got this packets 0D:

0D 05 00 01 06 00 0F 13 00 00
0D 00 2E 00 00 5A 11 43 12 80


But the documentation for this packet is:
0x0D
D2GS_PLAYERSTOP
Lengh = 13

0D 00 XX XX XX XX 07 67 16 D8 15 00 5D
(BYTE) Object Type
(DWORD) Object ID
(BYTE) Unknown (very's from 0 to 15)
(WORD) Location X
(WORD) Location Y
(BYTE) Unknown
(BYTE) Life%

Well, I think this packet changed, do you know what are the possible information in this packet now?
I captured this 2 packets while standing in the same position, that's weird because I can't see the location WORDS, their values difference have to be small, right?

now I got this packet 0x51

51 00 00 28 00 00 59 F9 FF 1F

Previously documentation:
51 02 XX XX XX XX 25 00 59 16 A0 15 02 00
(BYTE) Object Type
(DWORD) Object ID
(WORD) Object Unique Code
(WORD) Location X
(WORD) Location Y
(BYTE) Objects State (0x00=no &HE will follow, 0x02=expect a &HE)
(BYTE) Interaction Conditions


Well, in both cases, shouldn't the IDs have lower values?
#9
omg, you're good at this :o more efficient than my packet splitter class... lol

I'm gonna try to find out something about this "unknow" packets, but how do you know how to separate the packet? just intuitive? any hint for a beginner?

You really helped me, thanks  ;D

Thanks I found the lenghs, its for the 1.10, but it helps
Private m_PacketLengths() As Integer = {&H1, &H8, &H1, &HC, &H1, &H1, &H1, &H6, &H6, &HB, &H6, &H6, &H9, &HD, &HC, &H10, _
                                              &H10, &H8, &H1A, &HE, &H12, &HB, -1, -1, &HF, &H2, &H2, &H3, &H5, &H3, &H4, &H6, _
                                              &HA, &HC, &HC, &HD, &H5A, &H5A, -1, &H28, &H67, &H61, &HF, &H0, &H8, &H0, &H0, &H0, _
                                              &H0, &H0, &H0, &H0, &H0, &H0, &H0, &H0, &H0, &H0, &H0, &H0, &H0, &H0, -1, &H8, _
                                              &HD, &H0, &H6, &H0, &H0, &HD, &H0, &HB, &HB, &H0, &H0, &H0, &H10, &H11, &H7, &H1, _
                                              &HF, &HE, &H2A, &HA, &H3, &H0, &H0, &HE, &H7, &H1A, &H28, -1, &H5, &H6, &H26, &H5, _
                                              &H7, &H2, &H7, &H15, &H0, &H7, &H7, &H10, &H15, &HC, &HC, &H10, &H10, &HA, &H1, &H1, _
                                              &H1, &H1, &H1, &H20, &HA, &HD, &H6, &H2, &H15, &H6, &HD, &H8, &H6, &H12, &H5, &HA, _
                                              &H4, &H14, &H1D, &H0, &H0, &H0, &H0, &H0, &H0, &H2, &H6, &H6, &HB, &H7, &HA, &H21, _
                                              &HD, &H1A, &H6, &H8, -1, &HD, &H9, &H1, &H7, &H10, &H11, &H7, -1, -1, &H7, &H8, _
                                              &HA, &H7, &H8, &H18, &H3, &H8, -1, &H7, -1, &H7, -1, &H7, -1, &H0, -1}
#10
I didn't see anything about this packets, and this values 00 01 are very weird for me.

Here's the hole packet

8F 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 59 18 00 00 00 05 42 69 67 4D 61 63 00 00 00
00 00 00 00 00 00 00 00 00 00 00 AA 00 18 00 00
00 0C 69 59 F9 FF 1F 76 00 18 00 00 00 94 08 18
00 00 00 00 00 01 02 00 01 01 00 01 D9 00 01 DA
00 01 DB 00 01 DC 00 01 03 00 01 22 00 00 18 00
00 00 DB 00 01 CB 00 22 00 00 18 00 00 00 D9 00
01 CB 00 5E 01 00 00 00 00 00 00 01 00 01 00 00
00 00 01 01 01 01 00 01 00 00 00 00 01 00 00 00
01 01 00 00 00 00 00 00 77 28 06 00 00 00 00 00
01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
29 00 00 00 80 00 80 00 80 00 A0 00 80 00 80 00
00 00 20 00 A0 00 00 00 A0 00 A0 00 80 00 80 00
00 00 20 00 00 00 80 00 00 00 80 00 A0 00 A0 00
00 00 00 00 80 00 80 00 80 00 00 00 00 00 00 00
00 00 A0 00 00 00 00 00 80 00 80 00 80 00 80 00
80 00 80 00 00 00 00 00 00 00 00 00 00 00 00 00
00 0B 00 18 00 00 00 5F 01 00 00 00 1D 00 0F 1D
01 14 1D 02 14 1D 03 19 1E 07 00 37 1E 09 00 14
1E 0B 00 54 1D 0C 01 9C 0E 14 10 CF 02 00 00 10
00 A2 00 65 08 00 80 06 17 03 02 9C 0E 14 10 D0
02 00 00 10 00 A2 00 65 08 02 80 06 17 03 02 9C
0E 14 10 D1 02 00 00 10 00 A2 00 65 08 04 80 06
17 03 02 9C 0E 14 10 D2 02 00 00 10 00 A2 00 65
08 06 80 06 17 03 02 9C 04 14 10 D3 02 00 00 10
00 A2 00 65 00 72 42 37 37 06 02 00 00 00 00 00


I'm almost sure there's something wrong, I don't understand this lot of 00 bytes in the packet
#11
Well, I make my bot enter the game and now I'm trying to read the packets I receive, but I'm having a little problem.

This is the part of a packet I decompressed, and now I'm trying to read it, but I found some problems
8F 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 59 18 00 00 00 05 42 69 67 4D 61 63 00 00 00
00 00 00 00 00 00 00 00 00 00 00 AA 00 18 00 00
00 0C 69 59 F9 FF 1F 76 00 18 00 00 00 94 08 18
00 00 00 00 00 01 02 00 01 01 00 01 D9 00 01 DA
00 01 DB 00 01 DC 00 01 03 00 01 22 00 00 18 00
00 00 DB 00 01 CB 00 22 00 00 18 00 00 00 D9 00
01 CB 00 5E 01 00 00 00 00 00 00 01 00 01 00 00
00 00 01 01 01 01 00 01 00 00 00 00 01 00 00 00
01 01 00 00 00 00 00 00 77 28 06 00 00 00 00 00


The first packet is ping response, that's OK.
8F 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00


The second packet is D2GS_PLAYERASIGN
59 18 00 00 00 05 42 69 67 4D 61 63 00 00 00
00 00 00 00 00 00 00 00 00 00 00

In this packet I'm seeing my self, so:
My player ID: 18 00 00 00
I'm a druid, so: 05
And my name: 42 69 67 4D 61 63
Well, here I didn't understand why my location is 00 00 00 00
But that's not the problem, let's move on.

Third packet:
AA 00 18 00 00
00 0C 69 59 F9 FF 1F 76 00 18 00 00 00

Well, this is packet D2GS_COMINFOADD, its lengh is determinated by its 7th byte
soh the packet lengh is 0C (12)... Ok, next packet:

Fourth packet:
94 08 18
00 00 00 00 00 01 02 00 01 01 00 01 D9 00 01 DA
00 01 DB 00 01 DC 00 01 03 00 01

This is packet D2GS_SKILLSLOG, its lengh is 6 + (byte1 * 3).
In this case the lengh is 30, right?

Fifth packet?
And now, the next packet ID is a 0x22, I don't what packet it is, I found nothing about it, so i'm almost sure I'm doing something wrong, that's why I posted everything I did here.
You guys have any idea what I'm doing wrong?

Thanks in advance

#12
hehehe, ok, i thought your minimap was draw based on .ds1 files
I prefere building the minimap using the map files. But I need some documentation about it, if I get anything I'll share here.
#13
Thanks, I understand now.

I was thinking the locations were relative to the map. Like, if my char was standing on map townE1.ds1 in location (150,50) of the map, the X and Y location would be that. I was thinking like in other games where the maps aren't together like Diablo.


You wrote the code to draw that minimap?
I wrote one, but my map isn't quite right yet, I don't know what is walkable and what is not, I just read the walls layer and put them as unwalkable. but this isn't right because I'm seting a whole cell as unwalkable, and a wall cell can have walkable subcells.
Do you know how to calculate exactly what is walkable and what is not?
If you knew what the 4 bytes in each cell mean, it would hep me a lot.



#14
Yeah, but I'm trying to understand how the client make this packets

I logged the packets send by my char while I was walking around town

0000  03 46 12 C9 11                   
0000  03 42 12 C8 11                               
0000  03 3F 12 C4 11                                 
0000  03 3E 12 BC 11                                 
0000  03 3B 12 B8 11                                 
0000  03 38 12 B5 11                                 
0000  03 34 12 B4 11                                 
0000  03 32 12 B2 11                                 
0000  03 2D 12 B1 11                                 
0000  03 29 12 B3 11                                 
0000  03 28 12 B8 11

So, in the first packet my location X would be 46 12, and Y = C9 11
But these are high numbers, so the way I'm thinking isn't right

Why the second byte in locations always repeat?
I walked around all the map and the bytes 12 and 11 didn't change

The location are calculated this way right?
(0,0) ------------------------> X
|
|
|
\/   Y

Because is like that the map is read from the .ds1 file, if not, I'm being really dumb!   :-X
#15
Hello, I've been reading this foruns for a couple weeks now, and I started to code a "bot" in fact I just make a program that connects to Bnet and log into a game.
But now I want my char to move, and I cannot understand the 0x03 packet, I mean:

03 65 15 61 12
(WORD) X location
(WORD) Y location

How this X location and Y location are calculated?

For example, the town map in act one has:
57 cells - Width
41 cells - Height

This mean, in coordinates:
285 subcells - X
205 subcells - Y

How can i convert this X, Y based on the subcells, to the X, Y I have to send in the packet?
I need this because I draw like a minimap on the screen, and I want the char to go the location I click.
Anyone knows how to do that?

Thanks