Valhalla Legends Archive

Programming => Battle.net Bot Development => Topic started by: Tazo on February 12, 2004, 06:53 PM

Title: D2XP Game Creation
Post by: Tazo on February 12, 2004, 06:53 PM
I tried to create a d2xp game, took a log, and got this
(full log @ http://www.incdamage.net/pistol/ingame%20log.txt )

1  192.168.2.37  63.240.202.148  19  Send  
0000  13 00 03 02 00 00 00 00 00 01 FF 08 56 6C 00 56    ............Vl.V
0010  6C 00 00                                           l..

2  63.240.202.148  192.168.2.37  13  Recv  
0000  0D 00 03 02 00 14 01 00 00 00 00 00 00             .............

3  192.168.2.37  63.240.202.148  11  Send  
0000  0B 00 04 03 00 56 6C 00 56 6C 00                   .....Vl.Vl.

4  192.168.2.37  63.240.202.121  31  Send  
0000  FF 1C 1F 00 01 00 00 00 00 00 00 00 00 00 00 00    ................
0010  00 00 00 00 00 00 00 00 56 6C 00 56 6C 00 00       ........Vl.Vl..

5  63.240.202.148  192.168.2.37  21  Recv  
0000  15 00 04 03 00 14 01 00 00 3F F0 CA 9B 1B A1 58    .........?.....X
0010  28 00 00 00 00                                     (....

6  192.168.2.37  63.240.202.121  18  Send  
0000  FF 22 12 00 50 58 32 44 0A 00 00 00 56 6C 00 56    ."..PX2D....Vl.V
0010  6C 00                                              l.

7  63.240.202.155  192.168.2.37  2  Recv  
0000  AE 01                                              ..

8  192.168.2.37  63.240.202.155  29  Send  
0000  67 1B A1 58 28 14 01 01 0A 00 00 00 00 69 63 65    g..X(........ice
0010  64 2D 63 72 65 61 6D 00 4B 00 00 00 04             d-cream.K....

9  63.240.202.155  192.168.2.37  5  Recv  
0000  05 7A 09 A5 F0                                     .z...

10  63.240.202.155  192.168.2.37  2  Recv  
0000  02 5C                                              .\

11  192.168.2.37  63.240.202.155  9  Send  
0000  6C 55 3A 1B 00 00 00 00 00                         lU:......

12  63.240.202.155  192.168.2.37  7  Recv  
0000  07 1F 7F FF FF FF C0                               .......

13  192.168.2.37  63.240.202.155  1  Send  
0000  6A                                                 j

vL//vL was game, iced-cream was character, and account was Kcoj14@useast
can anyone make heads or tails of this? I'm not sure if 0x1C is used to create games for ALL clients, and if the values are the same. By the looks of it, making D2 games is much different, if I assume correctly.
Title: Re:D2XP Game Creation
Post by: Soul Taker on February 12, 2004, 07:32 PM
Yes, I'm sure many people can make heads and/or tails of it, as it's pretty simple stuff.  Do you have a specific question? =P
Title: Re:D2XP Game Creation
Post by: UserLoser. on February 12, 2004, 08:24 PM
Quote

1  192.168.2.37  63.240.202.148  19  Send  
0000  13 00 03 02 00 00 00 00 00 01 FF 08 56 6C 00 56    ............Vl.V
0010  6C 00 00  

0x03 Creates game on realm server


Quote

3  192.168.2.37  63.240.202.148  11  Send  
0000  0B 00 04 03 00 56 6C 00 56 6C 00                  .....Vl.Vl.

0x04 Joins game on realm server


Quote

4  192.168.2.37  63.240.202.121  31  Send  
0000  FF 1C 1F 00 01 00 00 00 00 00 00 00 00 00 00 00    ................
0010  00 00 00 00 00 00 00 00 56 6C 00 56 6C 00 00      ........Vl.Vl..

0x1C Tells BNCS game was created


Quote

6  192.168.2.37  63.240.202.121  18  Send  
0000  FF 22 12 00 50 58 32 44 0A 00 00 00 56 6C 00 56    ."..PX2D....Vl.V
0010  6C 00                                              l.

0x22 Tells BNCS you joined a game
Title: Re:D2XP Game Creation
Post by: Tazo on February 13, 2004, 05:25 AM
0x03 and 0x04 are they UDP or something? i dont recognize the packet format
Title: Re:D2XP Game Creation
Post by: Soul Taker on February 13, 2004, 05:26 AM
He said 'realm server' =P
Title: Re:D2XP Game Creation
Post by: UserLoser. on February 13, 2004, 10:59 AM
Quote from: laurion on February 13, 2004, 05:25 AM
0x03 and 0x04 are they UDP or something? i dont recognize the packet format

Like SoulTaker said, I did say realm server - which is TCP

Diablo II/Lord of Destruction and Warcraft III/The Frozen Throne are the only Battle.net games that do not use UDP for gaming, it's all TCP.
Title: Re:D2XP Game Creation
Post by: Tazo on February 13, 2004, 06:43 PM
So 0x03//0x04 would be sent on a seperate TCP socket, one used for realm stuff?
Title: Re:D2XP Game Creation
Post by: UserLoser. on February 13, 2004, 06:48 PM
Quote from: laurion on February 13, 2004, 06:43 PM
So 0x03//0x04 would be sent on a seperate TCP socket, one used for realm stuff?

The same socket you used for logging onto your character, which would be the one you're using for the realm
Title: Re:D2XP Game Creation
Post by: Tazo on February 14, 2004, 03:29 PM
can i get some help on how 2 read the packet?
Title: Re:D2XP Game Creation
Post by: l)ragon on February 15, 2004, 05:00 PM
Quote from: laurion on February 14, 2004, 03:29 PM
can i get some help on how 2 read the packet?

Which ones, D2GS or Realm packets lol.
Title: Re:D2XP Game Creation
Post by: Tazo on February 16, 2004, 05:19 AM
Quote from: dRAgoN on February 15, 2004, 05:00 PM
Quote from: laurion on February 14, 2004, 03:29 PM
can i get some help on how 2 read the packet?

Which ones, D2GS or Realm packets lol.
Both
Title: Re:D2XP Game Creation
Post by: UserLoser. on February 16, 2004, 10:58 AM
Quote from: laurion on February 16, 2004, 05:19 AM
Quote from: dRAgoN on February 15, 2004, 05:00 PM
Quote from: laurion on February 14, 2004, 03:29 PM
can i get some help on how 2 read the packet?

Which ones, D2GS or Realm packets lol.
Both

One way you can figure it out is by packet logging it multiple times with different characters, different game names and see what changes and what doesn't

Edit: Fixed quote
Title: Re:D2XP Game Creation
Post by: Dark-Feanor on February 16, 2004, 12:16 PM
It would help a great deal if you posted your source code as well as the packet logs, so that it is easier to see where something went wrong.
Title: Re:D2XP Game Creation
Post by: Eric on February 16, 2004, 01:17 PM
QuoteIt would help a great deal if you posted your source code as well as the packet logs, so that it is easier to see where something went wrong.

He doesn't know how to read the packet, he most likely doesn't have much if any useful code to show. Packetlogs > *

Quotecan i get some help on how 2 read the packet?

One way you can figure it out is by packet logging it multiple times with different characters, different game names and see what changes and what doesn't

Which ones, D2GS or Realm packets lol.
 
Both

D2GS packets are always in the following format:


(BYTE)   Packet ID
(VOID)   Packet Data


However these packets are compressed using what appears to be a broken Huffman encryption.

MCP (Realm) packets are always in the following format:

(WORD)   Packet length, including this header
(BYTE)   Packet ID
(VOID)   Packet Data
Title: Re:D2XP Game Creation
Post by: Tazo on February 16, 2004, 03:11 PM
So, help me read 0x03, 0x04, and 0x1C?