After searching the internet for a truly good method to macro Safeguard/Intervene I came to the realization that what I wanted hadn't created yet. With that opportunity, I scripted what I consider to be the hands down best way (in terms of utility) to macro Safeguard/Intervene. Due to its complexity, the macro commands had to be split amongst multiple macros, each placed on the action bar; for this reason I shall refer to the macros collectively as a framework.
There are two main features that the framework provides:
- Selecting a character to Safeguard/Intervene based on a priority
- Attempting to Safeguard/Intervene a Mocking Banner
While the prioritization structure of the framework is quite simple, the Mocking Banner selection was quite difficult to implement. In the past, there have been countless macros that have been considered suitable for casting Safeguard/Intervene on a player's Mocking Banner; however, none of them consistently preserved targets. In most cases, it was generalized that the players using the macros would have a target already selected when the macro would be cast. In the cases that a player did not have a target, the player would end up with its previous target selected in the end, although Safeguard/Intervene would have been cast on a banner if it was placed; however, using the macro when a Mocking Banner was not summoned would drop the player's current target.
The macro framework I have written corrects these errors and adds additional functionality to what was previously seen as the "best" method to macro Safeguard/Intervene. The following code blocks are each an individual macro. After creating the macros, drag them onto the action bars.
Activation (Composite):
Code:
#showtooltip Safeguard
/click [modifier:shift] actionButtonAlpha
/click [nomodifier] actionButtonBravo
actionButtonAlpha represents the location of the Activation (Banner) macro on the action bars.
actionButtonBravo represents the location of the Activation (Priority) macro on the action bars.
Activation (Priority):
Code:
#showtooltip Safeguard
/cast [party,exists,nodead][raid,exists,nodead][@focus,party,exists,nodead][@focus,raid,exists,nodead][] Safeguard
Activation (Banner):
Code:
#showtooltip Safeguard
/click [target,noexists] actionButtonCharlie
/stopmacro [target,noexists]
/click [target,exists] actionButtonDelta
/targetlasttarget
actionButtonCharlie represents the location of the Banner (No Target) macro on the action bars.
actionButtonDelta represents the location of the Banner (Target) macro on the action bars.
Banner (No Target):
Code:
#showtooltip Safeguard
/targetexact Mocking Banner
/cast [@target,exists,help] Safeguard
/cleartarget
Banner (Target):
Code:
#showtooltip Safeguard
/cleartarget
/targetlasttarget
/targetexact Mocking Banner
/targetlasttarget
/stopmacro [target,noexists]
/targetlasttarget
/cast [@target,exists,help] Safeguard
In order to find the location of a button on the action bars, enter the following command into the chat window while hovering over the button with the mouse:
Code:
/run print(GetMouseFocus():GetName())