Command actions
The actions that the website sends, with their arguments. Module 0.7.0 runs the first group. Rules and chat will send the planned actions in the same way.
Runs now
| Action | Arguments | What the module does |
|---|---|---|
reset_loot | none | starts the loot, supplies and time counters from zero |
toggle_cavebot | on: true or false | turns the cavebot on or off |
toggle_targetbot | on: true or false | turns the targeting on or off |
reset_here | none | points the cavebot at the nearest waypoint on the same floor |
capture | none | takes a screenshot now |
logout_in_pz | none | logs out when in a protection zone |
The bot actions run in the bot adapter, version 2. It works with the stock cavebot, vBot and presets that are based on them. reset_here does not start the cavebot.
Plans, module 0.8.0
| Action | Arguments | What the module does |
|---|---|---|
refill | none | at the next hunt label, jumps to refill |
go_depot | none | refills, then turns the cavebot off after the first step after city |
load_route | route | refills, then at city loads the route and starts it at its own city |
resume | none | for a parked character: turns the cavebot on at city |
cancel_plan | none | ends the running plan. The bot stays as it is. |
- The first 3 actions start a plan. The result comes at once. It says that the plan started, or why it did not.
- The bot adapter, version 5, runs the plans. It wraps the bot's
labelandgotosteps andCaveBot.gotoLabel. - The status field
planreports the plan:kind,state,step,message,since,untilandended. stateisrunning,done,stuck,cancelled,taken_overorfailed. An ended plan stays in the status for 2 minutes.- The website sets the status of the command from the plan. It is running while the plan waits, then done or failed.
Team exiva, module 0.9.0
| Action | Arguments | What the module does |
|---|---|---|
cast_exiva | target, run, by | casts exiva at once and answers later, with the game message |
exiva_show | target, x, y, zmin, zmax, radius, answers, area, casts, partial, first | shows the result as a game message |
cast_exivaneeds Team exiva on, half of the HP, mana for the spell, and 5 s since the last cast. On "You are exhausted." it casts again after 0.4 s, up to 5 times.- Its result comes when the game answers.
dataholdsx,y,z,band,dirandlevel. - The player's own cast writes
outbox/exiva.json. The upload script sends it toPOST /api/v1/exiva, which starts the run. exiva_showsendsareawhen the server found one. It holdsstepandrows. Each row is[y, first x, last x]in cell centres. The Exiva map addon draws it.exiva_showwithpartialis an area while answers still come. The first one also hasfirst. The module shows a game message only forfirstand for the final area.exiva_showsendscastswitharea:x,y,bandanddirof each caster. A guild mate's cast is in the list only when they share their position. The Exiva map addon draws each one as a thin outline.exiva_showsendsshapewitharea: the exact outline of the area.edgesholds lines["l", x1, y1, x2, y2]and arcs["a", cx, cy, r, a0, a1], with angles in degrees clockwise from east.bestis the number of answers that meet. Fill it row by row: the area lies between the 1st and 2nd crossing, the 3rd and 4th, and so on. Module 0.13.0 draws it.- The player's own cast reaches addons as the event
exiva_cast, withtarget,x,y,z,band,dirandlevel. It comes also with Team exiva off. Module 0.11.0 sends it.
Addons, module 0.10.0
| Action | Arguments | What the module does |
|---|---|---|
addon_install | addon | adds the addon id to addons-wanted.json |
addon_remove | addon | removes the id. The upload script deletes the addon folder. |
- The upload script reads
addons-wanted.json. It downloadsaddon-<id>.zipfrom the module release. - The upload script checks each zip against
SHA256SUMSof the same release. - Every game client that shares the data folder loads the addon within 5 seconds.
- The status field
addonslists each addon withid,version,onanderror. - The status reply field
addonCataloglists the addons of the newest release, withidandname. - Only addons from the module release load. The module never runs player code.
- Each new reply reaches addons as the event
reply, with the whole reply. Module 0.12.0 sends it. - The reply field
radarcomes only while the status says that Team radar runs. It listsname,x,y,zandkind, which isownorguild. - While Team radar runs, the client and every character on its radar report every 5 seconds.
Planned
| Action | Arguments | What the module should do |
|---|---|---|
goto_label | label | jump to a label of the loaded route |
reload_bot | none | reload the scripts of the bot |
chat_reply | to, text | send a private message |
Delivery
- The upload script writes each batch of commands to its own file,
inbox/commands-<time>-<n>.json. - The module runs each command once, by its
id. - A command older than 60 seconds does not run. The API also stops its delivery, and the log shows it as expired.
Results
Add one result for each command to outbox/results.json.
[{ "id": 812, "ok": true, "message": "cavebot off" }]
The upload script moves the file aside before it sends the results. So a new result never gets lost.
An action that the module does not know gets ok: false and the message not supported on this client. The command log shows it. So players see what their server supports.