Aller au contenu
Afficher dans l'application

Une meilleure façon de naviguer. En savoir plus.

Asterobot

Une application plein écran sur votre écran d'accueil avec notifications push, badges et plus encore.

Pour installer cette application sur iOS et iPadOS
  1. Appuyez sur Icône de partage dans Safari
  2. Faites défiler le menu et appuyez sur Ajouter à l'écran d'accueil.
  3. Appuyez sur Ajouter dans le coin supérieur droit.
Pour installer cette application sur Android
  1. Appuyez sur le menu à trois points (⋮) dans le coin supérieur droit du navigateur.
  2. Appuyez sur Ajouter à l'écran d'accueil ou Installer l'application.
  3. Confirmez en appuyant sur Installer.
Choose a few messages on your MITM bot, watch them pass while you play, and read the fields of one of them.
Everything you do in Dofus turns into messages between your game and Ankama's servers. This tutorial shows a few of them live on the MITM bot from Your first bot, while you walk and chat. No package is needed.
Caution
Don't tick IdentificationRequest for this tutorial. It's the first message your game sends, and it carries the ticket that opens your game session: never share a screenshot or a copy of it.
1. Bring your bot online
On your bot's page, click Start waiting. Start Dofus from the Ankama Launcher, sign in and enter the game with your character. The bot's status turns to Connected to game server.
2. Choose a few messages
On the bot's page, click Tools. The Network tool opens on its Traffic panel. Click Settings. The list holds every message Asterobot can name, with a box to tick for each. Type MapMovement in Filter messages..., then tick MapMovementRequest and MapMovementEvent. Replace the filter with ChatChannelMessage, and tick ChatChannelMessageEvent. Click Apply. The button shows how many messages are ticked, and a notification confirms how many message types the bot now mirrors. Message Sent by What it says MapMovementRequest Your game Your character asks to walk along a path of cells. MapMovementEvent The server Someone on your map walks along a path: your character or another one. ChatChannelMessageEvent The server A chat message reaches you. 3. Play and watch
Click Traffic. In Dofus, click a cell to walk there. A MapMovementRequest row marked Out appears, and a MapMovementEvent row marked In comes after it. Wait for other players to move on your map: each of their walks adds a MapMovementEvent row. When a chat message reaches you, a ChatChannelMessageEvent row appears, marked In. New rows arrive at the bottom, and the list follows them while you're at the bottom. Pause freezes the list, but messages that arrive while it's on aren't kept. The colour of each row tells the kind of message: Network traffic explains them.
4. Read a message
Click a MapMovementEvent row. It opens and shows every field of the message as JSON. Find cells: the path the character walks, as a list of cell numbers. Another field holds the id of the character that moves, which tells your own walks from other players'. Click a ChatChannelMessageEvent row and find content: the text of the message. Large numbers, such as ids, show as text in quotes. To keep one kind of message in the list, type name:MapMovementEvent in the search box above it. The Dofus protocol reference describes every message and field.
5. Tidy up
The messages you chose stay selected with the bot, and Asterobot keeps passing them on to Asteroboard, until you untick them. When you no longer need them, untick them in Settings and click Apply again. Clear, on Traffic, empties the list, and removes the chat lines from the Console tab too.
When you're done, quit Dofus, and click Disconnect if you want the bot to stop waiting.
Where to go next
Network traffic, for the search syntax and every part of the panel. Send messages by hand React to messages, to act on a message in a script of your own. Lire cette page en français
  • 71 vues
Short answers about what Asterobot is, the computers and the Dofus it works with, whether you need to code, and what keeps running when you close a window.
The basics: what Asterobot is, where it runs, and what keeps working when you close things.
What is Asterobot?
Asterobot is a program you run on your own computer to run bots for Dofus 3. A bot either signs in and plays on its own, in Full socket mode, or joins the game you play, in MITM mode (short for man-in-the-middle). What a bot does in the game comes from a package: a small JavaScript program from the marketplace, or one you write. Asterobot also lets you browse the game's data, maps and texts without any bot.
What is Asterobot gives the full tour.
What's the difference between Asterobot, Asteroboard and asterobot.net?
Asterobot is the program that does the work, Asteroboard is the web interface you control it from, and asterobot.net is the website. Asteroboard opens at https://asteroboard.asterobot.net, but everything it shows comes straight from your Asterobot. asterobot.net holds your account, the downloads, the marketplace and the forum. See The three parts.
Which systems does Asterobot run on?
Windows, macOS and Linux, each on x86-64 (Intel or AMD) and ARM64 processors. That makes six builds, including one for Macs with Apple silicon and one for ARM boards such as the Raspberry Pi 4 and 5. The x86-64 builds need a processor with the x86-64-v2 instruction set, which every x86-64 processor made since about 2009 has. Requirements lists everything else you need.
Which Dofus does it work with?
Dofus 3. Bots only play Dofus 3, and Asterobot always downloads the Windows version of its game files, even on macOS or Linux. Each release of Asterobot is tested with one Dofus version, which Asteroboard marks Compatible. Why Asterobot downloads Dofus explains the tested version.
Do I need Dofus installed?
Only for MITM mode, where you play Dofus yourself and a bot joins your session. A Full socket bot needs no Dofus client at all. Either way, Asterobot downloads its own copy of the game files, separate from the Dofus you play. Full socket and MITM compares the two modes.
Do I need to know how to code?
No. Running a bot in MITM mode, installing a package from the marketplace and changing its settings all happen in Asteroboard. You need JavaScript to write packages of your own, and for now to get a Full socket bot into the game.
Note
No code needed. The official @asterobot:base package, which Asterobot installs by itself, takes a Full socket bot into the game without any code from you: pick it as the bot's package and click Play. To write your own, use Identify and run.
Can I use Asterobot without running a bot?
Yes. With a game version downloaded and extracted, the Game page lets you browse the world map, inspect maps cell by cell, search the game data, query it in SQL, read the game's texts and listen to its music. See Game page.
Can I leave my bots running all day?
Yes, as long as Asterobot keeps running and each bot's connection lasts. Asteroboard doesn't need to stay open. Keep in mind that nothing reconnects or starts again by itself: when a bot's connection drops, or when Asterobot restarts, you bring the bot back online and press Play yourself. In MITM mode, every session also starts with someone launching Dofus.
Disconnect, delete and restart covers each case, and Asterobot on a remote machine shows how to keep Asterobot running on a machine you don't sit at.
What happens when I close the browser or Asteroboard?
Nothing stops. Your bots stay connected, their scripts keep running and downloads carry on, because all of that happens inside Asterobot. What only lived in the page goes away with it: the messages a bot's Traffic panel had captured and the chat lines its console showed from them, the contents of a bot's Inventory tab until the character enters the game again, the lines on Server > Console, the Extract data after downloading choice of a download that hasn't finished, and the music playing from the Game page. See The three parts.
What happens when I close Asterobot's terminal window?
Asterobot stops, and everything with it. Every bot disconnects, including a bot relaying the game you play, so your Dofus is disconnected too, and scripts and downloads stop.
To stop it cleanly, press Ctrl+C in its terminal or click Shutdown server on Server > Status. Asterobot then also puts back the line it changed in your Dofus folder for MITM mode. After an abrupt stop, it puts that line back the next time it starts, provided one of your bots comes back with it (MITM problems). See First launch.
Can Asteroboard start Asterobot again?
No. Once Asterobot has stopped, you need access to the computer it runs on to start it. Meanwhile Asteroboard shows Server disconnected, and connects again by itself as soon as Asterobot is back. See First launch.
Does Asterobot update itself?
No. When a new version is out, Asterobot tells you as it starts, and you replace the program by hand. Your bots, accounts, packages, game versions and settings are kept. Asteroboard, on the other hand, updates itself. See Updating Asterobot.
Is there an app?
Asterobot has no window of its own: on Windows it runs in a terminal window, and on macOS and Linux you start it from a terminal. Asteroboard can be installed as an app from your browser, and then opens in its own window. See Tour of Asteroboard.
Which languages is Asteroboard available in?
English, French and Spanish. It follows your browser's language, and starts in French when your browser uses another one. To change it, open Preferences and pick one under Language. See Preferences.
Where does Asterobot keep its files?
In folders of your user profile, not next to the program: one for its settings, with config.toml, one for its data, such as bots, Ankama accounts and packages, and one for its cache, which holds the game versions. Files and folders shows where they are on each system and how to back them up.
How do I reset Asterobot or start over?
Pick the smallest reset that fixes your problem, since each one deletes something for good. Reset offline data and Reset preferences, on Preferences, only clear what Asteroboard keeps in your browser. Reset all, on Server > Config, puts your settings back to their defaults and signs Asterobot out of asterobot.net. cache reset deletes every game version, and keeps your settings, bots, Ankama accounts and library. Reset and start over helps you choose.
Lire cette page en français
  • 73 vues
The risk for your Ankama account, where Asterobot keeps your passwords and sign-ins, Shield and two-factor authentication, captchas, and what a package can do with your account.
Read these answers before you use Asterobot with an Ankama account you care about.
Can my Ankama account get banned?
Yes. Using a bot breaks Ankama's terms of use, and Ankama can sanction the accounts involved at any time. That holds in Full socket mode and in MITM mode, with a package you wrote or one from the marketplace. Nobody can promise that an account stays safe, and these docs give no advice on avoiding detection.
Only use an Ankama account with Asterobot if you accept that risk.
Is MITM mode safer for my account?
No. A bot in MITM mode is still a bot, and it breaks Ankama's terms of use just the same. What MITM mode changes is who holds your login: you sign in yourself, in Dofus, and never give Asterobot your Ankama login or password. See Full socket and MITM.
Where does Asterobot keep my Ankama password?
In a file called accounts.toml, in Asterobot's data folder, as plain text, and only if you chose to store one. It isn't encrypted because Asterobot has to type it into Ankama's sign-in page. The same file holds each account's Login ID and the tokens Ankama gave Asterobot.
On Linux and macOS, Asterobot restricts the file so only your user account can read it. On Windows that restriction has no effect. Either way, anyone who can open files as your user, or who gets a copy of the file, can read the password and use the tokens. Asterobot never sends the password back to Asteroboard.
Add an account has the details, and Files and folders shows where the data folder is.
Do I have to store my Ankama password?
No. The password only serves automatic sign-in. Without one, you sign the account in yourself from Asteroboard whenever its sign-in stops working, as Manual sign-in shows. MITM mode needs no stored account at all.
What else on my computer gives access to my accounts?
A few files and folders, each worth protecting like a password:
What Where What it gives access to accounts.toml The data folder Your Ankama Login IDs, the passwords you stored, and Ankama's tokens zaapmanager/browser-profiles/ The data folder A live Ankama session for each account that signed in automatically website.token config.toml, in the settings folder Your asterobot.net account, through Asterobot's sign-in server.basicAuth config.toml Asterobot's port, with passwords written in plain text On Linux and macOS, only your user can read these. On Windows, that protection has no effect. Never share any of them, not even to get help: Getting help lists what must stay private.
Can I use an account protected by Ankama Shield or two-factor authentication?
Only in MITM mode. Full socket mode doesn't support these accounts: Asteroboard has no field for a verification code, and automatic sign-in only types the Login ID and the password. In MITM mode, you sign in yourself in Dofus, codes included, and the bot relays that session. See Shield and two-factor authentication.
What happens when Ankama shows a captcha during automatic sign-in?
Asterobot gives up, and a person has to sign in. You have two ways out:
Sign in yourself from the sign-in dialog. This always works, wherever Asterobot runs. When Asterobot runs on a computer you're sitting at, turn off zaapmanager.browserHeadless on Server > Config, start the automatic sign-in again, and answer the challenge in the browser window that opens. Turn the setting back on afterwards. See Automatic sign-in.
Why doesn't Asteroboard say why automatic sign-in failed?
Because its message is the same whatever went wrong, starting with ankama account authorization required. The real reason is only in Asterobot's log. In the terminal or on Server > Console, look for the warning Automatic Ankama sign-in failed, a person has to sign in: its error says what happened.
When you started the sign-in from the dialog's own button, the dialog also shows a picture of the page the browser was on, which often tells a captcha from a wrong password. See Automatic sign-in.
What can a package do with my account?
Everything your character can do in the game. A package's script can send any message to the game server as your character, to move, fight, trade, sell or delete items. It reads everything the game sends, can read the session's game ticket and can close the game connection. On a MITM bot, it can also change or block what your Dofus and the server send each other.
It can't read your Ankama login or password, open files on your computer, use the internet or reach your other bots. Only play packages from authors you trust. Trusting a package lists everything.
Do package permissions limit what a package can do?
Not yet. A package can list permissions in its manifest, but Asterobot doesn't enforce them: a package that lists none can still do everything described above.
Note
Coming soon. Asterobot will enforce the permissions a package lists. Until then, don't count on them to limit what a package does.
See Trusting a package.
What do I do if I think someone used my Asterobot?
Stop Asterobot, or put server.listenAddress back to 127.0.0.1:8080 and restart it. Then change the basic auth passwords, click Disconnect on each Ankama account in Account Manager, change the Ankama passwords you had stored, and log Asterobot out of asterobot.net before signing in again. Security goes through each step, and explains who can reach Asterobot in the first place.
Lire cette page en français
  • 80 vues
Short answers about choosing Full socket or MITM mode, playing alongside a bot, running several bots, restarts and using other computers.
How bots connect, how many you can run, and what happens to them when things stop.
Should I use Full socket mode or MITM mode?
Start with MITM mode. You play Dofus as usual and the bot joins your session: there's nothing to store in Asterobot and no connection script to find, and it works with accounts protected by Ankama Shield or two-factor authentication. Full socket mode is for bots that play without you and without a Dofus window, but each bot needs its own Ankama account and a connection script to enter the game. See Full socket and MITM.
Why doesn't my Full socket bot enter the game?
Because Asterobot's part ends once the connection to the game server is open. It signs the account in, picks a server and connects, but it doesn't identify the bot on the game server or choose a character. A connection script does that: a package you start with Play. Connected to game server only means the connection is open, whether the bot got into the game or not.
Note
A ready-made connection script. The official @asterobot:base package takes a Full socket bot into the game: pick it as the bot's package and click Play. You can also use MITM mode, or write your own by following Identify and run.
Full socket mode explains it in full, and Bot doesn't connect covers the errors.
Can I play Dofus while a bot uses my account?
In MITM mode, yes: that's what the mode is for. You keep playing, and a package running on the bot controls the same character as you, with nothing to coordinate the two of you. In Full socket mode, no. An Ankama account has one game session at a time, and a bot that connects while the account is already in the game fails with identification was refused: account already connected elsewhere.
See MITM mode, and for script authors, Sessions.
Does Asterobot change my Dofus installation?
Only one line, and only in MITM mode. Asterobot edits the ConfigUrl line of Dofus_Data/StreamingAssets/version, in your Dofus folder, so your game signs in through Asterobot. It puts the original line back when no bot is waiting any more and when Asterobot stops normally, or the next time it starts after an abrupt stop, provided one of your bots comes back as it starts. It never installs or updates your Dofus. See MITM mode.
Dofus won't sign in since Asterobot stopped. What do I do?
Start Asterobot again. While that line points at Asterobot, Dofus can't sign in without it, and Asterobot puts the line back as it starts, provided one of your bots comes back with it. If the log doesn't show Restored a game install left pointing at Asterobot by a previous run, put the line back by hand. See MITM problems.
Why does my MITM bot stay on Waiting for your game client?
Your game isn't reaching the bot. The usual causes:
Dofus was already open when the bot started waiting. Close it and start it again. botmanager.mitmGamePath is empty or points at the wrong folder. Asterobot's log shows Pointed the played game at Asterobot when it edited your Dofus folder. The bot is attached to another Ankama account. It only takes the sessions of the account it attached to the first time. server.tls is on or server.basicAuth is set. MITM mode doesn't work with either of them. See MITM mode and MITM problems.
What happens to my game when I stop a bot?
That depends on the button. Stop only stops the bot's script, and your game carries on. Disconnect on a MITM bot ends the session it relays, so your Dofus is disconnected if you're in the game. Stopping Asterobot does the same to every bot. See Disconnect, delete and restart.
What happens when I quit Dofus in MITM mode?
The bot goes back to Waiting for your game client and takes your next session by itself. The script it was running stopped, though: press Play again once your game is back. See MITM mode.
How many bots can I run?
As many as your asterobot.net account allows. Every bot listed in Bot Manager counts, connected or not, and past that number Add a bot fails with Couldn't add the bot. In Full socket mode, each bot also needs its own Ankama account, and in MITM mode each bot relays one Dofus client. See Many bots.
Can two bots use the same Ankama account?
No. An Ankama account can belong to one bot only, since Dofus allows one game session per account. Adding a second bot with it fails with Couldn't add the bot, and choosing it on a bot's Settings is refused with this account is already associated with a bot. Store one account for each Full socket bot. See Many bots.
Can one bot use both modes?
Yes, but not at the same time. A bot with an Ankama account offers both Connect and Start waiting, and a bot without one can only wait for your game. Disconnect the bot before you switch. See Full socket and MITM.
Do my bots reconnect by themselves?
No. Asterobot never connects a bot or starts a script on its own. After Asterobot restarts, every bot is Disconnected and nothing plays. When a Full socket bot's connection drops, click Disconnect, then Connect, then Play. See Disconnect, delete and restart.
Are my bots kept when Asterobot restarts?
Yes. Every bot is saved in bots.toml, with its settings, its package, its package settings and its message selection, and comes back disconnected when Asterobot starts. Its console history doesn't come back, and neither does an inline script loaded on it. See Disconnect, delete and restart.
Why is a bot missing after I restarted Asterobot?
Asterobot skipped it. That happens when the bot's Ankama account is no longer in Account Manager, when the version it's set to is no longer installed, when Asterobot couldn't prepare Ankama sign-ins, or when it couldn't confirm your asterobot.net account in its first seconds. The terminal shows a warning starting with skipping bot restore:, followed by the reason.
The bot's configuration is still saved: fix the cause and restart Asterobot. Don't add a new bot with the same name, which replaces the saved one for good. See Disconnect, delete and restart.
I play several accounts in MITM mode. Which bot gets which game?
Each game goes to the waiting bot attached to its Ankama account. The first time, a bot without an account attaches itself to the first account whose session it takes, in alphabetical order of the waiting bots, and keeps that attachment for good. To decide which bot relays which account, start waiting on one bot at a time and sign in with the account you want on it. See Many bots.
Can I use other computers?
Yes. Asteroboard can run on a phone or another computer, Asterobot on a server or a computer you don't sit at, and in MITM mode Dofus can even be on a third computer. None of this works with the default settings, which only accept connections from Asterobot's own computer. How the parts connect shows each setup, and Asteroboard and network answers the common questions.
Lire cette page en français
  • 54 vues
Short answers about Asterobot's own copy of Dofus, the disk space it takes, what to do after a Dofus patch, the tested version and updating Asterobot.
Asterobot keeps its own copy of Dofus, separate from the one you play, and neither that copy nor Asterobot updates itself.
Why does Asterobot download Dofus when I already have it?
Because Asterobot works from its own copy of the game files. Bots, scripts and the Game page all read the game data, maps and texts from that copy, never from the Dofus you play. By default it only downloads the files a bot needs, not the whole game, and always the Windows version. See Why Asterobot downloads Dofus.
How much disk space does it need?
It depends on the Dofus version, and Asterobot doesn't give a total. A few sizes, all approximate: 545 MB for the world map artwork and 630 MB for the map data (measured on Dofus 3.7.11.11), both part of every game version you download, and 900 MB for the game's music, only if you download it from the Game page's Music tab. Extracting the game data takes more space on top of the files.
Asterobot doesn't check the free space before a download. When the disk fills up, the download stops and its status turns to Failed. See Why Asterobot downloads Dofus.
How do I free disk space?
From Game Manager. Remove all chunks deletes the stored pieces game versions are rebuilt from, at the cost of a slower next download. Uninstall deletes a version's files and keeps its extracted game data, and Delete removes the version completely. Neither Uninstall nor Delete checks whether a bot still uses the version. While Keep DOFUS up to date is on, Asterobot also deletes by itself the older versions no bot uses. See Manage game versions.
Dofus just got a patch. What do I do?
Usually nothing. While Keep DOFUS up to date is on in Game Manager, as it is until you turn it off, Asterobot sees the new version within a minute, downloads and extracts it, moves your bots on Latest to it and deletes the old version once no bot uses it. A bot set to a fixed version stays on it: choose Latest or the new version on its Settings tab.
With the switch off:
In Game Manager, click Download a game, keep latest in Version and Extract data after downloading checked, and click Download. Keep Asteroboard open until the new row shows Ready for bot. On each bot set to a fixed version, click Disconnect, choose Latest or the new version on its Settings tab, and click Save settings. Once no bot uses the old version, delete or uninstall it. See When Dofus updates.
Why does my MITM bot refuse to start waiting after a patch?
Because the Dofus you play is neither the version Asterobot has nor the one Ankama serves. Asteroboard shows Couldn't put the bot into waiting, without saying why. Right after a patch, it usually means the Ankama Launcher hasn't updated your Dofus yet while Asterobot already has the new version: update your Dofus and click Start waiting again. It also happens when Asterobot can't reach Ankama's download servers to learn which version they serve and still has the previous version. See MITM mode.
What do Compatible and Different version mean?
Compatible means your release of Asterobot was tested with that Dofus version, and Different version means it wasn't. A different version isn't blocked, but the game's messages change from one version to the next, so a bot on it may fail to connect, and its game data may not match what you expect. See Why Asterobot downloads Dofus.
What happens when Asterobot doesn't support the new Dofus version yet?
Your bots may not work on it. You can meet Different version in Game Manager, a Full socket bot that doesn't connect and shows Couldn't connect this bot, a MITM game that gets disconnected as it reaches the bot, and scripts that can't start, with an error beginning with the game engine is not available:. When the reason tells you to update Asterobot, download its new release. See When Dofus updates.
Does Asterobot update the Dofus I play?
No. The Ankama Launcher updates your Dofus. Asterobot updates its own copy: each patch is a new game version, which Asterobot downloads by itself while Keep DOFUS up to date is on in Game Manager, and the versions already there stay as they were until no bot uses them. See When Dofus updates.
Can I keep several game versions?
Yes. Each version has its own row in Game Manager, each bot uses the version set on it, and pieces of content that several versions share are stored once. While Keep DOFUS up to date is on, though, Asterobot deletes the versions older than the newest one ready that no bot is set to: set a bot to a version to keep it. See Manage game versions.
How do I know a new Asterobot is out?
Asterobot checks asterobot.net each time it starts. When a newer version is published, the terminal prints An Asterobot update is available, and Asteroboard shows Asterobot update available with a View on asterobot.net button. A version published while Asterobot runs is only noticed at its next start. See Messages and updates.
How do I update Asterobot?
Download the new archive, stop Asterobot, replace the program file with the new one, and start it again. On macOS and Linux, make the new file executable with chmod +x asterobot first. Your bots, accounts, packages, game versions and settings stay, since they live in other folders. After the update, bring your bots back online and look at the Compatibility column of Game Manager. See Updating Asterobot.
Will my packages still work after an update?
They can stop working in two cases. A package that states which versions of Asterobot it works with can turn Incompatible after you update Asterobot, and it won't start then. And a Dofus patch can change the messages a script relies on, until its author adapts it. Authors can read After a game update.
Lire cette page en français
  • 62 vues
