Introduction
Ce que les scripts peuvent faire, le JavaScript qu'il vous faut, comment un bot communique avec Dofus, et vos outils
4 archives dans cette catégorie
-
A script is the JavaScript code inside a package. When a bot plays a package, Asterobot runs that code for the bot, right next to the bot's connection to the game. Read this before your first script: it saves you from looking for things that don't exist. One copy per bot Every bot that plays a package runs its own copy of the script. Two bots playing the same package share no variables, a script can't see or control another bot, and stopping one bot's script leaves the others running. The cod
- 0 commentaires
- 3 vues
-
Scripts are plain JavaScript. These docs don't teach the language, but four ideas come up on almost every page, so each one gets a short explanation here and a link to a proper tutorial. Why JavaScript There's nothing to install and nothing to build. You write a package's code in Asteroboard's editor, which completes Asterobot's functions and the names of game messages as you type, and Asterobot runs the files as they are. Files must end in .js or .mjs, so TypeScript isn't an option. If JavaS
- 0 commentaires
- 3 vues
-
Dofus and the game servers talk by exchanging messages, and a bot talks to them the same way. A script is the part that decides what to send and what to do with what arrives. The words introduced here come back throughout the developer docs. Messages, names and fields A message is one piece of data sent between Dofus and a game server: a line of chat, a character moving, the contents of an inventory. Every message has a name and fields. When someone speaks in chat, a script receives something
- 0 commentaires
- 1 vue
-
Everything you need to write scripts is already in Asteroboard, plus one reference on asterobot.net. Here's what each tool is for, so you know where to look when a script doesn't do what you expect. The package editor You write code in the package editor. Open it from Library Manager: New package creates a package and opens it, and Edit code, in a package's menu, opens one you already have. Only local packages can be edited: a package downloaded from the marketplace is read-only. The editor c
- 0 commentaires
- 3 vues