Getting Started

Okay, okay, I know...Magsbot looks a bit complicated. So here are the Quick & Easy Instructions telling you what Magsbot can do, and how to make it do it. :) This is the place to come first if you're confused about all the stuff there is to know about Magsbot!

For on-line help just press F1 to call up the Help Contents web page (although you probably know that already or you wouldn't be reading this!). The first place to look for recent changes to the program is the What's New section.

NOTE: These instructions are mainly concerned with the built-in functionality of Magsbot and the standard Behavior Table and buttons that come with it. For information about how to program Magsbot yourself, read about the Behavior Table and then look at Events, Actions and Functions. Also check out my forum, especially the class logs, if you are interested in programming or have questions to ask.

If you're looking for information about any of the menu items, look here.  For an overview of the Magsbot user interface, look here.



INTRODUCTION

By default, when you start Magsbot it will automatically connect and create a bot instance at 15n 775e in AW, which happens to be the site of Magine's Gardens, my first building project in Active Worlds. I set this for the default because if you try to send a bot to "ground zero" (0n 0e) of a public world, it will get ejected...they don't like bots there. To change the starting location, bot name, bot's avatar type, etc. you simply click on "Save Configuration" in the File/Configuration menu to make the current location and other settings the default. (Note this will only save the configuration for one bot instance. If you want to save multiple bot instances, see here.) If you don't want Magsbot to create a bot instance automatically when it starts, then uncheck "Auto Connect" in the Options/Connection menu.

To start a bot instance manually, click "New Instance..." in the Connection menu. To see a list of currently running instances, click the "Instance..." menu.  Select a row of the Instance List to specify the "active" instance, which is the bot that is controlled by the tabbed panels. Messages in the log window will only be shown for the active instance, if  "Show Messages for Active Instance Only" is checked in the Options/Show in Log menu.

Magsbot has five tabbed panels: Chat, Location, Actions,Telegram and Announce. Each can become a separate, sizeable  window by clicking and dragging on the bar at the top of the panel. Drag the window back in place to restore it as part of the main window. You can close an "undocked" window by clicking on the "x" button at the upper right of the window; that window can then be made to reappear by clicking it's name on the Window menu.

To chat through the bot, select the Chat panel and type into the edit box, then press Enter or click the Send button. You can click the "Nearby List" button on the chat panel to see the names of nearby avatars. To whisper, select the names of the people you want to whisper to in the Nearby List window. (Use the Ctrl and/or Shift keys to select multiple names at once.)

To set world, location and avatar type, enter the desired information on the Location Panel and click the Set button. The coordinates on the Location Panel are in SDK format, but if you are uncomfortable with that, you can just click the "AW coords" button and enter the desired location in familiar AW Browser style, like "aw 15n 775e". Those coordinates will be translated to SDK coordinates and put into the Location Panel for you. Then click the Set button to send the bot to that world/location. (Note you must click the Set button; merely entering the coordinates using the AW Coords button won't move the bot.)
 
Technical note: The SDK coordinates system is a little different than what you are used to in the AW browser: there is no decimal point; instead, you multiply the coordinates by 1000.  North and West use positive numbers, and South and East use negative numbers. So, for instance, 15n 775e becomes NS=15000 WE= -775000. Note that a decimal coordinate like 15.23 in the AW browser would become 15230 in SDK coordinates.  Altitude (Alt) is also multiplied by 1000*, and Yaw (the direction that the bot is facing, in degrees) is multiplied by 10. (If you forget all this, you can see a pop-up reminder by moving your mouse pointer over any of the edit controls on the Location panel.) For Yaw, 0 is north, 900 (90.0 degrees) is east, 1800 (180.0 degrees) is south and 2700 (270.0 degrees) is west.

(* Altitude used to be x100 in older versions of the AW Browser.)

The Telegrams tab is for sending messages via Ima Genius' Bot Bone telegram system. See www.imabot.com/bone for details and a free Bot Bone ID. Unfortunately bots can't yet send actual AW telegrams.

The Announce tab is similar to the Chat tab, and is used for sending announcements (what the SDK calls "console messages") that can be heard throughout the entire world, or limited to certain individuals. You can also specify the color of the text and whether it is bold or italic. (The bot instance must be owned by a world caretaker in order to send annoucements.)

(The new Bot Telegrams are supported only programmatically, with the BOTGRAM command and BOTGRAM event.)

The Actions panel contains buttons that you can define yourself. I've included a large number of standard ones, whose use is detailed in the Sample Buttons help.  One I'll mention here is the "Change Bot Name" button, that you can use to change the name of a bot instance already started. To edit, delete or create a new button, right-click on the Actions buttons panel. If you're having a hard time finding a particular button within a category, you can click on any button name (not the gray button icon itself) then begin to type the name of the button, and the highlight will skip to the first button in that tab whose name matches what you've typed. Buttons always appear on the Actions panel in alphabetical order.  If you have trouble finding a particular category tab, you can press Ctrl-D and type the name of the tab to select it.  Or, you can search through all categories for a button by name, by pressing Ctrl-G.

As of version 2.5, you can also change the fonts that Magsbot uses. This is in response to all those people who have told me they can't stand Comic Sans MS! :P  (And here I thought it looked so fun and lively, heheh!) Anyway...just click the Options menu, Fonts item to change any of the fonts used by the program.

IMMEDIATE MODE COMMANDS ("DO...")

You can make Magsbot perform any Action or Actions, simply by typing commands in immediate mode. Press F5 or select Do... from the Actions menu and the edit box will appear for you to enter commands into. The Insert Action button at the bottom of the edit box will display a list of commands; selecting an action from the list will insert that action at the cursor location. There are also insert buttons for Functions and Attributes.  When you click OK on the immediate mode window, the actions you have typed will be carried out.

Multiple Actions can be entered separated by semicolons, like:

    SAY "Howdy!"; GESTURE 1

Program flow control structures like WHILE, IF and SWITCH can be used in immediate command mode, the same as in the behavior table. Refer to the full documentation for details. As an example, this would cause Magsbot to count down from 10:

FOR i 10 1 -1 {
    SAY $str[@i] };
SAY "Blast off!"
Note that whatever you type in the immediate mode window will still be there the next time you open the window. This has given some users the mistaken impression that the data is somehow being stored in the window; this is not the case. The text remains in the window merely as a convenience in case you want to perform the same command again, or edit it and perform a similar command.  If you do not want the same command to be performed again, you should delete the text from the window before entering a new command (simply select the text and press delete).

BEHAVIOR TABLE

The Behavior Table is what determines the bot's responses to events. An "event" in this case is a message that the bot receives, either from the AW world or universe server, or due to certain internal Magsbot events. Click the Behavior menu item to see the table. A detailed discussion of the use of the Behavior Table is given here, but you don't need to understand how the table works in order to use the standard functionality explained in these "Quick & Easy" instructions.

The standard Behavior Table included with Magsbot is divided into sections so you can deactivate or remove the parts that aren't useful to you. (Be sure to keep a copy of the standard table, though, for your future reference!) You don't need to do this for Magsbot to work properly! It's only an option if it bothers you to have parts of the table that you won't be needing or using.

Each section begins with a Remark (REM) line and section name, for example the section that controls the bot's midi-playing ability starts with:

    REM MIDI ------------------------------------

If you're not going to use this capability, you can simply delete everything up to the next section, or (recommended for beginners) keep it there but deactivate it by changing the CHECK line that follows the REMARK:

Active Event Action
On ANY  CHECK 1 

Just change the CHECK 1 to CHECK 0 and the section will be deactivated.

The standard Behavior Table contains the following sections:



The rest of this "Quick & Easy" help explains the behaviors contained in the standard table.

CHAT
(See also MOVEMENT  for random chatter feature.)

As set up in the standard behavior table, Magsbot will respond to avatars who whisper to it, or use the bot's name as the first word of their chat message. The behavior table contains responses for the words HELP, CALC, TRIVIA, MIDI, MAGSBOT, BOT, VERSION and TURTLE.  (Magsbot will also respond to chat commands from someone on the controller list; see the REMOTE CONTROL section below for information about chat commands.)

Magsbot will also tell you the value of any AW SDK attribute, if you tell it the attribute name with a "$" (for text attributes) or "@" (for numerical attributes) in front of the word. For instance, if you whisper $world_name or say mags $world_name to Magsbot, it will respond by telling you the world name.   (This feature is turned off by default. Turn it on by setting the Active column to On for the rows of the table whose Action columns begin REM tell string attribute and REM tell numeric attribute.)

Telling Magsbot to CALC some_mathematic_expression will cause it to reply with the answer. For instance CALC 2+15*6.2 would cause Magsbot to respond 2+15*6.2=95.

To add words to Magsbot's vocabulary, just insert a new row in the behavior table with  HEAR @w[YourWord] in the Events column, and the desired reaction, for instance  WHISPER $avname "I'll thank you to watch your language!" in the Actions column.

(Remember to set the row's "Active" column to ON or else your new behavior will be ignored! Just double-click the Active column to toggle that row On/Off.)

If your word contains anything but letters, then you should add quotes around it, like this: HEAR @w["Wow!"]

If you want Magsbot to respond to a phrase instead of a single word, then use @phr instead of @w, like this: HEAR @phr["flying turtle"]

If you want Magsbot to respond the same way to several different words, use @ww and a string with the words separated by | pipe symbols, e.g. @ww["turtle|tortoise"]

FYI, @w, @ww and @phr are macro functions defined in the userdefs.udf file. The @w macro looks for a single word in any chat string that is spoken to the bot. (If the word occurs in a chat string that isn't spoken to Magsbot, then it's ignored.) Look here to see numerous other string handling macros for examining chat input.

Note that the last row of the behavior table with "HEAR" in the Events column contains a default response that occurs when someone speaks to Magsbot but no word is recognized. In that case Magsbot will say "Sorry, I don't know anything about that". When you add vocabulary to the behavior table, be sure to insert those rows above this default row, or else Magsbot will recite the help list even when it recognizes your new words!

If you want Magsbot to recite the list of words that it recognizes when someone asks for help, then activate the row of the table that has USEREVENT @userevent=@helpreq as the Event, and add your list of recognized words as WHISPER commands in the Action section of the same row. Also activate the row that has HEAR @cmd[help] as the event. If you want Magsbot to speak out loud instead of whispering to the avatar who spoke to it, then use SAY instead of WHISPER $avname.

You can drag rows of the behavior table up or down using the blank column on the lefthand side. You can select multiple rows of the behavior table to Delete, Cut, or Copy, and you can insert rows that you copied or cut, using Paste.

Of course, you are not limited to spoken responses. Magsbot can respond to chat in any way you choose. When editing an Action in the behavior table, try clicking on the Insert Action button and choosing an action from the drop-down list. When you pick an Action, a template will be inserted into the edit box at the cursor position. Replace the template parameters with your own choices. See the full documentation for details on all the Actions that Magsbot can perform. Or continue to read below for some ideas. :)

Note: Here's a tip for using the dropdown boxes for inserting Events, Actions, Function and so forth: you can press the space bar to skip immediately to the next category within the list box. You can also type the name of the command and the highlight in the list box will skip to the next item that matches the name you type.

RECITE A FILE

Magsbot can read from a text file on your computer and recite it through chat. Click the "Recite from Text File" button on the Actions page to see how this works, or use the READFILE command, either as an Action in the behavior table or an immediate mode command (see below). The READFILE command is:

    READFILE $filename  @delay

The filename should be in quotes, and the optional "delay" parameter is the number of milliseconds that Magsbot pauses between lines of the file. For example:

    READFILE "my_poem.txt" 500

When Magsbot reads a file in this way, it recites it in whatever mode (speak or whisper) is currently active. If avatar names are selected on the NearBy List, then Magsbot will whisper the file to those individuals. Otherwise, it will speak it out loud.

STORYTELLING

This is something I added at the request of a Magsbot user. It's a more sophisticated version of the "recite a file" behavior mentioned above. In this case, the bot will automatically begin reciting a text file when an avatar comes within a defined area, and stop if everyone leaves that area. To define the area, use the "Set Area..." action buttons. With the bot nearby, move your avatar to the north edge of the area that you want to define, then click the "SetAreaN" button. Enter "recite" for the zone name. Repeat this with the other 3 edges of the area (south, west, east) and corresponding Set Area... buttons. Once the area has been set, click the "Storytelling ON" button and select a text file for the bot to read. The Storytelling OFF button stops this behavior. Storytelling PAUSE stops the behavior but Magsbot recalls the line of the text file that it left off reading, so that the next time Storytelling ON is clicked, it will resume at the same spot.

RANDOM MOVEMENT

Click the "Random Movement" action button in the Movement tab to begin random movement. When Random Movement is activated, Magsbot will randomly move between numbered positions that you set using the "Set Position..." buttons in the Movement tab.

Similarly, when "Chat/Random Chatter" is clicked, Magsbot will randomly speak a line of text from a string list every so often.

To set positions for random movement, use the user-defined Action buttons "Set Position from Bot" or "Set Position from Target." When you use the former, it will create a position marker at the bot's current position; when you use the latter, Magsbot will prompt you to select an avatar name from the NearBy list, and record that avatar's location. (Note that position also includes the yaw, or facing direction, of the subject.) When prompted, give the position a number.

"Positions" are actually the same as "Markers" (described below) except that they are kept track of separately, and must be numbered instead of named. (If you enter a name instead of a number for a position, then random movement won't work right. Use "positions" only for random movement, and "markers" for any other purpose...see below.)

In version 4.0, when you click the Random Movement and/or Chatter buttons, you will also be prompted to enter a "period" (or "rate") and "percent".  The Period refers to how often the bot has a chance of moving/speaking, and percent refers to the chance each period that the bot will move/speak. For instance, if period is 30000 and rate is 50, then each 30 seconds (=30000ms) the bot will have a 50% chance of moving or speaking.

For Random Chatter, create a text file containing things for the bot to say, then load the list using the "Random Chatter - Load file" button. To begin random chat, use the "Random Chatter" button, which will prompt you to choose from among the chatter lists you have previously loaded. (Note: once loaded, a list will be retained in the varlist file when you quit Magsbot, so you don't need to load it each time you run the program, unless it changes. You can remove a list from memory using the "Random Chatter - Delete List" button.)

PATROLLING
New in version 4.0, Patrolling is another kind of movement, similar to Random Movement except the bot moves to each position in order, rather than randomly. Start the bot patrolling using the Patrol buttons in the Movement tab.

BOOKMARKS & MARKERS

You can mark Magsbot's location and have the bot return to it in a number of different ways, using "Positions" (for random movement, as explained above), "Markers" or "Bookmarks." These are essentially all the same thing: Magsbot remembers a location either from the bot's current coordinates, or from the coordinates of a nearby "target" avatar that you specify.

"Bookmarks" include the world name and avatar type as well as coordinates, and cause Magsbot to teleport to those locations; whereas "Markers" and "Positions" only contain the coordinates and cause the bot to walk to those locations. "Positions" are numbered and intended to be used for random movement (see above), and "Markers" are named and are used for any other reason you want to move the bot to a particular location within the same world.

Bookmarks, Markers and Positions are controlled by the user-defined Action buttons "Set Bookmark from Bot", "Set Bookmark from Target", "Goto Bookmark", "Set Marker from Bot", "Set Marker from Target", "Goto Marker", "Set Position from Bot", "Set Position from Target", "Goto Position", "Clear Markers" and "Clear Positions".

FOLLOW

This is a simple one. :) To get Magsbot to follow someone, just click on the user-defined Action button "Follow Target" and select an avatar name from the list that appears. After that, Magsbot will tag along after that individual as long as they are within range, whenever they move. Even if the target leaves the area, Magsbot will resume following them when they return. Click on the user-defined Action button "Stop Following" when you want Magsbot to stop following.

Someone with remote control privileges can also get Magsbot to follow them simply by saying "follow" to the bot. See "Remote control".

RECORD/PLAYBACK

Magsbot can record the movements of a nearby avatar and later playback or mimic those movements. Just click on the user-defined Action button "Record", enter a name for the recording (no spaces) and choose a target avatar from the list that appears. Magsbot will start to record all of that avatar's movements. When you click "Stop Recording", the data will be saved to a file.

To playback a recorded file, click on user-defined Action button "Playback (once)" or "Playback (continuous loop)" and select a .rec file from the file dialog that appears. Magsbot will then perform the movements that were saved in the file, at approximately the same speed that the recorded avatar originally moved. To end playback, click on "Stop Playback."

Note: when recording, the data is saved in memory until recording ends, so if you want to record a really long sequence, you should probably do it in parts or you might run out of memory. Also note that when you click on "Record", a line is added to the beginning of the behavior table; don't move or delete that line, it will be deleted automatically when you click "End Recording".

Magsbot can also do multiple record and playback at the same time. Use one bot to record the movements of several avatars, then playback those movements thru multiple bot instances. Just use the Record and Playback action buttons. You also have the option of recording and playing back in memory, or to/from a file.

REMOTE CONTROL

The standard behavior table is set up to allow you to control Magsbot through chat commands.  Commands must be directed at the bot either by using the bot's name as the first word of your chat string, or by whispering. In version 4.0, you can also direct commands by prefacing them with a slash, for example /follow. Just remember that if you use the / method, then any Magsbot instance that can hear your chat will respond. Use whispering or the bot's name instead, to target a specific bot instance when several are in the area. Magsbot will only obey someone whose name appears on the controller list. To add a name to the controller list, press F5 to get the immediate mode command box and enter:

    ENLIST control citizenname

...where citizenname is the name of someone you want to allow to control the bot.

To remove the control privilege, press Ctrl-F3 to get the variable edit box, find the $control:n variable with the person's name as it's value, and delete it. Or, you can use the immediate command box again and enter:

    FREEITEM control @itemnum[control,citizenname]

If you'd rather have the bot respond to anyone who issues a command, then you can edit the behavior table to allow that. Open the behavior table by pressing Alt-B, then find the section that begins with the line REM REMOTE CONTROL. (You can use the Find and Next buttons on the behavior table window to search the behavior table for a string.)  In the section that follows the REM REMOTE CONTROL line, you can see the commands that Magsbot will respond to, in the form of Events like HEAR @cmd[follow], etc. If you want to allow the bot to respond to commands from any speaker, then simply move the line that says HEAR ... CHECK @isctrl[$avname] below the lines containing the commands you want the bot to respond to. The bot will respond to anyone using the commands on behavior table rows above the CHECK @isctrl[$avname] row, but the bot will only respond to commands below the CHECK @isctrl[$avname] line if they are given by a controller.

IMPORTANT! It is highly recommended that you do NOT allow the special "DO" command (see below) to be used by other people besides controllers, because a malicious hacker could use the DO command to not only cause your bot to delete or change objects (or even DELETEALLOBJECTS in your world!) but even run programs on your computer using the Magsbot RUNEXE command! You have been warned!

Also note that Magsbot will preserve the controller list between sessions, so be sure to remove names of people whom you no longer want to grant control to.

The chat commands that have been implemented in the standard behavior table are:

COME
The bot moves to just in front of the speaker, facing the speaker.

FOLLOW [name]
The bot begins to follow the specified avatar, until the avatar leaves the area or the bot receives the STAY command. If no avatar is specified, then the bot will begin to follow the speaker.

STAY
The bot stops following (see above).

FIND name
The bot moves to just in front of the specified avatar, facing them.

TAKETO name
The bot warps the speaker to just in front of the specified avatar, facing them.

BRING name
The bot warps the specified avatar to just in front of the speaker, facing them. (Added in version 4.0)

PORT coordinates
The bot teleports to the coordinates specified  in AWB format (e.g. "AW 21N 775E 0a 180" etc.)

MOVE coordinates
The bot moves to the coordinates specified  in AWB format (e.g. "AW 21N 775E 0a 180" etc.) (Formerly this was WALK. Changed to MOVE in version 4.0, when WALKTO was added.)

MARK [markername]
The bot memorizes its current location as a marker. If no name is specified for the marker, then the speaker's name is used.

POS list n
Add a position marker number n to the specified list, at the bot's current location. The list can be specified by name or number. (Added in version 4.0)

POSAT name list n
Add a position marker number n to the specified list, at the specified avatar's current location. The list can be specified by name or number. (Added in version 4.0)

NEWPOS listname
Similar to POS and POSAT, this is a slightly simpler way to add positions to a list. When you use this command, your current position is added to the stated position list. If you have already specified a list by using the NEWPOS command earlier, then you can omit the list name from the command; the most-recently-used list is assumed.

MARKAT avatarname [markername]
The bot memorizes the specified avatar's current location as a marker. If no name is specified for the marker, then the avatar's name is used. (Note that if the avatar's name contains a space, you should put quotes around it, like MARKAT "Wild One" mymarker.

GOTO markername
The bot moves to the specified marker location.

WALKTO markername
The bot slowly strolls to the specified marker location. (Added in version 4.0)

FACE markername
The bot turns toward to the specified marker location. (Added in version 4.0)

LOOK [avname]
The bot turns toward the specified avatar. If no name is given, the bot turns toward the speaker. (Added in version 4.0)

CITIZEN name or number
The bot whispers the name and number of the specified citizen.

SPAWN name
The bot creates another bot instance with the specified name. (The new instance will use the same privilege password as the bot it was spawned from.)

RENAME newname
The bot changes its name to the specified name.

REC filename
Begin recording movements and chat of the speaker, into the specified file.

RECSTOP
Stop the current recording.

PLAY filename
Playback to specified recording through the bot.

DO actions
This extremely powerful command causes the bot to perform any valid action(s) in the Magsbot programming language! For instance a controller could say: DO GESTURE 6; TURN 1800; AVTYPE 3; SAY "Hello everybody, how do you like my new look?" Note that this could be dangerous in the wrong hands, so consider carefully who you give controller status to!


TRIVIA

To have Magsbot play trivia, first create a text file named "trivia.txt" and enter a question and correct answer on each line of the file, separated by a tilde (~) like this:

Who originally wrote the AWB?~Protagonist
Who wrote the first bot program for AW?~Hamfon
If there is more than one correct answer to a question, then separate the correct answers with a pipe | symbol, for example:

    Who was the first programmer?~Ada Augusta|Countess of Lovelace

Anyway...when you want to allow trivia play, click on user-defined Action button "Play Trivia" and Magsbot will load the list of questions into memory and announce that trivia is available. After that, a game will begin if anyone says "trivia" to Magsbot.

(If the trivia.txt file isn't found in the same folder that Magsbot is running in, Magsbot will announce to the public that it can't find its list of questions!)

When a game begins, Magsbot states a question and waits 30 seconds for an answer. (You can change the wait time by changing the "@triviawait=30000" in userdefs.udf; the value is in milliseconds.)

If the correct answer is given, Magsbot will record the winner's name and give them a point. (The score can be viewed by clicking the user-defined "Trivia Score" button.)

If the correct answer isn't given within the time limit, then Magsbot will announce that nobody won.

In either case, after pausing 5 seconds Magsbot will move on to the next question. (The pause time can be changed in userdef.udf, "@triviapause="; the value is in milliseconds.)

When Magsbot runs out of questions, it will announce that the game is over. The question number that Magsbot is on will be remembered between sessions in the variables file, assuming that "Auto Save Var List" on the File menu is checked.

MIDIS

In the example behavior table, Magsbot will respond to someone saying "/midi" (or whispering "midi") by whispering the list of available midi selections then waiting for the requestor to enter a number. Magsbot will then play that selection from the list. The model used to "create sound" can be specified in the userdefs.udf file as "$midiobject=".

Magsbot won't respond to a request if someone else has already made a request, and if the avatar who made the request leaves the area before making a selection, the request will be cancelled.

To support midi playing, you should create a file named "midis.txt" in which each line has the following form:

    time,Title,url

...where "time" is the time in seconds for the midi to run, "Title" is the name that you want to appear when the choices are listed, and "url" is the URL of the midi. For example:

    120,Atuin's Croons,www.turtlepower.com/~atuin/croons.mid

When the time is up, the midi object is deleted and Magsbot is open to new requests.

SURVEY & BUILD

You can do a simple survey with Magsbot by just selecting Actions/Survey from the menu...but we can do some more interesting things than that. :)

Before you start, you should make some choices. If you want to save the survey to a file (rather than just having it show in the log window), you can check "Report surveys in a separate file" and select a filename under "Survey file name..." on the File menu. Under the Options menu you can choose to "Report Survey in Propdump format" or not. (If "not", then objects will be reported in a lengthly format, suitable for selective surveys where you are looking for just a few objects.)

To do a selective survey, you need to use an immediate mode command. Press F5 or choose Actions/Do... from the menu to get the Actions edit box, then enter

 SURVEY whatever_conditions_you_want!

And click Okay.

The "conditions you want" should be stated as a conditional expression, which is explained in detail in the main documentation. But since we are trying to be Quick and Easy here, I'll give you some simple examples. :)

Suppose you want to find out what that object was that someone just clicked on. Magsbot told you that the object number was 8945340 when the click happened, but you want to know the model, description, etc. So, you enter

    survey @objnum=8945340

...and the survey will take place, with only the object with that number being listed.  You can abort the survey the same as if you had chosen the Actions/Survey menu item, by clicking Actions/Stop Survey.

Another example: you only want to list items that were created by yourself. Supposing that an AW citizen # is 28777, you could enter

    survey @atr[object_owner]=28777

...and only objects created by that citizen would be listed.

These are some simple examples, but actually the conditional expression can be as complicated as you want (or can stand). :) Using the @atr and $atr functions that return AW attribute values, you can test for any quality the object might have.

Once you have the propdump file, you can use the BUILD command to reconstruct everything in the file. Or, actually, you can just use the "Build from Propdump" button that I defined for you. Click that, and it will prompt you for the filename and building offsets, and build away. :)

Note 9/24/00: Use the "Load from Propdump" button instead, if you want the objects that the bot recreates to have the original creators' ID's and timestamp on the objects. If you use BUILD, the bot's ID (citizen number of the bot owner) and current time are used.

The building offsets, by the way, refer to distance from the original location. If you surveyed something at Ground Zero of a world but want to build it at 1274.6n 192e, then you would add a NS offset of 1274600 and WE offset of -192000. (Remember that Magsbot uses SDK coordinates, which are 1000x the regular coordinate value, positive for N or W and negative for S or E.)

Another way of selectively manipulating objects is to use the "Log Objects by Click" user-defined button. When Logging by Click is active, then the object number and position of any object the selected avatar clicks on will be saved in a list in memory. Click "Stop Logging by Click" when done, then click on "Dump Click Log" and Magsbot will do a survey to obtain additional information (such as model, description and action) for each object in the Click Log, placing the results in a prop dump file. To recreate the objects later, just click "Build from PropDump". All this can be very handy if you want to, say, preserve only certain objects in an area but not others; you can literally hand-pick them!

5/2/00: I added a button, "Save ObjLog as Propdump" that will save the Object Log into a text file in propdump format.

SHARING BEHAVIORS

Note 8/9/01: Admittedly these capabilities need some work. :) They probably are of limited usefulness anyway, so I'm not inclined to work on them at this time. But I'll leave them in, if you want to play around with them and see...