Short answers about finding packages, deciding whether to trust one, updating, editing, sharing and publishing packages.
Packages are what bots run. You get them from the marketplace or write them yourself.
What is a package?
The code that tells a bot what to do. A package is a small set of JavaScript files, often with settings and buttons that show on the bot's page. You install packages in your library, then give one to each bot. See What is a package.
Does a bot need a package?
To do anything in the game, yes. A MITM bot connects without one, and you can already read its chat, inventory and messages in Asteroboard. A Full socket bot needs a connection script just to enter the game. See What is a package.
Where do I find packages?
On the marketplace, the Library category of asterobot.net: https://asterobot.net/files/category/2-librairie/. Copy the address of a file's page, then in Library Manager click Download package, paste it in File ID or URL, click Preview, then Install. Asterobot has to be signed in to asterobot.net. See Install from the marketplace.
Is a package from the marketplace safe?
Asterobot can't tell you. A package runs with your bot's game session and can do anything your character can. Asterobot's own check only proves that a marketplace package's files haven't changed since you downloaded them, not that its code is safe. Before you play one, read its file page on asterobot.net, look at its dependencies, read the code if you can, and keep the bot's console open the first time. See Trusting a package.
What do Local, Community and Official mean?
They say where a package's name comes from:
Badge Name Where the package comes from Local A plain name, such as my-harvester You created, copied or imported it. Only local packages can be edited. Community @ the author, : the title, such as @some-author:auto-harvest A marketplace file published by an asterobot.net member Official @asterobot: and the title A marketplace file that asterobot.net marks as official The badge comes from the name alone, so a package imported from a .zip file can show Community or Official too. Only a package installed from the marketplace has a Source row on its page. See What is a package.
Does the Official badge mean the code is safe?
No. It tells you who published the package, not what its code does, and it doesn't replace reading the file's page. See The marketplace.
Why can't I download a package?
The two messages you can get mean different things:
You don't have permission to download this file. under the preview card: the file's rules on asterobot.net don't let your account download it. There's nothing to fix in Asterobot. File not found, or you don't have permission to view it. after Preview: the file doesn't exist, the account can't see it, or Asterobot couldn't ask asterobot.net, for example because it isn't signed in. Check the address, then the account button at the bottom of the sidebar. See The marketplace.
How do I update a package?
In Library Manager, click Check for updates, then Update to followed by the version. The new version installs next to the old one, and your bots keep playing the old one until you move them. Nothing is checked automatically, and only packages installed from the marketplace can be updated this way. See Update packages.
Do I lose my package settings when I update?
No. Package settings are saved for each bot under the package's name, not its version, so a bot moved to the new version keeps them. Only a setting the new version removed, renamed or gave another type starts again from its default. See Update packages.
Why does a package say Incompatible?
The package states which versions of Asterobot it works with, and yours isn't one of them. It stays in your library but won't start. Update the package, or Asterobot, until the two match. See What is a package.
Play only says Couldn't start the behavior. Where's the reason?
On the bot's Settings tab, under Package settings. When the package can't be loaded, for example because it's incompatible or its files fail the integrity check with package source integrity mismatch, Couldn't read this package's settings appears there with the reason. Check first that the bot is Connected to game server: a package can't start on a bot that isn't. See Package errors.
Can I edit a package I downloaded from the marketplace?
No. Marketplace packages are read-only: Edit code isn't offered for them, and a package whose files were changed by hand is refused. To change one, Export it and bring it back with Import a .zip under a local name. That copy is yours to edit, but it no longer gets updates. See The editor.
Can several bots play the same package?
Yes. Each bot runs its own copy of the script, with its own package settings. See What scripts can do.
How do I give a package to a friend?
Export it as a .zip from its menu in Library Manager, and have your friend add it with Import a .zip. A package shared that way has no link to the marketplace, so it gets no updates. To share with everyone, publish it. See Share your package.
How do I publish a package?
Any asterobot.net member can. Export your package as a .zip, then submit a file in the Library category of asterobot.net, with that .zip as its only attachment, a title, which becomes part of the package's name, and your package's version. See Before you publish and Publish on asterobot.net.
Where are packages stored?
In the library/packages/ folder of Asterobot's data folder, one folder per version. See Files and folders.
Lire cette page en français
  • 52 vues
Short answers for script authors about TypeScript, npm, timers, internet and file access, message names, debugging and movement.
Questions people ask while writing packages. The developer docs cover each topic in full.
Which language are scripts written in?
JavaScript. Every file of a package is an ES module, and scripts can use the syntax of JavaScript up to ES2022, apart from three constructs: async generators, for await and import() called as a function. See JavaScript support.
Can I write scripts in TypeScript?
No. A package's files must end in .js or .mjs. You still get types: the editor checks your JavaScript the way TypeScript checks it, and JSDoc comments such as /** @type {BehaviorParameters} */ give your own code completion and checks. See JavaScript support.
Can I use npm packages?
No. There's no npm and no require(), and an import such as "lodash" is read as a dependency your package didn't declare, so the script doesn't load. To reuse code, import your own files with paths starting with ./, or turn the code into a package of your own and declare it as a dependency. See Modules and imports and Dependencies.
Is there setTimeout or setInterval?
No. sleep() from asterobot:timers is the only timer: await sleep(1500) pauses your function for 1.5 seconds without holding up the bot. For something that repeats, write a loop with await sleep() inside and start it from the entry function without awaiting it. For anything the game announces, a message handler is better than a loop. See Async and timing.
Can a script use the internet?
No. There's no fetch(), no WebSocket and no connection of any kind besides the bot's game connection. See What scripts can do.
Can a script read or write files?
No. A script only reaches the modules of its own package and of the packages it depends on. It has nowhere to keep data for its next run either: each start begins from scratch, and values is read-only. What a script needs again has to come from the game, or from a setting someone fills in. See Play, stop and reload.
Can two bots share data?
No. Each bot runs its own copy of the script, and two copies share no variables. A script can't see or control another bot either. See What scripts can do.
Where do I find message names and fields?
In three places:
The Dofus protocol reference describes every message and what its fields mean. The package editor completes message names and payload fields as you type, and marks a field a message doesn't have. A bot's Tools > Network shows the messages the game really exchanges, with their values. On a MITM bot, do the action in Dofus and watch what goes through. Scripts read field names in camelCase, such as senderName for sender_name. See Finding messages.
Are there functions to walk, fight or harvest?
To walk and to use things, yes. move() walks the character to a cell of its map, changeMap() takes it to the next map by one side, and useElement() uses a door, a zaap, a resource (to harvest it), a workshop or an exit, walking within reach first. They work on Full socket and MITM bots, and they're the same moves as the bot's Map tab. travel() takes the character to any map, however far, through map sides, stairs, suns and doors (not zaaps yet). There's no function to play a fight: a script does that by sending the game's messages and reacting to what the server answers. See What scripts can do and asterobot:movement.
Why doesn't my script get a Full socket bot into the game?
Because a Full socket script has to identify the bot itself. Its first message on a new connection must be IdentificationRequest, sent when launch.reason is "initial", and choosing a character and entering the game are up to scripts too. Identify and run shows the lines every sample in these docs uses.
Note
Depend on @asterobot:base. The official package does the identification for you: a package that imports it doesn't have to handle the connection, on Full socket and MITM bots alike. To do it yourself, keep the lines Identify and run shows.
Which bot should I test my scripts on?
A MITM bot on your own Dofus client. You make things happen in the game yourself and watch the script react, and no Ankama account has to be stored. Keep in mind that everything the script sends goes out as your character. See Identify and run.
How do I restart a script after changing its code?
Click Run in the editor, or Stop then Play on the bot's page. There's no Reload button. Saving alone doesn't change a script that's already running: the next start loads what you saved. See Play, stop and reload.
How do I debug a script?
Start with the bot's console:
Check the editor's error badge before running. Write to the bot's Console with botInfo() and the other functions of asterobot:bot, and untick Asterobot under Channels, at the left of the chat box. When the script stops on an error, The behavior stopped with an error appears at the top of the bot's page, with the full text and a Copy button. When a handler never seems to run, look at what really arrives in the Network tool. Logging and debugging goes through the whole routine.
Why does my log show map[] instead of the error?
Because Asterobot turns logged values into text itself, and an Error object comes out as map[]. Log String(error) or error.message instead. Other objects come out as map[...] too: JSON.stringify() reads better, once BigInt values are converted, since it throws on them. See Logging and debugging.
Why did my script stop with JavaScript execution deadline exceeded?
Some of your code ran for more than 5 seconds without awaiting anything, which is almost always a loop that never ends. Look for one, split long work with await sleep(0) now and then, and replace thousands of record() or text() calls in a row with one find() or query(). See Async and timing.
Why are game texts and item names in French?
Because every script started from Asteroboard uses the language fr, whatever language the bot is set to. text() and search() answer in that language. To read another one, query the _names table, which has a language column. See Game data overview.
Can a script change its own settings?
No. values is read-only: assigning to one of its properties throws a TypeError, and the setting keeps its value. Settings change when someone applies them on the bot's Settings tab. See Read settings.
Will my script break when Dofus updates?
It can. As long as Asterobot knows the game version, it keeps readable message names when the scrambled names on the wire change. But a patch can add, remove or change messages, an Asterobot update can rename a message, and game data tables and columns follow the game version. Read fields with ?., give every wait() a timeout, and check your script after each update. See After a game update.
Are there example scripts?
Yes. The tutorials are small complete scripts to copy and adapt, and the samples throughout the developer docs work on Full socket and MITM bots alike.
Lire cette page en français
  • 65 vues
Short answers about connecting Asteroboard to Asterobot, certificate warnings, using a phone or another computer, ports, and what works without an internet connection.
Asteroboard talks to Asterobot over the network, even when both are on the same computer.
Asteroboard says Server disconnected. What should I check?
First, that Asterobot is running: its terminal window must be open. Then, that Asteroboard uses the right address. Open Preferences, look at Server URL, which is http://127.0.0.1:8080 by default, and click Test connection. Opening Asterobot's own address in the browser also sets Server URL for you. Meanwhile, Asteroboard keeps trying to reconnect by itself. See Asteroboard can't connect.
How does Asteroboard know where my Asterobot is?
It keeps the address as its Server URL, in your browser. When you open Asterobot's address, such as http://127.0.0.1:8080, Asterobot sends the browser on to https://asteroboard.asterobot.net with that address attached, and Asteroboard saves it. Each browser keeps its own. See How the parts connect.
Does Asteroboard need an internet connection?
Only to load the first time. After that, it opens without an internet connection, as long as it can reach your Asterobot. A few things still come from the internet, such as your asterobot.net name and avatar on the Account page. See The three parts.
Does Asterobot need an internet connection?
Yes, for anything that involves Ankama or asterobot.net. Asterobot reaches Ankama's servers to download game versions, sign accounts in and play, and asterobot.net to sign in, install packages and confirm your account. When it hasn't reached asterobot.net for more than an hour, it refuses to add a bot or to connect one in Full socket mode, and Connect shows this installation is not entitled to start bots. See How the parts connect and Many bots.
Can I use Asteroboard on my phone?
Yes, on your home network, once Asterobot serves HTTPS behind a password. On Server > Config, set server.basicAuth, turn on server.tls and set server.listenAddress to 0.0.0.0:8080, then restart Asterobot and allow port 8080 in the firewall. On the phone, open https:// followed by the computer's address and :8080, accept the certificate warning and enter the password.
HTTPS and the password stop MITM mode from working. See Asteroboard on another device.
Why can't my phone reach http://192.168.1.20:8080?
Because browsers don't let the Asteroboard page, which comes over HTTPS, send plain http:// requests, except to the device the browser runs on. That's why http://127.0.0.1:8080 works on Asterobot's own computer while a network address doesn't. Use HTTPS on Asterobot, or an SSH tunnel. See Asteroboard on another device.
Why does my browser warn about Asterobot's certificate?
Because Asterobot makes its own certificate when you turn on server.tls. No authority your browser trusts signed it, and it only covers localhost, 127.0.0.1 and ::1, so browsers warn the first time and report that it doesn't match an address such as 192.168.1.20. Check that the address is your Asterobot's, then continue to the site. The certificate lasts 3 years and Asterobot doesn't renew it. See Asteroboard on another device.
Why does Asteroboard stay disconnected after I typed an https address in Preferences?
Because the certificate warning and the password prompt only appear on a page you open yourself, never for Asteroboard's own requests. Open the address in the browser first, accept the certificate and enter the password, and Asteroboard connects. See Asteroboard on another device.
Why did MITM mode stop working after I turned on HTTPS or a password?
Because MITM mode doesn't work while server.tls is on or server.basicAuth is set: Dofus can't fetch its connection settings from Asterobot then. Put both settings back to their defaults, restart Asterobot, and reach it from other devices through an SSH tunnel instead. See MITM mode.
Can I reach my Asterobot from outside my home?
Yes. Prefer an SSH tunnel: Asterobot keeps listening on its own computer only, nothing new is opened to the internet, and MITM mode keeps working. You can also open the port, with server.basicAuth and server.tls, but never without both. See Asterobot on a remote machine.
Can I run Asterobot on a server or a Raspberry Pi?
Yes. Asterobot doesn't need a screen, and there are Linux builds for x86-64 and ARM64 processors. You sign it in to asterobot.net with the link it prints or with a QR code, reach Asteroboard through an SSH tunnel, and keep it running with tmux, screen or a system service. See Asterobot on a remote machine.
Can I play Dofus on one computer and run Asterobot on another?
Yes, in MITM mode. On the computer that runs Asterobot, open its ports to the Dofus computer. On the Dofus computer, edit the ConfigUrl line of the version file yourself, since Asterobot can only edit files on its own computer, and put it back yourself when you're done. See MITM across machines.
Which ports does Asterobot use?
Port What it's for 8080 Asteroboard, and in MITM mode the connection settings Dofus fetches 5555 MITM mode: your game's sign-in. Open only while a bot waits. 5556 MITM mode: your game session. Open only while a bot waits. By default, all three only accept connections from Asterobot's own computer. See How the parts connect.
What if port 8080 is already in use?
Asterobot stops right after starting, with An error occurred during the server's initialization process, for example because another copy of Asterobot already runs. Asteroboard can't change the port while Asterobot isn't running, so edit config.toml: under [server], set listenAddress to another port, such as 127.0.0.1:8081, then start Asterobot and open that address. See How the parts connect.
Can several devices use the same Asterobot?
Yes. Every Asteroboard connected to the same Asterobot shows the same bots, library and asterobot.net account, since all of it lives in Asterobot. Each browser keeps its own preferences and its own Server URL. See How the parts connect.
Can one Asteroboard control several Asterobots?
One at a time. A browser keeps a single Server URL, so to switch, open the address of the Asterobot you want, or type it in Preferences. See Preferences.
Who can control my Asterobot?
Anyone who reaches its port. Asterobot has no user accounts of its own, so whoever gets through can use your bots and Ankama accounts, read every setting and shut it down. By default, only Asterobot's own computer can reach it. Read Security before you open it to anything else.
Asteroboard shows an old version or behaves oddly after an update. What do I do?
Use Reset offline data, in the Danger zone section of Preferences. It deletes the copy of Asteroboard your browser keeps and downloads it again, without touching Asterobot. See Preferences.
Lire cette page en français
  • 50 vues
Short answers about signing Asterobot in with a code, your asterobot.net account in Asteroboard, and where to get help.
Asterobot signs in with your asterobot.net account, and the website is also where you ask for help.
Why do I need an asterobot.net account?
Because Asterobot signs in with it, and you can't add a bot until it's signed in. Asterobot also downloads marketplace packages with that account, and you need one to post on the forum. Create it on https://asterobot.net. See Create an asterobot.net account.
Does Asterobot ask for my asterobot.net password?
No. You only ever type it on asterobot.net. Asterobot gets a sign-in code, you confirm that code on the website, and Asterobot keeps its own sign-in from then on. See Sign in with asterobot.net.
Where do I find the sign-in link?
In three places:
in the terminal, on the line after Website sign-in required. Please visit this link to authorize access to your account; the app will continue automatically once authorized.; in the browser tab Asterobot opens by itself, for the first code only; behind the account button at the bottom of Asteroboard's sidebar, which then reads Sign-in pending. See Sign in with asterobot.net.
My sign-in code expired. What do I do?
Wait a few minutes: Asterobot asks for a new code by itself. A code is valid for 15 minutes, and once it expires, the terminal prints Sign-in was not completed in time; it will be offered again. The account button then opens the new link. For a new code right away, reload Asteroboard, and click Sign in if the account button shows it. See Sign in with asterobot.net.
Where's the code the Connect a device page asks for?
In the sign-in link, after code=: eight characters, digits and letters from A to F. Opening the whole link fills it in for you. The Connect a device page shows up when the address was opened without it, and there, spaces, hyphens and small letters don't matter. See Sign in with asterobot.net.
What does "Too many incorrect codes have been entered" mean?
That 20 codes that didn't match were typed from your connection within 15 minutes. Wait: you can type codes again at most 15 minutes after the last wrong one. Next time, open the link from the account button rather than typing the code, since the link carries it. See Sign-in problems.
Can I sign in from my phone?
Yes. Turn on website.showQRCode on Server > Config, wait for the next code, and scan the QR code the terminal shows. It's handy when Asterobot runs on a machine without a browser. See Sign in with asterobot.net.
Why is Asterobot asking me to sign in again?
Because asterobot.net stopped accepting Asterobot's sign-in, for example once it expired or was revoked. Asterobot then forgets it and starts a new sign-in right away: the terminal shows a warning such as Website rejected the token, and the account button switches to Sign-in pending. Confirm the new code. See Sign in with asterobot.net.
Is the sign-in shared between my devices?
Yes, because it belongs to Asterobot, not to your browser. Every Asteroboard connected to the same Asterobot shows the same account, and signing out from one of them signs Asterobot out for all. Being signed in to asterobot.net in your browser doesn't sign Asterobot in. See Your account.
How do I sign out, or switch to another account?
Click the account button, then Log out, and confirm. Asterobot doesn't sign back in by itself afterwards, not even when it restarts, and if it starts while signed out, it skips every saved bot.
To switch accounts, sign out of Asterobot, make sure your browser is signed in to asterobot.net with the other account, then click Sign in on the account button and confirm the new code. See Your account.
Why does the Account page say Not signed in?
Either Asterobot really isn't signed in, and the account button reads Sign in, or Asteroboard couldn't load your details from asterobot.net, and the button reads Signed in without your name. In the second case, the device you use Asteroboard on has to reach asterobot.net: check its internet access and the status page. See Your account.
How do I know whether asterobot.net is down?
Look at the status page, https://status.asterobot.net, also linked from Asteroboard's About page. Check it first when sign-in codes won't go through or marketplace previews fail. See Messages and updates.
Where can I get help?
On the forum and on Discord, and guides are at https://asterobot.net/docs/guide/en/. Give your Asterobot and Asteroboard versions, how your bot connects, what you did and the exact error text. See Getting help.
What must I never share when I ask for help?
Your passwords, config.toml and the website.token it holds, accounts.toml, the sign-in browser profiles, Asterobot's data folder, the link you copy during a manual Ankama sign-in, and a session's game ticket. Anyone who gets one of them can use your accounts. See Getting help.
Where are Asteroboard's release notes?
At https://asterobot.net/changelog/asteroboard/. The version number at the top of Asteroboard's sidebar links there. See Messages and updates.
Lire cette page en français
  • 62 vues
