HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Hosting Bot

12-28-2007, 01:09 PM#1
Strilanc
I want to write a host bot. I want to make it because people often can't host games, and someone running one of these would be fantastic. More specifically:
- The bot sits in the channel, until a create command is given (presumably it can download maps from epic war or other trusted sites, but that is not difficult).
- It then creates a game with the specified settings (public/private/refs/etc).
- It surrenders the first player slot to the command issuer when they arrive.
- It uploads to other players and otherwise acts normally until the game starts, at which point it exits.

I don't doubt this can be done. WC3 can do all of these things, so there is no reason a program can't emulate that. But I don't have any experience with writing this type of thing.

I need to know where I can go to find:
- Information on how to log the program on to battle.net
- Information on interacting within channels
- Information on game lobby interaction (including DLs)

I do have Wireshark, so I can figure some of it out myself, but I don't have the experience to rely on just myself for a project like this.
01-04-2008, 06:46 PM#2
Mapz_Maker
This may be already obvious, but; there is no documentation on that stuff to my knowledge. What will need to be done is that you should probably write a quick app that monitors wc3.exe's binary stream. It would then record this to a file. Have it write to the file the byte values and the ascii characters, this would be very useful. Most likely you should have it begin recording before you enter a chat channel, and stop afterwards, using that type of thing. Then you would need to modify the binary stream with the information you want wc3 to do. For instance, you should find what you need. Then you send information through wc3's binary stream to B.Net which says that such and such happened. You might have to send some stuff to the wc3 app, but that should be mostly unnecessary. I don't know much about the implementation of most of this, but i imagine that it would be easiest done using the .NET framework, just for simplicity and speed of use. Anyways, you will need to be able to host games in order to construct this, otherwise you will be missing valuable commands (binary sequences). Plus, only people who can already host could have this bot successfully running. You might look up existing wc3 bots and see if you can gather source code. This would be a tremendous boost towards your ultimate goal.
01-05-2008, 06:07 PM#3
Strilanc
I found http://www.bnetdocs.org/ awhile ago, and have my bot logging in correctly. Some of the encryption stuff you need to do is devious.

You're right about no docs on creating games. I'm breaking the code in that now...