I've also defined some Action buttons to allow behavior table data and Action Button definitions themselves to be transfered between bots.

The receiving bot must first be under Remote Control (see above). Then simply click on the "SendABehavior" button to send a single row or "SendBehTable" button to send the entire behavior table to the controlled bot, via whispers.

Click "SendButtons" to transfer all the Action buttons to the controlled bot. There's even a "Send SendButtons Button!" button to, you guessed it, send the SendButtons button to the other bot, so it could send *it's* button definitions back. (Did you get all that?)

There is a tiny flaw in this system that I'm working on: the SDK only allows whispers to be of a certain length, so if a behavior table item or button definition is too long...it will be truncated. Oops. Keep definitions short by using string assignments and so forth, if you expect to use this feature. (Note 8/9/01: Actually I now use a method of sending longer strings in pieces to do this. But it probably needs more testing.)

TELEGRAMS

Thanks to ImaGenius, we can now have telegrams with our bots. :) See http://www.imabot.com/bone/ for information about the Bot Bone network and how to obtain a Bot Bone ID.

When Magsbot attempts to connect to the Bone server, it will prompt you for a Bone name and password. If you don't want to have to enter these each time, just press Shift-F1 to save your configuration after entering the name and password.

Otherwise, sending telegrams manually with Magsbot is pretty self-explanatory. You can send telegrams programmatically with the BGRAM command. You can monitor for incoming telegrams using the BGRAM event and variables $bgram and $bsender that get assigned by Magsbot whenever a BGRAM event occurs. See the documentation for further details.

