The Send a game message panel of the Network tool builds one message from its fields and sends it on the bot's game connection, the same way a script's send() does. Use it to test: see how the server answers a request, or try a message before a script sends it.
Before you send
Caution
A message sent to the server comes from your character, exactly as if your Dofus client had sent it, and the server acts on it. A wrong message can move your character, spend kamas or destroy items, and there's no undo.
The bot must be Connected to game server. Only messages Asterobot can name can be sent.
Send a message
- On the bot's page, click Tools, then Send a game message in the Network tool.
- Under Direction, keep To the server or choose To the client. See the table below.
- Pick the message from the list, "Pick a request to send..." or "Pick an event to inject...". Type to search in it.
- Fill in the fields you need, and leave the others empty.
- Check the JSON under "This is what will be sent."
- Click Send followed by the message's name.
A notification with the message's name followed by "sent" confirms it went out. The panel shows no answer: to see how the server reacts, tick the messages you expect in Settings and watch Traffic. See Network traffic.
Direction
| Direction | Messages offered | What happens |
|---|---|---|
| To the server | Requests, whose names end in Request |
"Goes to Ankama as a request, exactly as the real client would have sent it." |
| To the client | Events, whose names end in Event |
The message is delivered as if the server had sent it. On a MITM bot, your Dofus client receives it and acts on it. On a Full socket bot there's no client: only the bot's own script receives it. |
Changing the direction empties the message you picked, since the two lists have no message in common. Responses can't be sent at all: a response answers one precise request.
Fields
When you pick a message, its fields appear, each labelled with its name and, under it, its type, such as int32, string · optional or message · repeated followed by the type of message it holds.
| Field type | Field in the panel | What to enter |
|---|---|---|
bool |
A checkbox | Tick it for true. |
| A list of named values | A dropdown | One of the names. |
int32, uint32, sint32, fixed32, sfixed32, float, double |
A number box | A number. |
int64 and the other 64-bit numbers |
A text box | A whole number. It's kept as text so that large ids aren't rounded. |
string, bytes and other single values |
A text box | The value. |
| Lists, and fields that hold another message | A JSON box, starting with [] or {} |
JSON. |
An empty field is left out of the message, and so is an unticked checkbox: the game then uses the field's default value. A message without fields says "This message has no fields to fill in."
When a value can't be used, the preview is replaced by the reason in red, and the send button stays greyed out:
| Reason, for example | What to fix |
|---|---|
mapId: abc is not a number |
Type a number in that field. |
characterId: 12.5 is not a whole number |
Type a whole number in that 64-bit field. |
| The field's name followed by a JSON error from your browser | Fix the JSON in that field. |
The Dofus protocol reference describes each message and its fields. Script authors can also read Finding messages and Sending.
When sending fails
The alert Couldn't send the message appears above the form with the reason:
| Reason | What it means |
|---|---|
bot has no game connection: "<bot>" |
The bot isn't connected to a game. Connect it and try again. |
Starts with message could not be built from the given payload: |
A value doesn't fit the message: a wrong type, an unknown value in a list, JSON of the wrong shape. The rest of the text says which. |
Starts with unknown game protocol message names: |
Asterobot doesn't know this message, for example after a game update. |
Starts with send, the message's name, and to server: or to client: |
The message couldn't be written on the connection, often because the connection closed a moment before. |
Starts with the game engine is not available: |
Asterobot couldn't load its list of game messages. |
The chat box of the Console tab and Destroy on the Inventory tab send their messages the same way, and fail with the same reasons.