How to make macros in WoW Classic 101

0
79
How to make macros in WoW Classic 101

5. Conditional: [@mouseover] – [@player] – [modifier] – [combat]

Conditionals
are a way to extend the macro interface. They allow limited decision-making to
macros; be aware that they are limited. A full list of conditionals will
be available at the bottom of this post once the initial posts in all
categories have been created.

As an example, let’s take the simple macro from the initial
post:

#showtooltip
/cast Flash Heal

We are going to modify this macro with the [harm]
conditional, so it does something different when an enemy is targeted:

#showtooltip
/cast [harm]Smite;Flash Heal

Now, the macro will use Smite if you have an enemy targeted,
and Flash Heal otherwise.

You can use multiple conditionals in a macro command.
Example:

#showtooltip
/cast [harm,mod:ctrl]Holy
Fire;[harm]Smite;[mod:ctrl]Heal;Flash Heal

The macro will now use Holy Fire if you are pressing CTRL
and you have an enemy target, Smite if you have an enemy target and are not
pressing CTRL, Heal if you are pressing CTRL without an enemy target, and Flash
Heal if none of the other conditions are true.

IT IS IMPORTANT TO REMEMBER THAT A MACRO WILL EXECUTE THE
FIRST TRUE CONDITION.

In the above example, if you have an enemy targeted, the
macro will never cast Heal or Flash Heal, no matter what you do. You need to
target a friendly or clear your target in order to cast a healing spell.

Conditionals available for use in macros:

(Note that any of these conditions (excepting @unit) can be
inverted with no, meaning [nocombat], [nopet], etc, will work exactly as you’d
expect.

Attempts to perform the action on the listed unit, unit can
be a UnitID (player, target, pet, party1, raid1targettarget, etc) or a name
(Adreaver-Undermine). Names are case-sensitive and only valid if the named
player is a member of your group. Additionally, for Cross-Realm players, omit
spaces (but not punctuation) in the realm name (Bob-SomeRealm rather than
bob-some realm). A full list of UnitIDs is available at WoWPedia.

A special unit is [@mouseover], which refers to the unit (or
unitframe) you are pointing your cursor at. Particularly useful for healers to
cast healing spells on party members without having to change targets, they are
also useful for things like interrupts, offensive dispels, and sending your pet
to attack one target while you attack another.

This allows you to cast a different spell when pressing
ctrl, shift, or alt. [modifier] can be shortened to [mod] with the same effect.
[mod] will register any modifier, while [mod:shift] will only register shift,
and ignore ctrl or alt. If desired, you can use multiple modifiers together –
[mod:ctrlalt] for example, will only register when pressing ctrl AND alt at the
same time.

This checks which mouse button you used to click the macro.
It can also be shortened to [btn]. [btn:1] is implied by default, but you can
specify [btn:2] for right click, [btn:3] for middle click, and 4/5 for side
buttons on your mouse.

  • [exists], [help], [harm], [dead]

These check the status of your target. [exists] simply
checks for any target, living or dead, friendly or hostile. [help] and [harm]
check for a friendly or hostile target respectively, while [dead] check if your
target is dead. [help][harm][dead] all imply [exists] – if your target is dead,
you obviously have a target.

Combat allows you to check if you are in combat. This is
helpful when you have certain spells that can only be used out of combat, for
example mounts.

#showtooltip
/use [combat]Aspect of the Cheetah;Brown Ram

for example would use your Aspect of the Cheetah in combat,
and summon your mount out of combat, thus giving you a speed boost in either
scenario.

 

Source link

LEAVE A REPLY

Please enter your comment!
Please enter your name here