NBBOT FAQ
Answers to frequently asked questions
Credits
NBBOT is primarily the creation of Adron, and of the [RIP] guild. He is
currently WoLF`Adron[RIP] and we are honored to consider him a
WoLF brotherhood member and friend. There isn't a nicer person or better
soul on battle.net.
According to Adron, this NBBOT was created to answer the need for a chat interface for people who wanted to converse in languages requiring the use of high ASCII characters. Blizzard was unwilling or unresponsible to their needs, so Adron and [RIP] accepted the challenge.
How do I install it?
SET PATH=%PATH%;C:\DIABLO
PATH=C:\WINDOWS;C:\WINDOWS\COMMAND;C:\DIABLO
Now what?
Although you have done everything necessary to get the NBBOT.EXE to run, it will not be of any use to you until you personalize it. You will want to put in your own user names, idle strings, and home channel. It will also be necessary to set yourself up as an owner or operator if you want to control it from other user names. So security groups must be set.
What are all these files about?
This looks hard! How will you teach me?
We are going to learn the sections of the CFG and USR files. This will be a task-oriented instruction set, where we set a goal, think about what we need, change the CFG and USR file, run the bot and test our changes, and examine the results.
Why not just give me a working CFG and USR file?
Your bot would be running and you would start asking questions like "How do I do a safe list?", "How do I get it to listen to my commands?", and "How do I get it to auto-designate people?" This lesson’s approach just short-circuits your questions by teaching you how to perform the tasks and why they work. Soon you will be self-sufficient on 95% of your configuration needs.
Wait! How do I read the entries in the CFG file?
OK. The following is a brief primer on the NBBOT.CFG file, so we have some common ground for discussing how to perform the tasks.
Command Reference
Your CFG file may include the following entries. This is a list of commands available for you to program the behavior of your bots. At this time they are only listed. Discussion will come later.
The next few sections take you through the prerequisites to becoming an NBBOT programmer. While you do not have to memorize every command or syntax, you do need to understand how each part is used.
Commands:
- :reload
- :quit
- :random alternative1|alternative2|alternative3|...|alternativeX
- :config <new config section>
- :autoban <user>
- :autounban <user>
- :roll <dice>
- :scanf <base variable no> <expected number of variables> <match string>&<searched string>
- :novote
- :make <game>
- :leave
- :joingame <game>
- :passgame <game> <pass>
- :listgame <level range>
- :setprof <user> <variable> <value>
- :listuserpriv <group>
- :listidentities <user>
- :setpass1 <newpass1>
- :setpass2 <newpass2>
- :setuserpriv <group> <user> [priv]
- :renameuser <newname>
- :joinuser <otheruser> <userspass2>
- :nothing
Even though it says "config file commands" for the following entries, they are more closely related to your DOS environment variables. Only, they apply just to your NBBOT. Discussion of the important ones will occur at the appropriate time.
Config file commands
- server=
- gate=
- log=
- home=
- basegate=
- votes=
- floodprot=
- spawn=
- load=
- reconnectinterval=
- idleinterval=
- idle=
- username=
- statstring=
- stickyhome=
- password=
- config=
- diablo=
- battle=
- storm=
- automerge=
- regauth=
- regver=
- clientid=
- clienttoken=
- designategroup=
- topdesignatepriority=
- cdkey=
- cdkeyname=
- cdspawn=
- simulogon=
- noGPF
- type=
This section describes the behavior of your bot. It is in the event filters where you define how the bot should respond when certain things occur in specified ways. For example, you could program the bot to say "hello, master" every time it saw you join the channel.
The event filters section in the config file make the assumption that you understand the event types. You are unlikely to understand event types unless you have spent some time in telnet or programming your own bot for battle.net. Here is a sample screen from a telnet session to battle.net:
2010 NAME WoLF`GRoK~{RC}
1007 CHANNEL "Blizzard Chat 3"
1001 USER Guest20 0010 [CHAT]
1001 USER WoLF`GRoK~{RC} 0010 [CHAT]
1018 INFO "Welcome to Battle.net!"
1018 INFO "This server is hosted by Mindspring."
1018 INFO "There are currently 45422 users online, in 11181 games and 3055 channels."
1018 INFO "Check out the Sorceress unleashing a Blizzard on"
1018 INFO "some Zealots and Zombies in the Diablo II"
1018 INFO "Screenshot of the Week at www.blizzard.com. Spin"
1018 INFO "the Wheel in the Starcraft Map of the Week at"
1018 INFO "www.blizzard.com."
/who death
1019 ERROR "That channel does not exist."
1019 ERROR "(If you are trying to search for a user, use the /whois command.)"
1002 JOIN-=ForsakeN=- 0010 [CHAT]
1003 LEAVE-=ForsakeN=- 0010
1002 JOIN Ruffbot4 0010 [CHAT]
1005 TALK Ruffbot4 0010 "Ruffbot4"
1005 TALK Ruffbot4 0010 "cow"
/who the loft
1018 INFO "Users in channel the loft:"
1018 INFO"-=^P$Y]3oT-7^= -,-=^P$Y]3oT-3^=-, "
1018 INFO "~Un4GiVeN^ArMy~,-=^P$YcHoTiC^=-, "
1018 INFO "Su[]Der`$iZe,-=^P$Y]3oT-A^=-, "
1018 INFO"-=^P$Y]3oT-9^=-, [SU[]DER[]DE$'|'], "
1018 INFO "Su[]Der`l3oVVl, Su[]Der`l3a|{eD, "
1018 INFO"[-=^P$Y]3OT-2^= -],-=^An|maL^=-"
/me test
1023 EMOTE WoLF`GRoK~{RC} 0010 "test"
1003 LEAVE Ruffbot4 0010
1002 JOIN Sod_Bot 0010 [CHAT]
1003 LEAVE Sod_Bot 0010
/w wolf`grok~{RC} whisper to self
1010 WHISPER WoLF`GRoK~{RC} 0010 "whisper to self"
1004 WHISPER WoLF`GRoK~{RC} 0010 "whisper to self"
/join grok
1007 CHANNEL "grok"
1001 USER WoLF`GRoK~{RC} 0010 [CHAT]
1009 USER WoLF`GRoK~{RC} 0012
/who
1018 INFO "Users in channel grok:"
1018 INFO "[WOLF`GROK~{RC}]"
Notice that on almost every line of listing is a number from 1001 to 1023. The first line is 2010 and the lines that do not begin with a number show my typing into the session.
NBBOT subtracts 1000 from the event number to get its event filter number. The following table shows the battle.net event numbers and their description. This list can be found in the greetbot source file.
1001 SHOWUSER
1001 USER WoLF`GRoK~{RC} 0010 [CHAT]
1002 JOIN
1002 JOIN-=ForsakeN=- 0010 [CHAT]
1003 LEAVE
1003 LEAVE-=ForsakeN=- 0010
1004 WHISPER
1004 WHISPER WoLF`GRoK~{RC} 0010 "whisper to self"
1005 TALK
1005 TALK Ruffbot4 0010 "Ruffbot4"
1006 BROADCAST
1007 CHANNEL
1007 CHANNEL "grok"
1009 USERFLAGS
1010 WHISPERSENT
1010 WHISPER WoLF`GRoK~{RC} 0010 "whisper to self"
1013 CHANNELFULL
1014 CHANNELDOESNOTEXIST
1015 CHANNELRESTRICTED
1018 INFO
1018 INFO "Welcome to Battle.net!"
1018 INFO "This server is hosted by Mindspring."
Sometimes 1018 gives useful info, like a /who channelname:
1018 INFO "Users in channel the loft:"
1018 INFO"-=^P$Y]3oT-7^= -,-=^P$Y]3oT-3^=-, "
1018 INFO "~Un4GiVeN^ArMy~,-=^P$YcHoTiC^=-, "
1018 INFO"[-=^P$Y]3OT-2^= -],-=^An|maL^=-"
In the 2nd example, knowing what users are in a channel may be useful.
Programming the bot to respond to that information is the challenge.
1019 ERROR
1019 ERROR "That channel does not exist."
1019 ERROR "(If you are trying to search for a user, use the /whois command.)"
1023 EMOTE
/me screams
1023 EMOTE WoLF`GRoK~{RC} 0012 "screams"
1018 INFO "No one hears you."
2010 NAME
Each unique username you wish to load on a battle.net server must be defined by a section in the nbbot.cfg file. A section is described as a friendly name surrounded by square brackets. [grok]
[grok]
username=WoLF`GRoK~{RC}
password=mypassword
[bot1]
username=WoLF`aLpHa`MaLe
password=hispassword
[bot2]
username=WoLF`Cu|3
password=thatpw
The only required entry in a user section is the username. Let’s say I have 3 bot names that all have the same password. I define the password before the username sections, and it remains constant for all:
password=mybotpass
[bot1]
username=WoLF`aLpHa`MaLe
[bot2]
username=WoLF`Cu|3
[bot3]
username=WoLF`FaNGs
[grok]
username=WoLF`GRoK~{RC}
password=mypassword
Each bot- 1, 2, and 3 will use ‘mybotpass’ to log on. By including the password= variable for grok, it does not use ‘mybotpass’ for WoLF`GRoK~{RC}. Instead, password is defined in the section local to grok.
You can define a server for each username to log on. In this example, 3 bots log on the same server.
server=207.138.34.3
[bot1]
username=WoLF`aLpHa`MaLe
[bot2]
username=WoLF`Cu|3
[bot3]
username=WoLF`FaNGs
In this next example, each bot logs on a different server.
[bot1]
username=WoLF`aLpHa`MaLe
server=207.69.194.189
[bot2]
username=WoLF`Cu|3
server=216.32.73.174
[bot3]
username=WoLF`FaNGs
server=209.67.136.170
What now? We have defined 4 section names for users: grok, bot1, bot2, bot3. How do I load them? This is what the [_load] section is all about. Put the [_load] section after your user sections. I keep this load section last in my cfg file.
[_load]
spawn=bot1
spawn=bot2
spawn=bot3
spawn=grok
Starting the bot with this load section will cause bot1, bot2, and bot3 user sections to be processed and those users logged on.
The grok section will not be loaded because we have commented it out by putting a space before the spawn= command.
So you know the basics of how to log them on .. what now?
Before you go any further, you will want to create some usernames on battle.net for your bots, if you have not already. You probably have. This NBBOT is not for sissies, so if you are still reading you have probably done some channel warfare with other bots and have usernames already created. Otherwise, go create the names now and edit your CFG file with those names and passwords.
Event triggers: How do I read them? It is all numbers and symbols!!
At first glance lines like the following look daunting:
&4&£&p2&%1: Password 2 OK
&4&$&setpriv &:setuserpriv %3
&4&£&rename &:renameuser %3
&4&£&merge &:joinuser %3
But, as we go through this, it will become clear how to not only read those lines, but modify them to suit your purposes and create new ones just for you.
Syntax is the ‘structure’ of any language. Using proper syntax when you speak allows the listener to properly separate the sentences into words. The same is true in computer languages and in NBBOT-speak.
An NBBOT event trigger always has EXACTLY four parts. Adron defines them as:
<type number>
<user name match>
<text match>
<action>
However I prefer to call them by these names:
<event trigger>
<user name filter>
<text filter>
<action>
NBBOT command event syntax:
&<event trigger>&<user name filter>&<text
filter>&<action>
Notice that an ampersand(&) goes BEFORE each part of the command. The only required part is the event trigger itself. All other parts are optional, though it makes no sense to leave off the <action>.
<Event Trigger>
Earlier you were told about the different battle.net event codes and their meanings. For all the 1000-series event codes, like 1001 USER and 1002 JOIN, 1005 TALK and so on, to find the NBBOT event trigger number just subtract 1000.
&1 traps when a username has been told to you after you joined a
channel
&2 traps when a username has joined the channel you are in
&3 traps when a username has left the channel you are in
&5 traps when the bot has received a 1005 TALK message from
battle.net
&7 traps when the name of the channel you have entered
&9 traps when a user has had their flags change
&10 traps when you have sent a whisper
&18 traps when battle.net is giving you info
&19 traps when battle.net is informing you of an error condition
&23 traps when a user did an emotion
<User Name Filter>
For discussion purposes, lets say we received a type 5 event, which is a TALK event, meaning someone in the channel said something. So far we can trap that event with the &5 event trigger. Now suppose we want to respond to that if the username is ‘guest’. How do we do that? The 2nd part of the command, <user name filter> is the way.
&5&"guest"
&5&guest
&5&"guest
&5&guest"
&5&@Friends
<Text Filter>
So far we know that guest said something. The 3rd part of the command lets us respond when we saw a particular set of words in the speech or other event string.
In this example we will look for when someone laughs in the channel by saying ‘LOL’.
&5&&"LOL"
&5&&LOL
In this example we look for someone whispering to us "ban <someone>", and so we ban them(seguey to <action> description).
&4&&"ban &/ban %3
<Action>
This 4th part describes how the NBBOT will react when parts one, two, and three are all true. There are two possibilities for the <action> part. You can either provide text for the bot to type, or you can use one of the many NBBOT stored commands. NBBOT stored commands begin with a colon( : ) character.
This example listens for WoLF`GRoK~{RC} to say "join grok", and then it joins that channel.
&5"WoLF`GRoK~{RC}"&"join grok"&/join grok
But that is not very flexible. Let us change it so that it responds to anyone in group Operators who tells it to join any channel. To do this we introduce a new feature: variables.
&5&@Operators&"join &/join %3
The "@Operators" indicates anyone in group operators. The %3 is a variable which is filled by NBBOT with the text following whatever you matched for in the <text filter> part of the command. We matched for "join " which means any string beginning with the word join (there is a space after join). %3 will equate to the text after join(space).
For example, if an operator says:
join dark realm
and if <text filter> is "join(space) then %3 will be "dark realm"
How is that useful? It enables us to write this command: /join %3
And the bot will actually say:
/join dark realm
Another example is if someone joins your channel who is on your shitlist. You filter the 2 event(join), their username against the Shitlist group, and if they match, you ban them automatically.
&2&@Shitlist&&/ban %1
where %1 is the name variable after NBBOT reads the line.
Before this NBBOT can work real well for you, it is necessary for you to understand the NBBOT.USR file. Right now I do not have time to describe it for you, but will at a later date/time.
That is all for now.
-WoLF`GRoK~{RC}