Jack's Guides & Tutorials
  • đŸ—‚ī¸Jack's Tutorials
  • Getting Started
    • 🔑Get a License
    • đŸ“ĨDownload and Install Jack
    • âš ī¸Addon, Action Bars & Keybinds
    • đŸ•šī¸Quick Start Guide
  • Profile Manager
    • 🆓Download Free Profiles
    • ⭐Premium Profiles
      • Profile Store
      • Bottie Coins
    • âœī¸Create a Profile
      • Settings
      • Mobs
      • Black- & Whitelist
      • Black Spots
      • Stuck Paths
    • âš™ī¸Advanced Settings
  • Event Manager
    • đŸƒâ€â™‚ī¸Create an Event
    • ⚡Events
      • Add Vendor, Mailbox and More
      • Interact with...
      • Load Profile
      • Load Rotation
      • Wait
      • Cast Spell
      • Change Walk Sensitivity
      • Use Hearthstone
      • Start Fishing
      • Use Transport
      • Execute LUA
      • Change Profile Settings
      • Go through Portal
      • Start Combat
      • Kill and Loot Attackers
      • Enter/Leave Dungeon
      • Reset Dungeons
      • Stop walking
      • Start walking
      • Jump
      • Jump while walk
      • Walk while jump
      • Start Swimming
      • Stop Swimming
      • Loot
      • Facing next Waypoint
      • Stop
  • Rotation Manager
    • đŸ¤ēDefault Rotation
    • âœī¸Create a Rotation
    • âš”ī¸Rotation Manager
    • đŸ”ĨSpell Conditions
  • Quest Manager
    • â‰ī¸Create a Quest Profile
    • âš™ī¸Options
      • NPC's, Food and Drink
      • Profile Settings
      • Quest Archive
    • ⚡Events
      • Do Quest
      • Interact with...
      • Stopover
      • Go to Trainer
      • Go through Portal
      • Execute LUA
      • Use Transport
      • Load Profile
      • Check Quest Availability
  • PvP Manager
    • đŸ›Ąī¸Create a PvP Profile
  • Modules
    • 👨‍👩‍đŸ‘Ļ‍đŸ‘ĻSessions
    • đŸ“ŦNotifications
  • Settings & Features
    • 🔧Diagnostic
    • đŸ‘ī¸Overlay
    • 🧩Addon
    • âš™ī¸Settings
    • â„šī¸Live Status Bar
    • đŸ—ŊPoints of Interest
    • đŸ‘ĨAccount Manager
    • 📋Lists
    • 📑Object Lists
Powered by GitBook
On this page
  • Index
  • Official Commands
  • Custom Commands
  1. Event Manager
  2. ⚡Events

Execute LUA

PreviousUse TransportNextChange Profile Settings

Use this event if you want to execute one or more LUA commands.

You can combine official LUA commands with custom LUA commands (line by line).

Index

  1. Official Commands

  2. Custom Commands


Official Commands

The official WoW LUA API comes with a bunch of commands and functions that anyone can access and use.

Here you can find a clear list.

These commands have different execution levels. Most can be executed individually or in combination directly. Others require a hardware event and can only be executed with a mouse click or key press.

  • Copy the following command into the LUA event text field.

print("My name is "..UnitName("player")..".")
  • Click on the "Test" button to test the command.

  • The output in your in-game chat should look like this:

Since this command doesn't really give us anything, we'll build ourselves a little conditional query to check if we have a Hearthstone in our bags:

if GetItemCount(6948) == 1 then
    print("Yay, i have a Hearthstone in my bag.")
else
    print("I have no Hearthstone in my bag ;(")
end

Also possible as a function:

function CheckMyHearthstone()
    if GetItemCount(6948) >= 1 then
        print("Yay, i have a Hearthstone in my bag.")
    else
        print("I have no Hearthstone in my bag ;(")
    end
end

CheckMyHearthstone()

If a function is passed, it remains until the next reload of the game.

Alternatively, we can trigger commands or a conditional query as a Key Press event by placing a /run in front of it.

/run print("My name is "..UnitName("player")..".")

Enter commands line by line if you want to execute several in a row:

/run print("My name is "..UnitName("player")..".")
/dance

Custom Commands

  • Click on "Show custom commands" to display a list and descriptions of all custom commands.

To explain the structure, we click on the "WaitForNPC" command on the left.

  1. Name of the command.

  2. Duty Argument.

  3. Optional arguments.

WaitForNPC("NameOrID" [, "MaximumWaitTime", "DistanceInYards", "DeadOrAlive"])

All arguments in square brackets are optional.

  1. Description of the command and what it does.

  2. Description of all arguments and what influence they can have.

  3. Example(s) of correct execution of the command.

We have here a command with 4 arguments. One mandatory and three optional.

First we look for the name or ID of the NPC we want to wait for. We simply take the ID "12345" as an example.

The simplest execution of the command would now look like this:

WaitForNPC("12345")

If we now want to change the maximum waiting time, we extend the command and specify a waiting time of 30 seconds:

WaitForNPC("12345", "30")

We would now like to extend the maximum search radius to 60 yards:

WaitForNPC("12345", "30", "60")

If we assume that we are looking for a dead target, we set the DeadOrAlive argument to "0":

WaitForNPC("12345", "30", "60", "0")

Custom LUA commands cannot be tested.