Valhalla Legends Archive

Programming => Battle.net Bot Development => Topic started by: GoSuGaMING on May 19, 2004, 03:29 PM

Title: Packets for Leaving Games
Post by: GoSuGaMING on May 19, 2004, 03:29 PM
what do you need to send to leave a game... like b4 the game even starts?
Title: Re:Packets for Leaving Games
Post by: Eric on May 19, 2004, 03:41 PM
0x10 and 0x0C
Title: Re:Packets for Leaving Games
Post by: GoSuGaMING on May 19, 2004, 04:20 PM
thnx
Title: Re:Packets for Leaving Games
Post by: Lenny on May 19, 2004, 04:21 PM
Out of curiosity, what product is this for?
Title: Re:Packets for Leaving Games
Post by: GoSuGaMING on May 19, 2004, 04:38 PM
Quote from: Lenny on May 19, 2004, 04:21 PM
Out of curiosity, what product is this for?

Starcraft / Broodwar

hey lord... i never actually start the game how would i make it leave??? there is no opponent so it cant start so im not sure how i would parse this lil help>?
Title: Re:Packets for Leaving Games
Post by: effect on May 19, 2004, 07:05 PM
Logic says , you would have to start the game to leave it ?
Title: Re:Packets for Leaving Games
Post by: MyndFyre on May 19, 2004, 07:08 PM
Quote from: effect on May 19, 2004, 07:05 PM
Logic says , you would have to start the game to leave it ?

I presume what he means is that he creates a game (example, click "Create" on the left-hand side of the Battle.net window in Brood War), but doesn't ever "Start" the game.  He then leaves the game and then re-enters chat.  It appears that he is trying to find the correct sequence of packets to send in a similar scenario, with his bot.

I suggest, Gosugaming, that you find a packet logger, and log the packets from your Brood War client.
Title: Re:Packets for Leaving Games
Post by: UserLoser. on May 19, 2004, 07:45 PM
Quote from: LoRd[nK] on May 19, 2004, 03:41 PM
0x10 and 0x0C

Those are not related to leaving games.
Title: Re:Packets for Leaving Games
Post by: Eli_1 on May 19, 2004, 07:53 PM
I'll go packet log it you poopie heads.
Title: Re:Packets for Leaving Games
Post by: Eric on May 19, 2004, 07:56 PM
Quote from: UserLoser. on May 19, 2004, 07:45 PM
Quote from: LoRd[nK] on May 19, 2004, 03:41 PM
0x10 and 0x0C

Those are not related to leaving games.

It's before the game starts.
Title: Re:Packets for Leaving Games
Post by: MyndFyre on May 19, 2004, 07:58 PM
Quote from: Eli_1 on May 19, 2004, 07:53 PM
I'll go packetlog it you poopie heads.
Be sure to share the results ^_^
Title: Re:Packets for Leaving Games
Post by: GoSuGaMING on May 19, 2004, 08:01 PM
Quote from: Eli_1 on May 19, 2004, 07:53 PM
I'll go packetlog it you poopie heads.

i already packetlogged it and figured it out... thnx guys
Title: Re:Packets for Leaving Games
Post by: MyndFyre on May 19, 2004, 08:13 PM
Quote from: GoSuGaMING on May 19, 2004, 08:01 PM
Quote from: Eli_1 on May 19, 2004, 07:53 PM
I'll go packetlog it you poopie heads.

i already packetlogged it and figured it out... thnx guys

So how about sharing the results you poopie head?
Title: Re:Packets for Leaving Games
Post by: Eli_1 on May 19, 2004, 08:16 PM
*Shares his results!*

This is everything I sent after creating my own game and then leaving. I'm sure it would be different if I joined someone elses game or there were other people there.

