### User Interaction Methods Source: https://doc.ankabot.dev/ankabot-touch/methodes/global Methods for displaying dialog boxes and getting user input. ```APIDOC ## POST /ankabot-touch/methodes/global/question ### Description Displays a dialog box with a question and waits for a YES or NO answer from the user. ### Method POST ### Endpoint /ankabot-touch/methodes/global/question ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **questionText** (string) - Required - The text of the question to display. ### Request Example ```json { "questionText": "Do you want to proceed?" } ``` ### Response #### Success Response (200) - **response** (string) - The user's answer, either "YES" or "NO". #### Response Example ```json { "response": "YES" } ``` ## POST /ankabot-touch/methodes/global/input ### Description Displays a dialog box with a text input field for the user to enter text. ### Method POST ### Endpoint /ankabot-touch/methodes/global/input ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **promptText** (string) - Required - The text to display as a prompt for the input field. ### Request Example ```json { "promptText": "Enter your name:" } ``` ### Response #### Success Response (200) - **userInput** (string) - The text entered by the user. #### Response Example ```json { "userInput": "John Doe" } ``` ``` -------------------------------- ### Network Request Methods (GET) Source: https://doc.ankabot.dev/ankabot-touch/methodes/ankabot-touch Methods for performing GET requests with various proxy configurations. ```APIDOC ## getRequest ### Description Performs a GET request and retrieves its result. ### Method GET ### Endpoint *N/A* ### Parameters *No explicit parameters mentioned.* ### Request Example *N/A* ### Response *Returns the result of the GET request.* ## getRequestThroughHTTPSProxy ### Description Performs a GET request through an HTTPS proxy and retrieves its result. ### Method GET ### Endpoint *N/A* ### Parameters *No explicit parameters mentioned.* ### Request Example *N/A* ### Response *Returns the result of the GET request through the HTTPS proxy.* ## getRequestThroughSocks5Proxy ### Description Performs a GET request through a SOCKS5 proxy and retrieves its result. ### Method GET ### Endpoint *N/A* ### Parameters *No explicit parameters mentioned.* ### Request Example *N/A* ### Response *Returns the result of the GET request through the SOCKS5 proxy.* ## getRequestThroughMyIP ### Description Performs a GET request through the bot's IP address and returns its result. ### Method GET ### Endpoint *N/A* ### Parameters *No explicit parameters mentioned.* ### Request Example *N/A* ### Response *Returns the result of the GET request through the bot's IP.* ``` -------------------------------- ### GET /ankabot-touch/methodes/exchange/getallitems Source: https://doc.ankabot.dev/ankabot-touch/methodes/exchange Retrieves all items currently in the storage or exchange space. ```APIDOC ## GET /ankabot-touch/methodes/exchange/getallitems ### Description This method retrieves all items currently in the storage or exchange space. ### Method GET ### Endpoint /ankabot-touch/methodes/exchange/getallitems ### Response #### Success Response (200) - **items** (array) - A list of items in the storage/exchange. - **itemId** (integer) - The ID of the item. - **quantity** (integer) - The quantity of the item. #### Response Example ```json { "items": [ { "itemId": 12345, "quantity": 10 }, { "itemId": 67890, "quantity": 5 } ] } ``` ``` -------------------------------- ### Iterate and Display Inventory Mounts (Lua) Source: https://doc.ankabot.dev/ankabot-touch/methodes/mount/inventorymounts This Lua example demonstrates how to use the `inventoryMounts` method to retrieve mount data and then iterate through the list to print various attributes of each mount. It includes detailed logging of mount properties and their effects, ancestors, and behaviors. ```lua function move() global:printMessage("----------------------------------------------- ") global:printMessage("Montures dans l'inventaire") global:printMessage("----------------------------------------------- ") local inventoryMounts = mount:inventoryMounts() for _,inventoryMount in ipairs(inventoryMounts) do global:printSuccess("ID "..inventoryMount.id) global:printSuccess("Expiration Date "..inventoryMount.expirationDate) global:printSuccess("Inventory GID "..inventoryMount.gid) global:printSuccess("Inventory UID "..inventoryMount.uid) global:printSuccess("....................................") global:printSuccess("id: "..inventoryMount.mount.id) global:printSuccess("model: "..inventoryMount.mount.model) global:printSuccess("name: "..inventoryMount.mount.name) global:printSuccess("sex: "..tostring(inventoryMount.mount.sex)) global:printSuccess("ownerId: "..inventoryMount.mount.ownerId) global:printSuccess("experience: "..inventoryMount.mount.experience) global:printSuccess("experienceForLevel: "..inventoryMount.mount.experienceForLevel) global:printSuccess("experienceForNextLevel: "..inventoryMount.mount.experienceForNextLevel) global:printSuccess("level: "..inventoryMount.mount.level) global:printSuccess("isRideable: "..tostring(inventoryMount.mount.isRideable)) global:printSuccess("maxPods: "..inventoryMount.mount.maxPods) global:printSuccess("isWild: "..tostring(inventoryMount.mount.isWild)) global:printSuccess("stamina: "..inventoryMount.mount.stamina) global:printSuccess("staminaMax: "..inventoryMount.mount.staminaMax) global:printSuccess("maturity "..inventoryMount.mount.maturity) global:printSuccess("maturityForAdult: "..inventoryMount.mount.maturityForAdult) global:printSuccess("energy: "..inventoryMount.mount.energy) global:printSuccess("energyMax: "..inventoryMount.mount.energyMax) global:printSuccess("serenity: "..inventoryMount.mount.serenity) global:printSuccess("serenityMax: "..inventoryMount.mount.serenityMax) global:printSuccess("aggressivityMax: "..inventoryMount.mount.aggressivityMax) global:printSuccess("love: "..inventoryMount.mount.love) global:printSuccess("loveMax: "..inventoryMount.mount.loveMax) global:printSuccess("fecondationTime: "..inventoryMount.mount.fecondationTime) global:printSuccess("isFecondationReady: "..tostring(inventoryMount.mount.isFecondationReady)) global:printSuccess("boostLimiter: "..inventoryMount.mount.boostLimiter) global:printSuccess("boostMax: "..inventoryMount.mount.boostMax) global:printSuccess("reproductionCount: "..inventoryMount.mount.reproductionCount) global:printSuccess("reproductionCountMax: "..inventoryMount.mount.reproductionCountMax) global:printSuccess("harnessGID: "..inventoryMount.mount.harnessGID) global:printSuccess("useHarnessColors: "..tostring(inventoryMount.mount.useHarnessColors)) global:printSuccess("Effects :") for _,effect in ipairs(inventoryMount.mount.effectList) do global:printSuccess(" ActionID: "..effect.actionId.." - Value: "..effect.value) end global:printSuccess("ancestors :") for _,ancestor in ipairs(inventoryMount.mount.ancestor) do global:printSuccess(" "..ancestor) end global:printSuccess("behaviors :") for _,behavior in ipairs(inventoryMount.mount.behaviors) do global:printSuccess(" "..behavior) end global:printMessage("----------------------------------------------- ") end global:printMessage("----------------------------------------------- ") end ``` -------------------------------- ### Access and Display Mount Properties (Lua) Source: https://doc.ankabot.dev/ankabot-touch/methodes/mount/mymount This Lua example demonstrates how to use the `myMount()` function and process its return value. It checks if a mount is equipped, and if so, iterates through and prints various properties of the `MountClientData` object, including effects, ancestors, and behaviors. ```lua function move() local myMount = mount:myMount() if myMount == nil then return end global:printSuccess("id: "..myMount.id) global:printSuccess("model: "..myMount.model) global:printSuccess("name: "..myMount.name) global:printSuccess("sex: "..tostring(myMount.sex)) global:printSuccess("ownerId: "..myMount.ownerId) global:printSuccess("experience: "..myMount.experience) global:printSuccess("experienceForLevel: "..myMount.experienceForLevel) global:printSuccess("experienceForNextLevel: "..myMount.experienceForNextLevel) global:printSuccess("level: "..myMount.level) global:printSuccess("isRideable: "..tostring(myMount.isRideable)) global:printSuccess("maxPods: "..myMount.maxPods) global:printSuccess("isWild: "..tostring(myMount.isWild)) global:printSuccess("stamina: "..myMount.stamina) global:printSuccess("staminaMax: "..myMount.staminaMax) global:printSuccess("maturity "..myMount.maturity) global:printSuccess("maturityForAdult: "..myMount.maturityForAdult) global:printSuccess("energy: "..myMount.energy) global:printSuccess("energyMax: "..myMount.energyMax) global:printSuccess("serenity: "..myMount.serenity) global:printSuccess("serenityMax: "..myMount.serenityMax) global:printSuccess("aggressivityMax: "..myMount.aggressivityMax) global:printSuccess("love: "..myMount.love) global:printSuccess("loveMax: "..myMount.loveMax) global:printSuccess("fecondationTime: "..myMount.fecondationTime) global:printSuccess("isFecondationReady: "..tostring(myMount.isFecondationReady)) global:printSuccess("boostLimiter: "..myMount.boostLimiter) global:printSuccess("boostMax: "..myMount.boostMax) global:printSuccess("reproductionCount: "..myMount.reproductionCount) global:printSuccess("reproductionCountMax: "..myMount.reproductionCountMax) global:printSuccess("harnessGID: "..myMount.harnessGID) global:printSuccess("useHarnessColors: "..tostring(myMount.useHarnessColors)) global:printSuccess("Effects : ") for _,effect in ipairs(myMount.effectList) do global:printSuccess(" ActionID: "..effect.actionId.." - Value: "..effect.value) end global:printSuccess("ancestors : ") for _,ancestor in ipairs(myMount.ancestor) do global:printSuccess(" "..ancestor) end global:printSuccess("behaviors : ") for _,behavior in ipairs(myMount.behaviors) do global:printSuccess(" "..behavior) end end ``` -------------------------------- ### Get Equipped Mount Information (Coffeescript) Source: https://doc.ankabot.dev/ankabot-touch/methodes/mount/mymount This snippet shows how to call the `myMount()` function in Coffeescript to retrieve data about the currently equipped mount. It's a simple invocation and assumes the function is available in the current scope. ```coffeescript mount:myMount() ``` -------------------------------- ### Update All Items Prices Examples (Lua) Source: https://doc.ankabot.dev/ankabot-touch/methodes/sale/updateallitems Demonstrates various use cases for the updateAllItems method in Lua, including adjusting prices with and without minimum price constraints. It highlights how the 'kamas' argument affects the price and how 'min_price' prevents prices from falling below a specified threshold. ```lua sale:updateAllItems() -- Le nouveau prix est 499 sale:updateAllItems(-1) -- Le nouveau prix est 499 sale:updateAllItems(-3) -- Le nouveau prix est 497 sale:updateAllItems(2) -- Le nouveau prix est 502 sale:updateAllItems(3) -- Le nouveau prix est 503 sale:updateAllItems(-100) -- Le nouveau prix est 400 -- Avec prix minimum MIN_PRICE = { { 6898, 20 }, -- Plume de piou violet, prix minimum de l'unité = 20 { 885, 50 }, -- Laine de Boufton Noir, prix minimum de l'unité = 50 } sale:updateAllItems(-1, MIN_PRICE) -- Si le prix de 1xPlume de piou violet est 30, le nouveau prix est 29 car 29 > 20. -- Si le prix de 10xPlume de piou violet est 190, echec car 189 < 200 (20 x 10). ``` -------------------------------- ### GET /mount/myMount Source: https://doc.ankabot.dev/ankabot-touch/methodes/mount/mymount Retrieves detailed information about the player's currently equipped mount. If no mount is equipped, it returns nil. ```APIDOC ## GET /mount/myMount ### Description Retrieves detailed information about the player's currently equipped mount. This includes its ID, model, name, level, experience, stamina, maturity, energy, serenity, and other attributes. It also provides information about any active effects, ancestors, and behaviors associated with the mount. If no mount is equipped, the function returns nil. ### Method GET ### Endpoint /mount/myMount ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```lua local myMount = mount:myMount() ``` ### Response #### Success Response (200) - **MountClientData** (object) - Contains detailed information about the mount. - **nil** - Returned if no mount is equipped. #### Response Example ```json { "id": "12345", "model": "Griffin", "name": "ShadowWing", "sex": true, "ownerId": "67890", "experience": 15000, "experienceForLevel": 20000, "experienceForNextLevel": 5000, "level": 10, "isRideable": true, "maxPods": 1000, "isWild": false, "stamina": 80, "staminaMax": 100, "maturity": 90, "maturityForAdult": 100, "energy": 70, "energyMax": 100, "serenity": 60, "serenityMax": 100, "aggressivityMax": 50, "love": 40, "loveMax": 50, "fecondationTime": 10000, "isFecondationReady": true, "boostLimiter": 5, "boostMax": 10, "reproductionCount": 2, "reproductionCountMax": 5, "harnessGID": "Harness001", "useHarnessColors": true, "effectList": [ { "actionId": "SpeedBoost", "value": 10 } ], "ancestor": [ "Phoenix", "Dragon" ], "behaviors": [ "Aggressive", "Loyal" ] } ``` #### Error Response None explicitly defined, but nil is returned if no mount is equipped. ``` -------------------------------- ### itemWeight Method Documentation Source: https://doc.ankabot.dev/ankabot-touch/methodes/inventory/itemweight Provides details on how to use the itemWeight method to get the weight of an item using its identifier. ```APIDOC ## itemWeight ### Description Retrieves the weight of an item using its unique identifier. ### Method This appears to be a function call within a specific system rather than a standard HTTP API method. The syntax suggests an internal method call. ### Endpoint N/A (Internal Method Call) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```css inventory:itemWeight(gid) ``` ### Response #### Success Response (int) - **int** (int) - The weight of the item. #### Response Example ```json { "weight": 100 } ``` ### Arguments #### Arguments - **gid** (int) - Required - Identifiant de l'objet. (Object identifier.) ``` -------------------------------- ### GET /ankabot-touch/methodes/exchange/storageitemquantity Source: https://doc.ankabot.dev/ankabot-touch/methodes/exchange Returns the quantity of a specific item type in the storage space. ```APIDOC ## GET /ankabot-touch/methodes/exchange/storageitemquantity ### Description This method returns the quantity of a specific item type present in the storage space. ### Method GET ### Endpoint /ankabot-touch/methodes/exchange/storageitemquantity ### Parameters #### Query Parameters - **itemId** (integer) - Required - The ID of the item to query. ### Response #### Success Response (200) - **quantity** (integer) - The quantity of the specified item in storage. #### Response Example ```json { "quantity": 10 } ``` ``` -------------------------------- ### GET /ankabot-touch/methodes/exchange/getitem Source: https://doc.ankabot.dev/ankabot-touch/methodes/exchange Retrieves a specified quantity of a desired item from the storage space. ```APIDOC ## GET /ankabot-touch/methodes/exchange/getitem ### Description This method allows you to retrieve a specified quantity of a desired item from the storage space. ### Method GET ### Endpoint /ankabot-touch/methodes/exchange/getitem ### Parameters #### Query Parameters - **itemId** (integer) - Required - The ID of the item to retrieve. - **quantity** (integer) - Required - The quantity of the item to retrieve. ### Response #### Success Response (200) - **success** (boolean) - Indicates if the operation was successful. #### Response Example ```json { "success": true } ``` ``` -------------------------------- ### sellItem Method Documentation Source: https://doc.ankabot.dev/ankabot-touch/methodes/sale/sellitem This section details the sellItem method used to sell items. It includes information about the method's arguments, return value, and provides usage examples. A warning is included regarding the necessary prerequisite of opening the Auction House in 'Sell' mode. ```APIDOC ## sellItem Method ### Description This method allows you to sell items in the game. You need to specify the item's ID, the quantity to sell, and the price. ### Method `sale:sellItem(gid, lots, price)` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```coffeescript sale:sellItem(303, 100, 1500) ``` This example demonstrates selling 100 units of an item with ID 303 at a price of 1500 kamas. ### Response #### Success Response (200) This method does not have a defined return value. #### Response Example None ### Important Note {% hint style="danger" %} Assurez-vous de bien avoir ouvert l'Hôtel de Vente en mode **Vente** avant d'utiliser cette méthode. {% endhint %} ``` -------------------------------- ### Script Control Methods Source: https://doc.ankabot.dev/ankabot-touch/methodes/ankabot-touch Methods for managing script execution, including suspending, checking status, and starting scripts. ```APIDOC ## suspendScriptUntilMultiplePackets ### Description Suspends script execution until one of the expected messages is received and returns the name of the first message received. ### Method *Not explicitly defined, likely an internal method call.* ### Endpoint *N/A* ### Parameters *No explicit parameters mentioned.* ### Request Example *N/A* ### Response *Returns the name of the first received message.* ## isScriptPlaying ### Description Determines if a script is currently running. ### Method *Not explicitly defined, likely an internal method call.* ### Endpoint *N/A* ## startScript ### Description Starts the loaded script. ### Method *Not explicitly defined, likely an internal method call.* ### Endpoint *N/A* ``` -------------------------------- ### Process Console Lines (Lua) Source: https://doc.ankabot.dev/ankabot-touch/methodes/global/consolelines This Lua example demonstrates how to use the global:consoleLines() function to fetch console output. It then iterates through the returned list of lines, printing each one using global:printSuccess. The function returns a table of strings representing the console lines. ```lua function move() local console_lines = global:consoleLines() global:printSuccess("Il y'avait "..#console_lines.." lignes dans la console.") for _, line in ipairs(console_lines) do global:printSuccess(line) end end ``` -------------------------------- ### Load Bot Configuration with loadConfiguration Source: https://doc.ankabot.dev/ankabot-touch/methodes/global/loadconfiguration Loads bot configurations from a specified XML file path. The function can optionally start the script associated with the loaded configuration. It requires the absolute path to the .xml configuration file. ```coffeescript global:loadConfiguration(path, start) ``` ```coffeescript path = "C:/User/Desktop/sacrieur.xml" global:loadConfiguration(path) ``` -------------------------------- ### Get Console Lines (CoffeeScript) Source: https://doc.ankabot.dev/ankabot-touch/methodes/global/consolelines This CoffeeScript snippet shows how to call the global:consoleLines() function to retrieve all lines from the console. It has no arguments and returns a list of strings, where each string is a line from the console. ```coffeescript global:consoleLines() ``` -------------------------------- ### Iterate and Display Player Info (Lua) Source: https://doc.ankabot.dev/ankabot-touch/methodes/map/players This Lua snippet demonstrates how to use the `map:players()` method to get character data and then iterate through the returned list to print each character's name and contextual ID. This requires the Ankabot API. ```lua -- On stocke la liste des personnages characters = map:players() -- On parcourt la liste et on affiche les noms et les identifiants des personnages for _, character in ipairs(characters) do global:printSuccess(character["name"]) global:printSuccess(character["contextualId"]) end ``` -------------------------------- ### Display Question and Get Boolean Answer (CoffeeScript) Source: https://doc.ankabot.dev/ankabot-touch/methodes/global/question This method displays a given question to the user and waits for a response. It returns 'true' if the user's answer is 'YES' and 'false' if the answer is 'NO'. The 'q' argument is a string representing the question to be displayed. ```coffeescript global:question(q) ``` -------------------------------- ### Get Item GUID using getItemGUID (Coffeescript) Source: https://doc.ankabot.dev/ankabot-touch/methodes/sale/getitemguid The getItemGUID method retrieves the private identifier of an item based on its position in the sales space. It requires an integer argument representing the item's index. Ensure the Sales Hotel is open in 'Sell' mode before using this method. ```coffeescript sale:getItemGUID(index) ``` ```coffeescript sale:getItemGUID(6) ``` -------------------------------- ### File System and Directory Methods Source: https://doc.ankabot.dev/ankabot-touch/methodes/global Methods for interacting with the file system, including directories and files. ```APIDOC ## GET /ankabot-touch/methodes/global/getCurrentDirectory ### Description Returns the current working directory of Ankabot. ### Method GET ### Endpoint /ankabot-touch/methodes/global/getCurrentDirectory ### Parameters #### Path Parameters None #### Query Parameters None ### Request Example ```json {} ``` ### Response #### Success Response (200) - **directory** (string) - The current directory path. #### Response Example ```json { "directory": "/home/user/ankabot" } ``` ## GET /ankabot-touch/methodes/global/getAllFilesNameInDirectory ### Description Returns the names of all files present in a specified directory. ### Method GET ### Endpoint /ankabot-touch/methodes/global/getAllFilesNameInDirectory ### Parameters #### Path Parameters None #### Query Parameters - **directoryPath** (string) - Required - The path to the directory to scan. ### Request Example ```json {} ``` ### Response #### Success Response (200) - **fileNames** (array of strings) - A list of file names in the directory. #### Response Example ```json { "fileNames": ["file1.txt", "script.lua"] } ``` ## GET /ankabot-touch/methodes/global/getCurrentScriptDirectory ### Description Returns the path of the directory containing the currently loaded script. ### Method GET ### Endpoint /ankabot-touch/methodes/global/getCurrentScriptDirectory ### Parameters #### Path Parameters None #### Query Parameters None ### Request Example ```json {} ``` ### Response #### Success Response (200) - **scriptDirectory** (string) - The directory path of the current script. #### Response Example ```json { "scriptDirectory": "/home/user/ankabot/scripts" } ``` ## GET /ankabot-touch/methodes/global/scriptName ### Description Returns the name of the current script file without its extension. ### Method GET ### Endpoint /ankabot-touch/methodes/global/scriptName ### Parameters #### Path Parameters None #### Query Parameters None ### Request Example ```json {} ``` ### Response #### Success Response (200) - **name** (string) - The name of the script file (without extension). #### Response Example ```json { "name": "my_script" } ``` ## POST /ankabot-touch/methodes/global/fileExists ### Description Determines whether a file exists at the specified path. ### Method POST ### Endpoint /ankabot-touch/methodes/global/fileExists ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **filePath** (string) - Required - The full path to the file to check. ### Request Example ```json { "filePath": "/path/to/your/file.txt" } ``` ### Response #### Success Response (200) - **exists** (boolean) - True if the file exists, false otherwise. #### Response Example ```json { "exists": true } ``` ``` -------------------------------- ### GET /ankabot-touch/methodes/exchange/isinexchange Source: https://doc.ankabot.dev/ankabot-touch/methodes/exchange Checks if the bot is currently in an exchange. ```APIDOC ## GET /ankabot-touch/methodes/exchange/isinexchange ### Description This method indicates whether the bot is currently participating in an exchange. ### Method GET ### Endpoint /ankabot-touch/methodes/exchange/isinexchange ### Response #### Success Response (200) - **inExchange** (boolean) - True if the bot is in an exchange, false otherwise. #### Response Example ```json { "inExchange": false } ``` ``` -------------------------------- ### POST /ankabot-touch/methodes/exchange/launchexchangewithplayer Source: https://doc.ankabot.dev/ankabot-touch/methodes/exchange Initiates an exchange with a specified player. ```APIDOC ## POST /ankabot-touch/methodes/exchange/launchexchangewithplayer ### Description This method initiates an exchange with a specified player. ### Method POST ### Endpoint /ankabot-touch/methodes/exchange/launchexchangewithplayer ### Parameters #### Request Body - **targetPlayerId** (integer) - Required - The ID of the player to initiate the exchange with. ### Request Example ```json { "targetPlayerId": 98765 } ``` ### Response #### Success Response (200) - **success** (boolean) - Indicates if the operation was successful. #### Response Example ```json { "success": true } ``` ``` -------------------------------- ### GET /ankabot-touch/methodes/exchange/storagekamas Source: https://doc.ankabot.dev/ankabot-touch/methodes/exchange Returns the number of kamas available in the storage space. ```APIDOC ## GET /ankabot-touch/methodes/exchange/storagekamas ### Description This method returns the number of kamas currently available in the storage space. ### Method GET ### Endpoint /ankabot-touch/methodes/exchange/storagekamas ### Response #### Success Response (200) - **kamas** (integer) - The total number of kamas in storage. #### Response Example ```json { "kamas": 50000 } ``` ``` -------------------------------- ### GET /ankabot-touch/methodes/exchange/getkamas Source: https://doc.ankabot.dev/ankabot-touch/methodes/exchange Retrieves a specified quantity of kamas from the storage space. ```APIDOC ## GET /ankabot-touch/methodes/exchange/getkamas ### Description This method allows you to retrieve a specified quantity of kamas from the storage space. ### Method GET ### Endpoint /ankabot-touch/methodes/exchange/getkamas ### Parameters #### Query Parameters - **quantity** (integer) - Required - The quantity of kamas to retrieve. ### Response #### Success Response (200) - **success** (boolean) - Indicates if the operation was successful. #### Response Example ```json { "success": true } ``` ``` -------------------------------- ### Initialize newBorns Method Source: https://doc.ankabot.dev/ankabot-touch/methodes/mount/newborns This snippet shows how to initialize the newBorns method, likely within a larger script or framework. It is a fundamental step before accessing newborn mount data. ```coffeescript mount:newBorns() ``` -------------------------------- ### Launch Exchange with Player (CSS) Source: https://doc.ankabot.dev/ankabot-touch/methodes/exchange/launchexchangewithplayer Initiates an exchange with a target player using their unique identifier. Requires the player ID as an integer argument. Returns true if the exchange is accepted, false otherwise. Note that exchanges are blocked by default. ```css exchange:launchExchangeWithPlayer(playerId) ``` ```css exchange:launchExchangeWithPlayer(123456789) ``` -------------------------------- ### Example: Print Item Name using CoffeeScript Source: https://doc.ankabot.dev/ankabot-touch/methodes/inventory/itemnameid This CoffeeScript example demonstrates how to use the inventory:itemNameId method to retrieve the name of an item with ID 303 and print it to the console using global:printMessage. The expected output is 'Bois de Frêne'. ```coffeescript global:printMessage(inventory:itemNameId(303)) ``` -------------------------------- ### Global Methods Source: https://doc.ankabot.dev/ankabot-touch/methodes/ankabot-touch A collection of global methods for Ankabot Touch, including team management, input/output, and file system operations. ```APIDOC ## GET /ankabot-touch/methodes/global/getteammembersnames ### Description Méthode permettant de récupérer le nom des personnages dans le groupe. ### Method GET ### Endpoint /ankabot-touch/methodes/global/getteammembersnames ### Parameters ### Request Example ```json { "example": "request body" } ``` ### Response #### Success Response (200) - **names** (array) - The names of the team members. #### Response Example ```json { "names": ["Member1", "Member2"] } ``` ``` ```APIDOC ## GET /ankabot-touch/methodes/global/random ### Description Méthode retournant un nombre entier aléatoire. ### Method GET ### Endpoint /ankabot-touch/methodes/global/random ### Parameters ### Request Example ```json { "example": "request body" } ``` ### Response #### Success Response (200) - **randomNumber** (integer) - A random integer. #### Response Example ```json { "randomNumber": 12345 } ``` ``` ```APIDOC ## POST /ankabot-touch/methodes/global/setprivate ### Description Méthode permettant d'activer ou désactiver le statut privé. ### Method POST ### Endpoint /ankabot-touch/methodes/global/setprivate ### Parameters #### Request Body - **enabled** (boolean) - Required - Set to true to enable private mode, false to disable. ### Request Example ```json { "enabled": true } ``` ### Response #### Success Response (200) - **status** (string) - The status of the private mode operation. #### Response Example ```json { "status": "success" } ``` ``` ```APIDOC ## POST /ankabot-touch/methodes/global/setprivateteam ### Description Méthode permettant d'activer ou désactiver le statut privé sur les mules. ### Method POST ### Endpoint /ankabot-touch/methodes/global/setprivateteam ### Parameters #### Request Body - **enabled** (boolean) - Required - Set to true to enable private mode for team members, false to disable. ### Request Example ```json { "enabled": true } ``` ### Response #### Success Response (200) - **status** (string) - The status of the private team mode operation. #### Response Example ```json { "status": "success" } ``` ``` ```APIDOC ## GET /ankabot-touch/methodes/global/teamcheck ### Description Cette méthode ne peut être utilisée que par le chef d'un groupe. ### Method GET ### Endpoint /ankabot-touch/methodes/global/teamcheck ### Parameters ### Request Example ```json { "example": "request body" } ``` ### Response #### Success Response (200) - **teamStatus** (string) - Indicates the status of the team check. #### Response Example ```json { "teamStatus": "ready" } ``` ``` ```APIDOC ## POST /ankabot-touch/methodes/global/inviteteam ### Description Méthode permettant au chef du groupe d'envoyer une invitation en groupe aux mules. ### Method POST ### Endpoint /ankabot-touch/methodes/global/inviteteam ### Parameters #### Request Body - **characterName** (string) - Required - The name of the character to invite. ### Request Example ```json { "characterName": "MuleCharacter" } ``` ### Response #### Success Response (200) - **status** (string) - The status of the invitation attempt. #### Response Example ```json { "status": "invitation sent" } ``` ``` ```APIDOC ## POST /ankabot-touch/methodes/global/question ### Description Affiche une boîte de dialogue avec une question et attend la réponse de l'utilisateur avec un OUI ou NON. ### Method POST ### Endpoint /ankabot-touch/methodes/global/question ### Parameters #### Request Body - **question** (string) - Required - The question to display to the user. ### Request Example ```json { "question": "Do you want to continue?" } ``` ### Response #### Success Response (200) - **answer** (string) - The user's answer ('YES' or 'NO'). #### Response Example ```json { "answer": "YES" } ``` ``` ```APIDOC ## POST /ankabot-touch/methodes/global/input ### Description Affiche une boîte de dialogue avec un champs de texte à saisir. ### Method POST ### Endpoint /ankabot-touch/methodes/global/input ### Parameters #### Request Body - **prompt** (string) - Required - The message to display to the user. ### Request Example ```json { "prompt": "Enter your name:" } ``` ### Response #### Success Response (200) - **userInput** (string) - The text entered by the user. #### Response Example ```json { "userInput": "John Doe" } ``` ``` ```APIDOC ## GET /ankabot-touch/methodes/global/getcurrentdirectory ### Description Méthode retournant le répertoire d'Ankabot. ### Method GET ### Endpoint /ankabot-touch/methodes/global/getcurrentdirectory ### Parameters ### Request Example ```json { "example": "request body" } ``` ### Response #### Success Response (200) - **directory** (string) - The current Ankabot directory path. #### Response Example ```json { "directory": "C:\\Ankabot" } ``` ``` ```APIDOC ## GET /ankabot-touch/methodes/global/getallfilesnameindirectory ### Description Méthode retournant les noms des fichiers présents dans un répertoire. ### Method GET ### Endpoint /ankabot-touch/methodes/global/getallfilesnameindirectory ### Parameters #### Query Parameters - **directoryPath** (string) - Optional - The path to the directory. Defaults to the current Ankabot directory. ### Request Example ```json { "example": "request body" } ``` ### Response #### Success Response (200) - **files** (array) - An array of filenames in the specified directory. #### Response Example ```json { "files": ["file1.txt", "file2.script"] } ``` ``` ```APIDOC ## GET /ankabot-touch/methodes/global/getcurrentscriptdirectory ### Description Méthode retournant le chemin du répertoire contenant le script chargé. ### Method GET ### Endpoint /ankabot-touch/methodes/global/getcurrentscriptdirectory ### Parameters ### Request Example ```json { "example": "request body" } ``` ### Response #### Success Response (200) - **scriptDirectory** (string) - The path to the directory containing the currently loaded script. #### Response Example ```json { "scriptDirectory": "C:\\Ankabot\\Scripts" } ``` ``` ```APIDOC ## GET /ankabot-touch/methodes/global/scriptname ### Description Méthode permettant de retourner le nom du fichier de votre script (sans l'extension). ### Method GET ### Endpoint /ankabot-touch/methodes/global/scriptname ### Parameters ### Request Example ```json { "example": "request body" } ``` ### Response #### Success Response (200) - **scriptName** (string) - The name of the script file without its extension. #### Response Example ```json { "scriptName": "my_script" } ``` ``` ```APIDOC ## GET /ankabot-touch/methodes/global/fileexists ### Description Méthode permettant de déterminer si un fichier existe ou pas. ### Method GET ### Endpoint /ankabot-touch/methodes/global/fileexists ### Parameters #### Query Parameters - **filePath** (string) - Required - The full path to the file to check. ### Request Example ```json { "example": "request body" } ``` ### Response #### Success Response (200) - **exists** (boolean) - True if the file exists, false otherwise. #### Response Example ```json { "exists": true } ``` ``` ```APIDOC ## POST /ankabot-touch/methodes/global/editalias ### Description Méthode permettant de modifier l'alias affiché d'un compte chargé. ### Method POST ### Endpoint /ankabot-touch/methodes/global/editalias ### Parameters #### Request Body - **accountName** (string) - Required - The name of the account whose alias to edit. - **newAlias** (string) - Required - The new alias for the account. ### Request Example ```json { "accountName": "MyAccount", "newAlias": "MyAlias" } ``` ### Response #### Success Response (200) - **status** (string) - The status of the alias update operation. #### Response Example ```json { "status": "success" } ``` ``` ```APIDOC ## GET /ankabot-touch/methodes/global/isboss ### Description Méthode retournant si le bot est un chef de groupe. ### Method GET ### Endpoint /ankabot-touch/methodes/global/isboss ### Parameters ### Request Example ```json { "example": "request body" } ``` ### Response #### Success Response (200) - **isBoss** (boolean) - True if the bot is a group leader, false otherwise. #### Response Example ```json { "isBoss": true } ``` ``` ```APIDOC ## GET /ankabot-touch/methodes/global/consolelines ### Description Méthode permettant de récupérer les lignes de la console. ### Method GET ### Endpoint /ankabot-touch/methodes/global/consolelines ### Parameters #### Query Parameters - **count** (integer) - Optional - The number of lines to retrieve. Defaults to all lines. ### Request Example ```json { "example": "request body" } ``` ### Response #### Success Response (200) - **lines** (array) - An array of strings, each representing a line from the console. #### Response Example ```json { "lines": ["Line 1", "Line 2"] } ``` ``` ```APIDOC ## POST /ankabot-touch/methodes/global/clearconsole ### Description Méthode permettant de vider le contenu de la console. ### Method POST ### Endpoint /ankabot-touch/methodes/global/clearconsole ### Parameters ### Request Example ```json { "example": "request body" } ``` ### Response #### Success Response (200) - **status** (string) - The status of the clear console operation. #### Response Example ```json { "status": "cleared" } ``` ``` ```APIDOC ## POST /ankabot-touch/methodes/global/saveconsole ### Description Méthode permettant d'activer ou de désactiver l'enregistrement de la console. ### Method POST ### Endpoint /ankabot-touch/methodes/global/saveconsole ### Parameters #### Request Body - **enabled** (boolean) - Required - Set to true to enable console saving, false to disable. ### Request Example ```json { "enabled": true } ``` ### Response #### Success Response (200) - **status** (string) - The status of the console saving operation. #### Response Example ```json { "status": "enabled" } ``` ``` -------------------------------- ### GET /websites/doc_ankabot_dev_ankabot-touch_methodes/level Source: https://doc.ankabot.dev/ankabot-touch/methodes/job/level Retrieves the level of a specified job. ```APIDOC ## GET /level ### Description Retrieves the level of a specified job using its unique identifier. ### Method GET ### Endpoint /websites/doc_ankabot_dev_ankabot-touch_methodes/level ### Parameters #### Query Parameters - **jobId** (int) - Required - Identifiant du métier. ### Request Example (No request body for GET requests) ### Response #### Success Response (200) - **level** (int) - Niveau du métier. #### Response Example { "level": 100 } ``` -------------------------------- ### Account and Console Methods Source: https://doc.ankabot.dev/ankabot-touch/methodes/global Methods for managing account aliases and interacting with the Ankabot console. ```APIDOC ## POST /ankabot-touch/methodes/global/editAlias ### Description Modifies the displayed alias for a loaded account. ### Method POST ### Endpoint /ankabot-touch/methodes/global/editAlias ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **accountName** (string) - Required - The name of the account whose alias needs modification. - **newAlias** (string) - Required - The new alias to set for the account. ### Request Example ```json { "accountName": "MyAccount", "newAlias": "MyAlias" } ``` ### Response #### Success Response (200) - **success** (boolean) - Indicates if the alias was modified successfully. #### Response Example ```json { "success": true } ``` ## GET /ankabot-touch/methodes/global/isBoss ### Description Returns whether the bot is currently the leader of a group. ### Method GET ### Endpoint /ankabot-touch/methodes/global/isBoss ### Parameters #### Path Parameters None #### Query Parameters None ### Request Example ```json {} ``` ### Response #### Success Response (200) - **isBoss** (boolean) - True if the bot is a group leader, false otherwise. #### Response Example ```json { "isBoss": false } ``` ## GET /ankabot-touch/methodes/global/consoleLines ### Description Retrieves the lines currently present in the Ankabot console. ### Method GET ### Endpoint /ankabot-touch/methodes/global/consoleLines ### Parameters #### Path Parameters None #### Query Parameters None ### Request Example ```json {} ``` ### Response #### Success Response (200) - **lines** (array of strings) - A list of strings, each representing a line from the console. #### Response Example ```json { "lines": ["Log entry 1", "Log entry 2"] } ``` ## POST /ankabot-touch/methodes/global/clearConsole ### Description Clears all content from the Ankabot console. ### Method POST ### Endpoint /ankabot-touch/methodes/global/clearConsole ### Parameters #### Path Parameters None #### Query Parameters None ### Request Example ```json {} ``` ### Response #### Success Response (200) - **success** (boolean) - Indicates if the console was cleared successfully. #### Response Example ```json { "success": true } ``` ## POST /ankabot-touch/methodes/global/saveConsole ### Description Enables or disables the saving of console output. ### Method POST ### Endpoint /ankabot-touch/methodes/global/saveConsole ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **enable** (boolean) - Required - Set to true to enable saving, false to disable. ### Request Example ```json { "enable": true } ``` ### Response #### Success Response (200) - **success** (boolean) - Indicates if the console saving setting was updated successfully. #### Response Example ```json { "success": true } ``` ``` -------------------------------- ### GET /ankabot-touch/methodes/exchange/storageitemcount Source: https://doc.ankabot.dev/ankabot-touch/methodes/exchange Returns the number of different item types present in the storage space. ```APIDOC ## GET /ankabot-touch/methodes/exchange/storageitemcount ### Description This method returns the number of different item types currently present in the storage space. ### Method GET ### Endpoint /ankabot-touch/methodes/exchange/storageitemcount ### Response #### Success Response (200) - **count** (integer) - The number of distinct item types in storage. #### Response Example ```json { "count": 2 } ``` ```