Store SOCKS5 and HTTP proxies in Asterobot, give one to an Ankama account or to a bot, and choose which address Ankama sees each of them come from.
A proxy makes connections leave from another address instead of yours. Asterobot keeps a list of them on the Proxy Manager page, and you give one to an Ankama account, to a bot, or to both. From those two choices, Asterobot works out which proxy each connection goes through.
Two kinds of proxy work: SOCKS5 and HTTP. SOCKS4 proxies don't.
The usual reason to want one is a rented server. When Asterobot runs on a VPS in a datacenter, Ankama's sign-in page often blocks or challenges it, because addresses from datacenters are commonly flagged by the protection in front of that page. A proxy on the account makes the sign-in, and everything else Asterobot asks Ankama for that account, leave from the proxy's address instead.
Accounts and bots
An Ankama account and a bot each have a Proxy setting, and they cover different connections:
An account's proxy carries everything Asterobot asks Ankama for that account over the web: the automatic sign-in in the browser Asterobot drives, the code exchange that ends any sign-in, token renewals, Verify, and the game login token a bot needs each time it connects. A bot's proxy carries the bot's own connections to the Dofus servers: the login server and the game server. By default a bot uses its account's proxy, so one proxy set on an account covers everything done with it, from the sign-in to playing. You can still force a bot onto another proxy, or onto a direct connection.
A bot's Proxy choice The bot's connections go through Same as the account (...) The account's proxy, named in brackets. When the account has none, the brackets say "direct" and the bot connects directly; a bot with no account connects directly too. This is the default. Always connect directly No proxy, whatever the account uses. A proxy's name That proxy, whatever the account uses. An account has No proxy (connect directly), the default, or a proxy's name.
What goes through which proxy
Connection When it happens Goes through Ankama's sign-in page, in the browser Asterobot drives An automatic sign-in The account's proxy The code exchange after a sign-in Any sign-in, automatic or manual The account's proxy Token renewals, Verify, Force refresh token and Disconnect When a Full socket bot connects, and when you click them The account's proxy The game login token Each time a Full socket bot connects The account's proxy The login server A Full socket bot connecting The bot's choice The game server A Full socket bot, or a MITM bot relaying a session The bot's choice The login server of a relayed session A MITM bot relaying a session Direct The game's configuration file and game downloads A bot connecting, a game version downloading Direct A bot in MITM mode (man-in-the-middle: the bot relays the session of a Dofus client you play) sends only the game server connection through its proxy. The sign-in half of a relayed session travels over two ports that every waiting bot shares, and Asterobot opens them before anything in the traffic says which bot the session belongs to, so at that moment there's no bot to read a proxy from. Your own Dofus launcher signs in from your computer, as it always does: an account's proxy only covers what Asterobot itself sends.
When you sign an account in manually, you open Ankama's page in your own browser, so that visit leaves from wherever your browser is. Only the code exchange that follows goes through the account's proxy. Manual sign-in covers that flow.
Important
With the defaults, a Full socket bot and its account leave from the same address. Force the bot onto another proxy, or onto Always connect directly, and Ankama sees the bot's game login token requested from one address and its game connections coming from another. Decide whether that suits you before you set it up.
Two kinds of proxy
Type What it is Credentials SOCKS5 A SOCKS5 server, often listening on port 1080. A username and a password, with SOCKS5's own authentication. HTTP An HTTP proxy that opens tunnels with CONNECT. Providers often sell these as "HTTP/HTTPS proxies". A username and a password, sent as Basic authentication. Both carry everything Asterobot needs, for accounts and for bots, with one catch on the HTTP side: some HTTP proxies only open tunnels to port 443, the HTTPS port. That's enough for an account, whose requests to Ankama are all HTTPS. It isn't enough for a bot, because the Dofus servers listen on other ports. Test can't reveal it either, since a test is an HTTPS request too. A bot that fails with the HTTP proxy refused to open a tunnel followed by 403 or 405, while Test works, has hit that limit: ask your provider whether other ports are allowed, or give the bot a SOCKS5 proxy.
With either type, the proxy's username and password travel unencrypted from Asterobot to the proxy, as those two protocols define them. What goes through the tunnel is unchanged: Ankama's pages stay HTTPS, end to end.
Store a proxy
Open Proxy Manager in the sidebar. An empty list says "No proxies stored yet." Click Add a proxy. Fill in the fields below and click Add. Field Required What to put in it Name No How you recognise this proxy when picking it on an account or a bot. Lowercase letters, digits and hyphens, starting and ending with a letter or a digit. Leave it blank and Asterobot generates one; the dice button next to the field fills one in so you can see it and edit it first. It can't be changed later, and it can't be direct, the word a bot uses to connect directly. Type Yes SOCKS5 or HTTP, as your provider names it. It starts on SOCKS5. Address Yes The host and the port together, as your provider gives them: proxy.example.com:1080. An IPv6 address goes in brackets, [2001:db8::1]:1080. The port has to be between 1 and 65535. Username No The username the proxy asks for. Leave it and Password empty for a proxy that needs no credentials. Password No The password that goes with the username. It's never shown again after you save it. Nothing is contacted while you type, and nothing is contacted when you click Add. A proxy that's down, or whose password is wrong, is stored exactly like a working one. Test, in the same dialog, is what tells the two apart, and storing is deliberately not gated on it: a proxy that happens to be unreachable right now is often the one you're in the middle of fixing.
The name is this proxy's identity for good. Accounts and bots refer to it by that name, so renaming would break them: to change it, add a second proxy and point them at that one instead.
Read the list
Column What it shows Name The name you gave it. Click the header to sort. Address The host and port, with SOCKS5 or HTTP underneath. Authentication With credentials when a username or a password is stored, No credentials otherwise. When there is a username, it's shown next to the badge. Used by The accounts set to use this proxy, each with a person icon, then the bots set to use it by name, each a link to that bot's Settings. A bot that follows its account isn't listed again: the account's entry covers it. Unused when nobody uses it. Last test What the last test of this proxy found, while this page is open. A dash until you ask. The box above the table filters on the name and on the host, so you can search either.
Test a proxy
A test sends one real HTTPS request through the proxy and reports the address the other end saw it come from. That address is the answer: it's what anything reached through this proxy looks like it comes from, so comparing it with your own address is how you know the proxy is genuinely carrying the traffic, rather than merely accepting a connection.
There are three ways to run it, and they're the same test:
Test in the Add a proxy dialog, before the proxy is stored. Use it to try details you've just pasted in. Test in a proxy's menu at the end of its row, for one stored proxy. Test all, next to the filter box, for every stored proxy at once. They run together rather than one after another, so a pool of ten takes about as long as one. Results appear in the Last test column: the exit address and how long the round trip took on success, Failed with the reason in a tooltip otherwise. A failure gives you the reason as Asterobot received it: a refused connection, a rejected password (username/password authentication failed for SOCKS5, the HTTP proxy refused to open a tunnel: 407 Proxy Authentication Required for HTTP), or a host that doesn't resolve. Asterobot gives up after 15 seconds.
Nothing is remembered. Results live only while the page is open, and no badge survives a reload, because a proxy that answered a minute ago is not a proxy that answers now.
Note
Testing a proxy in the dialog while editing an existing one doesn't use the password you saved: Asterobot never sends a stored password back to the browser. The dialog says so under the result. Type the password in again if you want the test to include it.
What the test contacts
The address comes from a service outside Asterobot, set in proxymanager.ipCheckUrl on Server > Config. It starts as https://api.ipify.org?format=json, which answers with your address and nothing else.
Only tests use it, only when you ask for one, and the request carries nothing about you beyond the proxy's own address. Testing does tell whoever runs that service that this proxy exists and works, so point the setting at your own if you'd rather not say so. Asterobot reads an ip field from a JSON answer, or the whole answer when it's a single line, so most such services work unchanged.
Give a proxy to an account
When you add an account in Account Manager, the Add a bot account dialog has a Proxy field under the password. It starts on No proxy (connect directly). Pick a stored proxy instead, or use the + button to store one without leaving the dialog.
For an account that's already stored, open its menu at the end of its row and click Set proxy. The Proxy for ... dialog shows the same field: pick a proxy, or No proxy (connect directly), and click Save. The Proxy column of Account Manager shows each account's proxy, or "direct".
The change applies from the next request Asterobot makes for the account. A bot that's already playing isn't disturbed, and the bots that follow the account use the new proxy from their next connect.
Several accounts can share one proxy, and Asterobot puts no limit on how many. That's how a team of accounts looks like it connects from one network.
Give a proxy to a bot
When you add a bot, the Connection tab has a Proxy field between Server selection and the device identifier. It starts on Same as the account (...), with the account's proxy in brackets once you've picked an account. Keep it there to follow the account, or pick Always connect directly or a stored proxy. The + button stores a new proxy without leaving the form.
An existing bot has the same field on its own page, under Settings, in the Connection section. Changing it needs no disconnection: Asterobot reads the proxy when it opens a connection, so a change applies at the bot's next connect and leaves a running session alone. Click Save as usual.
The Proxy column of Bot Manager shows what each bot actually goes through: a proxy's name, the account's proxy followed by "(account)" when the bot follows its account, or "direct".
Whichever way you set it, picking a proxy shows a reminder under the field of what that proxy carries.
Automatic sign-in through a proxy
When an account has a proxy, the browser Asterobot drives for an automatic sign-in goes through it too. Asterobot doesn't hand the proxy to the browser directly: Chrome can't use a SOCKS5 proxy that has a password, and asks for an HTTP proxy's password in a window nobody is there to fill in. Instead, Asterobot starts the browser pointed at a small relay of its own, on 127.0.0.1, that sends every connection through the account's proxy and closes with the browser. Any proxy that works for a bot works for the browser that way, with or without credentials, and the proxy's password never reaches the browser.
Address lookups go through the proxy as well, and Asterobot starts the browser with WebRTC restricted to connections the proxy carries, so a page can't learn your own address around the proxy.
If the proxy is down, the browser can't load Ankama's page and the sign-in fails with failed to open ankama's sign-in page. Test the proxy first when you see that on an account that has one.
Common setups
What you want Account Its bots Run Asterobot on a VPS whose address Ankama's sign-in refuses A residential proxy Same as the account Several accounts that look like they connect from one place The same proxy on each Same as the account Keep the account's web requests on an expensive proxy and play through a cheaper one The expensive proxy The cheaper proxy, by name Try a new proxy on one bot without touching the others Unchanged The new proxy on that bot only Use a provider that only sells HTTP proxies The HTTP proxy Same as the account, if the provider allows tunnels to the game's ports The third setup saves bandwidth, because the web requests of an account weigh a few kilobytes per connect while a game session runs for hours. It's also the setup the warning in What goes through which proxy is about: Ankama sees two addresses for one bot.
Change or remove a proxy
Edit, in the proxy's menu, reopens the same dialog for everything except the name, the type included. The password field is empty because Asterobot never sends a stored password back: leave it empty to keep the one you saved, type a new one to replace it, or tick Remove the stored password to take it off entirely. Like any other change, a new address reaches an account at its next request and a bot at its next connect.
Remove deletes the proxy, and refuses while any account or bot still names it:
proxy "fr-datacenter-1" is still used by bots harvester-one, harvester-two and accounts my-login Point those accounts and bots somewhere else first, then remove it. The refusal is on purpose. An account or a bot whose proxy disappeared could otherwise carry on from your own address, which is the one thing a proxy is there to prevent.
When a proxy is missing
Removing a proxy in use is refused, so this mostly happens if proxies.toml is edited by hand or restored from an older copy. The account or the bot keeps the name it was given, and Asterobot refuses to connect rather than quietly connecting directly. For a bot:
bot "harvester-one" connects through proxy "fr-datacenter-1": proxy not found: "fr-datacenter-1" For an account, when you sign it in, verify it, or connect one of its bots:
account "my-login" connects through a proxy that cannot be used: proxy not found: "fr-datacenter-1" The bot's Settings page, or the account's Set proxy dialog, shows the missing name in the Proxy field, marked as no longer stored, with a warning under it. Pick another choice and save.
Where proxies are stored
Proxies live in proxies.toml, in Asterobot's application data folder, next to bots.toml and accounts.toml. Each account's proxy is saved by name in accounts.toml, and each bot's choice in bots.toml.
The password of each proxy is in proxies.toml in plain text. It has to be: SOCKS5 and HTTP proxies both want it on every connection, so Asterobot needs the password itself rather than a scrambled copy. On Linux and macOS the file is readable only by your own user, and Asterobot applies that again each time it starts and each time it saves. No endpoint ever gives a stored password back, which is why the dialog can't prefill it.
Asterobot reads these files when it starts and rewrites them whenever you change something, so edit them only while Asterobot is stopped.
Limits
SOCKS5 and HTTP proxies only. SOCKS4 isn't supported. An HTTP proxy that only opens tunnels to port 443 can carry an account's requests, but not a bot's game connections. One proxy per account and one per bot. Asterobot doesn't rotate proxies, pick one automatically, or fall back to a second one when the first fails. In MITM mode, the login server of a relayed session stays direct, and your own launcher signs in from your computer. Game downloads and the game's configuration file never go through a proxy. Where to go next
Add an account and Account status and actions cover the rest of Account Manager. Full socket mode covers connecting a bot that signs in on its own. MITM mode explains relaying the game you play. Bot settings goes through every field you can change on a bot afterwards. Security covers who can reach your Asterobot and what they can do with it. Lire cette page en français
  • 88 vues
Let an AI assistant such as Claude Code drive your Asterobot through MCP, and know what it can do, what it can't, and what to keep in mind before you let it.
Asterobot can be driven by an AI assistant, the way you drive it from Asteroboard. The assistant connects to Asterobot, sees everything Asteroboard can do as a list of tools, and calls them while you talk to it: "add a bot on my second account and connect it", "which tables hold the monsters and their drops", "write a script that greets the guild when the bot signs in". This chapter explains what an assistant gets, how to connect one, and what to watch out for.
What MCP is
MCP, the Model Context Protocol, is the standard way assistants talk to programs. Asterobot speaks it at the address /mcp, right next to the address Asteroboard uses. Any assistant that supports MCP over HTTP can connect: Claude Code, Codex, Cursor, a desktop assistant, or a program of your own. Nothing in Asterobot is tied to one of them, and there's nothing to install on Asterobot's side: it's on as soon as Asterobot starts.
What an assistant can do
Asteroboard does everything through Asterobot's port, and an assistant gets the same port. So it can do what you do on every page of Asteroboard:
Ankama accounts: add one, sign it in automatically or by hand, answer the code Ankama sends, refresh or check a sign-in, disconnect it. Bots: add, change and delete bots, connect and disconnect them, answer a connection question, move the character on its map, take it to the next map by a side, use a door, a zaap, a resource or an exit of its map, read a bot's console, choose which messages the bot mirrors, and send a message on its socket. Packages: install a package from the marketplace when you give it the file's id, create a package, edit its script and manifest, load, play, stop and reload it, read and change its settings, click its actions, update it, delete it. Fights: switch a bot's fight module on or off, choose its profile, speed and the fights it plays, read its turn log, and make, change, import and delete fight profiles. Game: list, download, extract, verify and uninstall game versions, browse the game data tables, look up texts and names, and run SQL queries. Everything else: read and change settings, manage proxies, sign Asterobot in and out of asterobot.net, check that Asterobot answers, and follow what happens through events and the log. Each tool is one action of Asterobot, named after what it does: get-bots lists your bots, post-bot-connect connects one, put-config-key changes a setting. There are about a hundred of them. The assistant reads a short description with each, written for it, so you don't have to explain Asterobot to it. When it starts something that takes time, such as connecting a bot, the answer tells it which event to wait for, and it can watch that event with a tool made for that. Tools, events and limits has the details.
What it can't do
Shut Asterobot down or reset every setting. These two actions are hidden from assistants unless you allow them in the settings. See MCP settings. Export or import a package as a zip file. Those need a file on your computer, which an assistant doesn't handle. Installing from the marketplace, and creating or editing a package in place, work. Browse the marketplace. It can install a package when you give it the file's id or address from asterobot.net, but it has no way to search the marketplace itself. More than a script can. An assistant writes and runs the same scripts you'd write: they can move on a map, change map, use the elements of a map and talk to the game, and they meet the same limits, described in What scripts can do. Anything Asterobot refuses. When your asterobot.net account doesn't give Asterobot access to the game protocol, the tools that need it answer that the game engine isn't available, exactly as Asteroboard would show it. Note
Coming soon. The assistant can't read this documentation through Asterobot yet. Until then it works from what each tool says about itself, from the script reference it can fetch, and from what it already knows about Dofus. You can paste a page of these docs into the conversation when it needs one.
Keep in mind
An assistant acts as you. Whatever you can do from Asteroboard, it can do, on your Ankama accounts and with your asterobot.net account. Security lists what that covers.
Most assistants ask before changing something. Every tool says whether it only reads. Assistants such as Claude Code ask for your permission before a tool that changes something, and let you allow a tool once or for good. Look at what a tool is about to do before you allow it, the same way you'd read a dialog before clicking OK.
It reads what other people write. A bot's console and traffic carry chat messages from other players. An assistant that reads them could take a message written to trick it for an instruction. Asterobot doesn't filter that. Keep the permission prompts on for tools that change things, and don't leave an assistant running unattended on a bot in a busy chat.
Secrets stay hidden. Tool answers never contain website.token or your basic auth passwords, even through the settings tools: those values are replaced with [redacted].
Next: Connect an assistant.
Lire cette page en français
  • 62 vues
Give an AI assistant the address of your Asterobot, with a password when you've set one, and check that it sees the tools.
Connecting an assistant means giving it one address. Asterobot needs no setting for it: the endpoint is on as soon as Asterobot starts.
The address
The endpoint is /mcp on Asterobot's port, the one in server.listenAddress:
Your setup Address Defaults http://127.0.0.1:8080/mcp Another port, for example 127.0.0.1:9000 http://127.0.0.1:9000/mcp server.tls on https://127.0.0.1:8080/mcp The assistant must run on the same computer as Asterobot, or reach it the way Asteroboard does from another device. An assistant that runs on a website rather than on your computer can't reach 127.0.0.1; see From another machine.
Claude Code
In a terminal, run:
claude mcp add --transport http asterobot http://127.0.0.1:8080/mcp Then start a conversation and ask it something about Asterobot, such as "list my bots". The first time it uses a tool that changes something, it asks for your permission.
claude mcp list shows the servers it knows and whether it reaches them.
Other assistants
Every assistant that supports MCP over HTTP takes the same address, called the server's URL. Many read it from a JSON file with an entry like this one, under a name you choose:
{ "mcpServers": { "asterobot": { "url": "http://127.0.0.1:8080/mcp" } } } The exact file and its shape depend on the assistant, so check its documentation for "MCP" and "HTTP". Two things to know when it asks:
The transport is HTTP, sometimes called streamable HTTP. It isn't the older SSE transport, and it isn't a command to run. Asterobot keeps no session between calls. Assistants built for the current version of the protocol work; a very old one that insists on a session id from the server won't connect. With a password
When server.basicAuth holds a login and a password, /mcp requires them too, as an Authorization header. The value is Basic followed by the login, a colon and the password, encoded in base64. To encode alice:s3cret:
echo -n 'alice:s3cret' | base64 [Convert]::ToBase64String([Text.Encoding]::UTF8.GetBytes("alice:s3cret")) Then give the assistant the header. With Claude Code:
claude mcp add --transport http asterobot http://127.0.0.1:8080/mcp --header "Authorization: Basic YWxpY2U6czNjcmV0" Other assistants have a headers entry next to the URL in their configuration file.
From another machine
An assistant on another computer reaches Asterobot the way Asteroboard does from another device, and with the same care: Asterobot on a remote machine and Security apply word for word. An SSH tunnel is the simplest: it keeps Asterobot on 127.0.0.1 and the address stays http://127.0.0.1:8080/mcp on the machine where the assistant runs.
When Asterobot listens on a network address without basic auth, its console says so at start:
The MCP is reachable from the network without authentication: set server.basicAuth or listen on loopback That is the same exposure Asteroboard already has in that setup, said out loud once.
Check that it works
When Asterobot starts, its console and terminal show one line about the endpoint:
Line What it means MCP ready with tools=, denied= and skipped= counts The endpoint serves. denied counts the hidden actions, skipped the ones Asterobot couldn't offer. MCP disabled by configuration mcp.enabled is off. Nothing answers at /mcp. MCP disabled with an err= The endpoint answers every call with an error saying why. See MCP settings. Then ask the assistant to check that Asterobot answers: it has a tool for that, get-runtime-ping, whose answer is pong. If the assistant says it can't reach the server, check the address and the port, and that Asterobot is running.
Next: Tools, events and limits.
Lire cette page en français
  • 60 vues
How an assistant's tool calls reach Asterobot, how it follows what happens through events and the log, and where the answers are cut.
You don't call the tools yourself, the assistant does. Knowing how they behave helps you read what it reports and understand why it sometimes asks for more.
How a call reaches Asterobot
A tool call is the same request Asteroboard would send, checked the same way. When the assistant gets an argument wrong, the answer tells it what's wrong, in the same words Asteroboard's own errors use, and it fixes its call. When Asterobot refuses something, the assistant reads the refusal: a call to move a bot that doesn't exist answers 404 Not Found: bot not found.
The arguments of a tool are the fields you'd fill in Asteroboard: the bot's name, the setting's key, the message to send. For two actions, sending a message on a bot's socket and copying a package, a field has the same name as the bot, so the assistant passes the whole form as one body argument. It can ask Asterobot for the exact shape of any action with the describe-operation tool, which also answers for the hidden actions, saying why they're hidden.
Three tools of their own
Besides the actions of Asterobot, the assistant gets three tools that Asteroboard has no need for:
Tool What it does describe-operation Every argument and the shape of the answers of one action, for when the short description isn't enough. watch-events The events Asterobot publishes: a bot changing state, a message on its socket, a download progressing, a setting changing. Each call returns the events after a position, waits up to 30 seconds for the first one when there's none yet, and answers with the position to continue from. read-logs Asterobot's own log, the one on Server > Console, from a chosen level up. Asterobot keeps the last 500 events of each kind. When an assistant comes back after that many have passed, watch-events tells it how many it missed, so it can look again rather than assume nothing happened.
Actions that finish later
Connecting a bot, playing a package or sending a message answers right away; what came of it arrives as an event later. The answer to such a call names the event to watch and the position to watch from, so the assistant can follow the outcome without guessing. That's why an assistant told to connect a bot usually reports the connection a little later, once it has seen the bot's state change.
Big answers
An answer larger than mcp.maxResponseBytes, 100,000 bytes by default, is cut down so it stays readable: whole entries are dropped from the end of the largest list in it, and the assistant is told how many, and which argument narrows that action when it has one. When there's nothing to drop, the answer is an error asking the assistant to narrow its request. The two answers that hit that in practice are the catalogue of game messages, which takes a name argument to return one message, and SQL queries, where LIMIT does the job.
Hidden actions
Two actions are hidden from every assistant unless you allow them: shutting Asterobot down and resetting every setting. Three are never tools, because an assistant has nothing to do with them: the live event stream Asteroboard uses (the assistant has watch-events instead), and exporting or importing a package as a zip file. MCP settings explains how to hide more actions, or allow the hidden ones.
The game protocol
The assistant can list every game message a bot can send, with every field, through the same catalogue the Send messages tab of a bot uses, and send one on a bot's socket. Asterobot checks the message against the game's own definition before it goes out, so a wrong field never reaches the game. The catalogue gives the shape of a message, not what it's for: the Dofus protocol reference has that, and you can point the assistant to a page of it. What the assistant can send is what a script can send; see Send messages.
Next: MCP settings.
Lire cette page en français
  • 59 vues