INSTANCES

As explained in the INTRO section above, you can run multiple bot instances in the same session of Magsbot. The instance highlighted in the Instance List window is the "active" instance and is the instance controlled by the Chat, Location, Actions and Telegram panels. However, all running instances are controlled by the Behavior Table.

In the Behavior Table, ALL existing instances will receive Event messages individually. To limit a behavior to one particular instance, you can use several methods. One way is to use a conditional expression for the event that specifies a particular instance.

For example, if you have a Behavior Table row like:
 

Active Event Action
On HEAR SAY "That's really nice to hear!"

...then EACH instance can potentially receive a separate "HEAR" Event and react to it individually.

If you want ONLY the Active Instance (displayed on the control panels) to react, then you could specify (for example):
 

Active Event Action
On HEAR @instance=@activeinst SAY "I'm a really active kind of bot!"

Another way or limiting behavior to certain instances is to use the ANY event with the CHECK action, keying it to the bot's name. For example:
 

Active Event Action
On ANY CHECK @eq[$botname,"Goofy"]


...


Behavior table rows here will only be examined if the bot's name is "Goofy."


...
On ANY CHECK 1


Behavior table rows here will be examined by all instances.

Or, you could instead use the Note field of the bot to limit behavior table sections to particular instances. The Note field is what appears in the Note column of the Instance List. You set the note for a particular instance by using the INSTNOTE command; then you could then use CHECK @eq[$instnote[@instance],"SomeKeyWord"] to key the table section.

