Skip to content

GENERAL


toggle

Parameters

  • NAME: The name of the toggle setting to check.

Returns BOOL

  • true if the toggle is enabled, false otherwise.

    "MasterToggle", "Interrupts", "Cooldowns", "AoE" and "custom_toggles".

Example:

{ACTION, "toggle(AoE)"},
_A.DSL:Get("toggle")(_, "AoE")
PLAYER:Toggle("AoE")

ui

Parameters

  • KEY: The name of the key in the GUI configuration to check.
  • UI_KEY (optional): The name of the UI element. Defaults to the current combat routine's name.

Returns BOOL or STRING or NUMBER

  • The value associated with the provided key in the GUI configuration.

Example:

local GUI = {
    ...
    {type = "checkbox", text = "Ashamane's Frenzy", key = "ashamane_key", default = true},
    ...
{ACTION, "ui(ashamane_key)" },
{ACTION, "ui(some_other_key, MyOtherUI)" },
_A.DSL:Get("ui")(_, "ashamane_key")
_A.DSL:Get("ui")(_, "some_other_key,MyOtherUI")
PLAYER:Ui("ashamane_key")
PLAYER:Ui("some_other_key,MyOtherUI")

timetomax

Parameters

  • UNIT: The unit to check. Defaults to "player" if not specified.

Returns NUMBER

  • The time in seconds it will take for the unit's primary resource (e.g., Mana, Rage, Energy) to reach its maximum value, based on current regeneration rate.

Example:

{ACTION, "timetomax < 5"},
{ACTION, "target.timetomax > 2"},
_A.DSL:Get("timetomax")() < 5
_A.DSL:Get("timetomax")("target") > 2
PLAYER:Timetomax() < 5
TARGET:Timetomax() > 2

gcd

  • This condition calculates the Global Cooldown (GCD) duration for the player's class.
  • Note: The provided code registers GCDRemains, which returns the time remaining on the GCD, not its total duration. The documentation below reflects the actual GCDRemains function.

Returns NUMBER

  • The time remaining on the GCD in seconds. Returns 0 if GCD is not active.

Example:

{ACTION, "gcd <= 0.1"},
_A.DSL:Get("GCDRemains")() <= 0.1
PLAYER:GCDRemains() <= 0.1

interruptible

Parameters

  • UNIT: The unit to check.

Returns BOOL

  • true if the unit is currently casting or channeling a spell that can be interrupted, false otherwise.

Example:

{ACTION, "target.interruptible"},
_A.DSL:Get("interruptible")("target")
TARGET:Interruptible()

castid

Parameters

  • UNIT: The unit to check.

Returns NUMBER

  • The spell ID of the spell the unit is currently casting. Returns 0 if not casting.

Example:

{ACTION, "target.castid == 133"}, -- e.g., "Fireball"
_A.DSL:Get("castid")("target") == 133
TARGET:Castid() == 133

channelid

Parameters

  • UNIT: The unit to check.

Returns NUMBER

  • The spell ID of the spell the unit is currently channeling. Returns 0 if not channeling.

Example:

{ACTION, "target.channelid == 5143"}, -- e.g., "Arcane Missiles"
_A.DSL:Get("channelid")("target") == 5143
TARGET:Channelid() == 5143

castTargetKEY

Parameters

  • UNIT: The unit whose cast target is being checked.

Returns STRING

  • A key or pointer identifying the target of the unit's current cast or channel. Returns nil if not casting/channeling or no specific target.

Example:

{ACTION, "target.castTargetKEY == some_pointer_value"},
_A.DSL:Get("castTargetKEY")("target") == some_pointer_value
TARGET:CastTargetKEY() == some_pointer_value

castTargetGUID

Parameters

  • UNIT: The unit whose cast target is being checked.

Returns STRING

  • The GUID (Globally Unique Identifier) of the target of the unit's current cast or channel. Returns nil if not casting/channeling or no specific target.

Example:

{ACTION, "target.castTargetGUID == PlayerGUID"},
_A.DSL:Get("castTargetGUID")("target") == PlayerGUID
TARGET:CastTargetGUID() == PlayerGUID

iscasting.any.spell

iscasting.any.spell || isCastingAny

Parameters

  • UNIT: The unit to check for casting or channeling.

Returns BOOL

  • true if the specified unit is currently casting or channeling a spell, false otherwise.

Example:

{ACTION, "target.isCastingAny"},
_A.DSL:Get("isCastingAny")("target")
TARGET:IsCastingAnySpell()

iscasting

Parameters

  • UNIT: The unit to check for casting.
  • NameOrID: The name or ID of the spell to check against.

Returns BOOL

  • true if the specified unit is currently casting the specified spell, false otherwise. This does not check for channeling.

Example:

{ACTION, "target.iscasting(Regrowth)", target},
{ACTION, "target.iscasting(740)", target}, -- (1)!
  1. Tranquility
_A.DSL:Get("isCasting")("target", "Regrowth")
_A.DSL:Get("isCasting")("target", "740") -- (1)!
  1. Tranquility
TARGET:Iscasting("Regrowth")
TARGET:Iscasting(740) -- (1)!
  1. Tranquility

ischanneling

Parameters

  • UNIT: The unit to check for channeling.
  • NameOrID: The name or ID of the spell to check against.

Returns BOOL

  • true if the specified unit is currently channeling the specified spell, false otherwise.

Example:

{ACTION, "target.ischanneling(Arcane Missiles)", target},
{ACTION, "target.ischanneling(5143)", target}, -- (1)!
  1. Arcane Missiles
_A.DSL:Get("isChanneling")("target", "Arcane Missiles")
_A.DSL:Get("isChanneling")("target", "5143") -- (1)!
  1. Arcane Missiles
TARGET:Ischanneling("Arcane Missiles")
TARGET:Ischanneling(5143) -- (1)!
  1. Arcane Missiles

iscasting.on.me

iscasting.on.me || isCastingOnMe

Parameters

  • UNIT: The unit to check for casting or channeling.

Returns BOOL

  • true if the specified unit is casting or channeling a spell targeted at the player, false otherwise.

Example:

{ACTION, "target.isCastingOnMe", target},
_A.DSL:Get("isCastingOnMe")("target")
TARGET:IscastingOnMe()

casting.percent

Parameters

  • UNIT: The unit to check for casting or channeling.

Returns NUMBER

  • The percentage of completion for the current cast or channel. Returns 0 if not casting or channeling.

Example:

{ACTION, "target.casting.percent >= 60", target},
_A.DSL:Get("casting.percent")("target") >= 60
TARGET:CastingPercent() >= 60

channeling.percent

Parameters

  • UNIT: The unit to check for channeling.

Returns NUMBER

  • The percentage of completion for the current channel. Returns 0 if not channeling.

Example:

{ACTION, "target.channeling.percent >= 60", target},
_A.DSL:Get("channeling.percent")("target") >= 60
TARGET:ChannelingPercent() >= 60

casting.delta

Parameters

  • UNIT: The unit to check for casting or channeling.

Returns NUMBER, NUMBER, BOOL, BOOL

  • 1st - The time remaining for the current cast/channel in seconds.
  • 2nd - The total cast/channel time in seconds.
  • 3rd - true if the ability is being channeled, false if it's a cast.
  • 4th - true if the spell is not interruptible, false otherwise.
  • Returns 0 for all values if not casting or channeling.

Example:

{ACTION, "target.casting.delta < 0.5", target},
local remaining, total, ischanneled, notInterruptible = _A.DSL:Get("casting.delta")("target")
local remaining, total, ischanneled, notInterruptible = TARGET:CastingDelta()

casting.length

Parameters

  • UNIT: The unit to check for casting or channeling.

Returns NUMBER

  • The length (duration) of the current cast or channel in seconds. Returns 0 if not casting or channeling.

Example:

{ACTION, "target.casting.length > 1.5", target},
_A.DSL:Get("casting.length")("target") > 1.5
TARGET:CastingLength() > 1.5

casting.remaining

Parameters

  • UNIT: The unit to check for casting or channeling.

Returns NUMBER

  • The remaining time in seconds for the current cast or channel. Returns 999 if not currently casting or channeling.

Example:

{ACTION, "target.casting.remaining < 0.5", target},
_A.DSL:Get("casting.remaining")("target") < 0.5
TARGET:CastingRemaining() < 0.5

casting

This condition checks if a unit is currently casting a specific spell.

Parameters

  • UNIT: The unit to check for casting.
  • SPELL: The spell to check if the unit is casting.

Returns BOOL

  • true if the unit is casting the specified spell, false otherwise.

Example:

{ACTION, "target.casting(Regrowth)", target},
_A.DSL:Get("casting")("target", "Regrowth")
TARGET:Casting("Regrowth")

channeling

This condition checks if a unit is currently channeling a specific spell.

Parameters

  • UNIT: The unit to check for channeling.
  • SPELL: The spell to check if the unit is channeling.

Returns BOOL

  • true if the unit is channeling the specified spell, false otherwise.

Example:

{ACTION, "target.channeling(Arcane Missiles)", target},
_A.DSL:Get("channeling")("target", "Arcane Missiles")
TARGET:Channeling("Arcane Missiles")

interruptAt

Parameters

  • UNIT: The unit whose casting to evaluate for interruption.
  • PERCENTAGE (optional): The percentage threshold to interrupt the cast (default: 35, with a random variance of -5 to +5). For channeled spells, the threshold is effectively 30%.

Returns BOOL

  • true if the cast/channel has passed the specified percentage threshold and is interruptible, false otherwise.

Example:

{ACTION, "target.interruptAt(60)", target},
_A.DSL:Get("interruptAt")("target", "60")
TARGET:InterruptAt(60)

stunAt

Parameters

  • UNIT: The unit whose casting to evaluate for stunning.
  • PERCENTAGE (optional): The percentage threshold to stun the cast (default: 35, with a random variance of -5 to +5). For channeled spells, the threshold is effectively 30%.

Returns BOOL

  • true if the cast/channel has passed the specified percentage threshold, false otherwise. This does not check if the spell is interruptible.

Example:

{ACTION, "target.stunAt(60)", target},
_A.DSL:Get("stunAt")("target", "60")
TARGET:StunAt(60)

custom.interrupts

  • This condition checks if a custom interrupt action is defined (in the plugin's custom tables) for the spell the target is currently casting.

Parameters

  • UNIT: The unit whose casting to evaluate for a custom interrupt.

Returns BOOL

  • true if a custom interrupt action is defined for the currently casting spell, false otherwise.

Example:

{ACTION, "target.custom.interrupts", target},
_A.DSL:Get("custom.interrupts")("target")
TARGET:CustomInterrupts()

custom.stuns

  • This condition checks if a custom stun action is defined (in the plugin's custom tables) for the spell the target is currently casting.

Parameters

  • UNIT: The unit whose casting to evaluate for a custom stun.

Returns BOOL

  • true if a custom stun action is defined for the currently casting spell, false otherwise.

Example:

{ACTION, "target.custom.stuns", target},
_A.DSL:Get("custom.stuns")("target")
TARGET:CustomStuns()

custom.cc

  • This condition checks if the unit has any debuff listed in the custom crowd control (CC) table (defined in the plugin).

Parameters

  • UNIT: The unit to check for custom CC debuffs.

Returns BOOL

  • true if a custom CC debuff is present on the unit, false otherwise.

Example:

{ACTION, "target.custom.cc", target},
_A.DSL:Get("custom.cc")("target")
TARGET:CustomCc()

custom.dispels

  • This condition checks if the unit has any dispellable debuff listed in the custom dispels table (defined in the plugin).

Parameters

  • UNIT: The unit to check for custom dispellable debuffs.

Returns BOOL

  • true if a custom dispellable debuff is present on the unit, false otherwise.

Example:

{ACTION, "target.custom.dispels", target},
_A.DSL:Get("custom.dispels")("target")
TARGET:CustomDispels()

custom.purges

  • This condition checks if the unit has any purgable buff listed in the custom purges table (defined in the plugin).

Parameters

  • UNIT: The unit to check for custom purgable buffs.

Returns BOOL

  • true if a custom purgable buff is present on the unit, false otherwise.

Example:

{ACTION, "target.custom.purges", target},
_A.DSL:Get("custom.purges")("target")
TARGET:CustomPurges()

isnear

Parameters

  • UNIT: The unit to check distance from (typically "player").
  • ARGS: A string containing TARGET_ID,DISTANCE.
    • TARGET_ID: The NPC ID of the target unit to check proximity to.
    • DISTANCE: The maximum distance in yards to be considered "near".

Returns BOOL

  • true if an enemy unit with the specified TARGET_ID is found within DISTANCE yards of the first UNIT, false otherwise.

Example:

{ACTION, "isnear(12345, 30)"}, -- Check if an enemy with ID 12345 is within 30 yards of the player.
_A.DSL:Get("isnear")(_, "12345,30")
PLAYER:Isnear("12345,30")

bagSpace

Returns NUMBER

  • The total number of free bag slots across all bags.

Example:

{ACTION, "bagSpace > 0"},
_A.DSL:Get("bagSpace")() > 0
PLAYER:BagSpace() > 0

timeout

timeout || to

Parameters

  • UNIT: The unit this timeout is associated with. Can be a unit ID or GUID.
  • NAME_XTIME: A string containing NAME,XTIME.
    • NAME: A unique identifier for this specific timeout.
    • XTIME: The time in seconds the timeout will remain active.

Returns BOOL

  • true when first called or while the timeout is active (i.e., less than XTIME seconds have passed). Returns false once XTIME seconds have elapsed since the first call with the given UNIT and NAME. After returning false, the timeout is reset.

Example:

{ACTION, "target.to(bloodlust_window, 40)", target}, -- Will be true for 40s after first use, then false.
_A.DSL:Get("timeout")("target", "bloodlust_window,40")
TARGET:Timeout("bloodlust_window,40")

timeout.reset

  • This condition resets a specific timeout, allowing it to start fresh the next time it is called.

Parameters

  • UNIT: The unit this timeout is associated with. Can be a unit ID or GUID.
  • NAME: The unique identifier for the timeout to reset.

Returns NIL

  • This condition does not return a value.

Example:

{ACTION, "target.timeout.reset(bloodlust_window)", target},
_A.DSL:Get("timeout.reset")("target", "bloodlust_window")
target:TimeoutReset("bloodlust_window")

frame.visible

Parameters

  • NAME: The name of the UI frame to check.

Returns BOOL

  • true if a UI frame with the given NAME exists, is of type table, its name matches NAME, and it is currently shown (IsShown() returns true). false otherwise.

Example:

{ACTION, "frame.visible(MyCustomFrame)"},
_A.DSL:Get("frame.visible")(_, "MyCustomFrame")
PLAYER:FrameVisible("MyCustomFrame")

spell.AutocastEnabled

Parameters

  • SPELL: The name or ID of the spell to check.

Returns BOOL

  • true if the spell is auto-castable and auto-cast is currently enabled for that spell, false otherwise.

Example:

{ACTION, "spell.AutocastEnabled(Arcane Intellect)"},
_A.DSL:Get("spell.AutocastEnabled")(_, "Arcane Intellect")

```lua PLAYER:SpellAutocastEnabled("Arcane Intellect")