Turn the assistant endpoint off, hide actions from assistants or allow the hidden ones, cap the size of answers, and read what Asterobot says when something is wrong.
Five settings on Server > Config control what assistants get. All of them are read when Asterobot starts.
Key Type Default Restart needed mcp.enabled On or off On Yes mcp.tags List of text Empty Yes mcp.denyOperations List of text Empty Yes mcp.allowOperations List of text Empty Yes mcp.maxResponseBytes Number 100000 Yes mcp.enabled
On or off. Default on. Restart needed.
Turn it off and nothing answers at /mcp: the address doesn't exist, and Asterobot's console says MCP disabled by configuration at start. Everything else in Asterobot is unchanged.
mcp.tags
List of text. Default empty. Restart needed.
Offer only the actions of some parts of Asterobot. Each entry is the name of a group of actions, and an assistant sees an action when it belongs to at least one group you listed. The groups are AccountManager, BotManager, Config, Events, FightProfiles, Galaxy, GameData, GameManager, Library, Logger, ProxyManager, Runtime and Website; the case doesn't matter. Empty means every group.
For example, ["GameData", "Library"] gives an assistant the game data browser and your packages, and nothing that touches accounts or bots.
mcp.denyOperations
List of text. Default empty. Restart needed.
Actions never offered to an assistant, on top of the two hidden by default. Each entry is the name of an action as the assistant would see it, in any spelling: post-bot-connect and PostBotConnect are the same action. Ask the assistant to list its tools to get the names, or use the ones from What an assistant can do.
Important
An entry that names no action turns the whole endpoint off, on purpose: you wanted something hidden, and it wouldn't be. Asterobot's console then shows MCP disabled with the entry in the reason, and calls to /mcp answer with the same reason. Fix the spelling and restart.
mcp.allowOperations
List of text. Default empty. Restart needed.
The two actions hidden by default, delete-runtime (shut Asterobot down) and delete-config (reset every setting to its default), offered anyway. Same spelling rules as mcp.denyOperations. An entry that names no action is ignored, with a warning in the console.
mcp.maxResponseBytes
Number. Default 100000. Restart needed.
The largest answer a tool returns whole, in bytes. Above it, entries are dropped from the end of the answer's largest list and the assistant is told how to narrow its request. The default is about the size assistants show in one piece; raise it if yours handles more, lower it to keep answers short.
When something is wrong
Asterobot never fails to start because of the assistant endpoint. What can happen instead shows in the console and terminal, on Server > Console:
Line What it means What to do MCP ready Everything serves. skipped=0 is the normal state. Nothing. MCP skipped an operation with operation= and err= One action couldn't be offered, and the others are. The assistant's instructions name it too. This shouldn't happen with a released Asterobot. Report it with the line. MCP disabled with err= Nothing serves. The reason is a setting, almost always an entry of mcp.denyOperations that names no action. Fix the setting and restart. The MCP is reachable from the network without authentication Asterobot listens on a network address with no basic auth. Not an error, a reminder. Set server.basicAuth or listen on 127.0.0.1, as Security explains. While the endpoint is disabled by a setting, an assistant that calls it gets an error whose message starts with MCP unavailable: and gives the same reason as the console.
The whole list of settings is in the Settings reference.
Lire cette page en français
  • 68 vues
Choose when each bot is in the game and what it plays, week by week, and let Asterobot connect it, play the right package and disconnect it on time.
A schedule tells Asterobot when a bot should be in the game, as a set of weekly time slots such as Monday from 08:00 to 12:30, and what it plays in each: one package in the morning and another in the evening, for example. When a time slot starts, Asterobot connects the bot and plays the time slot's package, or the bot's own. When it ends, Asterobot asks the script to finish what it's doing, then stops it and disconnects the bot. Each bot has its own schedule.
Set up a schedule
In Bot Manager, open the bot's menu and click Schedule…. Make sure On is switched on. A new schedule starts switched on, unless the bot can't follow one (see What a schedule needs). Pick the Time zone your time slots are written in. A new schedule starts with your browser's time zone. For each day, click Add a time slot and type its start and end times. A schedule holds up to 200 time slots, and does nothing until it has one. A time slot that ends at or before its start time ends the next day, and is marked next day: Monday 22:00 to 06:00 ends on Tuesday at 06:00. 00:00 to 00:00 covers the whole day. Next to the times, choose the package the time slot plays: The bot's package, or any package in your library. A version that isn't installed, or that doesn't run on your Asterobot, is flagged in orange under the time slot. Check the Week preview: one bar per day, filled in where the bot will be in the game. Hover over a bar to see the package it plays. Set the Time to finish (minutes), from 0 to 30. It's 5 for a new schedule. When a time slot ends explains it. Click Save. Asteroboard shows Schedule saved, and the Schedule column of Bot Manager shows what the bot will do next. A saved schedule applies immediately. During a time slot, the bot connects and starts playing within a second. Outside a time slot, a bot that signed in by itself is stopped, just as at the end of a time slot. Switching On off leaves the bot as it is, whether or not it's connected and its script is running.
If saving fails, Asteroboard shows Couldn't save the schedule with the reason.
Time slots that overlap or touch, and play the same package, count as one: Monday 22:00 to 06:00 and Tuesday 06:00 to 10:00 keep the bot in the game from Monday 22:00 to Tuesday 10:00, without disconnecting at 06:00. A time slot from 00:00 to 00:00 on every day keeps the bot connected all the time. Two time slots that overlap can't play different packages: saving refuses them and names both. Time slots that touch can, and the bot then changes package without leaving the game (see When the package changes).
Times follow the clock of the schedule's time zone, to the minute. When the clocks change for daylight saving time, the time slots follow the clock: a time slot that fits entirely inside the hour skipped in spring doesn't happen that night, and one inside the hour repeated in autumn happens twice.
When a time slot starts
Asterobot does what Connect followed by Play would do:
It signs the bot in with its Ankama account and selects a server, according to the bot's server selection. It opens the connection to the game server. It plays the time slot's package. A time slot set to The bot's package plays the bot's package, or whichever package or inline script was loaded last. If the bot is already connected, Asterobot only plays the package, and if its script is already running, the bot is left alone. A time slot's package doesn't become the bot's own package: it plays with the settings the bot keeps for that package, which you change on the bot's Settings tab by picking the package above Package settings.
Nobody may be at the computer when a time slot starts, so a scheduled connection never asks you anything. If the bot's server selection can't pick a server on its own, for example because the forced server is down for maintenance, the attempt fails instead of showing Pick a server, and Asterobot tries again later, as described below.
During a time slot
Asterobot checks the bot every second for as long as the time slot lasts:
If the bot gets disconnected, because the game server kicked it, closed for maintenance or the network dropped, or because connecting failed, Asterobot connects it again. If the script stops, after an error for example, Asterobot starts it again. It waits before each new try: 1 minute, then 2, then 5, then 10, and every 10 minutes after that. The wait goes back to 1 minute once the bot has stayed in the game with its script running for 10 minutes, and whenever a time slot starts or ends.
Each try and each failure is written to the bot's Console, on lines starting with Schedule:. A failed connection also shows up in the Couldn't connect this bot alert on the bot's page, just as when you click Connect.
Some failures keep happening until you step in, such as an Ankama account that has to be signed in again in Account Manager. Asterobot keeps trying every 10 minutes, and the bot comes back on its own at the first try after you fix the problem.
Outside time slots, Asterobot does nothing between the end of one time slot and the start of the next. A bot you connect yourself stays connected until the next time slot ends.
When a time slot ends
When a time slot ends, Asterobot asks the bot's script to finish what it's doing and waits until it has, or until the Time to finish runs out. It then stops the script and disconnects the bot, as Disconnect does.
The script has to be written to handle this. A package that doesn't is stopped immediately, as with a Time to finish of 0, even in the middle of a fight. Play, stop and reload shows script writers how to handle it.
Warning
Stopping immediately can leave the character in the middle of a fight, a trade or a trip. Give the package time to finish if it can use it.
If the next time slot starts while the script is still finishing, the stop still goes ahead, and the bot connects again right after.
When the package changes
When a time slot hands over to one that starts at the same minute and plays another package, the bot stays in the game. Asterobot asks the script to finish what it's doing, as at the end of a time slot, waits until it has or until the Time to finish runs out, then stops it and plays the next package. A package that doesn't handle the request is stopped immediately. If the next package can't start, Asterobot tries again, as during any time slot. Choosing another package for the time slot under way and saving hands over the same way, right away.
Taking over by hand
You can still use the bot's controls. Connect, Start waiting, Disconnect, Play and Stop put the schedule on hold until its next change, when a time slot starts, ends or hands over to another package: until then, Asterobot doesn't connect, play or disconnect that bot. The Schedule column shows On hold until and the time. A click that Asterobot refuses changes nothing.
At that next change, the schedule takes over again. To end the hold sooner, open Schedule… and click Save. A bot that is always connected has no next change, so a hold on it lasts until you save its schedule again or restart Asterobot.
Clicking while the script is finishing at the end of a time slot also takes over: Stop leaves the bot connected, and Disconnect disconnects it immediately.
Loading or unloading a package, changing settings and sending game messages don't put the schedule on hold.
What a schedule needs
On can only be switched on for a bot that has:
Needs Why Message under On An Ankama account A bot without one can only relay a game you sign in to yourself. A schedule needs an Ankama account: a bot without one can only relay a game you sign in to yourself. A package, unless every time slot has its own An inline script doesn't count, since it doesn't survive a restart. A time slot without a package of its own plays the bot's package, and this bot has none: load one first, or choose a package for every time slot. An inline script doesn't count, since it doesn't survive a restart. A server selection other than Ask me each time Nobody may be around to answer. A schedule needs a server selection other than "Ask me each time", since nobody may be around to answer. If one of these goes away while the schedule is on, for example when you unload the package, the schedule is paused: it no longer connects or plays the bot, but still disconnects it when a time slot ends. The Schedule column says why, and the schedule resumes on its own once you fix the problem.
The Schedule column
The Schedule column of Bot Manager shows what each bot's schedule will do next. Times are in the schedule's time zone, with the day when it isn't today.
Shows Meaning A dash The bot has no schedule. Off The schedule is switched off. Paused · no account, Paused · no script or Paused · server asked each time The schedule is on, but the bot can't follow it. See What a schedule needs. Stopping by a time The script has been asked to finish, and will be stopped at that time at the latest. On hold until a time, or On hold You took over by hand. See Taking over by hand. Retrying at a time Connecting or playing failed, and Asterobot will try again at that time. Hover over it to see why. Disconnects at a time The bot is in a time slot, which ends at that time. Hover over it to see the package playing, when the time slot has its own. Plays a package at a time The bot is in a time slot, and the next one, playing that package, follows it at that time. Hover over it to see the package playing now. Connects at a time The bot is outside its time slots, and the next one starts at that time. Always connected The time slots cover the whole week. No time slots The schedule is on, but has no time slots, so it does nothing. Copy a schedule to other bots
Open Schedule… on the bot whose schedule you want to copy. Under Copy to…, pick the other bots. Click Copy. Each bot gets the time slots and their packages, the time zone and the time to finish shown in the dialog, whether or not you saved them. Each bot keeps its own On setting, and a bot that had no schedule gets this one switched off. Asteroboard shows Schedule copied with the bots it was copied to, and Couldn't copy the schedule to with the bot's name and the reason for each one that failed.
What a schedule never does
It never touches a bot that is waiting for your game client or relaying it. That game is yours, at the start of a time slot as at its end. It doesn't sign in while another bot relays a game on the same Ankama account, because that would disconnect the person playing. Asterobot recognizes the account once the scheduled bot has been in the game during one of its time slots since Asterobot started. It tries again later, as after a failure. It doesn't connect while Asterobot can't confirm your asterobot.net account. It waits without counting this as a failure, and still disconnects bots when their time slots end. Limits
A schedule only runs while Asterobot is running. If Asterobot starts during a time slot, the bot connects immediately. Asterobot can't see a Dofus client that doesn't go through it. If you play a scheduled bot's account that way, the bot's connection at the next time slot is either refused and tried again, or ends your game. Which of the two happens hasn't been checked. A bot can stay in the game for up to its time to finish after its time slot ends, if its script uses all of it. Where to go next
States and controls Disconnect, delete and restart Play, stop and reload, for script writers. Lire cette page en français
  • 49 vues