Quote
00 05 5f ef 7c 54 00 40 05 06 d6 41 08 00 45 60   .._.|[email protected]`
00 2c df 26 40 00 20 06 32 44 18 1a 26 7d 3f f0   .,.&@. .2D..&}?.
ca 7a 06 6e 17 e0 0a 8e 45 d9 dd b2 6d b3 50 18   .z.n....E...m.P.
f9 a4 b0 03 00 00 ff 02 04 00                     ..........

00 05 5f ef 7c 54 00 40 05 06 d6 41 08 00 45 60   .._.|[email protected]`
00 38 e0 26 40 00 20 06 31 38 18 1a 26 7d 3f f0   .8.&@. .18..&}?.
ca 7a 06 6e 17 e0 0a 8e 45 dd dd b2 6d b3 50 18   .z.n....E...m.P.
f9 a4 c9 d3 00 00 ff 0a 10 00 41 73 79 6c 75 6d   ..........Eli_1
5d 6f 4c 5b 00 00                                 ......


00 05 5f ef 7c 54 00 40 05 06 d6 41 08 00 45 60   .._.|[email protected]`
00 43 e1 26 40 00 20 06 30 2d 18 1a 26 7d 3f f0   .C.&@. .0-..&}?.
ca 7a 06 6e 17 e0 0a 8e 45 ed dd b2 6d b3 50 18   .z.n....E...m.P.
f9 a4 59 47 00 00 ff 0b 08 00 50 58 45 53 ff 0c   ..YG......PXES..
13 00 02 00 00 00 6f 50 20 4f 75 54 4c 61 57 7a   ......oP aSdAsDa
00                                                .


00 05 5f ef 7c 54 00 40 05 06 d6 41 08 00 45 60   .._.|[email protected]`
00 3c e9 26 40 00 20 06 28 34 18 1a 26 7d 3f f0   .<.&@. .(4..&}?.
ca 7a 06 6e 17 e0 0a 8e 46 08 dd b2 71 87 50 18   .z.n....F...q.P.
fa 44 6d 81 00 00 ff 15 14 00 36 38 58 49 50 58   .Dm.......68XIPX
45 53 bd 0a 00 00 a8 43 a4 40                     ES.....C.@

00 05 5f ef 7c 54 00 40 05 06 d6 41 08 00 45 60   .._.|[email protected]`
00 3a ec 26 40 00 20 06 25 36 18 1a 26 7d 3f f0   .:.&@. .%6..&}?.
ca 7a 06 6e 17 e0 0a 8e 46 1c dd b2 72 d9 50 18   .z.n....F...r.P.
f9 f0 d5 e9 00 00 ff 21 12 00 36 38 58 49 50 58   .......!..68XIPX
45 53 a2 0a 00 00 00 00                           ES......

00 05 5f ef 7c 54 00 40 05 06 d6 41 08 00 45 60   .._.|[email protected]`
00 3b ef 26 40 00 20 06 22 35 18 1a 26 7d 3f f0   .;.&@. ."5..&}?.
ca 7a 06 6e 17 e0 0a 8e 46 2e dd b2 72 d9 50 18   .z.n....F...r.P.
f9 f0 c9 7f 00 00 ff 0e 13 00 61 73 64 61 73 64   ..........asdasd
61 73 64 20 64 6f 6e 65 00                        asd done.

