Valhalla Legends Archive

Programming => Battle.net Bot Development => Topic started by: Killa on June 12, 2004, 08:38 AM

Title: d1 udp
Post by: Killa on June 12, 2004, 08:38 AM
ive started to work on d1 udp and was wondering if somone could enlighten me with some information. I need to know what the packet format for a udp packet is and what is included in it. thanks for any help.
Title: Re:d1 udp
Post by: Adron on June 12, 2004, 09:47 AM
I posted about that earlier. I didn't give the packet format, but listed what's in it. Class, command, sequence numbers (run per class), player id, flags, checksum, among other things.
Title: Re:d1 udp
Post by: Killa on June 13, 2004, 07:56 PM
to simply get into a game with other people what things do i need to include in the udp packets to join a game and what packets are required to get into the game/how many?
Title: Re:d1 udp
Post by: UserLoser. on June 13, 2004, 08:46 PM
Quote from: Killa on June 13, 2004, 07:56 PM
to simply get into a game with other people what things do i need to include in the udp packets to join a game and what packets are required to get into the game/how many?

Try packet logging your self joining a game, come back and share the results and maybe we can help
Title: Re:d1 udp
Post by: Adron on June 14, 2004, 03:43 AM
Quote from: Killa on June 13, 2004, 07:56 PM
to simply get into a game with other people what things do i need to include in the udp packets to join a game and what packets are required to get into the game/how many?

I don't remember exactly, but something like 10-20 different packets. Apart from the ones that you just keep sending all the time.
Title: Re:d1 udp
Post by: Killa on June 20, 2004, 03:18 AM
i have a d1 ingame bot somewhat working,for some reason the bot sends the data to the host client and the host client responds but the packets are never recieved by my bot. here is how i setup the socket


Form1.d1udp.RemotePort = port
Form1.d1udp.RemoteHost = ip
Form1.d1udp.LocalPort = 6112


any ideas?

i packet logged the bot sending the data and the host revieving the data and sending the responds but the bot never gets them. and they are on seperate comps.
Title: Re:d1 udp
Post by: UserLoser. on June 20, 2004, 03:29 AM
Try adding:


form1.d1udp.Bind
Title: Re:d1 udp
Post by: Killa on June 20, 2004, 09:14 AM
didn't help
Title: Re:d1 udp
Post by: l)ragon on June 20, 2004, 09:51 AM
Quote from: Killa on June 20, 2004, 09:14 AM
didn't help

make sure it's set for udp protocall.
and if your behind a router set the local port to an open one.
Title: Re:d1 udp
Post by: Killa on June 20, 2004, 10:06 AM
if i chage the port my bot listens to in the program how does the host know what port to send the data too?
Title: Re:d1 udp
Post by: Killa on June 20, 2004, 10:13 AM
i just started d1 at the same time as my bot,i started a game and packet logged d1 then i tried to join my other comps game with my bot and the other comp sent the responds to d1 instead of my bot,but even when d1 isn't running my bot still doesn't get the responds,any ideas?
Title: Re:d1 udp
Post by: Killa on June 20, 2004, 10:20 AM
i think i figured it out,thanks for help anyways
Title: Re:d1 udp
Post by: Killa on June 21, 2004, 08:39 AM
for anyone thats actually got ingame in d1 on a bot could you tell me how close this is to getting in and anything im doing wrong/missing