Draw what a bot does on the world map, without code: where it goes, in which order, what it does at each stop, and what happens when something fails.
The Studio is the part of the package editor where you draw what a bot does instead of writing it. You draw a plan on the world map: the stops the bot goes to, the order it goes round them in, and at each stop the steps it runs there, such as waiting or playing another plan. Conditions, such as how full the bags are, decide whether a stop or a step runs, and when the plan ends. The plan is saved as a file of the package, and @asterobot:base plays it when a bot plays the package.
What you need
You need Why A local package The Studio opens in the package editor, which only edits local packages. To start from someone else's plan, copy it into one of yours: see Plans of other packages. @asterobot:base in your library Base plays plans, gives the conditions about the character, such as its level or how full its bags are, and the steps to gather resources, fight monsters, rest, eat, change equipment, sell and buy at the game's marketplace, and use the bank. A package that has plans depends on it, and the Studio adds that dependency for you. Asterobot installs base by itself and keeps it up to date: see Install base. An extracted game version The world map is drawn from game data. See Extract game data. A bot connected to a game Only to play the plan. Drawing needs no bot. The world map shows the game version Asterobot is tested against when its game data is extracted. A badge in the map's toolbar gives its number, and resting the pointer on it says that it's the version bots meet. When that version isn't extracted, the Studio uses the most recent extracted one and the badge reads Incompatible version: map ids and game texts can differ from what a bot meets. When no version is extracted at all, No extracted game version stands where the map would be, and says to extract one in the Game Manager: the map then shows up on its own, as soon as the version is ready. The panel still works meanwhile, but there's nothing to draw on.
Note
Base's steps gather resources, fight monsters, rest, eat, change equipment, sell and buy at the game's marketplace, and use the bank, so a plan built on base alone travels, gathers, fights, recovers, sells, buys, banks, waits, checks the character's state and plays other plans. Other steps that act in the game come from other packages, or from your own: Steps and conditions shows how a package gives its functions to the Studio.
Start a plan
A new package that starts with the Studio
In Library Manager, click New package. Type a Name, and keep or change the Version. Turn on Start with the Studio. Click Create and edit. The editor opens on plans/main.js, an empty plan, in the Studio. The package also gets an index.js that does nothing but play that plan and pass on its settings, and it depends on @asterobot:base, at the newest version installed.
When base isn't installed, @asterobot:base isn't installed appears under the switch and Create and edit stays greyed out until you install it there. See Install base.
A plan in a package you already have
Open the package in the editor with Edit code, from Library Manager or from the package's page. At the top of Files, click plan, next to file. The New plan dialog opens. Type a Name, such as farm: letters, digits, - and _, starting with a letter or a digit. The file it becomes, plans/farm.js, shows under the field. Click New plan, or press Enter. The dialog says Letters, digits, - and _ only. for a name it refuses, and This package already has a file at that path. when the plan would replace a file.
The new plan opens in the Studio with no stop and a One way circuit. Like a file added with file, it's only in the package once you save. If the package doesn't depend on base yet, the Studio adds it to the package's dependencies right away, at the newest version installed that your Asterobot can run, and a notification says so. If base isn't installed at all, the @asterobot:base isn't installed dialog opens.
Important
A plan only plays when something plays it. In a package started with the Studio, index.js plays plans/main.js. Any other plan plays when a plan that's playing reaches it, through a Play a plan step or an interrupt, or when your own code plays it, as The editor shows. Adding a plan to a package that has its own code changes nothing about what that code does.
Any file whose first line marks it as a plan opens in the Studio, whatever folder it's in. Plans have their own icon in Files.
Install base
Asterobot installs base by itself and keeps it up to date (see Base updates by itself). You only install it here when Asterobot couldn't yet, for example while it can't reach asterobot.net or before you sign in.
Base can be installed from three places: the New local package dialog, the dialog that opens after you create a plan, and Add base to the dependencies in the panel's alert The package doesn't depend on @asterobot:base. They all work the same way:
Paste the ID or the link of base's file on asterobot.net in File ID or URL. Browse packages on asterobot.net opens the site's library if you need to find it. Click Preview, and check what it will install, as in Install from the marketplace. Click Install. When that version is already in your library, the button is Use it instead. In the editor, base is then added to the package's dependencies. The alert in the panel shows whenever the package doesn't depend on base: its Add base to the dependencies button adds the dependency, or opens the install dialog when base isn't installed.
The screen
The Studio takes the place of the code. The world map is on the left and the panel on the right. Drag the line between them to share the room: Asteroboard remembers the position in this browser.
The world map is the one from a Game page's Maps tab, with its search, its switches, its zoom and its list of world maps (see World map). Here a click on a square doesn't open the map: it does what the tool in hand does.
The panel starts with the plan's name, Name this plan, which the bot's console uses too. Next to it are Undo, Redo and View as code. Under them come four tabs: Circuit, Interrupts, Settings and Problems.
While a plan is open, the editor's top bar keeps Save and Run, but not Game: the Studio has its own world map. The error count there includes the plans' problems.
Draw the stops
A stop is a place and the steps the bot runs there. Stops are numbered in the order of the circuit, on the map and in the panel. The tools are in the world map's toolbar:
Tool What it does Select Selects the stop under the pointer. Click the same square again to go through the stops on it, maps and zones first. A click where there's no stop clears the selection. Map Adds a stop on the map of the square you click. Zone Paints the squares you drag over into a zone: the selected stop when it's a zone, otherwise a new one. Shift+drag erases squares from the selected zone. Subarea Adds a stop on the subarea under the pointer. A stop's number on the world map can be clicked with any tool, and selects that stop. While Zone is in hand, dragging paints instead of moving the map: pick Select to move it.
Map. When several maps share a square, such as an outdoor map and the interiors that open off it, a list titled with the square's coordinates opens: Maps at 4,-19. Each line gives a map's ID and its subarea, and in the travel graph marks the map a trip can go to, outdoors as a rule. Click one to add it, or close the list with its cross or Escape. A click where there's no map says No map stands on this square.
Zone. Each square you paint takes the map a trip goes to on that square, the one in the travel graph. One drag is one change, undone in one go. The bot visits a zone's maps nearest first.
Subarea. The stop covers every map of the subarea. There's no tool for an area: select a stop and change its Place to An area, as described in Edit a stop.
Query. The Query button, next to Stops on the Circuit tab, adds a stop whose maps are found while the plan plays, from what you name. Each field is a switch: turn on the ones you want, fill them in, and click Add the stop. Every field you turn on narrows the maps. Add the stop stays greyed out until a field other than Has a zaap is set: a zaap alone, or nothing at all, would take every map of the game, and the stop would show The query must name a subarea, an area, a monster, a resource, coordinates or a world map: otherwise it picks every map of the game.
Field Keeps the maps Subarea In that subarea, searched by name. Area In that area, searched by name. Monster In a subarea where that monster lives, searched by name. Resource Where that item is harvested, such as wheat, searched by name. Has a zaap With an active zaap. X, Y At those coordinates. World map id On that world map. 1 is the world of the Twelve. What the world map shows
Each stop's place: a map's square, a zone's squares filled in, a subarea's or an area's outline, with the stop's number on it. An arrow from each stop to the next. When the circuit repeats, a dashed arrow goes from the last stop back to the first. The selected stop, in a colour of its own. Only the stops on the world map on screen. An arrow to or from a stop on another world map, such as Incarnam, is a short stub labelled like to 4 · Incarnam. Click the label to show that world map. A query stop isn't drawn, since its maps are only known while the plan plays, and neither is a map that's on no world map, such as an instance or a house. The arrows go straight from the stop before them to the stop after.
The list of stops
Stops, on the Circuit tab, lists the stops in order. Each line has the stop's number, its name or what its place is, its number of steps, on no world map for a map that can't be drawn, and a red count when something is wrong with it.
Click a line to select the stop and centre the world map on it. Drag a line to move the stop, or use the arrows that appear when the pointer rests on it. The arrows on the map follow. With no stop yet, the list says "No stop yet: pick the Map, Zone or Subarea tool and click on the world map."
The circuit
The top of the Circuit tab says the order the bot visits the stops in, and how many times. Four presets set both at once:
Preset Order Repeat What the bot does Loop As drawn Forever The stops in their order, again and again. One way As drawn Once The stops in their order, once. A new plan starts like this. Sweep Nearest first Forever The nearest stop that still has work, again and again. Until As drawn Until a condition The stops in their order, until a condition holds. You can also set Order and Repeat yourself, for example a sweep until a condition holds. No preset is highlighted then, and the line under them says "Another combination of order and repeat."
With Until a condition, the condition is under Until. It starts as "After 60 min of play": change it as described in Conditions. It's checked after each stop, and at the end of a lap once the lap is counted, so "After lap 3" ends the plan right as the third lap ends.
One time round the circuit is a lap. Here is how a lap goes:
As drawn takes the stops in the order of the list. Nearest first visits every stop once per lap too, but each time it picks the stop whose map is nearest. A stop whose Only if condition is false when it comes up is skipped for this lap. At a stop, the bot goes to its maps one after the other: first the one it stands on, then the nearest of the others each time. It gets there by a trip, map after map. A map no trip reaches is skipped, with a line in the bot's console. When no trip reaches any of a stop's maps, the stop fails. On each map, the bot runs the stop's steps in order. A stop with no step is a waypoint: the bot only passes through. Once ends the plan after one lap. Forever and Until a condition start the next one. A lap always lasts at least a second. A step from a package can tell the plan there's nothing more to do on a map for now, for example when everything there has been gathered, and when to come back. The bot then leaves that map alone until that time, or until the next lap, in both orders. When every map left is waiting, the bot waits for the first one to have work again instead of going round for nothing.
Edit a stop
Select a stop, in the list or with Select, and it opens under the list:
Part What it does Name Name this stop (optional). Shown in the list and in the bot's console. Without one, the place stands in. Trash icon Removes the stop, without asking. Undo brings it back. Place Where the stop is. See below. Only if A condition checked when the stop comes up. False: the stop is skipped for this lap, which isn't a failure. Without one, it says "Always visited." and Add a condition adds one. If it fails What happens when the stop fails. See When something fails. Steps The steps run on each of the stop's maps. See Steps. Place starts with a list of five kinds:
Kind What you set A map Map id, typed or picked with Pick on the world map. Under it, the map's coordinates and the name of its world map, or "On no world map (an instance, a house...): shown here only". A zone (painted maps) Painted with Zone on the world map. It shows how many maps it holds, how many are on no world map, and Show the maps lists them, each with a button to remove it. A subarea Searched by name, or picked on the world map. Under it, the world map it's on. An area The same, for an area. A query, found while playing The fields of a query, as for Query. Changing the kind keeps what it can: a map becomes a zone of that one map, a zone becomes a map with its first map, and a map or a zone becomes the subarea of its first map, or a query that starts with that subarea. With nothing to keep, a map, a subarea or an area starts empty, and the stop shows This stop's place hasn't been picked yet. until you pick one. 0 is never put in its place: it's an ID like any other, area 0 being Amakna.
Fields that name game data
A field that asks for a monster, an item, a job, a subarea or any other game data has a Search by name box. Type part of a name and pick it in the list: each entry shows its ID, and the ID shows under the box once picked. A field that takes several, such as a list of monsters, keeps each one you pick. The list says "Type a name to search.", "Nothing by that name." or "The search failed." when it has nothing to show. Names are in the language picked with Language on a Game page.
Fields for a map, a subarea or an area also have Pick on the world map. Click it: the button reads "Click on the world map..." and a bar on the map says what to click, with Cancel. Escape gives up too. For an area, click any square of it. A map has no name to search for: type its ID, or pick it.
Steps
Add a step, on a selected stop, opens the palette. It lists The Studio's blocks first, then the steps each package gives, grouped by package: the package you're editing first, marked "(this package)", then its dependencies in alphabetical order. Each entry has a line of description. Click one to add it at the end of the stop's steps.
The packages offered are the one you edit and those listed in its dependencies. Base's blocks are those of its newest version, the one the package plays, whatever version its manifest names. A package that only a dependency uses isn't offered. A dependency that gives nothing here is listed greyed out at the bottom, with the reason:
Reason What to do its version in the manifest isn't an exact one Set an exact version for it in the package's Manifest card. that version isn't installed Install that version, or change the dependency to one you have. its declarations couldn't be read The package has an error. See Package errors. When the package's own declarations can't be read, the panel shows The package's own blocks couldn't be read with the error, and the palette lacks the package's own steps and conditions until it's fixed.
The palette is read again each time you save, so a step newly declared in the package's code shows up once you save.
The Studio's steps
Step Fields What it does Fails when Wait Seconds, and Up to once turned on Waits that many seconds, or a random time between Seconds and Up to. Starts at 5 seconds. Never Wait until Until, a condition, and Give up after, in seconds, once turned on Checks the condition at once, then every second until it holds. Give up after passes first, or the condition can't be answered Play a plan Plan, another plan of the package Plays that plan here, from the start of its circuit, then carries on. Before the next step, the bot goes back to the stop's map. That plan stops on a failure Log Message Writes the message in the bot's console. Never Stop None Ends everything being played, as a normal end: this plan, and any plan that is playing it. Never An optional field shows as a switch: turn it on to set it, and turn its switch off again to remove it. Play a plan only offers the package's other plans, and says "The package has no other plan yet." when there are none. A plan played this way counts its own laps.
Steps from packages
A package's step shows its label, followed by the values of its arguments, such as "Gather: Wheat, Barley". Labels and descriptions are in the language the package's author wrote them in. Unfold the step to set its arguments: each is the same field as on the bot's Settings tab (see The fields), with the package's label, description and bounds, and the game data search where the package asks for game data. "Takes no argument." means there's nothing to set.
An argument you haven't changed takes the package's default when the plan plays, so a plan follows the package when its author changes a default. Once you change one, Use the default puts it back. When the package's default can't be used, because it breaks the argument's own rules (a level of at least 1 would start at 0) or because the argument asks for game data and has no default, the field stays empty and the step shows Argument <argument> needs a value. until you set it. From a setting lets the bot's page set it: see Plan settings.
Base's steps
Base gives eleven steps that act in the game, with the labels it writes in English:
Step Arguments What it does Fails when Gather resources Resources, Jobs, Never these resources, Only what my job level allows, Order, Most harvests, Stop when bags above Harvests the resources of the map that match, one after another, the nearest first or the highest level first, with the job's own action. Neither Resources nor Jobs gathers every resource of the map. A fight that comes meanwhile, such as an aggression, is waited for, played by the fight module, and gathering goes on. When nothing matches, there's nothing more to do on this map for a minute. In Resources, a resource the bot picked next to Run can't harvest yet shows greyed, with the job level it needs and the bot's: you can still pick it. The character dies in a fight Fight monsters Only with these monsters, Never with these monsters, Only with these races, Group level at least, Group level at most, Most monsters in a group, Highest monster level, Archmonsters, Most fights Attacks the monster groups of the map that match, the nearest first, one after another, and waits for each fight's end, which the fight module plays. It switches the module on when it's off, but on a relayed session, where the switch stays yours. When no group matches, there's nothing more to do on this map for a minute. The character dies in a fight Fight settings Fight module, Profile, Speed Sets how the fight module plays while the plan runs: switched on or off, its profile by its name on the Fight Profiles page, and its speed. Keep, or an empty Profile, leaves the bot's own settings. Profile names a profile that can't be played Rest Until life reaches, 100% by default, Eat first, Food Sits the character down until its life is back to that share of its maximum, then stands it up, eating from the bags first with Eat first. A fight meanwhile is waited for, and the rest goes on. Nothing to do when life is already there. The character dies, or its life stops coming back for a minute Eat Until life reaches, 100% by default, Food Eats from the bags until life is back to that share: breads, potions, meats, fish, any item that gives life back, the one that fits what is missing best first, or only the Food given. Nothing to do when life is already there, or the bags hold nothing to eat. The character dies in a fight meanwhile Equip items Items Puts the items on, each in a free slot it can go in, else in its first slot, sending the item there back to the bags. Nothing to do when every one is already worn. An item isn't in the bags, can't be worn, or the game didn't move it Take items off Items Takes the items off, back into the bags, or everything the character wears with none given. Nothing to do when none is worn. The game didn't move an item Sell at the marketplace Items, Jobs, Lots, Under the cheapest by, 1 kama by default, Never under, 70% of the average by default Puts the items from the bags on sale at the game's marketplace on the map: the Items picked, and every resource the Jobs gather. Neither sells nothing. Each lot is priced under the cheapest lot of its size, and never under that share of the marketplace's average price. A lot of yours that's already the cheapest keeps its price. Lots puts the biggest lots each stack fills, or lots of one size. Items this marketplace doesn't take, and items with their own stats such as equipment, stay in the bags. It stops when the character can't pay the tax, or when the marketplace takes no more lots. Nothing to do when the bags hold none of the items. There's no marketplace on the map, or its window doesn't open Buy at the marketplace Items, Until the character has, Most per item Buys the Items at the game's marketplace on the map until the character has that many of each, worn or in the bags: the lots that cost least per item first, never above Most per item, never more than is missing. Items with their own stats aren't bought. Nothing to do when the character already has enough. Most per item has no default: the step needs a value. There's no marketplace on the map, or its window doesn't open Put in the bank Only these items, Only what these jobs gather, Keep these items, Put kamas in, But keep Talks to the map's banker and puts in the bank every stack in the bags but the Keep these items, or only the items asked for. Worn items stay on. With Put kamas in, it puts in the kamas above But keep too. It moves one stack at a time, as you would, so Bags above stays right. A stack the bank doesn't take stays in the bags, and the Console says so. Nothing to do when there's nothing to put in. There's no banker on the map, its dialog offers no bank, or the bank doesn't open Take from the bank Items, Until the character has, Kamas up to Talks to the map's banker and takes the items out until the character has that many of each, worn or in the bags, and kamas until it carries Kamas up to. Nothing to do when it already has enough of everything. There's no banker on the map, its dialog offers no bank, or the bank doesn't open Every argument of Fight monsters can stay as it is: it then fights every group of the map, but the ones with an archmonster. A group's level is the sum of its monsters' levels, as the game shows it. Archmonsters avoids them by default, allows them, or fights only groups with one.
A plan that farms, for example, has a stop on each map of a zone with Gather resources or Fight monsters, and an interrupt that goes to the bank when Bags above 90%. That bank plan has one stop on a bank's map with Put in the bank, which empties the bags. To sell instead, the plan's stop is on a marketplace's map, with Sell at the marketplace and the same Jobs as Gather resources. Neither step looks elsewhere: the stop's place is the map with the banker or the counter. Since a death puts the character elsewhere, give these steps an If it fails that suits you, and use Died in the last fight to decide what comes next.
A step's card
Each step is a card with a sentence saying what it does, such as "Wait 5 s". Under it, Only if: shows its condition when it has one, and If it fails: always shows what happens when it fails, even when it's the default, Stop the plan.
Click the card, or its arrow, to unfold it: its arguments or fields, Only if and If it fails. Only if is checked right before the step. False: the step is skipped, which isn't a failure. Without one, it says "Always run." Drag a card by its grip to move it, or use its arrows. The trash icon removes it, without asking. Conditions
A condition is a yes or no question. They're used in a stop's Only if, a step's Only if, a Wait until, the circuit's Until, an interrupt's When, and inside other conditions. Add a condition opens the palette of conditions: The Studio's blocks first, then the conditions packages give.
Condition Fields True when All of Conditions Every one of them is. It starts with one, and Add a condition adds more. Any of Conditions At least one of them is. Not Condition Its condition isn't. Time played Minutes That long has passed since the bot started the plan. In a plan played by another one, it counts from when the first plan started. Laps Laps, from 1 The circuit has been completed that many times. Time of day From, To The clock of the computer running Asterobot reads from From, included, to To, excluded. A From after To spans midnight: 22:00 to 06:00 is the night. The same time in both is never true. Chance Chance, from 0 to 100% A random draw, made again each time the condition is checked, says so. 0 is never true, 100 always is. Base gives these conditions about the character, its fights and its harvests, with the labels it writes in English:
Condition Arguments True when Level at least Level, from 1 The character's level is at least that one. Kamas at least Kamas It carries at least that many kamas. Life below Life, from 1 to 100% Its life is below that share of its maximum. Bags above Bags, from 1 to 100% Its bags are fuller than that share of what they can carry. In a fight None A fight is under way. Has an item Item, searched by name, and How many, 1 by default It carries at least that many of the item, worn or not. Job level at least Job, searched by name, and Level, from 1 That job is at least that level. A job the character doesn't have is level 0. On a map Map It stands on that map. In a subarea Subarea It stands in that subarea. In an area Area It stands in that area. Died in the last fight None The character died in its last fight. False before any. Fights at least Fights, from 1 The character has fought at least that many fights since the script started. Harvests at least Harvests, from 1 The character has made at least that many harvests with Gather resources since the script started. Wears an item Item, searched by name The character wears that item. The opposite of each is Not around it. A new condition starts with the package's defaults, and most of base's arguments have none they could use: their fields stay empty, and the condition shows Argument <argument> needs a value. until you set them. Only Kamas (0) and How many (1) can be left as they are, and Died in the last fight takes no argument.
Each condition is a card with its sentence, such as "Between 08:00 and 20:00". Unfold it to edit its fields. The arrows button, Change the condition, replaces it with another from the palette. The cross removes it where a condition is optional: a stop's or a step's Only if, and the conditions inside All of and Any of. An interrupt's When, the circuit's Until, a Wait until and a Not always keep one: change it instead.
A condition that can't answer fails, and so does the block it guards. Base's conditions fail this way when the game hasn't told something yet, such as the character's job levels: they never guess. The console then says what's missing, for example the jobs aren't known yet.
When something fails
Every stop and every step has If it fails:
Choice Then Stop the plan The plan stops, with the error in the bot's console. This is the default. Skip it, go on to the next step (for a step), Skip it, go on to the next stop (for a stop) A line in the console, then the plan carries on. Try again Tried again up to Tries times, from 1 to 10 (2 to start with), Seconds between tries apart (5 by default). If it still fails, it stops the plan or skips, as you choose. A stop that's tried again starts over: its maps are found again and its steps run from the first.
What Fails when A step A package's step reports an error. Its Only if can't be answered. A Wait until gives up, or its condition can't be answered. The plan a Play a plan step plays stops on a failure. An argument's value breaks the package's rules, for example a plan setting whose value is below the argument's minimum. A stop Its place has no map, or its maps can't be found. No trip reaches any of its maps. A trip to one of its maps fails, including a trip you stop from the bot's Map tab. Its Only if can't be answered. The whole plan, whatever If it fails says An interrupt's When can't be answered, or the plan the interrupt plays stops on a failure. The circuit's Until can't be answered. A failing step doesn't fail its stop: only the step's own If it fails applies.
When the plan stops on a failure, the bot's console gets an error line naming the plan, the stop and the step, and why:
base: Astrub farm › 2 Wheat field (k3f9) › wait until (w4t6) failed: its condition still didn't hold after 60 s The four characters in parentheses are the block's ID in the plan file. The Studio doesn't show them, but View as code does.
With the index.js that Start with the Studio writes, a plan that stops on a failure stops the script too: the bot's page shows The behavior stopped with an error, with a text starting with unhandled Promise rejection:, followed by the same error. Click Play to start the plan again, from the start of its circuit.
Interrupts
An interrupt plays another plan when a condition holds, then goes back to the circuit or ends it. "When the bags are fuller than 90%, play the bank plan, then resume" is an interrupt. They're on the Interrupts tab. Add an interrupt adds one with these fields:
Field What it does Name Name it (Bank when full). Shown in the bot's console. When The condition. It starts as "After 60 min of play". Run the plan Another plan of the package. Until you pick one, the interrupt has the problem No plan chosen. Then Resume where the circuit was: the bot goes back to the map it was on and runs the step it was about to run. End this plan: the plan the interrupt belongs to ends there. When another plan was playing it, that one carries on. Interrupts are checked in their order, on arriving at each map and before each step. Never during a step or a trip: a long step finishes first. The first one whose condition holds plays its plan. While that plan plays, the same interrupt isn't checked again, even from inside it, so "bags full: bank" can't start the bank plan from the bank plan. The interrupts of the plan it plays do apply.
With Resume where the circuit was, the plan it plays has to make the condition false: the bank plan empties the bags. When the condition still holds right after that plan, base stops the plan rather than playing the bank plan again and again, and the console says which interrupt:
base: Astrub farm › interrupt Bank when full (i7w0) is still true after its plan plans/bank.js ran: that plan must make it false, or it would run again and again A Chance in the condition doesn't count against it, since the next check draws again.
The arrows move an interrupt up or down, and the trash icon removes it. An interrupt needs another plan to play: create it first with plan in Files.
Plan settings
A plan can have settings of its own, which a player sets on the bot's page, such as the monsters to fight or a level to reach. They're on the Settings tab. Add a setting adds one, named setting, holding a whole number, 0 by default.
Field What it does Name The setting's key. Letters, digits and _, not starting with a digit, and not __proto__. It's renamed when you press Enter or leave the box, along with every argument that uses it. A name that's taken or not allowed is refused with " can't be a setting's name: it is taken, or isn't a name a script could write." Use count not used, used once or used 3 times: how many arguments take their value from it. Type bool (on or off), string (text), int (whole number), double (decimal number), array (list) or map (entries with a key). Holding For array and map: the type of what they hold. Label The name the bot's page shows. Game data For a whole number or a list of them: the game data table the numbers come from, such as monsters, items, sub_areas, areas or maps. The bot's page then offers a search by name. Minimum, Maximum For numbers. Default value The value until a player changes it on the bot's page. A setting needs one when it couldn't start at its type's zero: a whole number of at least 1 would start at 0, and a single game data ID at 0, an ID nobody picked. Without one, the field stays empty and the setting shows It needs a default value: without one, it would start at a value it can't run with. The trash icon removes a setting. The arguments that used it then show the problem Argument <argument>: the plan has no setting <name>.
Use a setting
Unfold a step or a condition from a package and turn on From a setting under an argument. The argument then takes its value from the plan setting with the same name and type, or from a new one made from the argument itself: its label, its bounds, its game data table, and its current value as the default, or no default when the argument has none it could use. A list then lets you pick another setting of the same type. Turn the switch off to give the argument back the package's default.
Until a player sets another value on the bot's page, the argument takes the setting's default, so that default has to suit the argument: a setting that defaults to 150 can't stand for a percentage. When it doesn't, the step or condition shows Argument <argument>: the default value of setting <setting> doesn't fit: <issue>. A value set on the bot's page is checked when the step or condition runs, and one that doesn't suit the argument fails it.
Only the arguments of packages' steps and conditions can take a setting. The Studio's own blocks take fixed values: a Wait's seconds can't come from a setting.
Show them on the bot's page
A plan's settings reach the bot's Settings tab only once the package's index.js passes them on. The Settings tab of the Studio tells you where you stand:
What you see What it means These settings aren't on the bot's page yet, with Add it index.js doesn't pass them on. Add it writes what does in index.js: a line such as export { parameters } from "./plans/farm.js"; after the imports at the top, or, when index.js already passes on another plan's settings, the merge of both. A notification says "Added to index.js: save to apply it." "index.js re-exports them now: save to see these settings on the bot's page." index.js passes them on, but isn't saved yet. index.js has settings of its own index.js declares settings itself, not only plans' settings, and a second parameters would clash with them. The Studio adds nothing and shows the lines to write by hand: The editor explains them. Once saved, nothing more is shown. A package started with the Studio already passes on the settings of plans/main.js. Add it works for every other plan too, as long as index.js only gathers plans' settings: it merges the new plan's with those already there. The editor shows what it writes.
On the bot's page, plan settings are package settings like any other, in the package's card on Package settings: see Package settings and actions. A value you apply there is used from the next time an argument reads it, without restarting the plan. When index.js doesn't pass the settings on, the plan uses each setting's default, and the console says so before the bot moves, in one line that names them all:
base: Astrub farm: setting monsters isn't one of the package's settings, so its default is used: re-export the plan's settings from the package's entry The plans of one package share the bot's values: two plans with a setting of the same name use the same value, so they must give it the same type. When they don't, the setting says "Declared with another type by:" followed by each plan that declares it and its type, and it counts as a problem.
Problems
The Problems tab lists everything wrong with the plan, with a red count on the tab. Each problem says what's wrong and where: Stop 2, Interrupt 1, Setting monsters, Circuit or Plan. Click one to go there. The same sentence shows in red under the block it's about, and the list of stops counts each stop's problems. The editor's error count adds up the problems of every plan to the errors in the code. With none, the tab says "Nothing wrong with this plan."
Saving is allowed with problems, since a plan is often saved half done. Base is what refuses it: when the bot plays it, base checks the whole plan, and every plan it plays, before the bot moves. Even one problem keeps the bot from moving: the console shows can't be run: after the plan's name, followed by every problem base found.
Some of the problems you'll meet:
Problem What to do The circuit has no stop yet. Add a stop. No plan chosen. Pick the plan for a Play a plan step or an interrupt. The plan <path> no longer exists. The file was removed. Pick another plan. Argument <argument>: <issue>. Change the value, such as a number above its maximum. Argument <argument> needs a value. Set the argument: the package's default can't be used, or there's none. Argument <argument>: the plan has no setting <name>. The setting was removed or renamed. Pick another, or turn off From a setting. Argument <argument>: the default value of setting <setting> doesn't fit: <issue>. Change the setting's Default value, or its bounds. It needs a default value: without one, it would start at a value it can't run with. Give the setting a Default value. This stop's place hasn't been picked yet. Pick the stop's map, subarea or area. The query must name a subarea, an area, a monster, a resource, coordinates or a world map: otherwise it picks every map of the game. Turn on one more field of the query. The longest wait is shorter than the shortest. Up to is below Seconds in a Wait. It needs at least one condition. An All of or Any of is empty. @asterobot:base plays this plan, but the package doesn't depend on it. Click Add base to the dependencies in the alert at the top of the panel. The setting <name> is declared with different types by the package's plans Give it the same type in every plan. Locked blocks
A block the Studio can't edit is shown locked: "Read-only: made by a newer Studio, or calling something the package doesn't have", followed by the reason and the block as the file holds it. That happens to a block made by a newer version of the Studio, and to a step or condition from a package that isn't a dependency any more, that gives no blocks here, or that no longer declares that function. The Studio keeps a locked block exactly as it is and saves it unchanged. Fix the cause, such as adding or installing the dependency, or remove the block with its trash icon. A circuit made by a newer Studio says "This circuit was made by a newer Studio: it is kept as it is."
A plan that can't be opened
When a plan file can't be read, the Studio shows This plan can't be opened in the Studio instead of the plan, never writes over the file, and offers Open as code:
Reason Cause This plan was made by a newer Studio A newer Asteroboard wrote it. Asteroboard updates on its own: reload the page once it shows Update available. See Updating. The plan's markers are missing: the file was changed by hand. Someone edited the file's code. The plan's data can't be read The plan's data in the file is broken. Part of the plan isn't what the Studio expects The plan's data has the wrong shape. Save, undo and see the code
A plan is one of the package's files. Save, or Ctrl+S, saves it with the others. Unsaved and the dot next to its name in Files work as for code, and nothing asks you to save when you leave the editor: unsaved changes are lost. The editor gives every detail of saving.
Undo and Redo, next to the plan's name, take back changes one at a time. While the Studio has the focus, Ctrl+Z undoes, Ctrl+Shift+Z or Ctrl+Y redoes, and Ctrl+S saves: click in the Studio first. On a Mac, use Cmd. Typing in one field, or one drag of Zone, is one change. Add it is a change to index.js, not to the plan: undo it in index.js's code.
View as code shows the plan file in the code editor, with Back to the Studio above it and a reminder that changes made there by hand are lost the next time the Studio saves the plan. The Studio writes the whole file again each time you change the plan, so make your changes in the Studio.
Play a plan
In the editor, Run saves the package and starts it on the bot picked next to it. See Run. Or set the package on a bot and click Play, as Run a package shows. The plan waits for the character to stand on its map, checks the whole plan, then sets off. Each start begins at the start of the circuit: the plan doesn't carry on where an earlier run stopped. The bot's Console gets a line at each stop and each step, and for each interrupt, retry, skip, Log step and error:
base: Astrub farm › 1 Wheat field base: Astrub farm › 1 Wheat field › wait 5 s base: Astrub farm › 1 Wheat field › wait until base: Astrub farm › 2 3 maps While the bot travels, its Map tab shows the trip, as it does for a trip you start yourself. Stopping the trip there makes the stop fail, like any trip that fails.
Stop, on the bot's page, stops the script at once, wherever the plan is. When a time slot of the bot's schedule ends, the plan ends cleanly instead, within the schedule's Time to finish: the step under way finishes, a Wait or Wait until ends at once, and a trip ends once its step under way is over, so the character never stops in the middle of a map change. A Stop step ends the plan the same way, as a normal end.
A One way circuit, or one that ends with Until a condition, ends the plan when it's done. The bot stays where it is.
Note
Coming soon. The Studio will show where a bot is on its plan while it plays. For now, follow it in the bot's Console.
Plans of other packages
Every package's page has a Plans card listing its plans, marketplace packages included. Each line gives the plan's name, its file and its number of stops, or can't be read. "No plan in this package." means there's none.
Open shows the plan in the Studio, read-only, on a page of its own: the world map with the plan drawn on it, and the panel with nothing to change. Select stops to read them, in the list or on the map. The top of the page shows the package, the plan's file and Read-only. For a local package, Edit code opens the plan in the editor. For any package, Copy into... copies it into one of yours.
When the page can't show the plan, it says why: the package's files couldn't be read, the package has no such file, the file isn't a plan, or one of the reasons in A plan that can't be opened.
Copy a plan into your package
Click Copy into... on the package's page or on the plan's page. The dialog is titled with the plan's file, such as Copy plans/farm.js. Pick a Package. Only your local packages are listed. With none, it says "You have no package of your own yet." Read what the copy will do. Files lists each plan copied, with the file it becomes in your package. Added to its dependencies lists the packages the plans use that your package doesn't depend on yet, or says "Nothing to add." Click Copy and open. The copy goes into your package's plans folder, with every plan it plays through interrupts and Play a plan steps. A plan whose file name is taken gets a number, such as plans/bank-2.js, and the plans that play it are changed to match. The dependencies are added at the version installed, including the package the plan came from when the plan uses that package's own steps. Both the files and the dependencies are written to your package straight away, without Save, and the editor opens on the copy, which is now yours to change.
Message What it means "Not installed, to install before playing the plan:" followed by packages Packages the plans use that aren't in your library, so they can't be added as dependencies. Install them first. "Referred to but not found, left as they are:" followed by files Plans the copied plan plays that don't exist in the original package. The copy shows them as problems. "This plan can't be read." The plan file is broken, so it can't be copied. "That package's files couldn't be read." Asterobot couldn't read the package you picked. Pick it again, or another one. "The copy failed.", or Asterobot's reason The copy didn't go through. The copy's settings aren't on the bot's page until your index.js passes them on: see Plan settings.
Limits
A step or a condition from a package only appears when that package declares it for the Studio. If you write packages, Steps and conditions shows how. Only the package you edit and its own dependencies, at an exact version that's installed (base: its newest), give blocks. Interrupts are never checked during a step or a trip. The maps of a subarea, an area or a query are found when the stop comes up, from the game data of the version the bot plays, not the one the Studio shows. Time of day reads the clock of the computer running Asterobot, not the time zone of a schedule. The Studio's own blocks take fixed values only, never a setting. Stops are reached by trips, with the limits described in Travel to another map. A change made by hand to a plan file is lost the next time the Studio saves it. A marketplace package's plans can be read and copied, never edited. Where to go next
Package settings and actions, to set a plan's settings on a bot Run a package Steps and conditions, to give your own functions to the Studio The editor, for what a plan file holds and how code plays it Lire cette page en français
  • 50 vues
