Let a bot talk in the chat on its own: post ads, answer the private messages it gets, act on what other players say in the channels, obey commands from your other accounts and keep a status. Turn the chat module on, pick its chat profiles, try them with a dry run, set how many lines a minute it sends, stop sending when you need to, and read what each ad waits for and what was said.
The chat module lets a bot talk in the game's chat on its own. It posts ads: messages the bot says in the channels you pick, at random intervals, while their conditions hold. It answers the private messages the bot gets, after the time a person would take to read and type. It acts on what other players say in the channels, such as whispering a player who looks for what the bot sells. It obeys the commands your other accounts whisper to the bot, such as !status or !stop. And it can keep the character's status, such as Away with a message. What it says comes from the bot's chat profiles. Every line the bot says goes through the module's guard, which keeps to the server's own limits, so the bot never says more than the game allows.
The module listens too. With the default alarms, a member of staff speaking to the bot, warning it, muting it or standing on its map pauses its chat for half an hour, and a whisper or the character's name said in a channel shows a notification in Asteroboard.
The Chat tab
Open a bot's page, then its Chat tab.
| Setting | What it does |
|---|---|
| Chat module | Runs the module: the bot posts its ads, answers and obeys while its character is in the game. Off, it does none of it. The guard keeps handling what you type in the Console and what scripts say either way. |
| Ads | The ads part of the module. Off, the module runs but posts no ad. |
| Replies | The answers to private messages. Off, the bot answers nothing. See Replies. |
| Triggers | What the bot does on the channels' lines. Off, it does nothing on them. See Triggers. |
| Commands | The commands your accounts whisper. Off, a command is just a message, which the replies answer. See Commands. |
| Status | The status the profiles give the character. Off, the bot leaves the status alone. See Status. |
| Dry run | Writes each line in the bot's console instead of sending it, such as Dry run: would say in Trade: Selling wheat, whisper me!. What you type in the Console is always sent. |
| Profiles | The bot's chat profiles, in order. See Profiles. |
| Lines a minute | The most lines the bot sends in a minute, whispers included, from 1 to 30. Empty is 6. Type a number, then click Apply. |
Each switch and each change of the profiles is saved at once, in the bot's settings, and the bot follows it right away.
Profiles
Add a profile adds one of your chat profiles, or one of your packages', at the end of the list. The arrows move a profile up or down, and the cross removes it from the bot (the profile itself stays). Chat profiles opens the Chat Profiles page.
Every ad of every profile runs. When several profiles set the same variable, the first profile's value wins, which is what the order is for: a profile with this week's prices above a profile with the ads that read them.
A profile that can't be read shows Can't be read: hover over it to see why. Its ads don't run until you fix it. A profile you delete leaves every bot's list, and one you rename keeps its place under its new name.
What a script changes
A script can switch the module, its parts and the dry run, and set the profiles, while it runs (see asterobot:chat). The tab then says what it sets, such as "The running script sets: module on, Replies off, profiles Sell wheat." Your saved settings come back when the script stops. A script can also answer private messages itself, before the profiles' replies.
On a relayed session, only the Chat module switch you saved counts: a script can't turn the module on or off there.
Sending
Every line the bot says goes through the guard, one at a time:
- One line in flight. The guard sends a line, then waits for the server to say it back, or to refuse it, before the next one. After 5 seconds without an answer, the line counts as sent.
- Cooldowns. When the server answers that a channel is in its cooldown ("You will be able to post again in 37 seconds"), the guard waits exactly that long and sends the line once more. The console says
Waiting 37 s for the cooldown in Trade, then sending the line once more. - The cap. At most Lines a minute lines leave in any minute.
- Too much spam. When the server says "Too much spam!", nothing is sent for 5 minutes, then 10, 20, 40 and 60 minutes at most if it says it again.
- A mute. When a member of staff mutes the character, nothing is sent until the mute ends, and a minute more. The game saying the character may speak again ends it at once.
- Your lines first. What you type in the Console goes before every other line, and only a cooldown holds it back. Then come the alarms' lines, the commands' answers, the replies and the triggers' messages, and last the scripts' lines and the ads.
The Sending section shows where the guard stands: Sending, Paused until a time, Stopped until you resume, Too much spam: waiting until a time, or Muted until a time.
Stop sending holds back the ads, the replies, the triggers' messages, the commands' answers and the scripts' lines until you click Resume; the lines waiting are dropped. What you type in the Console and the lines your alarms say still go. An alarm that pauses the chat shows as Paused until the end of its pause.
Ads
The Ads section lists every ad of the bot's profiles, with its name (or Ad 1, Ad 2...), its profile, and where it stands:
| State | What it means |
|---|---|
| Sends as soon as it can | Its wait is over: it goes at the next look, within a second. |
| Next at a time | It waits between two sends. |
| Waiting for: a test | One test of its condition doesn't hold, such as Waiting for: Subarea. It goes as soon as the condition holds, if its wait is over. |
| Waiting: the character isn't in the game yet | The bot is connected but its character hasn't entered the game, such as while it picks one. |
| Waiting: sending is stopped, Waiting: too much spam, Waiting: the character is muted | The guard holds every ad back. |
A reason, such as {price} has no value |
Its message can't be filled: a variable without a value, an item the character doesn't have. |
| Ended: all its sends are done, Ended: its time is up, Ended: its date has passed | Its stop ended it for good. |
Beside it, how many times it went (Sent 3 times) and when it last did.
When an ad's turn comes, it fills one of its messages and sends it to each of its channels at once: a channel still in its cooldown waits while the others go. It then waits a random time between its two waits before the next send, and plays its emoticon or emote, if it has one, unless in a dry run.
The counts are kept in memory: they start over when Asterobot restarts or the bot's profiles change.
When the character runs out of an item an ad links, after the ad has said it at least once, the activity shows Sold out, and the alarms hear it as a soldOut event. The ad goes on once the item is back.
Replies
When another player sends the bot a private message, the bot answers with the first reply rule of its profiles whose test holds, such as "the message has the word price". It first waits as a person would: a random time to read the message, then the time to type the answer, both set by the profile's timing.
A player gets at most one answer from the rules an hour by default, so the bot answers the first message of a conversation and stays quiet after; a profile can change that. A script can answer first, as often as it likes (see asterobot:chat).
The bot never answers:
- your own bots, so two of your bots never talk to each other;
- a member of staff;
- a command, which the commands handle instead.
Triggers
When another player says something in a channel, every trigger of the bot's profiles whose test holds fires, such as "a line in Trade with the word wtb". It does its actions in order: whisper the player, say something in a channel, raise an event for the alarms, tell the script, ignore the player, play a smiley or an emote, invite the player to the party, pause the chat. A whisper or a message waits as a reply does, the time to read the line and type it.
One player fires a trigger at most once an hour by default; a profile can change that. Your own bots' lines fire triggers too, unless a trigger tests One of your bots. A member of staff's lines and the character's own never do.
The console says each trigger fired, such as Trigger wtb: Buyer in Trade: wtb wheat, and so does the Activity section.
Commands
When one of the bot's profiles takes commands, a private message that starts with !, from one of your other accounts or from a character the profile trusts, is a command. A stranger's !stop is just a message, which the replies answer: nothing tells them the bot takes commands.
| Command | What the bot does |
|---|---|
!stop |
Stops its script and its trip. |
!start |
Starts its script, the one it plays when you click Play. |
!pause or !pause 30 |
Stops sending, until !resume or for 30 minutes, like Stop sending. |
!resume |
Sends again. |
!say hello |
Says hello in General, as typed. A channel's shortcut picks another channel: !say /b selling wheat goes to Trade. |
!status |
Answers with its status, such as Hero, level 50, Astrub City [4,-19], 12000 kamas, 350/2000 pods. |
!disconnect or !disconnect 30 |
Leaves the game, and comes back after 30 minutes when you give them. Not on a relayed session. |
!status is the only command that answers. The console and the Activity section say what each command did, such as Command !stop from Master: the script is stopped.
!stop, !start and !disconnect put the bot's schedule on hold, as the same buttons do.
Once !stop has stopped the script, your saved settings are back: the bot hears !start only if the Chat module switch you saved is on and one of the profiles you saved takes commands. When it's the script that switches the module on or picks the profiles, !start goes unheard.
A profile chooses its prefix, the characters it trusts besides your own accounts, the commands that work and what !status answers (Commands). A trusted name counts only on the bot's own server. A command the profile doesn't know goes to the bot's script, if it answers commands, and is ignored otherwise.
Status
When one of the bot's profiles has a status, the character takes it once in the game, as the game's status menu would set it: Available, Away with its message, Private or Solo. The console says Status set to away by the chat profiles, and the bot's header shows it.
A status you change elsewhere wins: the header's status menu, your game client on a relayed session, a script. The bot leaves it until the profiles give another status, the Status part is switched off and on, or the next login. When the profiles give no status any more, or the part goes off, the character takes back the status it had before, unless somebody changed it meanwhile.
Away, Private and Solo refuse party invitations by themselves, as in the game, and Private keeps strangers' private messages out, which the replies then never get.
Activity
The Activity section keeps the last 200 lines, commands, triggers, ad ends and back-offs, the latest first, until Asterobot restarts. Each shows its time and what happened: Sent, Dry run, Not sent, Ad ended, Sold out, Backing off after "Too much spam!" or a mute, Command or Trigger. A line also shows who said it (You, Alarm, Command, Reply, Trigger, Script or Ad), where (in a channel, or to a character), the line, and why it wasn't sent. A command shows who sent it and what the bot did; a trigger, who said the line and where, the line, and the trigger's name.
The chat itself stays in the Console: the bot's lines appear there as the server says them back, and the dry run's as console lines.