Valhalla Legends Forums Archive | Battle.net Bot Development | Joining Games

AuthorMessageTime
MindArchon
Im having trouble making my bot join Starcraft games. Heres where I am

I created a basic bot that connects using packets (first bot :))

It works fairly well.. I got it to parse ladder.. etc.. and I want to add game support. Ive basically given up on making it create games because I have no idea what this is ...

[code],44,14,6,2,2,1,f69e9256,4,, & Username & 0x0D & "The Lost Temple" & 0x0D[/code]

I dont know how to change the map, or change the game type, So I thought I would move on to joining games (seems easier). I researched it (other posts), and I think I have the packet built up right, but battle.net just disconnects me whenever I try to send it. Here is the packet (0x22) I am sending (built up like this)

[code]NonNTString "PXES"
DWord 0xC7
NTString GameName
NTString GamePassword[/code]

I dont really know what the version thing is, but I got it off a winbot documentation. The version I got from BNLS 0x09 doesnt work. Anyone know why its not working?

EDIT: I take it that once you do join the game successfully battle.net sends 0x09, and if the status is OK, then I send leave chat?
September 29, 2004, 11:53 PM
UserLoser.
Version byte for Starcraft Brood War is 0xC9
September 30, 2004, 12:13 AM
MindArchon
Alright I changed it but it still doesnt work. Is it because I am leaving the chat directly after sending the packet? Am I supposed to wait to recieve 0x09 before I leave the chat?
September 30, 2004, 12:41 AM
Myndfyr
[quote author=MindArchon link=topic=8946.msg82679#msg82679 date=1096504900]
Alright I changed it but it still doesnt work. Is it because I am leaving the chat directly after sending the packet? Am I supposed to wait to recieve 0x09 before I leave the chat?
[/quote]

You can leave chat at any time; that is (I believe) how most /rejoin commands work.
September 30, 2004, 12:51 AM
MindArchon
[quote author=MyndFyre link=topic=8946.msg82680#msg82680 date=1096505466]
[quote author=MindArchon link=topic=8946.msg82679#msg82679 date=1096504900]
Alright I changed it but it still doesnt work. Is it because I am leaving the chat directly after sending the packet? Am I supposed to wait to recieve 0x09 before I leave the chat?
[/quote]

You can leave chat at any time; that is (I believe) how most /rejoin commands work.
[/quote]

That doesnt make much sense, doesnt that mean you could be in a game and in the chat at the same time?
September 30, 2004, 12:57 AM
zorm
[quote author=MindArchon link=topic=8946.msg82683#msg82683 date=1096505872]
[quote author=MyndFyre link=topic=8946.msg82680#msg82680 date=1096505466]
[quote author=MindArchon link=topic=8946.msg82679#msg82679 date=1096504900]
Alright I changed it but it still doesnt work. Is it because I am leaving the chat directly after sending the packet? Am I supposed to wait to recieve 0x09 before I leave the chat?
[/quote]

You can leave chat at any time; that is (I believe) how most /rejoin commands work.
[/quote]

That doesnt make much sense, doesnt that mean you could be in a game and in the chat at the same time?
[/quote]

Correct, you can be in chat and in a game at the same time.
September 30, 2004, 1:06 AM
MindArchon
Then wouldnt it show you in a channel and in the game at the same time? Couldnt you also chat in the game and in the channel at the same time?

Note: I still have that problem ^^. I dont want to get too off topic here
September 30, 2004, 1:08 AM
Myndfyr
[quote author=MindArchon link=topic=8946.msg82686#msg82686 date=1096506486]
Then wouldnt it show you in a channel and in the game at the same time? Couldnt you also chat in the game and in the channel at the same time?
[/quote]

Sorry I don't have an answer for you re: your original topic, but I'm hypothesizing about this...

If Bnet only stores the most recent location, then I would imagine it would return:

*in Op [vL]*
User *so-and-so* is in a private channel.
*in Op [vL], joins a game w/o leaving chat*
User *so-and-so* is in a private/public game.
*in game, changes to Op e1-*
User *so-and-so* is in a private channel.

Tough to say.  :-)  It would be interesting to play around with, anyway.
September 30, 2004, 1:11 AM
Skywing
[quote author=MyndFyre link=topic=8946.msg82688#msg82688 date=1096506691]
Sorry I don't have an answer for you re: your original topic, but I'm hypothesizing about this...

If Bnet only stores the most recent location, then I would imagine it would return:

*in Op [vL]*
User *so-and-so* is in a private channel.
*in Op [vL], joins a game w/o leaving chat*
User *so-and-so* is in a private/public game.
*in game, changes to Op e1-*
User *so-and-so* is in a private channel.

Tough to say.  :-)  It would be interesting to play around with, anyway.
[/quote]
You can only be on one place at the same time on the chatserver.

Note that games are in general not tightly linked with the chatserver.  D2 Realm games aren't linked at all, and games for other products are just linked for purposes of advertising the game in the game list (so after you are done acqurinig players, you're free to leave the chatserver game with no real impact on the "actual" game).
September 30, 2004, 1:27 AM
Minux
I personally leave chat first.

[code]
SendPacket &H10

InsertNonNTString "PXES"
InsertDWORD &HC9
InsertNTString "BLAH"
InsertNTString "moo"
SendPacket &h22
[/code]

What you are doing should work....
September 30, 2004, 1:35 AM
MindArchon
Well.. it doesnt. If it matters here is my code (Visual Basic)

[code]Dim packb As New PacketBuffer

With packb
.Clear
.SendPacket &H10
End With

AddRTB channeltext, "Left Chat", vbYellow, "", vbWhite

With packb
.Clear
.InsertNonNTString "PXES"
.InsertDWORD &HC9
.InsertNTString "mind"
.InsertNTString "archon"
.SendPacket &H22
End With

AddRTB channeltext, "Attempting To Join Game...", vbGreen, "", vbWhite[/code]

Would the map or gametype being played matter? Would the speed of the game matter? If it helps im not spoofing my ping and I have no lag plug.

If all else fails could someone explain the creating game packet? Ive seen it before but theres a big part I dont understand: The statstring. How do you get this and where do you specify the map to be played?
-------------------------
EDIT: Searching around, I found this: http://tks.slacktech.com/tuts/CreateGame0x1C.txt

Very nice documentation, I understand it a bit better now. However, I still dont know how to choose the map you want to create. (Ive kind of given up joining games now, since it doesnt seem to be working when it should)
September 30, 2004, 1:51 AM

Search