Since April 14, 2009, Blizzard has implemented Warden on Warcraft 3 on all Battle.Net servers.
Click here for more info on Warden.
What this means is that without proper Warden responses, your Ghost bot WILL be disconnected from Battle.Net after about 2 minutes. Ghost is not currently configured to provide Warden responses by default. This tutorial will guide you through adding Warden support to your Ghost bot step-by-step.
In this guide, Warden Server, BNLS Warden Server, and BNLS.exe all mean the same thing.
Software NeededIn order to get started, you need 2 things:
1. Ghost++ 13.0 or later:
http://www.codelain.com/forum/index.php?board=22.02. You need a BNLS Warden Server.
BNLS Warden Server only runs on Windows. You can either run the Warden Server yourself (it can be run on the same Windows computer that your Ghost++ is running on), or use one provided by someone else. Here is a list of
public Warden Servers. If you are going to run your own Warden Server, you can download it from here:
BNLS Warden Server:
http://www.codelain.com/forum/index.php?topic=5428.0
Setup1. If you are not running your own BNLS Warden Server, skip to Step 6
2. Unzip BNLSWarden.zip,
3. Open "Updater.ini". Change the CDKey in "Updater.ini" to a random one from further down the list. Save changes and close "Updater.ini"
4. Run "WardenUpdater.exe". If Windows asks you about running the file, give it permission to always run. WardenUpdater runs silently; you will not see it run or pop up a window or anything. DO NOT LAUNCH WardenUpdater.exe MULTIPLE TIMES, OR YOU WILL GET IP BANNED.
5. Wait 30 seconds. Now launch BNLS.exe
Now we need to configure Ghost++
6. Open your ghost.cfg file.
Find these 3 lines in your config file!. You can use your existing Ghost++ config file or the default config file that comes with GHost++. You don't need to alter any of your other Ghost configuration info to setup the BNLS connection. Here's an example:
bnet_bnlsserver = localhost
bnet_bnlsport = 9367
bnet_bnlswardencookie = 0
And here's another example:
bnet_bnlsserver = instinct121.no-ip.org
bnet_bnlsport = 6111
bnet_bnlswardencookie = 0
7. If your Warden Server is running on the same machine as Ghost++, then for "bnet_bnlsserver" use localhost as in the example above. If you are using an external (public) Warden Server, type in its hostname or IP address.
8. "bnet_bnlsport" should be left as the default port, 9367.
9. "bnet_bnlswardencookie" should be the default value of 0. If you have more than one bot/realm connecting, just make sure the cookie is not the same for the second connection. Refer to step 10 for more detail.
10. If your Ghost connects to multiple Battle.net servers, follow the instructions in the Advanced section below.
11. You're done. Save your config file changes, and proceed to the Usage section.
Usage1. Make sure BNLS.exe is running first (if you're running your own Warden Server)
2. Launch ghost.exe as normal. If you've set it up properly, you should see the following lines in your Ghost log or console, as it connects successfully to Battle.Net:
[Sun Apr 19 12:39:25 2009] [BNET: uswest.battle.net] connecting to server [uswest.battle.net] on port 6112
[Sun Apr 19 12:39:25 2009] [BNET: uswest.battle.net] connected
[Sun Apr 19 12:39:26 2009] [BNET: uswest.battle.net] creating BNLS client
[Sun Apr 19 12:39:26 2009] [BNLSC: localhost:9367:C0] connecting to server [localhost] on port 9367
[Sun Apr 19 12:39:26 2009] [BNLSC: localhost:9367:C0] connected
[Sun Apr 19 12:39:26 2009] [BNET: uswest.battle.net] username [XXXXXXXX] accepted
[Sun Apr 19 12:39:26 2009] [BNET: uswest.battle.net] using battle.net logon type (for official battle.net servers only)
[Sun Apr 19 12:39:26 2009] [BNET: uswest.battle.net] logon successful
[Sun Apr 19 12:39:26 2009] [BNET: uswest.battle.net] joining channel [XXXXXXXX]
[Sun Apr 19 12:39:26 2009] [BNET: uswest.battle.net] joined channel [XXXXXXXX]
Advanced––Your Ghost has multiple Battle.Net connections––
If your Ghost connects to multiple Battle.Net servers (or you have multiple instances of Ghost on the same IP Address), you need to add the 3 lines to the config for each Battle.Net server (if it isn't in the config already). Continuing our example from above, let's say Ghost also connects to uswest.battle.net and useast.battle.net. You would add the lines to your config as follows:
bnet_server = uswest.battle.net
bnet_bnlsserver = instinct121.no-ip.org
bnet_bnlsport = 6111
bnet_bnlswardencookie = 0
[...]
bnet2_server = useast.battle.net
bnet2_bnlsserver = instinct121.no-ip.org
bnet2_bnlsport = 6111
bnet2_bnlswardencookie = 1
You would use the same bnslserver and bnlsport as before. HOWEVER, the bnlswardencookie must be unique for each Battle.Net connection from your IP address. So increment them for each connection, as in the example above.
––Changing the Warden Server port––
Most people do not need to do this. However, if you need to change the port for the Warden Server, you can do so in the "BNLS.ini" file. Of course, you would also make sure your "bnet_bnlsport" value matches the new port number. The default port is 9367, but as you can see in the example, the port has been changed in that public server to 6111.
––Running BNLS Warden Server on Linux––
Some people have gotten it working. Try reading these two threads:
http://www.codelain.com/forum/index.php?topic=4910.0http://www.codelain.com/forum/index.php?topic=4911.0––Firewalls and NAT––
If the Warden Server is running on another machine, different from the machine Ghost is running on, you will need to make sure Port 9367 is accessible, so that Ghost can make the Warden connection to it. Make sure the firewall on the Warden Server is not blocking Port 9367. If the Warden server is behind a NAT connection, and outside the Ghost server's local network, make sure Port 9367 is forwarded correctly by the NAT router.
If the Warden Server and Ghost are on the same machine, and you're having troubles making a connection, make sure the firewall isn't blocking localhost, 127.0.0.1, or Port 9367.
Troubleshooting1. If you see "
received Error Code 3" in your Ghost logs, like this:
[Sun Apr 19 12:27:27 2009] [BNLSPROTO] received error code 3
[Sun Apr 19 12:28:27 2009] [TCPSOCKET] closed by remote host
[Sun Apr 19 12:28:27 2009] [BNLSC: 127.0.0.1:9367:C0] disconnected from BNLS server due to socket not connected
[Sun Apr 19 12:28:27 2009] [BNET: uswest.battle.net] deleting BNLS client
[Sun Apr 19 12:30:05 2009] [TCPSOCKET] closed by remote host
[Sun Apr 19 12:30:05 2009] [BNET: uswest.battle.net] disconnected from battle.net due to socket not connected
This means the Warden Server doesn't have the module it needs to provide the correct responses to the Battle.Net Server. The Warden Server periodically obtains this module directly from Battle.Net by using the "WardenUpdater.exe" application.
So, the most common cause of Error Code 3 is when WardenUpdater can't connect to Battle.Net to retrieve the module. The most common cause for WardenUpdater being unable to connect to Battle.Net is because you got IP Banned because you didn't follow Step 3 of the Setup. Look in the "Updater Log.txt" file. If it looks something like this:
1:17:27 p.m. Date: 22/04/2009
1:17:27 p.m. Connecting to USEast.battle.net:6112
1:17:27 p.m. Connected to battle.net
1:17:27 p.m. Connection to battle.net Error: Connection is aborted due to timeout or other failure
1:17:27 p.m. Program Unloaded.
then you're either IP Banned or your Firewall is blocking "WardenUpdater.exe". If it's your firewall, then fix it.
Try this to see if you're IP Banned.
So if you're IP Banned, now we have to connect you to a Battle.Net server that you're not IP banned on. Open "Updater.ini". Change the Battle.Net server to a new one (possible Battle.Net servers are uswest.battle.net, useast.battle.net, europe.battle.net, and asia.battle.net). You'll also need to change the CDKey. In "Updater.ini" choose a random CDKey from the HUGE list you see below and paste it into the CDKey field at the top. Now, save your changes to "Updater.ini" and close it. Run "WardenUpdater.exe" ONCE now (if you run it multiple times, you will get IP Banned). Look in your "Updater Log.txt". A successful run of WardenUpdater will look something like this in the log (the numbers and letters will be different):
8:48:26 AM Downloaded 16000 Bytes
8:48:26 AM Downloaded 16500 Bytes
8:48:26 AM Downloaded 17000 Bytes
8:48:26 AM Downloaded 17211 Bytes
8:48:26 AM 6F791FEC76C461AB5C42224DEC2B3114.mod was saved.
8:48:26 AM Program Unloaded.
A log that looks like this also means that WardenUpdater was successful:
3:45:22 PM S>C 0x0B
3:45:22 PM S>C 0x0A
3:45:22 PM S>C 0x0F
3:45:22 PM S>C 0x0F
3:45:24 PM We already have this module: 1883716F555DAB85A0CE6BCA1D4C97CA.mod
3:45:24 PM Program Unloaded.
Now that WardenUpdater has completed successfully, your BNLS Warden Server should work without Error Code 3.
2. Other Error Codes:
Error Codes 1, 2, 3, 4, 6, 7, 255 and more: http://www.codelain.com/forum/index.php?topic=4876.msg34721#msg34721
3. Error when running BNLS.exe or WardenUpdater.exe:
"Component 'MSWINSCK.OCX' or one of its dependencies not correctly registered: a file is missing or invalid"
Download and install the required Library files here:
http://www.ascentive.com/support/new/libraryfiles.exe4. Warden Server crashes and other errors:
http://www.codelain.com/forum/index.php?topic=4904.05. Warden Server crashes right away and you see this error text in Ghost:
[TCPSOCKET] error (recv) - ECONNRESET
[BNLSC: localhost:9367:C0] disconnected from BNLS server due to socket error
[BNET: uswest.battle.net] deleting BNLS client
Windows Server 2003 and 2008 users may need to disable DEP for the applications to run. See here:
http://www.codelain.com/forum/index.php?topic=4904.msg35333#msg353336. Error Code 6: You may get this if you are running Warden Server on a non-English Windows. Warden Server probably needs to run on English language Windows.
7. Getting Help
If you can't get it working, create a new thread in the
Help & Support forum. Make sure you include the relevant lines from your ghost.cfg, and the output of your Ghost console or ghost.log showing the connection attempt and/or subsequent disconnection. Also, post the last 6 lines of your "Updater Log.txt"
-updated on Sept 8, 2009 by Instinct121