WEATHER CONTROL

See here for instructions on using the time-of-day and weather control buttons on the Actions panel.

TERRAIN

Magsbot 3.0 has a few new commands and functions for dealing with terrain.  To save terrain, you can use the Terrain dialog by clicking on menu item Actions/Terrain.  When you perform a terrain query, a single page of terrain data is saved. In most cases a page is much larger than a typical privately owned world (a world with maximum coordinates of 64N/S/W/E would fit on one page), so coordinates won't make much difference; but in case your world is really large, you can select the page to get data from.  The output can be "raw" numbers for the whole page, heights and textures, or it can be in the more compact form that the world server uses. (In Magsbot version 3.0, only the raw form can be read back in using the BUILDTERRAINPAGE command. Future versions will possibly have more options.) You can look at the terrain data using the Actions/Terrain/Buffer menu or pressing Shift-Ctrl-F3. The terrain buffer window is read-only, so you need to use the SETHEIGHT_ and SETTEXTURE_ commands to change the data. I haven't yet created very many terrain-related buttons (what ones there are can be found on the Terrain tab of the Action panel), but all the necessary commands for manipulating terrain are available, so perhaps you will create some custom terrain buttons of your own! :)

IN CONCLUSION

I hope this explanation has made some things simpler. When I started Magsbot I intended to add a "Behavior Wizard" but as I added more and more functionality, I realized that any menu-driven behavior definition system would necessarily be less powerful than one you could do "by hand."

Ok, so I'll keep the "Wizard" in mind...but nevertheless I hope you will experiment with Magsbot as it is, and discover some fun things to do with it.

Oh yes, and email me about the bugs. :P

-Magine :)