SEND-> 0000   FF 09 19 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
SEND-> 0010   01 00 00 00 33 00 33 00 00                         ....3.3..
RECV-> 0000   FF 09 59 00 01 00 00 00 00 00 00 00 09 04 00 00    ..Y.............
RECV-> 0010   02 00 17 E0 40 E6 36 12 00 00 00 00 00 00 00 00    [email protected].........
RECV-> 0020   05 00 00 00 75 48 00 00 33 00 33 00 30 0D 73 61    ....uH..3.3.0.sa
RECV-> 0030   64 66 73 61 66 61 73 66 64 73 66 0D 4C 54 52 44    dfsafasfdsf.LTRD
RECV-> 0040   20 31 20 32 20 30 20 31 35 20 33 35 20 31 35 20     1 2 0 15 35 15
RECV-> 0050   32 30 20 31 30 30 20 30 00                         20 100 0.
SEND-> 0000   03 00 00 00 00 00 00 00                            ........
RECV-> 0000   03 00 00 00 01 00 00 00                            ........
SEND-> 0000   06 00 00 00 36 BD FF 00                            ....6...
SEND-> 0000   00 00 00 00 28 C4 10 00 00 00 01 00 00 01 FF 00    ....(...........
SEND-> 0010   01 00 00 00                                        ....
RECV-> 0000   00 00 00 00 33 B7 10 00 01 00 01 00 00 02 00 00    ....3...........
RECV-> 0010   01 00 00 00                                        ....
SEND-> 0000   00 00 00 00 40 A8 10 00 01 00 02 00 00 03 FF 00    ....@...........
SEND-> 0010   01 00 00 00                                        ....
SEND-> 0000   00 00 00 00 42 59 32 00 02 00 02 00 00 07 FF 00    ....BY2.........
SEND-> 0010   64 69 73 65 61 73 65 00 4C 54 52 44 20 31 20 31    disease.LTRD 1 1
SEND-> 0020   20 30 20 32 30 20 31 35 20 33 30 20 32 30 20 39     0 20 15 30 20 9
SEND-> 0030   30 20 30 00 33 00                                  0 0.3.
SEND-> 0000   00 00 00 00 78 69 0C 00 03 00 08 00 00 04 03 00    ....xi..........
RECV-> 0000   00 00 00 00 D0 8F 51 00 02 00 03 00 00 08 00 00    ......Q.........
RECV-> 0010   01 00 00 00 04 00 00 00 0B 24 00 00 05 00 00 00    .........$......
RECV-> 0020   75 48 00 00 33 00 30 0D 73 61 64 66 73 61 66 61    uH..3.0.sadfsafa
RECV-> 0030   73 66 64 73 66 0D 4C 54 52 44 20 31 20 32 20 30    sfdsf.LTRD 1 2 0
RECV-> 0040   20 31 35 20 33 35 20 31 35 20 32 30 20 31 30 30     15 35 15 20 100
RECV-> 0050   20 30 00 33 00                                      0.3.
RECV-> 0000   00 00 00 00 6D 8F 3F 00 03 00 03 00 00 06 00 00    ....m.?.........
RECV-> 0010   33 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00    3...............
RECV-> 0020   0B 24 00 00 00 00 00 00 00 00 00 00 00 00 00 00    .$..............
RECV-> 0030   00 00 00 00 73 61 64 66 73 61 66 61 73 66 64 73    ....sadfsafasfds
RECV-> 0040   66 00 00                                           f..
RECV-> 0000   00 00 00 00 A3 36 10 00 04 00 03 00 00 0F 00 00    .....6..........
RECV-> 0010   00 00 00 00                                        ....
RECV-> 0000   00 00 00 00 1E FC 14 00 05 00 03 00 00 09 00 00    ................
RECV-> 0010   AF F9 D5 40 00 00 00 00                            ...@....
RECV-> 0000   00 00 00 00 C2 A5 10 00 09 24 0B 24 02 00 00 00    .........$.$....
RECV-> 0010   05 24 00 00                                        .$..
RECV-> 0000   00 00 00 00 D0 95 10 00 0A 24 0B 24 02 00 00 00    .........$.$....
RECV-> 0010   06 24 00 00                                        .$..
RECV-> 0000   00 00 00 00 4D 99 0C 00 06 00 03 00 00 04 00 00    ....M...........
SEND-> 0000   00 00 00 00 69 7A 0C 00 03 00 07 00 00 05 01 00    ....iz..........
RECV-> 0000   00 00 00 00 24 5B 1F 00 00 00 00 00 01 00 00 00    ....$[..........
RECV-> 0010   4B 46 4B 46 80 07 00 00 80 07 00 00 0F 23 0F 70    KFKF.........#.p
RECV-> 0020   69 13 00                                           i..
SEND-> 0000   00 00 00 00 85 54 0C 00 0A 00 0D 00 01 00 01 01    .....T..........
RECV-> 0000   00 00 00 00 DE 85 10 00 0B 24 0B 24 02 00 00 00    .........$.$....
RECV-> 0010   07 24 00 00                                        .$..
RECV-> 0000   00 00 00 00 36 B4 0C 00 04 00 04 00 00 00 00 01    ....6...........
RECV-> 0000   00 00 00 00 27 57 1F 00 01 00 00 00 01 00 00 00    ....'W..........
RECV-> 0010   4B 46 4B 46 80 07 00 00 80 07 00 00 0F 23 0F 70    KFKF.........#.p
RECV-> 0020   69 13 00                                           i..
SEND-> 0000   00 00 00 00 97 3E 0C 00 0B 00 10 00 01 00 01 01    .....>..........
RECV-> 0000   00 00 00 00 2A 53 1F 00 02 00 00 00 01 00 00 00    ....*S..........
RECV-> 0010   4B 46 4B 46 80 07 00 00 80 07 00 00 0F 23 0F 70    KFKF.........#.p
RECV-> 0020   69 13 00                                           i..
SEND-> 0000   00 00 00 00 9F 34 0C 00 0C 00 11 00 01 00 01 01    .....4..........
RECV-> 0000   00 00 00 00 2D 4F 1F 00 03 00 00 00 01 00 00 00    ....-O..........
RECV-> 0010   4B 46 4B 46 80 07 00 00 80 07 00 00 0F 23 0F 70    KFKF.........#.p
RECV-> 0020   69 13 00                                           i..
SEND-> 0000   00 00 00 00 A7 2A 0C 00 0D 00 12 00 01 00 01 01    .....*..........
RECV-> 0000   00 00 00 00 30 4B 1F 00 04 00 00 00 01 00 00 00    ....0K..........
RECV-> 0010   4B 46 4B 46 80 07 00 00 80 07 00 00 0F 23 0F 70    KFKF.........#.p
RECV-> 0020   69 13 00                                           i..
SEND-> 0000   00 00 00 00 AF 20 0C 00 0E 00 13 00 01 00 01 01    ..... ..........
RECV-> 0000   00 00 00 00 EC 75 10 00 0C 24 0B 24 02 00 00 00    .....u...$.$....
RECV-> 0010   08 24 00 00                                        .$..
RECV-> 0000   00 00 00 00 33 47 1F 00 05 00 00 00 01 00 00 00    ....3G..........
RECV-> 0010   4B 46 4B 46 80 07 00 00 80 07 00 00 0F 23 0F 70    KFKF.........#.p
RECV-> 0020   69 13 00                                           i..
SEND-> 0000   00 00 00 00 BC 10 0C 00 0F 00 15 00 01 00 01 01    ................
RECV-> 0000   00 00 00 00 36 43 1F 00 06 00 00 00 01 00 00 00    ....6C..........
RECV-> 0010   4B 46 4B 46 80 07 00 00 80 07 00 00 0F 23 0F 70    KFKF.........#.p
RECV-> 0020   69 13 00                                           i..
SEND-> 0000   00 00 00 00 C4 06 0C 00 10 00 16 00 01 00 01 01    ................
RECV-> 0000   00 00 00 00 39 3F 1F 00 07 00 00 00 01 00 00 00    ....9?..........
RECV-> 0010   4B 46 4B 46 80 07 00 00 80 07 00 00 0F 23 0F 70    KFKF.........#.p
RECV-> 0020   69 13 00                                           i..
SEND-> 0000   00 00 00 00 CC FB 0C 00 11 00 17 00 01 00 01 01    ................
RECV-> 0000   00 00 00 00 EF A1 0C 00 0B 24 0B 24 02 00 00 02    .........$.$....
RECV-> 0000   00 00 00 00 EF A1 0C 00 0B 24 0B 24 02 00 00 02    .........$.$....
RECV-> 0000   00 00 00 00 55 8F 0C 00 07 00 04 00 00 04 00 00    ....U...........
SEND-> 0000   00 00 00 00 69 7A 0C 00 03 00 07 00 00 05 01 00    ....iz..........
RECV-> 0000   00 00 00 00 36 B4 0C 00 04 00 04 00 00 00 00 01    ....6...........
RECV-> 0000   00 00 00 00 EF A1 0C 00 0B 24 0B 24 02 00 00 02    .........$.$....
RECV-> 0000   00 00 00 00 EF A1 0C 00 0B 24 0B 24 02 00 00 02    .........$.$....
RECV-> 0000   00 00 00 00 EF A1 0C 00 0B 24 0B 24 02 00 00 02    .........$.$....
RECV-> 0000   00 00 00 00 55 8F 0C 00 07 00 04 00 00 04 00 00    ....U...........
SEND-> 0000   00 00 00 00 69 7A 0C 00 03 00 07 00 00 05 01 00    ....iz..........
RECV-> 0000   00 00 00 00 EF A1 0C 00 0B 24 0B 24 02 00 00 02    .........$.$....
RECV-> 0000   00 00 00 00 36 B4 0C 00 04 00 04 00 00 00 00 01    ....6...........
RECV-> 0000   00 00 00 00 EF A1 0C 00 0B 24 0B 24 02 00 00 02    .........$.$....

im trying to send the minimum required packets to get ingame
Title: Re:d1 udp
Post by: UserLoser. on June 21, 2004, 11:59 AM
(DWORD) Protocol id (0 for ingame stuff)
(WORD) Checksum result
(WORD) Packet len excluding protocol id
(WORD) ?
(WORD) ?
(WORD) ?
(WORD) ?
(VOID) Packet data

Fill in the ?'s with Adron's response (Class, player id, sequence, flags, ect)
Title: Re:d1 udp
Post by: Killa on June 21, 2004, 02:09 PM
i already got that,that log is of my bot,im trying to figure otu what packets i still need to send to get into the game.
Title: Re:d1 udp
Post by: Adron on June 21, 2004, 03:59 PM
Quote from: UserLoser. on June 21, 2004, 11:59 AM
(DWORD) Protocol id (0 for ingame stuff)
(WORD) Checksum result
(WORD) Packet len excluding protocol id
(WORD) ?
(WORD) ?
(WORD) ?
(WORD) ?
(VOID) Packet data

Fill in the ?'s with Adron's response (Class, player id, sequence, flags, ect)

Some of those fields are actually bytes.
Title: Re:d1 udp
Post by: UserLoser. on June 21, 2004, 04:07 PM
Quote from: Adron on June 21, 2004, 03:59 PM
Quote from: UserLoser. on June 21, 2004, 11:59 AM
(DWORD) Protocol id (0 for ingame stuff)
(WORD) Checksum result
(WORD) Packet len excluding protocol id
(WORD) ?
(WORD) ?
(WORD) ?
(WORD) ?
(VOID) Packet data

Fill in the ?'s with Adron's response (Class, player id, sequence, flags, ect)

Some of those fields are actually bytes.

Assumed they were words, no clue either hence the '?' :P
Title: Re:d1 udp
Post by: Dyndrilliac on June 22, 2004, 06:15 AM
<Snipped> Lol, didn't realize that was you Mike till I saw the packet log :P </Snipped>

I snipped the above since you've seen it already. For anyone interested in reading what was snipped it was some packet structures for In-Game Packets. Check it out here (http://www.gamehackers.net/forum/viewtopic.php?t=883).

The following are useful In-Game packets and their descriptions.

0x01 - This is the packet sent to move your character from one location to another. Send 2 WORDS with your coordinates to be moved to.

0x02 - This is used to update stats and such.

0x35 - This packet is sent to notify all players of a new player entering the game and deliver his stats values to each client, and transmits the other clients stats back to the person joining.

0x36 - Exactly the same as above except works with leaving.

0x4E - This is used to send in-game chat messages. The data sent is a Null Terminated String.

The above is incase you didn't know. Or anyone else for that matter.
Title: Re:d1 udp
Post by: Killa on July 01, 2004, 12:59 AM
ive got my bot ingame in games with only the host already in them,my question is what packets do i send to players that are already in the game other then the game host,the same ones as the ones i send to the gamehost?and how do i seperate which packet is from who