Macro conditionals

This page lists macro conditionals, keywords used with macro commands, the RestrictedEnvironment and the SecureStateDriver API to allow limited logic for player convenience without trivializing the game.

Refer to secure command options for syntax and making a macro for a tutorial.

Temporary targeting
/cast [@focus] Counterspell The following keywords temporarily assign a target that the macro command will act on. This only applies to a single action; it does not change the player's selected target.
 * @unitId : Replace with any valid unitId (@player, @target, @focus, etc.)
 * @cursor : Immediately targets the ground under the cursor.
 * @none : Interupts auto self-cast and requires a targeting cursor.

is also an alias for. However, despite the name, this still only affects a single macro command without changing the player's target.

Boolean conditions
/cast [dead] Resurrection; Heal All other conditionals evaluate as either true to execute the macro command, or false to skip it. The  prefix reverses this (ie, nodead means alive).

The following tables categorize each boolean condition by whether it evaluates the state of any target, only the player, or the user interface.