BotBot

Secrets of the BotBot

Notes for the Powermad

Remember, you don't have to understand the Palace's "iptscrae" programming language to use the BotBot this FAQ-like section is only provided for those type-A expert users (and you know who you are) who want maximum control.

That said, here are a few notes about the BotBot, how it builds scripts, and information that might help you channel your own cyborg consciousness.

Special Strings
The BotBot form has two kinds of user-specified strings: active strings, and string variables. Both classes of string will accept the following special "escape" sequences:
%n will be replaced by your login name (username)
%t the name of the current whisper target, if any
%l their login number (or zero, if none)
%w the name of whoever is speaking (usually you)
%c the login number of whoever is speaking (usually you)
%p the value of your "prefered name"
%r the current room name
%i the current room ID number
%e current elapsed time (in seconds)
%m current elapsed time (in minutes)
%h current time (hh:mm:ss) based on your timezone
%s your xbot serial number
%v current BotBot version number
So...
%n (bjorke@botzilla.com) has been here for %m minutes

Will become (assuming my name is Dr.X and I've been online at that palace for 20 minutes):
Dr.X (bjorke@botzilla.com) has been here for 20 minutes

The important distinction between active strings and variable strings is that unlike active strings, which are expanded whenever you use them, the escape sequences for variables are evaluated at login time. So if the above string were a variable, it would always read:
Dr.X (bjorke@botzilla.com) has been here for 0 minutes

no matter how long I had actually been logged-on, and regardless of whether I had changed my username to "X-Lad" or "A Usual Suspect" or whatever.

Prop Names
A few new "PropTrix" commands (actually, so far only "blondie") now let you specify the props being used in a special way. If you don't specify a name, they will use their own default. If you do specify a name, they'll use that and if the name includes the "#" (hash) character, that character may be replaced with a number indicating that the prop is part of a set of named props.
The default "blondie" prop name is actually "Flower#" it uses the props "Flower1" through "Flower5." If you specified a prop name of "Poptart," all the props would be the same "Poptart" prop if you specified "my#money," if would use the props "my1money" through "my5money" (of course, we're assuming you already have props with those names).
It's always a good idea to have your own uniquely-named copies of "standard" props -- there's no telling what will really come up when you try to use common prop names like "Flower," "Heart," or "Kiss."

Some Useful Variables
Here are some useful iptscrae variables and globals used by the BotBot (Don't forget string variables)

That Doggoned "help"
Ain't it a stinker? As of version 15 or so, the BotBot will now optionally write the help information as
;iptscrae comments
into the cyborg file if "help" is turned off. Of course, if you check "No comments," that will be turned off, too leaving you with the leanest possible 'bot. Since version 64/65, there's also good solid web-based help. It's been so successful, that as of version 66 it's the default. Almost all bots should become much smaller.

Hex Keys?
The botbot hexkey is a binary code that contains a lot of little codes, each of which flips an internal switch in the botbot. Given just a hexkey, it's possible to almost entirely regenrate a cyborg from scratch.

Serial Number?
The botbot serial number is just a simple identifier used in case you have a problem with your cyborg. The most important digits are the first two they tell what version of the BotBot made your cyborg. At this writing (6 Jan 99), the BotBot version number is 66. The rest of the digits are just fine details, and have mostly been made superfluous since the advent of hey keys

Scripts that have Changed...
Many of the BotBot's commands are based on scripts that have been mailed-in as suggestions, or based on popular scripts from web archive sites like EricD's. Sometimes, these scripts will appear to be very different from the original, if you find them in the cyborg code! It grieves me to say it, so I'll say it only once much, if not most, of the iptscrae code I've found on the web is faulty, redundant, needlessly laggy, error-prone, pointlessly huge, slow, scattered, and sloppy. Some of it doesn't do what it claims, and some doesn't run at all. This isn't the fault of archivists like EricD, who runs a laudable service, but of people who upload scripts to the web without even bothering to check (or understand?) them. Of the remaining (good to begin with) scripts that have made it into the BotBot, many have been subtly improved, like the naming improvements in blondie. Whenever possible, however, I've left the original authors' names attached. You know who you are.

What about Interpalace Globals?
The Botbot generally ignores interpalace globals like the controversial ICameFrom string. It's highly unlikely that such globals will affect Botbot operation in any way.

What Do You Mean, "Bot Too Big"?
How big is too big? Not always easy to say! The amount of memory available to the client for user scripts is fixed no matter how big your application size or available RAM, your cyborg must share a small area of memory with any and all room scripts you encounter. This means the cyborg size limit changes from room to room! Worse yet, the client doesn't handle overflows gracefully instead it often crashes. If BotBot could do something about this it would. But it can't. Instead, sometimes you just have to keep cutting back on features until your cyborg fits.

Hint: if your hexkey is longer than an 80-character line, you're almost certainly over the limit.

Of course, BotBot is a free service so if you really need some special features, you can always come back and build another bot. You could even build several and save them on your disk under different names, and use them as you need by renaming them before logging-in.

Why Do My Laggy Scripts Fail?
Because you're trying to run them in a paint-free room. Some rooms can be designated as "paint free" by the local wizard(s), and paint commands like LINE won't function in those rooms. Sadly, there's no way for the script to identify a paint-free room, so it just fails ignobly. However, you were warned about this already. RTFM!

What's a Bogus Init?
It means that your cyborg has discovered that it's running but hasn't been initialized at login time. So any cyborg features that depend on initialized global variables will work in correctly. BotBot cyborgs have safety traps to prevent you fron accidentally crashing your machine and won't run such commands if a bogus init has been detected.

So how do I add extra commands to my cyborg?
A BotBot cyborg is really no different from any "normal," hand-written, cyborg. So you can cut and paste blocks of code just as you would with any other cyborg. HOWEVER:
1 You void your warranty I won't even try to fix an edited cyborg.
2 If you're going to hand-edit the cyborg file, I recommend leaving comments turned on any decent text editor will let you strip them out later anyway.
3 To protect your OUTCHAT code against bogus inits, find this line, and put your code after it:
{ EXIT } initOK NOT IF

Use the BotBot