Wtf is 0x15 and 0x21? :(
(and no I can't check bnetdocs because I got owned by Arta's paranoid auto-ipban for wrong passwords).
Title: Re:Packets for Leaving Games
Post by: GoSuGaMING on May 19, 2004, 08:26 PM
 here is my packetlog:


1  Hide  Hide  4  Send  
0000  FF 02 04 00                                        ....

2  Hide  Hide  21  Send  
0000  FF 0A 15 00 4E 61 4B 65 44 2E 50 61 63 6B 65 74    ....NaKeD.Packet
0010  4C 6F 67 00 00                                     Log..

3  Hide  Hide  8  Send  
0000  FF 0B 08 00 50 58 45 53                            ....PXES

4  Hide  Hide  13  Send  
0000  FF 0C 0D 00 02 00 00 00 63 63 78 63 00             ........ccxc.

5  Hide  Hide  62  Recv  
0000  FF 0A 3E 00 4E 61 4B 65 44 2E 50 61 63 6B 65 74    ..>.NaKeD.Packet
0010  4C 6F 67 00 50 58 45 53 20 30 20 30 20 30 20 30    Log.PXES 0 0 0 0
0020  20 30 20 30 20 30 20 30 20 50 58 45 53 00 4E 61     0 0 0 0 PXES.Na
0030  4B 65 44 2E 50 61 63 6B 65 74 4C 6F 67 00          KeD.PacketLog.

6  Hide  Hide  49  Recv  
0000  FF 0F 31 00 07 00 00 00 00 00 00 00 2F 00 00 00    ..1........./...
0010  00 00 00 00 0D F0 AD BA 0D F0 AD BA 4E 61 4B 65    ............NaKe
0020  44 2E 50 61 63 6B 65 74 4C 6F 67 00 63 63 78 63    D.PacketLog.ccxc
0030  00                                                 .

7  Hide  Hide  70  Recv  
0000  FF 0F 46 00 01 00 00 00 00 00 00 00 2F 00 00 00    ..F........./...
0010  00 00 00 00 0D F0 AD BA 0D F0 AD BA 4E 61 4B 65    ............NaKe
0020  44 2E 50 61 63 6B 65 74 4C 6F 67 00 50 58 45 53    D.PacketLog.PXES
0030  20 30 20 30 20 30 20 30 20 30 20 30 20 30 20 30     0 0 0 0 0 0 0 0
0040  20 50 58 45 53 00                                   PXES.

8  Hide  Hide  20  Send  
0000  FF 15 14 00 36 38 58 49 50 58 45 53 BA 0A 00 00    ....68XIPXES....
0010  F8 FC AB 40                                        ...@

9  Hide  Hide  67  Recv  
0000  FF 15 43 00 B2 0A 00 00 2E 73 6D 6B 00 36 E3 10    ..C......smk.6..
0010  C5 82 C3 01 61 64 30 30 30 61 62 32 2E 73 6D 6B    ....ad000ab2.smk
0020  00 68 74 74 70 3A 2F 2F 73 68 6F 70 2E 62 6C 69    .http://shop.bli
0030  7A 7A 61 72 64 2E 63 6F 6D 2F 73 65 63 74 69 6F    zzard.com/sectio
0040  6E 32 00                                           n2.

10  Hide  Hide  18  Send  
0000  FF 21 12 00 36 38 58 49 50 58 45 53 B2 0A 00 00    .!..68XIPXES....
0010  00 00                                              ..


heres what i used...


With PBuffer
.SendPacket &H2
.InsertNTString vUser
.InsertBYTE 0
.SendPacket &HA
.InsertDWORD &H1
.InsertNTString MyChan
.SendPacket &HC
End With


:)
Title: Re:Packets for Leaving Games
Post by: Eli_1 on May 19, 2004, 08:29 PM
For the sake of emulating the game client more closely:

With PBuffer
   .SendPacket &H2

   .InsertNTString vUser
   .InsertBYTE 0
   .SendPacket &HA

   .InsertNonNTString MyProduct
   .SendPacket &HB

   .InsertDWORD &H1
   .InsertNTString MyChan
   .SendPacket &HC
End With



