GENERAL¶
toggle¶
Parameters¶
NAME: The name of the toggle setting to check.
Returns BOOL¶
-
trueif the toggle is enabled,falseotherwise."MasterToggle", "Interrupts", "Cooldowns", "AoE"and"custom_toggles".
Example:¶
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},
...
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:¶
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 actualGCDRemainsfunction.
Returns NUMBER¶
- The time remaining on the GCD in seconds. Returns
0if GCD is not active.
Example:¶
interruptible¶
Parameters¶
UNIT: The unit to check.
Returns BOOL¶
trueif the unit is currently casting or channeling a spell that can be interrupted,falseotherwise.
Example:¶
castid¶
Parameters¶
UNIT: The unit to check.
Returns NUMBER¶
- The spell ID of the spell the unit is currently casting. Returns
0if not casting.
Example:¶
channelid¶
Parameters¶
UNIT: The unit to check.
Returns NUMBER¶
- The spell ID of the spell the unit is currently channeling. Returns
0if not channeling.
Example:¶
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
nilif not casting/channeling or no specific target.
Example:¶
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
nilif not casting/channeling or no specific target.
Example:¶
iscasting.any.spell¶
iscasting.any.spell || isCastingAny
Parameters¶
UNIT: The unit to check for casting or channeling.
Returns BOOL¶
trueif the specified unit is currently casting or channeling a spell,falseotherwise.
Example:¶
iscasting¶
Parameters¶
UNIT: The unit to check for casting.NameOrID: The name or ID of the spell to check against.
Returns BOOL¶
trueif the specified unit is currently casting the specified spell,falseotherwise. This does not check for channeling.
Example:¶
ischanneling¶
Parameters¶
UNIT: The unit to check for channeling.NameOrID: The name or ID of the spell to check against.
Returns BOOL¶
trueif the specified unit is currently channeling the specified spell,falseotherwise.
Example:¶
iscasting.on.me¶
iscasting.on.me || isCastingOnMe
Parameters¶
UNIT: The unit to check for casting or channeling.
Returns BOOL¶
trueif the specified unit is casting or channeling a spell targeted at the player,falseotherwise.
Example:¶
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
0if not casting or channeling.
Example:¶
channeling.percent¶
Parameters¶
UNIT: The unit to check for channeling.
Returns NUMBER¶
- The percentage of completion for the current channel. Returns
0if not channeling.
Example:¶
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 -
trueif the ability is being channeled,falseif it's a cast. - 4th -
trueif the spell is not interruptible,falseotherwise. - Returns
0for all values if not casting or channeling.
Example:¶
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
0if not casting or channeling.
Example:¶
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
999if not currently casting or channeling.
Example:¶
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¶
trueif the unit is casting the specified spell,falseotherwise.
Example:¶
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¶
trueif the unit is channeling the specified spell,falseotherwise.
Example:¶
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¶
trueif the cast/channel has passed the specified percentage threshold and is interruptible,falseotherwise.
Example:¶
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¶
trueif the cast/channel has passed the specified percentage threshold,falseotherwise. This does not check if the spell is interruptible.
Example:¶
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¶
trueif a custom interrupt action is defined for the currently casting spell,falseotherwise.
Example:¶
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¶
trueif a custom stun action is defined for the currently casting spell,falseotherwise.
Example:¶
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¶
trueif a custom CC debuff is present on the unit,falseotherwise.
Example:¶
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¶
trueif a custom dispellable debuff is present on the unit,falseotherwise.
Example:¶
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¶
trueif a custom purgable buff is present on the unit,falseotherwise.
Example:¶
isnear¶
Parameters¶
UNIT: The unit to check distance from (typically"player").ARGS: A string containingTARGET_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¶
trueif an enemy unit with the specifiedTARGET_IDis found withinDISTANCEyards of the firstUNIT,falseotherwise.
Example:¶
bagSpace¶
Returns NUMBER¶
- The total number of free bag slots across all bags.
Example:¶
timeout¶
timeout || to
Parameters¶
UNIT: The unit this timeout is associated with. Can be a unit ID or GUID.NAME_XTIME: A string containingNAME,XTIME.NAME: A unique identifier for this specific timeout.XTIME: The time in seconds the timeout will remain active.
Returns BOOL¶
truewhen first called or while the timeout is active (i.e., less thanXTIMEseconds have passed). ReturnsfalseonceXTIMEseconds have elapsed since the first call with the givenUNITandNAME. After returningfalse, the timeout is reset.
Example:¶
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:¶
frame.visible¶
Parameters¶
NAME: The name of the UI frame to check.
Returns BOOL¶
trueif a UI frame with the givenNAMEexists, is of type table, its name matchesNAME, and it is currently shown (IsShown()returns true).falseotherwise.
Example:¶
spell.AutocastEnabled¶
Parameters¶
SPELL: The name or ID of the spell to check.
Returns BOOL¶
trueif the spell is auto-castable and auto-cast is currently enabled for that spell,falseotherwise.