Creating a graphical user interface (GUI) for your AutoIt script doesn't have to be complex or time-consuming. You can design your GUI visually and export it directly to the AutoIt script (.au3) format using KODA, a popular GUI form designer tailored for AutoIt.
Using KODA for GUI Design:
1. Download KODA: To begin designing your GUI, download KODA from the following link:

2. Learn More About KODA: If you have concerns about the tool or wish to learn more about its features and updates, you can read the release notes provided by the AutoIt moderators at:

With KODA, you can drag and drop interface elements, configure their properties, and export your complete GUI layout to an AutoIt script effortlessly. This tool is highly recommended for anyone looking to streamline their GUI development process in AutoIt.
Using KODA for GUI Design:
1. Download KODA: To begin designing your GUI, download KODA from the following link:

2. Learn More About KODA: If you have concerns about the tool or wish to learn more about its features and updates, you can read the release notes provided by the AutoIt moderators at:

With KODA, you can drag and drop interface elements, configure their properties, and export your complete GUI layout to an AutoIt script effortlessly. This tool is highly recommended for anyone looking to streamline their GUI development process in AutoIt.
Basic Understanding/Information:
1. Syntax Overview
AutoIt scripts are structured with a simple syntax that resembles Visual Basic. It uses functions, loops, and conditionals to control the flow of execution.
2. While-WEnd Loop
The While statement in AutoIt is used to repeat a block of code as long as a specified condition is true. The loop ends when the condition becomes false, with the loop terminated using WEnd:
This loop continues as long as the current map ID does not equal the target map ID.
3. Nested While Loop
Inside the first loop, there is a nested While loop that checks additional conditions:
This loop increments the $attempts variable with each iteration to limit the number of retries.
4. Conditions with If-Else
The If-Else statement is used to execute different blocks of code based on the condition:
5. Functions and Procedures
Several functions are used in the script, including GetMapID(), GoOut(), RndTravel(), WaitForLoad(), and VQ(), each serving specific purposes in the script's flow.
6. Comments
Comments in AutoIt start with a semicolon (;) and are used to explain or comment out code.
Example Usage
Here's how you might structure a simple script:
AutoIt scripts are structured with a simple syntax that resembles Visual Basic. It uses functions, loops, and conditionals to control the flow of execution.
2. While-WEnd Loop
The While statement in AutoIt is used to repeat a block of code as long as a specified condition is true. The loop ends when the condition becomes false, with the loop terminated using WEnd:
Code:
While GetMapID() <> $Target_Map_ID
; Code to be executed as long as the condition is true
WEnd
3. Nested While Loop
Inside the first loop, there is a nested While loop that checks additional conditions:
Code:
While GetMapID() <> $Target_Map_ID and $attempts < 6
RndTravel($Target_Map_ID) ; Try to reach target map
WaitForLoad() ; Ensure game loads new map
$attempts += 1
WEnd
4. Conditions with If-Else
The If-Else statement is used to execute different blocks of code based on the condition:
Code:
If GetMapID() == $Target_Map_ID Then
VQ() ; Execute actions like Vanquishing
Else
MsgBox(0, "Error", "Failed to reach target map after 6 attempts.")
Exit ; Stop script on failure
EndIf
Several functions are used in the script, including GetMapID(), GoOut(), RndTravel(), WaitForLoad(), and VQ(), each serving specific purposes in the script's flow.
6. Comments
Comments in AutoIt start with a semicolon (;) and are used to explain or comment out code.
Example Usage
Here's how you might structure a simple script:
Code:
$Target_Map_ID = 3 ; Define target map ID
$attempts = 0 ; Initialize attempt counter
While GetMapID() <> $Target_Map_ID
GoOut()
While GetMapID() <> $Target_Map_ID and $attempts < 6
RndTravel($Target_Map_ID)
WaitForLoad()
$attempts += 1
WEnd
If GetMapID() == $Target_Map_ID Then
VQ()
Else
MsgBox($MB_ICONERROR, "Error", "Failed to reach target map after 6 attempts.")
Exit
EndIf
WEnd
AutoIt Script Creation Using Dependencies
Objective: The script checks for logged characters in a game client, initializes the environment if the target character is found, and provides user feedback.
Step-by-Step Script Creation:
1. Setup Initial Variables
Description: Define constants or target variables such as character names or specific settings you might want to initialize.
2. Check Logged Characters
Description: Use the
function to retrieve a list of currently logged characters and verify if a specific target character is among them.
3. Initialize Environment
Description: If the target character is found, call the
function with the required parameters to prepare the game environment.
4. Output and Error Handling
Description: Provide feedback to the user about the actions the script is performing or if there are any issues during execution.
Summary:
The script utilizes functions from dependencies to interact with a game environment, checking for logged characters and initializing settings as necessary.
Example of how to write a script using GWA2 functions as dependency.
The GWA2 Function GoToNPC
Explanation: GoToNPC is designed to handle navigation and interaction with a specified NPC. It verifies the NPC's data structure, moves to their coordinates, and performs an interaction. It also handles situations where the player is blocked or the game is loading a new map, retrying as needed until the player is close enough to the NPC or too many attempts result in a halt.
Now this is how I would utilize it if my goal is to be used inside the Main Function:
1. Main Execution Function:
Explanation of the For Loop Statement in AutoIt
The line
is a loop construct used in AutoIt scripts to iterate over elements of an array. Here's what each part of this statement accomplishes:
In practical terms, this loop is typically used to process or manipulate each element of an array in some way, such as retrieving information or performing an operation related to each element, one at a time. In the context of the snippet above, this loop is used to interact with a list of NPC IDs, where operations such as fetching NPC data or initiating interactions are performed sequentially for each NPC ID.
Summary:
This script exemplifies structured interactions, emphasizing automated navigation. It leverages specific functions like moving to and interacting with NPCs, ensuring robust error handling and user feedback.
Step-by-Step Script Creation:
1. Setup Initial Variables
Description: Define constants or target variables such as character names or specific settings you might want to initialize.
Code:
#include <MsgBoxConstants.au3> ; Include necessary constants for message box
Description: Use the
Code:
GetLoggedCharNames()
Code:
; Get logged characters
Local $sLoggedChars = GetLoggedCharNames()
If @ Error Then ; Using a Space between @ and Error only in Forum due to combining it together it does mention to a username
MsgBox($MB_ICONERROR, "Error", "Failed to retrieve logged characters.")
Return
EndIf
Description: If the target character is found, call the
Code:
Initialize()
Code:
; Check if target character is logged in
If StringInStr($sLoggedChars, $sTargetChar) > 0 Then
MsgBox($MB_ICONINFORMATION, "Character Check", "Character " & $sTargetChar & " is currently logged in.")
; Attempt to initialize game environment
If Not Initialize($sTargetChar) Then
MsgBox($MB_ICONERROR, "Initialization Failed", "Could not initialize the environment for " & $sTargetChar & ".")
Else
MsgBox($MB_ICONINFORMATION, "Success", "Environment initialized successfully for " & $sTargetChar & ".")
EndIf
Else
MsgBox($MB_ICONINFORMATION, "Character Check", "Character " & $sTargetChar & " is not logged in.")
EndIf
Description: Provide feedback to the user about the actions the script is performing or if there are any issues during execution.
Code:
MsgBox($MB_ICONINFORMATION, "Character Check", "Character " & $sTargetChar & " is not logged in.")
The script utilizes functions from dependencies to interact with a game environment, checking for logged characters and initializing settings as necessary.
Example of how to write a script using GWA2 functions as dependency.
The GWA2 Function GoToNPC
Code:
;~ Description: Talks to NPC and waits until you reach them. Func GoToNPC($aAgent) If Not IsDllStruct($aAgent) Then $aAgent = GetAgentByID($aAgent) Local $lMe Local $lBlocked = 0 Local $lMapLoading = GetMapLoading(), $lMapLoadingOld Move(DllStructGetData($aAgent, 'X'), DllStructGetData($aAgent, 'Y'), 100) Sleep(100) GoNPC($aAgent) Do Sleep(100) $lMe = GetAgentByID(-2) If DllStructGetData($lMe, 'HP') <= 0 Then ExitLoop $lMapLoadingOld = $lMapLoading $lMapLoading = GetMapLoading() If $lMapLoading <> $lMapLoadingOld Then ExitLoop If DllStructGetData($lMe, 'MoveX') == 0 And DllStructGetData($lMe, 'MoveY') == 0 Then $lBlocked += 1 Move(DllStructGetData($aAgent, 'X'), DllStructGetData($aAgent, 'Y'), 100) Sleep(100) GoNPC($aAgent) EndIf Until ComputeDistance(DllStructGetData($lMe, 'X'), DllStructGetData($lMe, 'Y'), DllStructGetData($aAgent, 'X'), DllStructGetData($aAgent, 'Y')) < 250 Or $lBlocked > 14 Sleep(GetPing() + Random(1500, 2000, 1)) EndFunc ;==>GoToNPC
Now this is how I would utilize it if my goal is to be used inside the Main Function:
1. Main Execution Function:
Code:
; Main execution function
Func Main()
; Define NPC IDs to interact with
Local $aNPCIDs = [101, 102, 103] ; Example NPC IDs
For $i = 0 To UBound($aNPCIDs) - 1 ; Check below for explanation
; Fetch the NPC as a DllStruct
Local $aAgent = GetAgentByID($aNPCIDs[$i])
If @ Error Then ; Using a Space between @ and Error only in Forum due to combining it together it does mention to a username
MsgBox($MB_ICONERROR, "Error", "Failed to find NPC with ID: " & $aNPCIDs[$i])
ContinueLoop
EndIf
; Go to the NPC and interact
GoToNPC($aAgent)
If @ Error Then ; Using a Space between @ and Error only in Forum due to combining it together it does mention to a username
MsgBox($MB_ICONERROR, "Error", "Failed to interact with NPC: " & $aNPCIDs[$i])
Else
MsgBox($MB_ICONINFORMATION, "Success", "Successfully interacted with NPC: " & $aNPCIDs[$i])
EndIf
Next
EndFunc
The line
Code:
For $i = 0 To UBound($aNPCIDs) - 1
- $i = 0: This initializes the loop variable $i to 0, the index of the first element in the array, setting up the loop to start from the beginning of the array.
- To UBound($aNPCIDs) - 1: UBound($aNPCIDs) returns the number of elements in the array named $aNPCIDs. Since array indexing in AutoIt starts at 0, you must subtract 1 to get the index of the last element. This part sets the upper limit for the loop, ensuring it iterates over every element in the array from start to end.
- The Loop: Inside the loop, the code block will execute once for each index from 0 to UBound($aNPCIDs) - 1. With each iteration, $i increases by 1, allowing the script to access each array element sequentially.
In practical terms, this loop is typically used to process or manipulate each element of an array in some way, such as retrieving information or performing an operation related to each element, one at a time. In the context of the snippet above, this loop is used to interact with a list of NPC IDs, where operations such as fetching NPC data or initiating interactions are performed sequentially for each NPC ID.
Summary:
This script exemplifies structured interactions, emphasizing automated navigation. It leverages specific functions like moving to and interacting with NPCs, ensuring robust error handling and user feedback.
Script Setup
First, let's look at the initial setup and include statements, which are crucial for providing the necessary functions and constants used throughout the script.
These lines include various libraries and custom scripts that provide functionality for GUI elements, constants, and specific game actions through the GWA2 and common function scripts.
Understanding Global Variables:
Global variables are declared outside any specific function and can be accessed anywhere in your script. They're vital for:
Example Globals Explained:
Breakdown of Globals:
Code:
#include "GWA2_Headers.au3" #include "GWA2.au3" #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <GuiComboBox.au3>"
Understanding Global Variables:
Global variables are declared outside any specific function and can be accessed anywhere in your script. They're vital for:
- Sharing Data Across Functions: Globals let functions within your script share and modify the same data, making it easier to manage the script's overall state and communication between different parts of the script.
- Setting Configuration and Constants: Use global variables to define constants or settings once, and then use them anywhere in your script. This approach simplifies updates since you only need to change values in one place.
- Managing State: Global variables store this state information for easy access and modification throughout the script.
Example Globals Explained:
Code:
global $DeadOnTheRun = 0 Global $GWA_CONST_UnyieldingAura = 268 Global $SS_begin, $LB_begin, $Asura_begin, $Deldrimor_begin, $Norn_begin, $Vanguard_begin, $Kurzick_begin, $Luxon_begin Global $Map_To_Zone, $Map_To_Farm Global $SS_Outpost = 396 Global $Deldrimor_Outpost = 639 Global $Asura_Outpost = 640 Global $Norn_Outpost = 645 Global $Vanguard_Outpost = 648 Global $SS_LB_Outpost = 545 Global $Kurzick_Outpost = 77 Global $Luxon_Outpost = 389 Global $areaFerndale = 210 Global $what_we_donate = 0 Global $Abandonquest = False Global $SS_Map = 395 Global $Deldrimor_Map = 781 Global $Asura_Map = 569 Global $Norn_Map = 553 Global $Vanguard_Map = 647 Global $SS_LB_Map = 444 Global $Kurzick_Map = 210 Global $Luxon_Map = 200 Global $RenderingEnabled = True Global $selectedHeroNames[7]
- $DeadOnTheRun: Tracks if the character is dead while moving. "0" means alive.
- $GWA_CONST_UnyieldingAura = 268: The ID for "Unyielding Aura," indicating whether this skill is active or needed for activation.
- Titles and Progress Markers: Variables like $SS_begin and $LB_begin monitor your advancement or starting points in various game titles or achievements.
- Navigation Helpers: $Map_To_Zone and $Map_To_Farm hold destination IDs for travel or farming routes.
- Outpost IDs: Specific variables store IDs for key outposts, essential for automated navigation.
- Quest and Donation Management: Use $areaFerndale, $what_we_donate, and $Abandonquest for specific navigation tasks, managing donations, or controlling quest progress.
- Map IDs for Navigation: Similar to outpost IDs, these globals help direct the script to specific game maps for various activities.
- Performance and Visual Settings: $RenderingEnabled toggles rendering for performance tweaks or specific script operations.
- Hero Management: $selectedHeroNames[7] arrays track the heroes chosen for your party, up to eight heroes as per game limits.
Script Logic with "While" Loops:
The core of our script uses "While" loops for control flow, guiding actions based on game state or specific conditions.
Within this loop, the script checks if it's the first run, registers status update functions, initializes timers, and opens files. It then determines the starting points for various titles or factions based on the character's current status.
Within this loop, the script checks if it's the first run, registers status update functions, initializes timers, and opens files. It then determines the starting points for various titles or factions based on the character's current status.
Code:
While GetMapID() <> $Target_Map_ID
GoOut() ; Exit current area
$attempts = 0
While GetMapID() <> $Target_Map_ID and $attempts < 6
RndTravel($Target_Map_ID) ; Try to reach target map
WaitForLoad() ; Ensure game loads new map
$attempts += 1
WEnd
If GetMapID() == $Target_Map_ID Then
VQ() ; Execute actions like Vanquishing
Else
MsgBox(0, "Error", "Failed to reach target map after 6 attempts.")
Exit ; Stop script on failure
EndIf
WEnd
Understanding Script Functionality
Navigation to a Specific Map
1. Condition Check: If GetMapID() <> $Map_To_Zone Then
This line checks if the current location is not the target destination. If you're not at the desired map, the script activates the navigation process.
2. Initiating Movement: CurrentAction("Moving to Outpost")
Updates the script or game UI to reflect the current task, which is navigating to a specific outpost.
3. Loop Initialization: local $out = 0
Sets up a counter to track the number of navigation attempts, starting at zero.
4. Travel Loop:
Repeatedly attempts to travel to the target zone, waiting for the map to load after each try, and stops after reaching the destination or after 6 attempts.
1. Condition Check: If GetMapID() <> $Map_To_Zone Then
This line checks if the current location is not the target destination. If you're not at the desired map, the script activates the navigation process.
2. Initiating Movement: CurrentAction("Moving to Outpost")
Updates the script or game UI to reflect the current task, which is navigating to a specific outpost.
3. Loop Initialization: local $out = 0
Sets up a counter to track the number of navigation attempts, starting at zero.
4. Travel Loop:
Code:
Do
RndTravel($Map_To_Zone)
WaitForLoad()
$out = $out + 1
Until GetMapID() = $Map_To_Zone or $out = 6
Delay Before Next Action
- Pause Execution: Sleep(3000)
The script waits for 3 seconds before proceeding, allowing time for actions to complete or to simulate more human-like behavior.
The script waits for 3 seconds before proceeding, allowing time for actions to complete or to simulate more human-like behavior.
Several utility functions are implemented to handle repetitive tasks such as checking if the inventory is full, withdrawing gold, and managing the party's composition by adding heroes.
1. Condition for Resource Management: If GetGoldCharacter() < 100 AND GetGoldStorage() > 100 Then
Checks if the character has less than 100 gold and if there's more than 100 gold in storage, indicating a need to transfer funds.
2. Executing Withdrawal:
- Notifies the current action of withdrawing gold.
- Inserts brief delays before and after the gold withdrawal to add variability.
- Withdraws 1000 gold units to ensure the character has enough resources for their activities.
1. Condition for Resource Management: If GetGoldCharacter() < 100 AND GetGoldStorage() > 100 Then
Checks if the character has less than 100 gold and if there's more than 100 gold in storage, indicating a need to transfer funds.
2. Executing Withdrawal:
Code:
CurrentAction("Grabbing gold for shrine")
RndSleep(250)
WithdrawGold(1000)
RndSleep(250)
- Inserts brief delays before and after the gold withdrawal to add variability.
- Withdraws 1000 gold units to ensure the character has enough resources for their activities.
Understanding the MoveTo Function
The `MoveTo` function plays a crucial role by facilitating controlled navigation. It instructs the game's character to move to a predefined set of coordinates, enabling precise positioning and movement across the game's map areas.
Function Usage:
In this command, x and y represent the target coordinates in the game world where the character should move. The script calculates or defines these coordinates based on the task at hand, such as reaching a specific location for a quest, farming spot, or strategic position for combat.
Key Aspects of MoveTo:
- Automated Navigation: By providing direct control over character movement, `MoveTo` allows the script to automate the process of reaching specific locations, significantly reducing the need for manual input and making the automation process more efficient.
- Strategic Movement: Use of `MoveTo` can be tailored to avoid obstacles, enemies, or to navigate through complex terrains by specifying a series of coordinates that plot a safe or efficient path.
- Coordination with Other Functions: Often, `MoveTo` is used in conjunction with other functions such as `WaitForLoad()`, which ensures the game has finished loading the new area before proceeding, or combat functions that engage enemies once the destination is reached.
- Conditional Execution: `MoveTo` commands can be conditionally executed based on game state, such as only moving to a location if a certain item is obtained, or a specific enemy is defeated, enhancing the script's adaptability and intelligence.
Example Scenario:
Function Usage:
Code:
MoveTo(x, y)
Key Aspects of MoveTo:
- Automated Navigation: By providing direct control over character movement, `MoveTo` allows the script to automate the process of reaching specific locations, significantly reducing the need for manual input and making the automation process more efficient.
- Strategic Movement: Use of `MoveTo` can be tailored to avoid obstacles, enemies, or to navigate through complex terrains by specifying a series of coordinates that plot a safe or efficient path.
- Coordination with Other Functions: Often, `MoveTo` is used in conjunction with other functions such as `WaitForLoad()`, which ensures the game has finished loading the new area before proceeding, or combat functions that engage enemies once the destination is reached.
- Conditional Execution: `MoveTo` commands can be conditionally executed based on game state, such as only moving to a location if a certain item is obtained, or a specific enemy is defeated, enhancing the script's adaptability and intelligence.
Example Scenario:
Code:
If Not AtTargetLocation() Then
MoveTo(1234, 5678)
WaitForLoad()
EndIf
Understanding the AggroMoveTo Function
The `AggroMoveTo` function is designed for strategic navigation that involves moving towards a target location while engaging enemies that come within a certain distance. This function is crucial for tasks that require both movement and combat, such as vanquishing or farming in Guild Wars.
Key Components:
- CurrentAction("Hunting " & $s): Displays the current activity, providing feedback that the character is moving towards a target to engage in combat.
- Movement with Randomization: The function initiates movement towards the coordinates ($x, $y) with a random element ($random) to simulate more natural movements and avoid detection by anti-bot mechanisms.
- Engaging Enemies: As the character moves, it continuously checks for nearby enemies. If an enemy is within a predefined distance ($z), the character engages in combat using the `Fight` function.
- Handling Obstacles: The function includes logic to detect if the character is stuck or blocked (by comparing old and new coordinates). If blocked, it attempts to unblock itself by adjusting the position slightly.
- Completion Criteria: The movement continues until the character is within a certain distance of the target location or if it gets blocked too many times ($iBlocked > 20), indicating a possible pathfinding issue.
Code:
Func AggroMoveTo($x, $y, $s = "", $z = 1450)
- CurrentAction("Hunting " & $s): Displays the current activity, providing feedback that the character is moving towards a target to engage in combat.
- Movement with Randomization: The function initiates movement towards the coordinates ($x, $y) with a random element ($random) to simulate more natural movements and avoid detection by anti-bot mechanisms.
- Engaging Enemies: As the character moves, it continuously checks for nearby enemies. If an enemy is within a predefined distance ($z), the character engages in combat using the `Fight` function.
- Handling Obstacles: The function includes logic to detect if the character is stuck or blocked (by comparing old and new coordinates). If blocked, it attempts to unblock itself by adjusting the position slightly.
- Completion Criteria: The movement continues until the character is within a certain distance of the target location or if it gets blocked too many times ($iBlocked > 20), indicating a possible pathfinding issue.
Understanding the Fight Function
The `Fight` function manages combat mechanics, detailing how the character engages with enemies once they are within range.
Combat Loop: This function continuously checks for the nearest enemy and engages until the enemy is defeated or out of range. It uses several key strategies:
- Targeting and Attacking: The script changes the target to the nearest enemy and performs an attack. This process repeats, ensuring the character focuses on one enemy at a time.
- Skill Usage: It cycles through available skills, checking for energy levels, recharge times, and adrenaline, then uses the appropriate skill on the target. This ensures optimal use of the character's abilities.
- Health Management: If the character's health drops below a certain threshold, it uses a healing skill to recover health.
- Loot and Utility: After combat, the function handles looting and checks for chests if specified by the user. This automates resource collection and maximizes efficiency during farming or vanquishing runs.
Code:
Func Fight($x, $s = "")
- Targeting and Attacking: The script changes the target to the nearest enemy and performs an attack. This process repeats, ensuring the character focuses on one enemy at a time.
- Skill Usage: It cycles through available skills, checking for energy levels, recharge times, and adrenaline, then uses the appropriate skill on the target. This ensures optimal use of the character's abilities.
- Health Management: If the character's health drops below a certain threshold, it uses a healing skill to recover health.
- Loot and Utility: After combat, the function handles looting and checks for chests if specified by the user. This automates resource collection and maximizes efficiency during farming or vanquishing runs.
===========================================
Custom Function You May Use, Adapt To Fit Your Script
Player Check and District Swap
DO NOT CHANGE THE FOLLOWING JUST ADD IT TO YOUR SCRIPT
Add Globals with whatever name you need to identify it and then add the correct MapID
Change MapIDs to match what you need for your map needs based on your global
$town will declare what town to go to for different district. So for mine I wanted to go from the one I was in to the same one just a different district.
Code:
Func IsAgentAPlayer($aagent)
if DllStructGetData($aagent,'Allegiance') <> 1 then Return
$thename = GetPlayerName($aAgent)
if $thename = "" then Return
Return True
EndFunc
Add Globals with whatever name you need to identify it and then add the correct MapID
Code:
Global $Treasure_Hunter_Outpost = 675
$town will declare what town to go to for different district. So for mine I wanted to go from the one I was in to the same one just a different district.
Code:
Func CheckForEmptyDis()
Local $mapID = GetMapID() ; Automatically get current map ID
Local $peoplecount = -1
Local $town
$lAgentArray = GetAgentArray()
For $i = 1 To $lAgentArray[0]
$aAgent = $lAgentArray[$i]
if IsAgentAPlayer($aAgent) Then
$peoplecount += 1
EndIf
Next
if $peoplecount > 0 Then ; The Number 0 is the amount of player before trigger the condition
Switch $mapID
Case $mapID = $SS_Outpost
$town = $SS_Outpost ; Switch to a different district
Case $mapID = $SS_LB_Outpost
$town = $SS_LB_Outpost
Case $Deldrimor_Outpost
$town = $Deldrimor_Outpost
Case $Asura_Outpost
$town = $Asura_Outpost
Case $Norn_Outpost
$town = $Norn_Outpost
Case $Vanguard_Outpost
$town = $Vanguard_Outpost
Case $Treasure_Hunter_Outpost
$town = $Treasure_Hunter_Outpost
Case $Kurzick_Outpost
$town = $Kurzick_Outpost
Case $Luxon_Outpost
$town = $Luxon_Outpost
EndSwitch
CurrentAction("Player Detected, Moving to " & $town)
RndTravel($town) ; Call RndTravel with the new map/district
Return False
Else
CurrentAction("No Players! We Safe!")
Return True
EndIf
EndFunc
Heroes
Code:
Global Enum $HERO_Norgu = 1, $HERO_Goren, $HERO_Tahlkora, $HERO_MasterOfWhispers, $HERO_AcolyteJin, $HERO_Koss, $HERO_Dunkoro, $HERO_AcolyteSousuke, $HERO_Melonni, _ $HERO_ZhedShadowhoof, $HERO_GeneralMorgahn, $HERO_MargridTheSly, $HERO_Olias = 14, $HERO_Razah, $HERO_MOX, $HERO_Jora = 18, $HERO_PyreFierceshot, _ $HERO_Livia = 21, $HERO_Hayda, $HERO_Kahmu, $HERO_Gwen, $HERO_Xandra, $HERO_Vekk, $HERO_Ogden
Code:
Global Enum $HERO_MercenaryHero1 = 28, $HERO_MercenaryHero2 = 29, $HERO_MercenaryHero3 = 30, $HERO_MercenaryHero4 = 31, $HERO_MercenaryHero5 = 32, $HERO_MercenaryHero6 = 33, $HERO_MercenaryHero7 = 34, $HERO_MercenaryHero8 = 35
Code:
Func GetHeroIdByName($heroName)
Switch $heroName
Case "Norgu"
Return $HERO_Norgu
Case "Goren"
Return $HERO_Goren
Case "Tahlkora"
Return $HERO_Tahlkora
Case "Master Of Whispers"
Return $HERO_MasterOfWhispers
Case "Acolyte Jin"
Return $HERO_AcolyteJin
Case "Koss"
Return $HERO_Koss
Case "Dunkoro"
Return $HERO_Dunkoro
Case "Acolyte Sousuke"
Return $HERO_AcolyteSousuke
Case "Melonni"
Return $HERO_Melonni
Case "Zhed Shadowhoof"
Return $HERO_ZhedShadowhoof
Case "General Morgahn"
Return $HERO_GeneralMorgahn
Case "Margrid The Sly"
Return $HERO_MargridTheSly
Case "Olias"
Return $HERO_Olias
Case "Razah"
Return $HERO_Razah
Case "MOX"
Return $HERO_MOX
Case "Jora"
Return $HERO_Jora
Case "Pyre Fierceshot"
Return $HERO_PyreFierceshot
Case "Livia"
Return $HERO_Livia
Case "Hayda"
Return $HERO_Hayda
Case "Kahmu"
Return $HERO_Kahmu
Case "Gwen"
Return $HERO_Gwen
Case "Xandra"
Return $HERO_Xandra
Case "Vekk"
Return $HERO_Vekk
Case "Ogden"
Return $HERO_Ogden
Case "Mercenary Hero 1"
Return $HERO_MercenaryHero1
Case "Mercenary Hero 2"
Return $HERO_MercenaryHero2
Case "Mercenary Hero 3"
Return $HERO_MercenaryHero3
Case "Mercenary Hero 4"
Return $HERO_MercenaryHero4
Case "Mercenary Hero 5"
Return $HERO_MercenaryHero5
Case "Mercenary Hero 6"
Return $HERO_MercenaryHero6
Case "Mercenary Hero 7"
Return $HERO_MercenaryHero7
Case "Mercenary Hero 8"
Return $HERO_MercenaryHero8
Case Else
Return -1 ; Hero name not found
EndSwitch
EndFunc
===============================================
If you have any questions or concerns, or if you're skilled in coding and wish to contribute, please join our Discord:






