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.

Fonctionnement des scripts

Structure d'un paquet, fonction d'entrée, lancement, arrêt et rechargement, imports, temporisation, erreurs, journalisation et JavaScript pris en charge.

9 archives dans cette catégorie

  1. Smooth ·
    The files a package holds, the index.js every script starts from, the rules for module paths, and the optional asterobot.json. A package is a small set of JavaScript files with a fixed starting point, index.js, and not every file in it runs when a bot starts the package. What a package contains A package with a few files looks like this: index.js asterobot.json lib/chat.js lib/format.mjs fightprofiles/careful.json chatprofiles/wheat-ads.json File Required What it's for index.js Yes Th
    • 72 vues
  2. Smooth ·
    The default export Asterobot calls when a script starts, the launch object it receives, what top-level code can do, and what to do for each launch reason. Every script starts in one function: the default export of the package's index.js. Asterobot calls it each time a bot starts the package, and the way you write it decides whether that start goes through. The default export export default async function behavior(launch) { // ... } Asterobot checks three things before and after calling it:
    • 89 vues
  3. Smooth ·
    Everything that starts or stops a script, what starts over and what's kept between two runs, and what happens when the connection drops or Asterobot restarts. A script runs from the moment a bot starts it until something stops it, and it keeps little from one run to the next. States and controls describes the same buttons from the player's side. Starting a script Where Control What it does Package editor Run Saves the package, stops the script the chosen bot is running, sets this packa
    • 73 vues
  4. Smooth ·
    The built-in asterobot modules, importing your own files and other packages, versioned imports, and what scripts can't import or use. Every file of a package is an ES module. Scripts reach Asterobot's functions, their own files and other packages through import statements, and through nothing else. The built-in modules Module Exports Reference asterobot:protocol send, request, wait, on, off, onTraffic, intercept asterobot:protocol asterobot:bot session, currentMap, memory, disconnect
    • 84 vues
  5. Smooth ·
    How a bot runs its script one piece at a time, why await keeps the bot responsive, the 5 s limit, sleep(), loops and the order handlers run in. A bot runs its script one piece of code at a time. Once you know how those pieces are scheduled, the 5 s limit, long loops and the order of handlers stop being surprises. One piece of code at a time Each bot runs its own copy of the script, and bots run side by side without sharing anything. Inside one bot, a single piece of your code runs at any mome
    • 89 vues
  6. Smooth ·
    Where script errors show up, what stops a script and what doesn't, how to read the error texts, and habits that keep a script running. Most mistakes in a script stop it until its next start. Knowing which ones do, where they show up and how their texts are built saves a lot of guessing. Where errors show up Where What it tells you The behavior stopped with an error, at the top of the bot's page The script started, then stopped because of an error. The alert shows the whole text, with C
    • 81 vues
  7. Smooth ·
    Where each logging function writes, how logged values come out, how to keep the game ticket out of logs, and a routine for finding out why a script misbehaves. When a script doesn't do what you expect, its own output is usually the quickest way to find out why, once you know which of the two consoles it went to. Two places to write Functions Module Where the lines appear botDebug(), botInfo(), botWarn(), botError() asterobot:bot The bot's Console tab, as Script lines, at every level
    • 74 vues
  8. Smooth ·
    The JavaScript features scripts can use, the three constructs they can't, the built-in objects that are missing, the editor's warnings, and JSDoc types. Scripts run modern JavaScript, with three constructs left out and a few built-in objects missing. JSDoc comments make what the editor tells you more precise. What works The syntax of JavaScript up to ES2022 works, apart from the three constructs in the next section. That includes: classes, with private fields such as #count and static block
    • 82 vues
  9. Smooth ·
    How the memory a bot's scripts share works, what it keeps and for how long, how to keep state for one game connection or for the whole bot, and when it's emptied. A script's variables are gone every time it stops, whether through Stop, Run in the editor or a dropped connection. The bot's memory is where a script keeps what it must find again: a count, how far it got, a choice it made. It belongs to the bot, not to the script, and every package the bot runs reads and writes the same one. This p
    • 71 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.