Let Asterobot play a bot's fights: turn the fight module on, choose its profile and speed, see what changes on a relayed session, make fights faster, and read the turn log of its last fights.
Asterobot can play a bot's fights for it. The fight module places the character, says it's ready and plays each of its turns: it walks, casts spells, hits with the weapon and ends the turn, with the same messages the Dofus client sends. How it plays is up to the bot's fight profile.
The module plays fights, it doesn't start them. A fight begins when the character attacks a group of monsters, gets attacked or joins a fight, and that's the job of the bot's package, or yours when you play on a relayed session. Once a fight starts, the module plays it to the end, then waits for the next one.
What it decides
In a fight it plays, against monsters by default, the module decides each part of the fight that its profile leaves on:
Part What the module does Placement Picks the character's starting cell among its team's. With Automatic placement and the character's spells known, it picks the cell from which its first turn would go best, less the danger there beyond what the profile's risk accepts, should the monsters play first. Ready Says the character is ready, once enough allies have joined (Wait for allies). Without it, the fight starts when the placement countdown ends. Turns Walks, casts, hits and ends the turn, until nothing is left worth doing. Summons it controls Plays the turns of the summons the server gives the character to play, such as the Eniripsa's fairies, the same way: with the bot's profile and the summon's own spells, AP and MP. The opening stays the character's. Summons that play on their own, such as the Osamodas's, keep playing on their own. It also answers everything the Dofus client answers on its own during a fight, such as loading the fight's map and confirming each action it saw. Challenges aren't chosen yet: see Coming soon.
Each decision starts from what the fight looks like now. The module works out what the character can cast from each cell it can reach, how much each cast would deal or heal, and how dangerous each cell would be once the enemies play, then plays the turn its profile scores best. How the module decides explains it in full.
The module needs the bot's game version to be extracted. Without game data, it plays on what the game tells it alone, which makes for poor turns, and the bot's console says The fight module couldn't read the game data: it plays on without it.
A few cases it handles on its own:
The character dies. The module has nothing left to decide, and keeps answering the game until the fight ends. The bot reconnects during a fight. The server hands the fight back, and the module plays the rest of it, the turn under way included. A fight the bot doesn't play, such as a duel by default. The module is off for it, as if Play this bot's fights were off. The bot's console says The bot doesn't play this kind of fight: the fight module leaves it to the game client or a script. See The fights it plays. Turn it on
The module has its own settings on each bot, on the bot's Fight tab.
Open Bot Manager, click the bot's name, then the Fight tab. Switch on Play this bot's fights. The change is saved at once. Pick a Profile in the list and click Apply. Leave it empty to play the default profile. Pick a Speed. Custom lets you set each wait yourself: see Custom speed. Check the Fights it plays: Monsters alone by default. See The fights it plays. While the module plays a fight, Playing the fight under way appears next to the switch. The settings are kept with the bot, so they survive a restart. When saving fails, Couldn't save the fight settings says why.
You can switch the module on or off during a fight. It takes effect at the start of the next turn, so a turn is never played by two players at once. Before the first turn, it takes effect at once.
With the module off, Asterobot sends nothing at all during the bot's fights, apart from what Hurry the server sends when it's on: the fight is the package's or yours. On a Full socket bot, where no Dofus client can play it, the console warns Nothing plays this fight unless the bot's script does: the server disconnects a character left idle for a few minutes.
The bot's package can also override these settings while its script runs: turn the module on or off, play another profile, change the speed or the fights it plays. A profile the script plays plays every fight, against players too. The Fight tab then says what the script overrides, and your settings play again once it stops. On a relayed session the switch stays yours. A script can also take some of the module's decisions itself, such as where to place or what to do in a turn: the turn log marks them By the script.
The fights it plays
Fights it plays chooses which fights the module plays. Each kind is the Play this bot's fights switch for those fights: in a fight of a kind left unchecked, the module is off and sends nothing, so on a relayed session you play it, and on a Full socket bot nothing does, as the console warns. The game says what a fight is just after loading its map, so the module, when it's on, answers that load whatever the fight; it turns off for the rest of the fight at once.
Choice The fights Monsters Every fight against monsters, quest fights where an NPC fights beside the character included, and breaches. The only one checked by default. Aggressions A player attacking the bot's character, or the character attacking a player. Duels Duels between players. Kolossium Kolossium fights. Perceptors and prisms Fights for a perceptor, a prism or an alliance's territory. The module plays fights, it doesn't start them: accepting a duel or registering for the Kolossium is the package's job, or yours.
Once a fight against players is checked, Profile in PvP fights chooses the profile the bot plays in them, from the same list as Profile. Left empty, the bot plays its Profile in every fight.
Warning
The module doesn't know the spells of enemy characters yet: it reckons each one hits bare-handed. It plays fights against players, but its sense of danger is low there, and the Fight tab says so.
The profile
The Profile list holds every profile the bot can play: Idle, your own, and those your packages ship, named after their package, such as @some-author:fighters/fire-cra. Edit profiles opens the Fight Profiles page.
Choice How the bot fights Empty, shown as Default profile Every setting at its default. It adapts to any character: the role its class plays first, the range its spells reach, the spells it really has. Idle Takes part in the fight and passes every turn after 5 seconds. Nothing else: no placement, no ready. Any other profile As that profile says. The profile is read again when each fight starts, so a profile you change plays from the next fight. When the profile can't be played, because it was deleted, has an error or its package was removed, the bot plays the default profile and its console says The fight profile can't be played: the default profile plays. A profile you deleted stays selected in the list, so you can see what the bot is set to.
Speed
The speed sets how fast the module acts. Whatever the speed, it decides the same things.
Speed Before each decision Its answers to the game Slow Thinks 1.5 to 4 seconds Sent once the Dofus client would have played what happened Normal (the default) Thinks 0.6 to 1.8 seconds Sent once the Dofus client would have played what happened Turbo Decides at once Sent at once Custom Waits what you set, from none at all to a minute Sent as you choose: once the Dofus client would have played what happened, or at once Warning
Turbo answers at once after every cast, faster than any real game client: it's easy to notice. So does a Custom speed with Answer the server at once on. The server accepts it, but anyone watching the bot's fights, or its timings, can tell.
Custom speed
Choose Custom to set the waits yourself: no wait at all between actions, for instance, but a pause before each spell and before ending the turn. It starts from the waits of Normal.
Wait before every action: the wait before each move, spell and end of turn, before the placement and before saying ready, in milliseconds. 0 waits for nothing. Switch on Random to wait a different time each time, between the two values you give. Answer the server at once: off, the bot answers the game once the Dofus client would have played the animations, as at Normal. On, it answers at once, as Turbo does. Wait per action: tick Placement, Ready, Move, Spell or End of turn to give that action a wait of its own. The others keep the wait before every action. Click Apply to save. Each wait goes up to 60,000 ms, one minute, and never costs the turn: the module acts 2 seconds before the turn ends at the latest.
On a relayed session
A bot in MITM mode (man-in-the-middle: the bot relays the session of a Dofus client you play) can play its fights too. Your Dofus client keeps showing the fight as it happens, but while the module plays, the clicks you make for what the profile decides do nothing: Asterobot holds them back. That means your moves, spells and the end of your turns, and the placement and ready buttons when the profile leaves those parts on. When you click anyway, the game client shows, at most every 10 seconds, a popup in the bot's language:
Asterobot's fight module is playing this fight, so the game doesn't take what you do here. Turn the module off to play from the next turn. What the profile leaves off stays yours: with Placement off in its Parts, you place the character yourself and the module plays the turns. To take the whole fight back, switch the module off: you play from the next turn.
MITM mode explains relayed sessions.
Faster fights
The Faster fights switches on the Fight tab make every fight of the bot go faster, whether the module plays it, you play it in Dofus on a relayed session, or the bot's package does. They're off until you switch them on.
Hurry the server: the game server waits for the players' Dofus clients to have played each action before going on. Asterobot tells it at once that every action has played, those of monsters and allies included, and says the bot is ready again and again, every 100 ms, from the end of the character's turn until the next turn starts. The server then waits less between actions and between turns. It works on a Full socket bot too. Fewer animations: on a relayed session, your Dofus client plays every spell as a silent cast, which skips one of the kinds of visual a spell plays, and skips the fight cinematics, which can hold a fight up to 5 seconds, and the spell visuals played outside a cast, such as some traps and glyphs going off. Only what your Dofus client shows changes: the game gets exactly the same fight. Skip walking in fights (experimental): on a relayed session, your Dofus client moves each fighter straight to the end of its walk. On every bot, Full socket included, the fight module also stops waiting for walks to play before it answers the game, as it otherwise does at Normal. It hasn't been tried yet: switch it off if a fighter shows on its old cell, or if Dofus stops playing the fight. On a Full socket bot there is no Dofus client to show anything, so Fewer animations changes nothing there. For the fastest fights on a Full socket bot, use Turbo, which waits for no animation at all, with Hurry the server.
Turn log
The Turn log at the bottom of the Fight tab keeps every decision of the bot's last 10 fights, until Asterobot restarts. The newest fight comes first and is open: it shows when it started, Under way while it lasts, its map and how many decisions it had. The refresh button next to the title reads the log again.
Each decision reads like this:
Part What it shows Time and round When it was sent, and the fight's round. Action Placement, Ready, Move, Cast or End of turn. Details The cell, or the spell and the cell it was cast on. Weapon or bare hands is a hit with the weapon. Score What the profile made of it, then what that score counted: damage, kill, heal, control, buff, summon, safety, position, unused AP, harm to allies. Also weighed The next best options, with their scores. Not answered The server didn't take the action. The module decided again without it. By the script The bot's script took this decision instead of the AI. When the profile names spells the character can't cast in a fight, nor a creature its spells summon, that fight lists them at its top, by name: the module ignored them. It happens with a profile written for another class, or for a spell variant the character didn't pick.
Watching a fight
During a fight, the bot's Map tab shows the fight's map with every fighter where it stands and its life, as they walk, get pushed and die.
Coming soon
Note
Coming soon. These parts of a fight aren't played by the module yet:
Challenges. The module doesn't choose challenges. On a relayed session, choosing them stays yours, even while the module plays; on a Full socket bot, none is chosen. A live board on the Fight tab, showing the fight as the module sees it. Next, How the module decides explains how it chooses each action, and Fight profiles how to make and share profiles.
Lire cette page en français
  • 55 vues
What the fight module knows about a fight, how it works out the turns it can play, how it scores them and weighs the danger, and the limits that keep a fight going, so you can read its turn log and tune a profile.
The fight module doesn't follow a script of moves written for each class. Before each action, it looks at the fight as it is, works out what the character can really do, plays whole turns out on a copy of the fight, and picks the one its profile scores best. This page explains how, so you can read the turn log and know which profile setting changes what.
What it knows
The module reads the fight from two sources.
The game's messages, the same ones the Dofus client reads: every fighter's team, cell, life, shield, AP, MP, characteristics, resistances, states and active effects, who is invisible, every spell's cooldown and how often it was cast, the glyphs and traps on the ground, the round and whose turn it is. The character's own spells, at their levels, come with the fight's start.
The game data of the bot's game version: what each spell costs, its range, its zone and its effects, which targets it touches, the monsters' spells at each grade, the weapon the character holds, and the fight map's cells and line of sight.
When a piece is missing, it estimates with less rather than stopping. An enemy whose spells the game data doesn't have is counted as hitting bare-handed, and a fight map it can't read is played as if every cell were open. A decision always comes out.
It doesn't know what it can't see either: a fighter that is invisible is never aimed at until the game shows it again.
What the character can do
For each cell the character can walk to, the module works out the walk's cost: the MP of the path, and the AP and MP the enemies next to it would take when it leaves their side (tackle), with the game's own formula. A cell it would be stopped on is out of reach.
From each of those cells, it checks every spell and the weapon the way the game does: AP, range with the character's range bonus, the effects that change a spell's range and the spell bonuses of its equipment, line of sight, casting in a line or a diagonal, cooldowns, casts per turn and per target, the states a spell needs or forbids, the free cell a spell needs, and the summon limit.
For each cast it can make, it works out what happens on every fighter in the spell's zone: damage with its rolls and the spell's bonuses, the caster's characteristics and the target's resistances, critical hits by their chance, erosion and shields, heals, pushes and the damage of hitting an obstacle, AP and MP taken, states, summons, and the spells an effect casts in turn. These are the rules the Dofus client uses to preview a spell, so the module and your client agree on what a cast does.
The danger
Before choosing, the module works out how dangerous each cell would be at the end of the turn: how much the enemies could deal the character there on their next turn. It takes the worst case. Each enemy is counted from every cell it can walk to, with every spell it will have off cooldown by then, as many casts as its AP allows, the most damage per AP first.
The glyphs on the map count too, as the game plays them: a glyph acts on a fighter whose turn ends in it, and on one whose turn starts in it, before it can move. So a cell in a glyph that would hurt the character is as dangerous as what the glyph would deal it.
The profile's Risk turns that into a limit:
Risk Where the module avoids ending a turn 0 to 99 Where the enemies could kill the character, and where they could deal it more than risk percent of its life. At 50, the default: more than half its life. 100 Nowhere: the character fights as if danger didn't exist. The danger beyond that limit counts against a turn as safety. Killing an enemy removes its share of the danger, so a turn that kills a threat before stepping in front of it is worth more than one that doesn't.
Planning a turn
The module plays turns out on copies of the fight: walk, cast, cast again, walk, end the turn. Each action is played with its expected result, so a push really moves the target, a kill really removes the enemy, and the next cast sees it.
Traps play as in the game: a fighter that walks or is pushed into one sets it off, its spell plays, and its walk or push stops there. So the module never walks into a trap that would hurt the character, and it counts pushing an enemy into a trap of its side.
It doesn't try every possible turn, there are far too many. At each step it keeps the 6 best turns started so far, extends each with the best next actions, and goes up to 5 actions deep, within 2000 actions per decision. Then it plays only the first action of the best turn, waits for the server's answer, and decides again from the fight as it now is. The rest of the turn it chose is always among what it weighs then, so deciding again can find a better turn but never loses a good one. A spell that rolled low, a dodge or a push that went differently doesn't throw the rest of the turn off.
The work is bounded by these counts, never by time. The same fight and the same profile give the same decision on a slow PC and a fast one, and a decision takes a few milliseconds to a second, up to a few seconds for a high-level summoner weighing what each of its summons would do, depending on the character's spells. The module thinks while it waits before playing, so this rarely slows the fight.
How a turn is scored
A turn's score adds up what it does, each part weighted by the profile:
Term What counts Damage The damage dealt, expected: critical hits counted by their chance, capped at what the target has left in life and shield. Kill An enemy killed: half its maximum life, plus the danger it no longer poses. Heal Life healed, up to what is missing. Control Enemies hindered: AP and MP taken, characteristics lowered, pushed, put in a state. Buff Lasting help to its side: a buff or a shield on an ally, or on the character when it outlasts its turn. A buff that only lasts the character's own turn counts for what it lets the character do in that turn, so it's cast when it enables something. Summon A creature summoned: what its own next turn can do, which comes right after the character's. That's its best cast from where it lands or a cell it can walk to, with its own spells, counted at half. Only that one turn counts, since the enemies may kill it next: a summon that can't do much next turn is worth little, and hitting the enemy wins. Safety Minus the danger left beyond what the risk accepts. Position How well the cell the turn ends on suits the profile: its distance from the enemies, out of their sight to hide. Unused AP Minus the AP left over, or spent on casts that did nothing. Harm to allies Minus the damage and hindering done to its own side. Traps and glyphs What the traps and glyphs the turn lays will do to the enemies: a glyph's effect on the enemies standing in it, as their turn starts, or half of it for a glyph acting as their turn ends, since they may walk out first; a trap's effect on the enemy that can walk into it on its way to the character, at half, since whether it does is the monster's choice. A summon counts for half of a fighter of its kind, in every term: it dies with its summoner, so killing the summoner is often worth more.
The role sets the weights, and a profile can change any of them with Weights:
Role Damage and kill Heal Control Buff Summon Safety, position, unused AP, traps and glyphs Harm to allies Damage 1 0.5 1 1 1 1 5 Tank 1 0.5 1.5 1 1 1 5 Support 0.7 1 2 2 1 1 5 Healer 0.5 2 1 1.5 1 1 5 The profile then shifts single casts and targets:
Setting Effect on the score A spell's Use Prefer ×1.5, Avoid ×0.5, Never: never cast. The weapon's Use does the same for weapon hits. Elements A cast of a favoured element ×1.2. Focus, a monster's Focus, a focus rule Hitting the focused enemy ×2. A monster set to Last ×0.5, to Ignore ×0: hitting it counts nothing. Several focuses on one enemy multiply. Where the turn ends
Once nothing is left worth casting, the turn ends where the profile wants the character to stand:
Range sets the distance it fights at. Melee is in contact, Long range the reach of its longest damaging spell, Mid range half of it. Automatic, the default, reads the character's damaging spells: when most of them reach 2 cells or less it plays melee, from 6 cells long range, mid range in between. Positioning sets how it gets there: keep that distance, charge, hold, kite or hide. Profile settings describes each. A monster's Keep away and the movement rules (Retreat, Approach, Keep distance) add their own goal. Through all of it, the danger limit holds: the module doesn't walk where the character can be killed when another cell does almost as well.
Placement
Before the fight, with Placement set to Automatic and the character's spells known, the module scores each starting cell of its team the way it scores a turn: it plans the first turn from there, and takes away the danger beyond the risk, should the monsters play first. With Close, it picks the cell nearest the enemies, and with Far the farthest from them. Before it knows the character's spells, Automatic goes by range: close for melee, far for long range, 4 cells from the nearest enemy otherwise. The character's spells are known from its previous fight, so only the first fight after Asterobot starts is placed that way.
Limits that keep a fight going
One action at a time. The module sends an action, then waits for the server's answer before deciding the next. It never sends an action twice. 3 seconds without an answer means the server didn't take the action. The module drops that spell, or walks from that cell, for the rest of the turn, and decides again without it. The turn log marks it Not answered. 30 actions per turn at most, after which the turn ends. 2 seconds of margin. Its last decision goes out at least 2 seconds before the turn's time runs out, so a rule's delay never costs the turn. Always an action. When nothing is worth doing, it ends the turn. What it doesn't weigh yet
Walls, portals, runes, and the glyph-auras that follow their caster: they count as nothing. Nor does the danger count the traps and glyphs the enemies could lay on their next turn. The spells of an enemy's summons: the module doesn't know which monster a summon is yet, so it counts them as hitting bare-handed. Challenges. See Coming soon. Lire cette page en français
  • 45 vues