Edit:
Quote
Wtf is 0x15 and 0x21? :(
(and no I can't check bnetdocs because I got owned by Arta's paranoid auto-ipban for wrong passwords).
C->S 0x15 = Request Current Ad Banner?
C->S 0x21 = Mystery...
Title: Re:Packets for Leaving Games
Post by: MyndFyre on May 19, 2004, 08:44 PM
According to [edit]Open[/edit] BnetDocs, 0x21 is
BNCS_0x21 - SID_DISPLAYAD
Title: Re:Packets for Leaving Games
Post by: GoSuGaMING on May 19, 2004, 08:47 PM
well with the code i have when you do that it takes you to broodwar useast-1 or w/e... i havnt figuerd that one out  yet ^^
Title: Re:Packets for Leaving Games
Post by: Eli_1 on May 19, 2004, 08:49 PM
It's because your not sending 0x0B like my sexed up code does! Your's is poo!
Title: Re:Packets for Leaving Games
Post by: Eric on May 19, 2004, 08:56 PM
Quote from: Eli_1 on May 19, 2004, 08:49 PM
It's because your not sending 0x0B like my sexed up code does! Your's is poo!

Failure to request the channel list apon exiting a game will not affect anything.
Title: Re:Packets for Leaving Games
Post by: GoSuGaMING on May 19, 2004, 09:04 PM
Quote from: LoRd[nK] on May 19, 2004, 08:56 PM
Quote from: Eli_1 on May 19, 2004, 08:49 PM
It's because your not sending 0x0B like my sexed up code does! Your's is poo!

Failure to request the channel list apon exiting a game will not affect anything.

so why isnt it joining my home channel?
Title: Re:Packets for Leaving Games
Post by: Eli_1 on May 19, 2004, 09:09 PM
Have you tryed any other DWORDS (for 0x0C), like 2? (just a guess)



[Edit]
Quote from: LoRd[nK] on May 19, 2004, 08:56 PM
Quote from: Eli_1 on May 19, 2004, 08:49 PM
It's because your not sending 0x0B like my sexed up code does! Your's is poo!

Failure to request the channel list apon exiting a game will not affect anything.
It was more of a joke than anything. :P
Title: Re:Packets for Leaving Games
Post by: GoSuGaMING on May 19, 2004, 09:11 PM
*off-topic*
i thank baddblood & Eurijk! i couldnt have done this with out his awesome help!
Title: Re:Packets for Leaving Games
Post by: Eli_1 on May 19, 2004, 09:12 PM
Quote from: GoSuGaMING on May 19, 2004, 09:11 PM
*off-topic*
i thank baddblood i couldnt have done this with out his awesome help!

Wanna tell us what was wrong?
Title: Re:Packets for Leaving Games
Post by: GoSuGaMING on May 19, 2004, 09:14 PM
Quote from: Eli_1 on May 19, 2004, 09:12 PM
Quote from: GoSuGaMING on May 19, 2004, 09:11 PM
*off-topic*
i thank baddblood i couldnt have done this with out his awesome help!

Wanna tell us what was wrong?

no i mean he helped me come up with my origional code for leaving the game i still have not fixed my bug on how to leave joining the home cahnnel :) still working on that
Title: Re:Packets for Leaving Games
Post by: LordNevar on May 19, 2004, 09:28 PM
Obvioulsy wasn't that much of a help than.
Title: Re:Packets for Leaving Games
Post by: MyndFyre on May 20, 2004, 12:23 AM
Quote from: GoSuGaMING on May 19, 2004, 09:14 PM
Quote from: Eli_1 on May 19, 2004, 09:12 PM
Quote from: GoSuGaMING on May 19, 2004, 09:11 PM
*off-topic*
i thank baddblood i couldnt have done this with out his awesome help!

Wanna tell us what was wrong?

no i mean he helped me come up with my origional code for leaving the game i still have not fixed my bug on how to leave joining the home cahnnel :) still working on that

You're sending 0x0c incorrectly, most likely.  You're probably sending:


FF 0C 09 00 01 00 00 00 00


whereas you need to be saving your old channel, and use the Standard Join flag (0x00 for the first DWORD within the packet) and appending your channel name.
Title: Re:Packets for Leaving Games
Post by: GoSuGaMING on May 20, 2004, 11:53 AM
Quote from: Myndfyre on May 20, 2004, 12:23 AM

Wanna tell us what was wrong?
Quote

no i mean he helped me come up with my origional code for leaving the game i still have not fixed my bug on how to leave joining the home cahnnel :) still working on that
Quote

You're sending 0x0c incorrectly, most likely.  You're probably sending:


FF 0C 09 00 01 00 00 00 00


whereas you need to be saving your old channel, and use the Standard Join flag (0x00 for the first DWORD within the packet) and appending your channel name.
Quote


fixed :)

With PBuffer
.SendPacket &H2
.InsertNTString vUser
.InsertBYTE 0
.SendPacket &HA
.InsertDWORD &H0
.InsertNTString MyChan
.SendPacket &HC
End With