Premier script
Créer un paquet, faire entrer un bot dans le jeu, réagir aux messages, envoyer des messages, ajouter un réglage et le partager.
6 archives dans cette catégorie
-
Every script lives in a package. You create one in Library Manager, and Asteroboard opens it in the editor with a few lines of starter code that already run. Create the package In the sidebar, open Library Manager. Click New package. The New local package dialog opens. In Name, type a name for your package, for example my-first-script. Leave Version at 1.0.0. Click Create and edit. The dialog closes and the editor opens on your package, showing index.js. Back in Library Manager, the pac
- 0 commentaires
- 3 vues
-
A package does nothing until a bot plays it. Start by running the starter package on a bot, then send its output to the bot's page and add the lines that identify a Full socket bot on the game server. Before you start You need a bot whose header shows Connected to game server. The easiest is a MITM bot (man-in-the-middle: the bot relays the game session of the Dofus client you play). There's no Ankama account to store, and you can watch the result in your own game. Your first bot sets one up,
- 0 commentaires
- 3 vues
-
Most of a script's work is reacting to what the game says. Here you'll build the smallest useful example: a script that writes every chat line the bot receives to the bot's console. Test it on a MITM bot (man-in-the-middle: the bot relays the game session of the Dofus client you play). A Full socket bot doesn't get into the game until a connection script takes it there, and chat only starts once a character is in game. Your first bot sets up a MITM bot. Find the message Before you write a han
- 0 commentaires
- 2 vues
-
Reading the game is half of what a script does. Here the chat script learns to answer: when someone says !hello, the bot replies in chat and checks that its reply went through. Warning On a MITM bot (man-in-the-middle: the bot relays the game session of the Dofus client you play), everything the script sends goes out as your character. The reply on this page is a real chat message that other players can see. Try the message by hand first Before writing code, send the message from the Networ
- 0 commentaires
- 2 vues
-
The chat bot from Send messages has its trigger and its reply written in the code. Turn them into settings, and anyone who runs your package can change them from the bot's page, without editing code and without stopping the script. Declare the settings A package declares its settings by exporting an object named parameters from index.js. Each key is the name of a setting, and its value describes the setting: export const parameters = { enabled: { type: "bool", label: "Answer in chat
- 0 commentaires
- 1 vue
-
Your package only exists in your own library until you share it. You can send someone a .zip file, or publish the package on the marketplace so anyone with Asterobot can install it. Export a .zip Open Library Manager. Open the menu at the end of your package's row, or right-click the row. Choose Export. Your browser downloads a file named after the package and its version, such as my-first-script-1.0.0.zip. The same menu is also on the package's own page. The archive holds the package's
- 0 commentaires
- 3 vues