### ExoFast LUA Script: Analyze Item Stats and Return Rune ID Source: https://doc.exofast.dev/scripting/introduction This LUA script demonstrates how to implement the `exofast_analyse()` function within ExoFast. It checks the 'VITALITY' stat of an item and returns the appropriate rune ID ('RUNE["RA_VI"]' or 'RUNE.RA_VI') if the vitality falls within a specified range (150-200). If the condition is not met, the function returns nothing, and ExoFast will not apply any rune. ```lua function exofast_analyse() if ITEM["VITALITY"] >= 150 and ITEM["VITALITY"] <= 200 then return RUNE["RA_VI"] end end ``` ```lua function exofast_analyse() if ITEM.VITALITY >= 150 and ITEM.VITALITY <= 200 then return RUNE.RA_VI end end ``` -------------------------------- ### Play predefined sounds - Lua Source: https://doc.exofast.dev/scripting/methodes The sound:play method allows you to play specific sound effects. It accepts a sound constant as an argument. The available sounds are success, alert, danger, and fail. ```lua sound:play(sound) ``` -------------------------------- ### Show Dofus window - Lua Source: https://doc.exofast.dev/scripting/methodes The global:showDofus method is used to bring the Dofus game window to the foreground. This functionality is available for both Dofus 3.0 and Dofus Retro. It does not require any parameters. ```lua global:showDofus() ``` -------------------------------- ### Sound Playback Source: https://doc.exofast.dev/scripting/methodes Method for playing predefined sound effects. ```APIDOC ## sound:play(sound) ### Description Method to play a sound effect. ### Method N/A (Lua function call) ### Endpoint N/A ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```lua sound:play(sound.success) sound:play(sound.alert) ``` ### Response #### Success Response (200) N/A (This is a client-side function) #### Response Example N/A ``` -------------------------------- ### Console Output Source: https://doc.exofast.dev/scripting/methodes Methods for interacting with the console, including printing text with optional colors and clearing the console. ```APIDOC ## console:print(text, color) ### Description Method to write text to the console with optional color. ### Method N/A (Lua function call) ### Endpoint N/A ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```lua console:print("Hello, world!", console.default) console:print("Error message", console.red) ``` ### Response #### Success Response (200) N/A (This is a client-side function) #### Response Example N/A ``` ```APIDOC ## console:clear() ### Description Method to clear the console content. ### Method N/A (Lua function call) ### Endpoint N/A ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```lua console:clear() ``` ### Response #### Success Response (200) N/A (This is a client-side function) #### Response Example N/A ``` -------------------------------- ### Script LUA pour gérer l'augmentation du soin Source: https://doc.exofast.dev/autres-.../techniques-et-astuces/augmenter-pour-le-puit Ce script LUA définit une fonction exofast_analyse qui surveille la valeur de ITEM["HEAL_BONUS"]. Si elle atteint 0, un drapeau SHOULD_UPGRADE est activé pour commencer à augmenter le soin en utilisant RUNE["SO"]. L'augmentation s'arrête lorsque HEAL_BONUS atteint 6. Si aucun ajustement n'est nécessaire, la fonction retourne -1 pour passer à la condition suivante. ```lua -- Garder en mémoire si le logiciel doit augmenter SHOULD_UPGRADE = false -- Fonction d'ExoFast function exofast_analyse() -- S'il atteint 0, on commence à l'augmenter if ITEM["HEAL_BONUS"] == 0 then SHOULD_UPGRADE = true end -- S'il atteint 6, on ne l'augmentera plus if ITEM["HEAL_BONUS"] == 6 then SHOULD_UPGRADE = false end -- Augmenter if SHOULD_UPGRADE then return RUNE["SO"] end -- Sinon on passe à la condition suivante dans le tableau return -1 end ``` -------------------------------- ### Global Methods Source: https://doc.exofast.dev/scripting/methodes Global methods for interacting with the Dofus client and generating random numbers. ```APIDOC ## global:showDofus() ### Description Method to display the Dofus window. Supported on Dofus 3.0 and Dofus Retro. ### Method N/A (Lua function call) ### Endpoint N/A ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```lua global:showDofus() ``` ### Response #### Success Response (200) N/A (This is a client-side function) #### Response Example N/A ``` ```APIDOC ## global:random(min, max) ### Description Method to return a random integer between min and max (inclusive). ### Method N/A (Lua function call) ### Endpoint N/A ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```lua local randomNumber = global:random(1, 10) ``` ### Response #### Success Response (200) - **randomNumber** (int) - A random integer within the specified range. #### Response Example ```json { "randomNumber": 5 } ``` ``` -------------------------------- ### Print text to console with color - Lua Source: https://doc.exofast.dev/scripting/methodes The console:print method allows you to display text in the console with a specified color. It takes the text string and a color constant as arguments. Available colors include default, yellow, red, green, cyan, orange, and pink. ```lua console:print(text, color) ``` -------------------------------- ### Clear console output - Lua Source: https://doc.exofast.dev/scripting/methodes The console:clear method is used to clear all existing content from the console. This function does not take any parameters. ```lua console:clear() ``` -------------------------------- ### Generate random number within range - Lua Source: https://doc.exofast.dev/scripting/methodes The global:random method generates a random integer between a specified minimum and maximum value, inclusive. It takes two integer arguments: min and max. ```lua global:random(min, max) ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.