Ok as promised, here is the new Stealthbot script. It's a COMPLETE re-write from the ground up. There is not a single line of code left from iL's bot from Stealthbot or NNCron. What he had written was a good base, but it was really terrible as far as flexibility and extensibility. The idea he had however, spot on. Using Stealthbot was definately the way to go.
Ok, so how the F does one use this thing? Well, here are the requirements
1. You must be able to host already. Either from a VPS or a machine you have access to that is WINDOWS (XP through Win8 will work, IDK about Win10, I used Win7 and WinXP during development of the bot). Duuh. If you cant host, this script is NOT for you.
2. Decent IT experience. This is not for the faint of heart.
3. AutoIt must be installed on the machine that will be hosting games. There is nothing to configure, you simply need to make sure it's installed and thats it. Stealthbot accesses Autoit's feature via the COM object that comes with Autoit
4. 2 PVPGN Accounts on server.war2.ru. One should be called YOURNAME_HostBot and the other should be called YOURNAME_GameBot. You can use whatever names you want, but that naming convention makes them easy for other players to spot and will know who the owners are.
5. And finally, Stealthbot This is the heart of the Hostbot. There are PLENTY of docs on how to setup Stealthbot for PVPGN. Once You get your YOURNAME_HostBot working and logging in with Stealhbot, the rest is cake.
Steps, do in this order:
1. Setup 2 PVPGN Accounts on the RU server YOURNAME_HostBot and YOURNAME_GameBot
2. Download and install Autoit from https://www.autoitscript.com/cgi-bin/getfile.pl?autoit3/autoit-v3-setup.exe
3. Download and install Stealthbot from: http://www.stealthbot.net/sb/Development/482/StealthBotSetup.msi
4. Open Stealthbot and you will be present with a "Profile" window. Click "Create Profile"
5. Give it a name, Click ok
6. Double Click the new profile that just showed up in the launcher
7. Navigate to Settings->Bot Settings->General Settings and fill out the following:
a. Username - This is the YOURNAME_HostBot that you created in Step 1
b. Password - Duh, take a guess what this is for lmao. PW for YOURNAME_HostBot
c. Server - type in: server.war2.ru
d. cdkey - type in: pvpgn
e. HomeChannel - Type: War2BNE OR You can use your own clan channel if you want. It can be any channel really.
f. Bot Owner - This is your real War2 username. It's not used in our script but it needs to be filled in none the less.
g. Warcraft II BNE - MAKE SURE TO CLICK THIS BUTTON!!
8. Navigate to Advanced Settings
a. Connection Method - Select "Local Hash" from the drop down
b. Click "Apply and Close"
9. Navigate to Scripting->Open Script Folder
a. Right click anywhere in this dir and select "New Text Document" and name it "hostbot.txt"
b. Cut/Paste the code I have in this post into the hostbot.txt file
c. Modify the "Configuration" section in hostbot.txt with your YOURNAME_GameBot and YOURNAME_HostBot information. You can also enable/disable autohosting as well as some other things. I recommend leaving autohosting OFF until you're bot is working perfectly. Then and only then should you enable the autohosting capabilities.
10. Close the Script Directory window
11. Navigate to Scripting->Reload Scripts
12. Click "Connect"
13. Type /msg YOURNAME_HostBot reboot
If everything went ok, then War2 "should" open and autologin to your YOURNAME_GameBot user and then wait for commands. Use another computer to test it with.
This is my makeshift "TODO" List.
* = 100% Complete
~ = Functional but not yet used in a bot command (Partially Complete)
* Optimize code and make it FAR more extensible/flexible/easier to use (yes, I rewrote the ENTIRE bot, theres not a single line left from iL's old bot, this is a complete rewrite from scratch. The only thing that remains is iL's GPL License header lol.
* replace Timer with LongTimer (miliseconds to seconds since Timer sux ass with a 65K limit)
* replace nncron with autoit.
* create new InGame
* autohost games for new players
* add banning and kicking based on slots
~ Make Log() log to file AND the bot owner.
~ add a tVb game type
~ add a FFA game type
~ add feature to allow player to setup all the settings
~Allow any BUILT IN map to be played by giving each map an assigned # that cooresponds to the number of up/down arrows in the built in maps dir.