OPie: Extended macros

Macros executed via OPie can make use of additional advanced functionality described on this page, and can be of arbitrary length.

Table of Contents

Macro preprocessing

Custom macros are preprocessed to account for the abilities available to your character. When you edit a custom macro, recognized ability names in /cast-like commands are highlighted in blue, and are stored as {{spell:id}} tokens. When preprocessing the macro prior to use, these tokens are replaced by the corresponding ability name if the ability is known by your character, or removed from the macro if it is not. Commands where all arguments are removed in this fashion are removed from the macro, and empty macros are by default not displayed in OPie rings.

This makes it easier to write macros that adapt to your specialization or talent choices. For example, you could write /cast Heart of the Wild; Nature's Vigil; Feral Frenzy in a custom macro in order to cast the first of these abilities that your character knows, or /castrandom Heart of the Wild, Nature's Vigil, Feral Frenzy to cast a random known ability among those listed.

Available replaceable tokens

You can include the following special tokens within /cast-like commands in your macros:

{{spell:id}}
Replaced by the spell name corresponding to the specified ID if the player character knows a spell with that name. Ranks are typically omitted, causing you to cast the highest-known rank. You may specify multiple spell IDs separated by slashes; the spell ID that would produce output is used to do so.
{{spellr:id}}
Replaced by the spell name corresponding to the specified ID if that spell is known by the player character. Spell ranks are typically included, causing you to cast the rank corresponding to the given spell ID. You may specify multiple spell IDs separated by slashes; the spell ID that would produce output is used to do so.
{{mount:ground}} (Modern-only)
Replaced by an arbitrary ground mount.
{{mount:air}} (Modern-only)
Replaced by an arbitrary flying mount.
{{mount:dragon}} (Modern-only)
Replaced by an arbitrary dragonriding mount.

Additional castable actions

The /cast, /castrandom, and /use commands recognize certain additional abilities in custom macros. You can for example use:

  • /cast Summon Random Favorite Mount
  • /cast Summon Random Favorite Battle Pet
  • /cast spell:768 to cast a spell by ID.

Extended conditionals

You may use extended macro conditionals and units in combination with any macro command or metacommand that accepts secure options (like /cast or #show).

For example, you might try:

/cast [zone:isle of thunder] Kirin Tor Beacon; Hearthstone
/cast [form:cat] Prowl; Cat Form
/cast [@healer1] Innervate

Using secure options with other commands

You can use the #parse metacommand to cause the next line's slash command arguments to be parsed as secure options, even if the next command does not natively do this. If none of the option clauses apply, the following command is not executed.

For example, you could use secure conditionals in combination with /say to only send a message if a conditional is true:

#parse
/say [@target,exists] I have a target!

Muting error notifications

The #mute metacommand suppresses error notifications (like "Invalid target" or "Ability is not ready yet") and sounds until the end of the macro, or until an #unmute, whichever occurs first.

The #mutenext metacommand suppresses error notifications and sounds caused by the next command only.

For example, you might use when attempting to use cooldowns opportunistically:

#mute
/use 13
/use 14
/cast Presence of Mind
#unmute
/cast Pyroblast
#mutenext
/use 13
/cast Pyroblast

Controlling automatic form cancellation

The #nounshift metacommand temporarily configures the client to not automatically drop Druid forms in order to cast spells. It accepts extended secure options. If its argument evalutes to next, the auto-unshift behavior is suspended for the following slash command; if it evalutes to any other value, the auto-unshift behavior is suspended while the macro is running; if none of the conditional clauses apply, no change is made.

Due to a Blizzard restriction, on Modern WoW, this command only works while out of combat.

You might use this in a macro like the following, where the conditional prevents the player from exiting out of Cat Form if the Predatory Swiftness buff allowing an instant in-form Regrowth cast isn't active:

#nounshift [form:cat]
/cast [@player] Regrowth

Controlling macro feedback

You can use the #skip metacommand to indicate that the next command should not be used to provide feedback (icon, cooldown information) for the slice.

You can use the #important metacommand to indicate that the next command should be used to provide feedback for the slice with higher priority than it would ordinarily be.

For example, the following two macros provide a similar effect: despite /cast Presence of Mind appearing first, feedback for the slice will be based on /cast Pyroblast:

#skip
/cast Presence of Mind
/cast Pyroblast
/cast Presence of Mind
#important
/cast Pyroblast

The #show and #showtooltip metacommands treated as a virtual /use command at the start of the macro, preceded by an #important metacommand. When used without arguments, #show and #showtooltip have no effect, as OPie always attempts to provide feedback based on a macro's content.

In the background, OPie assigns numeric priorities to each type of action you may perform, which determine what command in a macro will be used to provide feedback for the slice. Innate priorities are in the 0-100 range, with player abilities at 100, items at 90, and actions like equipping items or setting raid/world markers at lower priorities. By default, #skip reduces innate priority by ∞ (preventing the command from ever being used for feedback), while #important raises innate priority by 1000; you may customize both of these effects by providing a numerical argument to either metacommand.

The innate priorities allow the following macro to display feedback for Pyroblast rather than the trinket:

/cast 13
/cast Pyroblast

#icon, #iconb, #iconc

You can use the #icon metacommand to override the action-based icon assignment using macro conditionals, specifying an icon using either its filename (for icons in the Interface/Icons directory), a full texture path, or a fileID; or an atlas entry using its name. You may use secure command options and extended conditionals to specify the arguments to this metacommand.

For example, the following macro cycles through various cake icons depending on modifier state while using the Fireball spell for other feedback:

#icon [nomod] inv_misc_celebrationcake_01; [mod:alt] 237358; interface/icons/inv_misc_food_147_cake
/cast Fireball

#iconb and #iconc metacommands accept the same arguments as #icon. These commands only change the feedback icon if there was no other source of icon feedback for the macro. If an icon is applied via #iconc, the macro will provide feedback that its action is not currently usable, which typically results in a dimmed icon being displayed.

#count

You can use the #count metacommand to override the action-based count feedback using macro conditionals, specifying an item name (or ID) to display the bag count of. You may use secure command options and extended conditionals to specify the arguments to this metacommand.

#label

You can use the #label metacommand to provide a short text label to display as part of the action feedback. This is typically used to display macro names. You may use secure command options and extended conditionals to specify the arguments to this metacommand.

/runmacro Recursion

You can use the /runmacro command to trigger another macro created through the /macro interface by name.

For example, you might branch conditionally:

/runmacro [mod] MacroOne; MacroTwo