• Welcome to Valhalla Legends Archive.
 

Joining Games

Started by MindArchon, September 29, 2004, 06:53 PM

Previous topic - Next topic

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 ...

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

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)

NonNTString "PXES"
DWord 0xC7
NTString GameName
NTString GamePassword


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?

UserLoser.

Version byte for Starcraft Brood War is 0xC9

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?

MyndFyre

Quote from: MindArchon on September 29, 2004, 07:41 PM
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?

You can leave chat at any time; that is (I believe) how most /rejoin commands work.
QuoteEvery generation of humans believed it had all the answers it needed, except for a few mysteries they assumed would be solved at any moment. And they all believed their ancestors were simplistic and deluded. What are the odds that you are the first generation of humans who will understand reality?

After 3 years, it's on the horizon.  The new JinxBot, and BN#, the managed Battle.net Client library.

Quote from: chyea on January 16, 2009, 05:05 PM
You've just located global warming.

MindArchon

Quote from: MyndFyre on September 29, 2004, 07:51 PM
Quote from: MindArchon on September 29, 2004, 07:41 PM
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?

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

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

Zorm

Quote from: MindArchon on September 29, 2004, 07:57 PM
Quote from: MyndFyre on September 29, 2004, 07:51 PM
Quote from: MindArchon on September 29, 2004, 07:41 PM
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?

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

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

Correct, you can be in chat and in a game at the same time.
"Now, gentlemen, let us do something today which the world make talk of hereafter."
- Admiral Lord Collingwood

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

MyndFyre

Quote from: MindArchon on September 29, 2004, 08:08 PM
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?

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.
QuoteEvery generation of humans believed it had all the answers it needed, except for a few mysteries they assumed would be solved at any moment. And they all believed their ancestors were simplistic and deluded. What are the odds that you are the first generation of humans who will understand reality?

After 3 years, it's on the horizon.  The new JinxBot, and BN#, the managed Battle.net Client library.

Quote from: chyea on January 16, 2009, 05:05 PM
You've just located global warming.

Skywing

Quote from: MyndFyre on September 29, 2004, 08:11 PM
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.
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).

Minux

I personally leave chat first.


SendPacket &H10

InsertNonNTString "PXES"
InsertDWORD &HC9
InsertNTString "BLAH"
InsertNTString "moo"
SendPacket &h22


What you are doing should work....

MindArchon

#10
Well.. it doesnt. If it matters here is my code (Visual Basic)

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


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)