Make, copy, import, export, edit and delete the fight profiles your bots play, on the Fight Profiles page, with the default profile, Idle, the profiles packages ship and profiles that extend another.
A fight profile tells the fight module how a bot plays: the role the character takes, the distance it fights at, which spells it prefers, which monsters it hits first, what it does when its life runs low. Each bot plays one profile, chosen on its Fight tab (The fight module), and one profile can serve as many bots as you like.
You don't need a profile to start. The default profile adapts to any character on its own, and a profile only needs the settings you want to change. A few lines, such as a role, a range and elements, already make a profile that adapts to any character of that kind; everything else is for making it yours.
Where profiles come from
Profile What it is Can you change it? The default profile Every setting at its default. It isn't in the list: a bot plays it when its Profile is empty. No: it's what every setting falls back to. Idle, Built-in Takes part in the fight and passes every turn after 5 seconds. Every part off, one rule. No. Copy it to change the delay or switch parts back on. Yours Profiles you made, copied or imported. Each is a file in Asterobot's data folder. Yes. A package's, Package Shipped by a package you installed, named after it, such as @some-author:fighters/fire-cra. No. Copy it to change it. @asterobot:base, Asterobot's official package, ships 24 profiles ready to play: see Ready-made profiles in base.
The Fight Profiles page
Open Fight Profiles in Asteroboard's menu. The page lists every profile: Idle first, then yours by name, then those of your packages.
Column What it shows Name The profile's name, the one a bot's Profile list shows. Source Yours, Built-in or Package. Status Ready, Can't be played when it has an error, or how many warnings it has. Hover over it to read them. The filter above the table finds a profile by name. Each row has a menu:
Item What it does Edit Opens your profile in the editor. View for Idle and a package's, which open read-only. Copy Saves a copy under a name of your own, then opens it in the editor. Export Downloads the profile as a .json file. Delete Deletes one of your profiles, after asking. Idle and a package's can't be deleted. The page stays current on its own when a profile is saved, imported or deleted, and when a package is installed or removed.
Make a profile
Click New profile. Type a Name, then click Create. The editor opens on the new profile. Every setting starts at its default, so it plays like a bot with no profile until you change something.
A name is also the profile's file name: it can't be empty, start with @, or contain a / or a character a file name can't hold. The dialog then shows fightprofiles: a profile's name can't be empty, start with @, or hold / or a character a file name can't. A name another profile has gives fightprofiles: a profile already has this name.
Copy a profile
Copy in a row's menu, or in the editor, opens a dialog with the name filled in as the original's followed by copy. Change it if you like, then click Copy. The copy is yours, with every setting the original had.
Copying is how you change Idle or a package's profile: the copy is a profile of yours that you can edit. To keep following a package's profile as it's updated while changing a few settings, extend it instead (see Extend another profile).
Share profiles
Export downloads the profile exactly as it's stored, as a file named after the profile, such as fire-cra.json. Characters other than letters, digits, ., - and _ become - in the file name.
To use a profile someone shared:
Click Import. Pick the file under Profile file, or paste the JSON under Profile JSON. Picking a file fills in the text, so what you see is what's imported. Click Import. The profile joins yours under the name it carries. When you already have a profile with that name, the dialog asks "You already have a profile named ... Replace it with this one?", and Replace it overwrites yours. Text that isn't JSON gives "This isn't valid JSON:" with the reason, and JSON that isn't an object gives "A profile is a JSON object." A profile Asterobot can't accept is refused with the reason, as when you save it.
A profile names spells, monsters and states by their game ids, which are the same for everyone playing the same game version, so a shared profile plays the same on another Asterobot.
Delete a profile
Delete asks first: "... will be deleted for good. Bots set to it will play the default profile." Bots set to it keep its name and play the default profile until you give them another one.
The editor
The editor shows the profile twice: the form on the left, section by section, and its JSON on the right. Both are live. A change in the form shows in the JSON at once, and JSON you type fills the form as soon as it reads as a profile.
The sections are General, Archetype, Play, Spells, Opening, Monsters, Rules and Weights. Profile settings describes every field, and Rules and conditions the rules.
Empty means default. A field you leave empty shows Default, or Inherited: with the value the extended profile gives it. The reset button next to a field you set empties it again. Picking spells. Spells are chosen in Choose a spell: pick a class to list its spells, each beside its variant, with their AP cost, range and icon, followed by the spells of the summons those spells bring and the spells every class can learn. Type to filter them, or to search every other spell of the game by name. Picking monsters, races and states. Type a few letters of the name, in the game's language, and pick it in the list. Monsters and states show their icon. Saving. Save is greyed out until something changes. Leaving the page with unsaved changes asks "Leave without saving your changes?" first. Renaming. Changing the Name in General and saving renames the profile: every bot playing it, and every profile of yours extending it, follows the new name. What the form doesn't show. Some settings are written in the JSON only, such as an opening spell aimed at a target or a fighter targeted by its id in a rule. The form shows them as they're written and keeps them. Settings it doesn't know, written for a newer Asterobot, are kept too. Names and icons come from the game data of the game version your Asterobot is made for, or of the newest version you extracted when that one isn't, in the language you use Asteroboard in. Icons appear once that version's game data has been extracted with them: after updating Asterobot, extract it again on the Game Manager page (Extract game data).
Errors and warnings
When you save, Asterobot checks the profile. A value it can't use stops the save, and the editor shows the reason with the field it's about, such as:
fight: malformed profile: spells[0].use: "sometimes" is not one of prefer, normal, avoid, never The field is written the way the JSON is: spells[0] is the first entry of Spells. Fix it in the form or the JSON, and save again.
Other things don't stop it from playing, and show as warnings above the form, under Worth knowing:
Warning What it means spell 12345: not in the game data, ignored An id the newest game version you installed doesn't have. The same for monster, monster race and state. rules[0].when.self.something: no such subject: never holds A condition that this Asterobot doesn't know. It never holds. weights.something: no such scoring term: ignored A weight with an unknown name. version: 2 is newer than this module's 1: what it adds is ignored A profile written for a newer Asterobot. extends: no profile has this name: its own fields play over the default profile The profile it extends is gone. name: "...", but its file is "....json": it plays as "..." A file renamed by hand: the file's name wins. A profile that can't be played at all, such as a file that isn't JSON or one whose extends itself extends another profile, shows Can't be played as it is with the reason. A bot set to it plays the default profile.
Extend another profile
Extends, in General, makes a profile start from another one: it takes every setting of that profile, and changes only the ones it sets itself. It's the way to follow a package's profile, or one of your own, and keep a few changes on top:
What the profile sets What it plays A setting such as Role or Risk Its own value, instead of the extended profile's. An object, such as Parts Field by field: the fields it sets replace the extended profile's, the others stay. Spells and Monsters The extended profile's entries, then its own. An entry for a spell or a monster the extended profile already has replaces that entry. Rules The extended profile's rules, then its own. Weights The extended profile's weights, with its own replacing them by name. The editor shows the inherited values greyed out in each field, and the inherited entries of a list folded above it ("... inherited entries").
When the extended profile changes, for example because its package was updated, every profile extending it follows. When it's gone, the profile plays its own settings over the default profile and says so in a warning. You can extend Idle, one of your profiles or a package's, but only one level deep: extending a profile that extends another one is refused with extends: "..." extends another profile, and one level is all.
Profiles from packages
A package can ship fight profiles alongside its script. Once the package is installed, its profiles show on the page with the Package source, named <package>/<name>, and any bot can play them, whether or not it plays that package.
Question Answer Which version plays? The newest version of the package installed, for every bot. To keep a profile as it is whatever the package's updates do, copy it into your own profiles with Copy. What happens when the package is updated? Its profiles are updated with it, and the profiles extending them follow. And when it's removed? Bots set to one of its profiles play the default profile, and their console says why. Package authors will find how to ship profiles in Ship fight profiles.
Ready-made profiles in base
@asterobot:base, Asterobot's official package, ships 24 profiles ready to play. Asterobot installs it by itself and keeps it up to date, so they're on the page and in every bot's Profile list (see Base updates by itself). None of them names a spell, so each plays any class at any level, with the character's own spells and weapon. What a profile doesn't set stays the default profile's: one whose purpose isn't a role leaves the role to the class, so a Feca still supports and an Eniripsa still heals. View shows what each one sets.
Profile How it fights @asterobot:base/careful Never ends a turn where the enemies can hurt it badly, and hides once its life is low @asterobot:base/all-in Deals as much damage as it can and ignores the danger, death included @asterobot:base/melee-charge Starts close, closes in on the nearest enemy and hits in contact @asterobot:base/ranged-kite Starts far, hits from afar, then steps out of the enemies' reach @asterobot:base/ranged-hide Starts far, hits from afar, then ends its turn out of the enemies' sight @asterobot:base/hold-position Moves only to reach a cast, so the enemies beside it stay locked @asterobot:base/finish-the-weakest Kills the enemy with the least life left first @asterobot:base/kill-the-most-dangerous Kills first the enemy that can hurt it the most where it stands @asterobot:base/healer Heals the weakest ally first, then itself, and hits when nobody needs healing @asterobot:base/bodyguard Keeps its allies safe: shields and boosts the weakest, and stands where it shelters them @asterobot:base/support Weakens the enemies and boosts its allies before hitting @asterobot:base/tank Goes in front, takes the hits for the team and locks the enemies in contact @asterobot:base/crowd-control Pushes the enemies, takes their AP and MP and puts them in states before hitting them @asterobot:base/summoner Summons whenever it can and stays behind its summons, out of the enemies' sight @asterobot:base/trapper Lays traps and glyphs where the enemies will walk, then keeps out of their reach @asterobot:base/earth-strength Prefers its earth spells, for a strength build @asterobot:base/fire-intelligence Prefers its fire spells, for an intelligence build @asterobot:base/water-chance Prefers its water spells, for a chance build @asterobot:base/air-agility Prefers its air spells, for an agility build @asterobot:base/weapon-fighter Hits with its weapon whenever it can, in contact @asterobot:base/spells-only Never hits with the weapon or bare hands: its AP go to its spells @asterobot:base/team-player Never hurts an ally with its areas, and heals and boosts its allies whenever it helps @asterobot:base/carried A low level in a strong group: starts far, stays out of danger and sight, and hits only when it's safe @asterobot:base/boss-fight For bosses and dungeons: careful, kills the most dangerous enemy first and keeps the group safe To change one, copy it into your own profiles, or make a profile that extends it and sets only what differs, so it keeps following base's updates (Extend another profile). Their names don't change from one version of base to the next, so a bot set to one keeps it.
Profile files
Your profiles are files in the fightprofiles folder of Asterobot's data folder (Files and folders), one <name>.json file each, in the same JSON the editor shows.
Asterobot reads a profile's file each time it's used, so you can also edit them by hand: a change plays from the next fight, and shows on the page the next time it loads. A file that isn't a readable profile is listed with its error. Copying a .json file into the folder is the same as importing it.
Next, Profile settings describes every setting of a profile.
Lire cette page en français
  • 36 vues
Every setting of a fight profile, section by section as the editor shows them, with its JSON key, its values, its default and what it changes in a fight.
This page describes every setting of a fight profile, in the order of the editor's sections. Each one gives the form's label, the key it has in the profile's JSON, its values and its default. A setting you leave out plays its default, so a profile only needs the settings you want to change. Rules have their own page: Rules and conditions.
A short profile already makes a full one:
{ "version": 1, "name": "Air Cra", "role": "damage", "range": "ranged", "elements": ["air"], "positioning": "kite" } How the module decides explains what the module does with these settings, and Profile examples shows whole profiles for common cases.
General
Setting JSON Values Default Name name Text. Required. Description description Text, for you and the people you share it with. Empty Extends extends The name of another profile: Idle, one of yours or a package's. None version 1, the version of the profile format. Only in the JSON. 1 Extend another profile explains Extends.
Archetype
Role
role: what the character is for in a fight. It sets the weight of each part of a turn's score (How a turn is scored).
Value JSON Plays Damage damage Hits first. Tank tank Hits, and hinders the enemies more. Support support Hinders the enemies and helps its side first, hits less. Healer healer Heals first, helps its side, hits least. Empty, the default, takes the role the game ranks first for the character's class: Damage Dealer, Positioner and Summoner play Damage, Tank plays Tank, Healer plays Healer, and Protector, Buffer and Debuffer play Support. When the class isn't known, Damage.
Range
range: the distance the character fights at, and where it's placed when its spells aren't known yet.
Value JSON Distance from the nearest enemy Automatic auto From the reach of its damaging spells, the weapon left out: when most of them reach 2 cells or less, melee; from 6 cells, long range; otherwise mid range. Without spells, mid range. Melee melee In contact. Mid range mid Half the reach of its longest damaging spell. Long range ranged The reach of its longest damaging spell. Default: Automatic. The reach counts the character's range bonus and the spells' range changes.
Elements
elements: the elements whose spells it favours, among Earth (earth), Fire (fire), Water (water), Air (air) and Neutral (neutral). A damaging spell of one of them scores 1.2 times as much. Empty, the default, favours none: the module casts whatever hits hardest with the character's real characteristics, which follows its build and gear.
Risk
risk: how much danger the character accepts, from 0 (careful) to 100 (reckless). Default: 50. The module avoids ending a turn where the enemies could deal it more than this percent of its life on their next turn, and where they could kill it, unless the risk is 100. The danger explains how that danger is worked out.
Placement
placement: where the character starts the fight.
Value JSON Starting cell Automatic auto The one its first turn would go best from, less the danger there beyond its risk. Before its spells are known, by range: close for melee, far for long range, 4 cells from the nearest enemy otherwise. Close close The one nearest the enemies. Far far The one farthest from the enemies. Default: Automatic. The module only places the character when the Placement part is on (see Play).
Positioning
positioning: where the character ends its turn, once nothing is left worth casting.
Value JSON Ends its turns Automatic auto At its range's distance, never where it can be killed when it can help it, nor beyond the danger its risk accepts. Charge charge In contact with the enemy, whatever the danger. Hold hold Where it stands: it only walks to reach a cast. Kite kite Once it has cast this turn, where the danger is least, then as far from the enemies as it can. Before that, it closes in as Automatic does. Hide hide As Kite, preferring a cell no enemy can see, behind a wall or a fighter, when the danger there is as low. Default: Automatic.
Focus
focus: which enemy it hits first. Hitting that enemy scores twice as much.
Value JSON Hits first Best score auto No one in particular: whatever scores best. Lowest life lowestLife The enemy with the least life left. Closest closest The enemy nearest the character. Most dangerous mostDangerous The enemy that could deal the character the most where it stands. Default: Best score. Monsters and rules can add their own focus: see Monsters and Rules and conditions.
Allies
allies: how it treats the other fighters of its team, characters and summons.
Value JSON Treats them Ignore ignore Only avoids hurting them: healing or buffing them counts nothing. Help help Heals and buffs them when it's worth it, and avoids hurting them. Protect protect As Help, and the danger they're in counts as much as its own, so it prefers turns that leave them safer: killing or hindering what threatens them first. Default: Help. Hurting its own side always counts against a turn, by default five times as much as hurting an enemy counts for it, whatever this says.
Play
Parts
parts: the parts of a fight the module decides. Each is on unless the profile switches it off.
Part JSON When it's off Placement parts.placement The module doesn't move the character before the fight. On a relayed session, you place it yourself. Ready parts.ready The module doesn't say the character is ready: you do on a relayed session, otherwise the fight starts when the placement countdown ends. Moving parts.movement The character never walks in its turns: it casts from where it stands. parts.challenges Only in the JSON. The module doesn't choose challenges yet, whatever it says. The turns themselves are always played: to leave them to someone else, switch the module off, or pass every turn with the setting below.
Pass every turn
Pass every turn after (seconds): when checked, the character ends every turn after that many seconds, without acting. It's a rule without a condition, { "do": { "endTurn": { "after": 5 } } }, which the form shows here rather than among the rules. Idle is exactly that, with every part off.
Weapon
weapon: what it does with the weapon it holds, or with bare hands when it holds none.
Setting JSON Values Default Weapon weapon.use Prefer (prefer), Normal (normal), Avoid (avoid), Never (never), as for a spell (see Spells) Normal Weapon hits per turn weapon.maxPerTurn A number, 0 for no limit but the weapon's own 0 Wait for allies
waitForAllies: how many other characters must be on the character's team before it says it's ready. Default: 0. It's for group fights where several bots join one after the other: the character waits for the others, and the placement countdown still starts the fight when it ends.
Spells
spells: what the profile says about some spells. A spell not listed is used normally, so only list the spells you want to change. Listing a spell the character doesn't have does nothing. The entries apply to the spells of a summon the character controls too: list a fairy's spell to change how the fairy uses it.
Setting JSON Values Default Spell id A spell, picked in Choose a spell. Required. Use use Prefer (prefer, scores 1.5 times as much), Normal (normal), Avoid (avoid, half as much), Never (never, never cast) Normal Per turn at most maxPerTurn A number, 0 for no limit but the spell's own 0 Cast on target Anyone (any), Enemies (enemy), Allies (ally), Self (self): who the spell may be aimed at Anyone Enemies hit at least minTargets A number: a cast must hit at least that many enemies 0 Only when when A condition the cast must meet: see Conditions Always A spell's condition can also test the fighter it's cast on, with Target · HP (target.life) and Target · Distance (target.distance). For example, an Iop's Chopper (13115), preferred but kept for enemies below a third of their life:
{ "id": 13115, "use": "prefer", "when": { "target.life": { "below": "33%" } } } The weapon isn't a spell entry: set it with Weapon in Play. An entry without a spell is refused with spells[0].id: required: the weapon is the profile's weapon.
Opening
opening: spells cast first in a turn, in order, whenever they can be cast. The module plays the rest of the turn as usual.
Setting JSON When First turn opening.firstTurn In the character's first turn of the fight, before Every turn's. Every turn opening.everyTurn In each of its turns. Each list holds spells in the order they're cast. A spell listed twice is cast twice. The opening is the character's alone: a summon it controls never plays it. A step that can't be cast right now, for lack of AP, range or line of sight, is skipped, and the next one is tried.
In the JSON, a step is a spell's id, "weapon" for a weapon hit, or an object that also says whom to cast it on. For an Iop that casts Fervour (14676) on itself in its first turn, then opens every turn with Pressure (13106):
"opening": { "firstTurn": [{ "spell": 14676, "target": "self" }], "everyTurn": [13106] } The target takes the same values as a rule's: see Targets. The form edits plain lists of spells; a list with a step aimed at a target is edited in the JSON.
Monsters
monsters: what it does with some monsters, picked one by one (By monster) or by their race (By race).
Setting JSON Values Default Monster or Race id or race A monster, or a monster race. One of the two is required. Focus focus First (first): hitting it scores twice as much. Last (last): half as much. Ignore (ignore): hitting it counts nothing. Empty: as any other Keep away (cells) keepAway The fewest cells the character ends its turns from it 0 Never stand beside noMelee true: ends its turns at least 2 cells from it false An entry applies to every monster of the fight it matches. A monster that matches several entries, such as one by monster and one by its race, gets all of them: the focuses multiply, and the largest distance holds.
For a character that kills L'il Gloots (4109) first and keeps 3 cells away from every monster of the Incarnam Chafers race (137):
"monsters": [ { "id": 4109, "focus": "first" }, { "race": 137, "keepAway": 3 } ] Weights
weights: what each part of a turn's score is worth against the others. The role sets them (How a turn is scored has the table), and a weight set here replaces the role's. Each is a number, 0 or more.
Weight JSON What it weighs Damage damage Damage dealt. Kill kill An enemy killed. Heal heal Life healed. Control control Enemies hindered: AP, MP or characteristics lowered, pushed, put in a state. Buff buff Lasting help to its side. Summon summon A summon brought in. Safety safety Ending the turn out of danger. Position position Ending the turn at the profile's distance. Unused AP waste AP left unused. Harm to allies allyHarm Harm done to its own side. Default: 5. Traps and glyphs mark What the traps and glyphs it lays will do to the enemies. Weights are for fine tuning, after role, range, risk and the other settings. A weight of 0 switches a part off: "safety": 0 makes the character ignore the danger altogether. A name that isn't one of these is ignored, with a warning.
Challenges
Note
Coming soon. Profiles will say which challenges to choose and how hard to try for them. Until then, a challenges setting written in a profile is kept as it is and has no effect.
Next, Rules and conditions explains rules: what the character does when something happens in the fight.
Lire cette page en français
  • 42 vues
Make a fight profile react to the fight with rules: a condition such as low life or an enemy nearby, and an action such as retreating, healing, focusing a target or ending the turn, with every subject, test, action and target.
Rules make a profile react to what happens in the fight: retreat when the character's life runs low, heal an ally in trouble, hit a given monster first while it's there, keep away when enemies crowd in. Each rule is a condition and one action, and the Rules section of the editor lists them in order.
"rules": [ { "when": { "self.life": { "below": "30%" } }, "do": { "retreat": { "to": "outOfReach" } } }, { "when": { "ally.life": { "below": "40%" } }, "do": { "heal": { "target": "lowestLifeAlly" } } } ] How rules apply
Before each action of the character's turn, the module checks every rule's condition against the fight as it is at that moment, so a rule can start or stop applying in the middle of a turn. A rule without a condition applies all the time.
Rules apply in the turns of a summon the character controls too, the summon being the one who acts. There, the Character subjects read the summon, and Self names it: Pass every turn passes its turns as well.
Rules come in two kinds.
Modifiers change how the module scores a turn, and add up:
every Focus and Avoid whose condition holds applies; of the movement rules, Retreat, Approach and Keep distance, only the first one whose condition holds applies. Forcing actions tell the character what to do next: Cast, Attack, Heal, Buff and End the turn. The opening's spells come first, then these rules, in their order. The first one that can be played right now becomes the character's next action, and the module plays the rest of the turn freely. One that can't be played, for lack of AP, of a target in range or of the target itself, is passed over.
So order matters for forcing actions: put the most urgent first. A rule like "heal when an ally is low" placed above "attack the lowest life enemy" heals first whenever both apply.
Actions
Action JSON Settings What it does Cast cast spell: a spell, or "weapon" (Weapon or bare hands in the editor), required. target: optional. Casts this spell first, on the target when one is set, otherwise wherever it does the most. Attack attack target: optional Attacks first, with its best damaging spell or the weapon, on the target when one is set. Heal heal target: optional Heals first, the target when one is set. Buff buff target: optional Casts a buff first, on the target when one is set. Retreat retreat to: Cover (cover) or Out of reach (outOfReach) Ends its turns away from danger: Cover, out of every enemy's sight when it can, as Hide positioning does; Out of reach, where the danger is least, as Kite does. Approach approach target: optional Ends its turns close to the target, or to the nearest enemy when none is set. Keep distance keepDistance min and max: cells Ends its turns between min and max cells from the nearest enemy. max 0 means no upper limit. Focus focus target Hitting the target scores twice as much. Avoid avoid spell: a spell, or "weapon" (Weapon or bare hands in the editor). target: optional. Doesn't cast that spell, and hitting the target counts nothing, while the rule applies. End the turn endTurn after: seconds, default 0 Ends the turn without acting, once that many seconds have passed since it began. End the turn is a forcing action like the others: when it's the first one that can be played, the character does nothing else in that turn. Its delay never costs the turn: the module ends it at least 2 seconds before the turn's time runs out, whatever after says. A rule with no condition that ends the turn is what Pass every turn after (seconds) writes in Play.
Targets
A rule's target names one fighter, worked out again at each decision.
Target JSON The fighter Anyone Left out No one in particular: the module chooses. Self "self" The character. Lowest life enemy "lowestLifeEnemy" The enemy with the least life left. Lowest life ally "lowestLifeAlly" The ally with the least life left, the character not counted. Closest enemy "closestEnemy" The enemy nearest the character. Most dangerous enemy "mostDangerousEnemy" The enemy that could deal the character the most where it stands. A monster { "monster": 4109 } An enemy of that monster. A race { "race": 137 } An enemy of that monster race. { "fighter": -2 } Only in the JSON: one fighter of the fight, by the id the game gives it. Mostly for scripts. When two fighters tie, the one with the lowest id is taken. A target that isn't in the fight, such as a monster that isn't there or that died, makes a forcing rule pass over itself.
Conditions
A condition holds when every test in it holds. In the editor, Only when opens the condition, Test adds a test, and All of, Any of and Not add a group.
Subjects
Each test reads one subject of the fight. The editor names it as whose and what, such as Character · HP.
Subject JSON Tests Reads Character · HP self.life below, above The character's life, as a number or a percent of its maximum. Character · Shield self.shield below, above Its shield points, as a number or a percent of its maximum life. Character · AP self.ap below, above Its AP left. Character · MP self.mp below, above Its MP left. Character · States self.state is Whether it is in that state. Enemies · States enemy.state is Whether an enemy is in that state. Allies · States ally.state is Whether an ally is in that state, the character not counted. Allies · HP ally.life below, above Whether an ally's life is in that range, the character not counted. Enemies · Number enemies.count is, atLeast, atMost How many enemies are alive, summons included. Allies · Number allies.count is, atLeast, atMost How many allies are alive, summons included, the character not counted. Enemies · Nearby enemies.within cells, then atLeast, atMost How many enemies stand within cells cells of the character. Allies · Nearby allies.within cells, then atLeast, atMost How many allies stand within cells cells of the character. Enemies · Monster enemy.monster is Whether that monster is among the living enemies. Enemies · Race enemy.race is Whether a monster of that race is among the living enemies. Fight · Round fight.round is, atLeast, atMost The fight's round. Fight · Turns fight.turn is, atLeast, atMost How many turns the character, or the summon whose turn it is, has played in this fight, the current one included. Target · HP target.life below, above In a spell's condition only: the life of the fighter the spell is cast on. Target · Distance target.distance below, above In a spell's condition only: how many cells away that fighter is. Each subject takes only the tests of its row. A test it doesn't take, such as below on Enemies · Count, a percent on Character · AP, Character · MP or Target · Distance, or Nearby without Within (cells), is refused when you save, naming it.
A subject this Asterobot doesn't know never holds, and the profile shows a warning for it. So do the Target subjects outside a spell's condition.
Tests
Test JSON Holds when Below below The value is strictly less. A number, or a percent written as text, such as "30%". Above above The value is strictly more. A number or a percent. Is is The value is exactly this, or for states, monsters and races, this one is there. At least atLeast The count is this or more. At most atMost The count is this or less. Within (cells) cells For Nearby: the distance counted, in cells. A test with several bounds needs all of them: { "below": "60%", "above": "20%" } holds between a fifth and three fifths of the character's life.
Groups
Group JSON Holds when All of these all Every condition in its list holds. Any of these any At least one condition in its list holds. Not this not Its condition doesn't hold. Groups go inside a condition and can hold groups of their own. This condition holds in the first two rounds, or when an enemy is in the Weakened state (a state's id, picked by name in the editor), as long as fewer than 3 enemies stand within 2 cells:
"when": { "any": [ { "fight.round": { "atMost": 2 } }, { "enemy.state": { "is": 42 } } ], "not": { "enemies.within": { "cells": 2, "atLeast": 3 } } } Examples
End the turns where the danger is least while the character's life is below 30%:
{ "when": { "self.life": { "below": "30%" } }, "do": { "retreat": { "to": "outOfReach" } } } Keep a healer's allies alive first:
{ "when": { "ally.life": { "below": "40%" } }, "do": { "heal": { "target": "lowestLifeAlly" } } } Don't let enemies surround the character:
{ "when": { "enemies.within": { "cells": 1, "atLeast": 2 } }, "do": { "keepDistance": { "min": 2 } } } Hit the L'il Gloot first while it's in the fight:
{ "when": { "enemy.monster": { "is": 4109 } }, "do": { "focus": { "target": { "monster": 4109 } } } } Keep the weapon for the end of the turn: no weapon hit while the character still has more than 4 AP:
{ "when": { "self.ap": { "above": 4 } }, "do": { "avoid": { "spell": "weapon" } } } Wait 10 seconds and pass from round 30 on, to let a long fight run out:
{ "when": { "fight.round": { "atLeast": 30 } }, "do": { "endTurn": { "after": 10 } } } Profile examples puts rules together with the other settings in whole profiles.
Lire cette page en français
  • 37 vues
Whole fight profiles for common cases, a ranged Cra, a melee Iop, an Eniripsa healer, a careful farmer, a group and a tweaked package profile, each explained setting by setting.
These profiles show how the settings work together. Copy one into Import on the Fight Profiles page (Share profiles), then change what you like in the editor. The ids are those of the game data: the editor shows their names.
Start small. A profile with a role, a range and elements already plays well for any character of that kind, and every setting you add should answer something you saw go wrong in the turn log.
A ranged Cra
{ "version": 1, "name": "Air Cra", "description": "Hits from afar, steps back after casting, opens with Distant Shots.", "role": "damage", "range": "ranged", "elements": ["air"], "placement": "far", "positioning": "kite", "focus": "lowestLife", "opening": { "firstTurn": [{ "spell": 32465, "target": "self" }] }, "rules": [ { "when": { "enemies.within": { "cells": 2, "atLeast": 1 } }, "do": { "retreat": { "to": "outOfReach" } } } ] } Range ranged and Placement far keep the Cra at the reach of its longest damaging spell, from the start. Positioning kite: once it has cast, it ends the turn where the danger is least. Focus lowestLife finishes enemies first, which removes their danger sooner. The opening casts Distant Shots (32465) on itself in its first turn, for the extra range of its spells. The rule makes it step out of reach as soon as an enemy stands within 2 cells. A melee Iop
{ "version": 1, "name": "Earth Iop", "role": "damage", "range": "melee", "elements": ["earth"], "risk": 70, "positioning": "charge", "opening": { "firstTurn": [{ "spell": 14676, "target": "self" }] }, "spells": [ { "id": 13107, "use": "avoid" } ] } Range melee and Positioning charge bring it into contact, whatever the danger. Risk 70 lets it end turns where the enemies could take up to 70% of its life. The opening casts Fervour (14676) on itself in its first turn. Jump (13107) is set to Avoid: its score is halved, so it's only cast when it clearly beats everything else. An Eniripsa healer
{ "version": 1, "name": "Eniripsa healer", "role": "healer", "allies": "protect", "positioning": "hold", "rules": [ { "when": { "ally.life": { "below": "50%" } }, "do": { "heal": { "target": "lowestLifeAlly" } } }, { "when": { "self.life": { "below": "35%" } }, "do": { "heal": { "target": "self" } } } ] } Role healer weighs healing at 2 and damage at 0.5, where the Damage role weighs them at 0.5 and 1. Allies protect counts the danger its allies are in as its own. Positioning hold keeps it where it stands unless a cast needs it to walk. The first rule heals the most hurt ally whenever one is below half its life. The second, below it, heals the Eniripsa itself: the ally comes first when both apply. A healer without allies to heal still fights: with no one hurt, healing counts nothing, and it hits like any other role, at half weight.
A careful farmer
For a character farming monsters that can kill it, which should take no chances:
{ "version": 1, "name": "Careful", "risk": 20, "focus": "mostDangerous", "rules": [ { "when": { "self.life": { "below": "40%" } }, "do": { "retreat": { "to": "cover" } } } ], "monsters": [ { "race": 137, "noMelee": true } ] } Risk 20: it avoids ending a turn where the enemies could take more than a fifth of its life. Focus mostDangerous hits first the enemy that could hurt it the most. Below 40% of its life, it ends its turns out of the enemies' sight when it can. It never ends a turn beside a monster of the Incarnam Chafers race (137). Role, range and elements are left out: the module takes them from the character's class and spells, so this profile suits any class.
A group of bots
For several bots fighting together, which join the same fight one after the other:
{ "version": 1, "name": "Group", "waitForAllies": 3, "allies": "protect" } Each bot waits until 3 other characters are on its team before saying it's ready, so the fight doesn't start before the group is complete. The placement countdown still starts it when it runs out. Joining the fight is the job of the bots' packages.
Pass the turns, but place the character
Idle takes part in fights and does nothing. This copy of it also places the character and says it's ready, and passes after 2 seconds instead of 5:
{ "version": 1, "name": "Idle, placed", "parts": { "placement": true, "challenges": false, "ready": true, "movement": false }, "rules": [ { "do": { "endTurn": { "after": 2 } } } ] } A package's profile, tweaked
To play a profile a package ships while changing a few settings, extend it rather than copying it: when the package is updated, your profile follows.
{ "version": 1, "name": "Fire Cra, careful", "extends": "@some-author:fighters/fire-cra", "risk": 25, "spells": [ { "id": 32426, "use": "prefer" } ] } It plays everything the package's profile says, with a lower risk, and prefers Retreat Arrow (32426) on top of the package's own spell settings. Extend another profile explains how the two are put together.
Lire cette page en français
  • 38 vues
Why a bot does nothing in a fight or is disconnected during one, passes its turns, plays a profile you didn't pick, keeps refusing actions or ignores your clicks on a relayed session, and what to do about each.
When the fight module doesn't play the way you expect, two places tell you why. The bot's Console tab says when a fight starts, whether the module plays it, and every action it sends. The Turn log on the Fight tab keeps every decision of the last 10 fights, with what each one counted (The fight module).
The bot does nothing in a fight
Check, in order:
The module is off. The console says A fight started: the fight module is off and doesn't play it. Switch on Play this bot's fights on the bot's Fight tab. A switch made during a fight takes effect at the next turn. The bot doesn't play this kind of fight. The console says The bot doesn't play this kind of fight: the fight module leaves it to the game client or a script. By default the module plays fights against monsters alone: check the fight's kind under Fights it plays on the bot's Fight tab if you want it played (The fights it plays). The profile switches its parts off. Idle places nothing and passes every turn. Check Parts in the profile's Play section. The character is dead. A dead character has nothing left to decide: the module keeps answering the game until the fight ends. The bot is disconnected during a fight
On a Full socket bot, a fight the module doesn't play has nothing to play it but the package's script. The character stays idle, and after a few minutes the server disconnects it: the console says Game connection lost. It warns first, as the fight starts: Nothing plays this fight unless the bot's script does: the server disconnects a character left idle for a few minutes. The line just before it says why the module left the fight: check the first two causes of The bot does nothing in a fight.
The bot passes every turn after a few seconds
It plays Idle, or a profile with a rule that ends the turn. Idle passes every turn after 5 seconds. Pick another profile on the Fight tab, or leave Profile empty for the default profile. In your own profile, look for Pass every turn after (seconds) in Play, and for End the turn rules.
The bot plays the default profile instead of mine
The console says The fight profile can't be played: the default profile plays, with the reason. The profile was deleted, it has an error, or its package was removed. Open Fight Profiles: a profile marked Can't be played shows the reason when you hover over it, and the editor shows it above the form. Fix it and save, or pick another profile. The profile is read again at the next fight.
The console says The fight profile extends a missing profile: it plays its own fields over the default profile when the profile it extends is gone. Set Extends to an existing profile, or to None.
The bot never says it's ready
It waits for its group: Wait for allies in the profile's Play section asks for more characters on its team than have joined. The placement countdown still starts the fight when it runs out. Lower the number, or check that the other bots really join the same fight.
With the Ready part off, the module doesn't say it's ready at all: the countdown starts the fight.
Not answered keeps coming back
Not answered in the turn log means the server didn't take an action within 3 seconds. The module drops that spell, or walking from that cell, for the rest of the turn, and decides again without it, so a fight never gets stuck on it. The console says The server didn't answer the fight module's action: it decides again without it, or The server refused the fight module's action: it decides again without it when the game said no.
The module works out what's possible the way the game does, so a refusal means it misjudged something, most often the AP and MP an enemy takes when the character walks away from it. When the same action is refused again and again, note the fight in the turn log and tell the Asterobot team (Getting help).
My clicks do nothing during a fight
On a relayed session, while the module plays a fight, the clicks you make for what its profile decides are held back, and your game client shows "Asterobot's fight module is playing this fight, so the game doesn't take what you do here. Turn the module off to play from the next turn." Switch the module off on the Fight tab to play yourself from the next turn, or switch off the parts you want to keep in the profile, such as Placement.
A summon's turn runs out
A summon you control, such as an Eniripsa's fairy, has 15 seconds to play. The module plays its turns as soon as the server says the character controls it, which it does when the summon arrives. Its turn runs out when nobody plays it:
The module is off. On a relayed session, play the summon yourself in the game client. On a Full socket bot, nothing plays it. The character is dead. The module decides nothing more, for the character or its summons. The profile passes its turns. Rules apply in the summon's turns too: Idle, or Pass every turn after (seconds), passes them after their delay. The module plays badly
No game data. The console says The fight module couldn't read the game data: it plays on without it. Extract the bot's game version. A setting works against the character. A melee range on a ranged class, a low risk on a tank: the turn log shows what each decision counted. Compare with How the module decides, and change one setting at a time. A spell of the profile does nothing. The fight in the turn log lists, at its top, the profile's spells the character can't cast there: another class's, or a variant it didn't pick. Remove them, or pick the variant in the game. Turbo. It decides the same things as the other speeds, but answers faster than any real game client: see Speed. Names or icons are missing in the profile editor
The editor reads names and icons from the game data. Without an extracted game version, spells, monsters and states show as their ids. Icons appear once the game data has been extracted by an Asterobot that extracts them: after updating Asterobot, extract the game version again on Game Manager (Extract game data).
Lire cette page en français
  • 37 vues
Short answers about the fight module, fight profiles, playing fights yourself, Turbo, PvP, challenges, summons and Dofus updates.
How bots play their fights, and how to change the way they do.
Can a bot fight on its own?
Yes. Switch on Play this bot's fights on the bot's Fight tab, and the fight module places the character, says it's ready and plays every turn, in Full socket mode as in MITM mode. See The fight module.
Does the bot attack monsters by itself?
No. The fight module plays fights, it doesn't start them. Attacking a group is the job of the bot's package, or yours on a relayed session. Once the fight starts, the module takes over.
Do I need a fight profile?
No. With Profile left empty, the bot plays the default profile, which adapts to any character: the role its class plays first, the range its spells reach, the spells it really has. Make a profile when you want it to play differently. See Fight profiles.
Are there ready-made profiles?
Yes. @asterobot:base, Asterobot's official package, ships 24, such as @asterobot:base/careful, @asterobot:base/ranged-kite, @asterobot:base/healer or @asterobot:base/boss-fight. They play any class, and since Asterobot installs base by itself, every bot can pick them. See Ready-made profiles in base.
Does it work for every class?
Yes. The module has no move written for a class. It reads every spell, effect and monster from the game data and works out what the character can do, so a new class, a new spell or a rebalanced one plays without waiting for an Asterobot update, once the new game version is extracted. See How the module decides.
Can I play a fight myself on a relayed session?
Yes. Switch the module off on the Fight tab: you play from the next turn. To leave only some parts to yourself, such as placement, switch them off in the profile's Parts instead. While the module plays, your clicks for what it decides are held back, and the game client says so. See On a relayed session.
Is Turbo safe?
Turbo decides the same things as the other speeds, but answers at once after every cast, faster than any real game client. The server accepts it, but it's easy to notice. The same goes for a Custom speed with Answer the server at once on. Normal plays at the game client's pace. See Speed.
Can fights go faster?
Yes, with the Faster fights switches on the Fight tab, module on or off: Hurry the server has the server wait less between actions and turns, and on a relayed session Fewer animations cuts some of what your Dofus client plays. See Faster fights.
Does it play quest fights where an NPC fights beside me?
Yes. A quest fight is a fight against monsters, whoever fights beside the character, so the module plays it whenever Monsters is checked under Fights it plays, as it is by default. The NPC counts as an ally, like another character of its team. See The fights it plays.
Does it play duels and other fights against players?
Not by default: the module plays fights against monsters, and is off in any other fight. Check Aggressions, Duels, Kolossium or Perceptors and prisms under Fights it plays on the bot's Fight tab to have them played, and pick a Profile in PvP fights if they need another profile. The module doesn't know enemy characters' spells yet, so it takes more risks there. See The fights it plays.
Does it do challenges?
Not yet: the module doesn't choose challenges. On a relayed session, choosing them stays yours.
Why does my summon do nothing?
Summons that play on their own, such as the Osamodas's, play as usual. Summons you control, such as the Eniripsa's fairies, are played by the module along with the character, with the bot's profile and the summon's own spells. When one still does nothing, see Fight problems.
How do I share a profile?
Export it on the Fight Profiles page and send the .json file. The other person opens Import. A package can also ship profiles, which everyone who installs it gets. See Share profiles.
What happens to my profiles when Dofus updates?
Nothing: they name spells, monsters and states by their game ids, which updates keep. When an update removes something a profile names, the profile still plays and shows a warning such as spell 12345: not in the game data, ignored. Extract the new game version so the module knows the new rules.
Lire cette page en français
  • 39 vues
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.
Lire cette page en français
  • 18 vues

Compte

Navigation

Recherche

Recherche

Configurer les notifications push du navigateur

Chrome (Android)
  1. Appuyez sur l'icône de cadenas à côté de la barre d'adresse.
  2. Tap Autorisations → Notifications.
  3. Ajustez vos préférences.
Chrome (Desktop)
  1. Cliquez sur l'icône représentant un cadenas dans la barre d'adresse..
  2. Select Paramètres du site.
  3. Find Notifications et ajustez vos préférences.