Macros: Essential Information

Progress… the funny thing is I USED to use those until they stopped working. And indeed, against conventional logic, use the “1” first did the surpression!

However, for reason the text warnings are back… So I duplicated what I had into a new macro and removed the sound stuff. Still had the text stuff BUT the audio alerts were also off! Maybe I have mistyped something, so here is what it is:

#showtooltip Manifesto of Madness
/console Sound_EnableErrorSpeech 0
/run UIErrorsFrame:Hide()
/use Manifesto of Madness
/cast Rune of Power
/run UIErrorsFrame:Clear()
/run UIErrorsFrame:Show()
/console Sound_EnableErrorSpeech 1

MoM has the longer CD, so I then can use the same button to do a RoP…

So ErrorSpeech 0 should turn it off, then 1 turns it back on. Except it seems that once it’s off, it stays off. AND the more I try it I find now that once it’s on, it stays on. Any ideas there?

I want to pull up my target reticle when I press and hold a trap, then launch the trap when I release the button.

I run around with mouse look all the time. So far I can pull up the target reticle, but have to click to launch it.

When using an addon like ConsolePort, I can make it work the way I desire. But I would like to be able to do it without an addon.

I don’t know whether this is possible, you’d have to separate the KeyDown and KeyUp hardware events, and that can’t be done via standard macro conditionals.

I’m not sure how ConsolePort does it, but anything that can be done with an addon can be done via scripting in a macro, provided you can fit it in the 255 character limit.

This post by @Gello goes into more detail, he uses this exact functionality with a Warrior’s Heroic Leap, but it requires a small addon as the script is complex.

https://us.forums.blizzard.com/en/wow/t/macro-help-events-on-target-area-of-a-spell/497074/7

1 Like

Adreaver, can you add something to this effect to the OP?

Any time you use an @unit test you need to include an existence check (exists, help, or harm) or the game assumes @unit exists.

1 Like

OP updated.

2 Likes

The code listed includes slash commands defined by addons that loaded prior to running the code. That means that if you have slash commands for ElvUI or Bartender or Decursive or whatnot, they’ll show as well.

1 Like

OP updated.

Changelog 20200110:

  • Clarified the functionality of [@unit] with an example.

Wanting to make a macro for holy paladin, specifically for casting Crusader Strike without deselecting my target.
What I have:

/cast [harm][@targettarget] Crusader Strike

This works great for when I am healing party members, but when I am healing myself not so much. So I tried:

/targetenemy [noexists, nodead]
/cast Crusader Strike
/targetlasttarget [harm]

This works well and lets me attack even while not having any target, except that now I cannot manually target something without it flying back to my last target. I have played around with the modifiers, specifically getting rid of [harm] at the end of /targetlasttarget, but this causes the macro to rapidly switch back and forth between me and my target when pressed quickly. I did try using /stopmacro but I don’t really understand how it works well enough to get anything meaningful out of it.

What I would love is if

/cast [harm][@targettarget]

could be replaced with something like

/cast [harm][@targetenemy]

this would be the ideal solution but I just cannot find a way to make it work.
Any help greatly appreciated!

#showtooltip
/startattack
/cast [harm] [@targettarget,harm,nodead] [] Crusader Strike

This has similar functionality of what I already have, except now targeting myself and casting Crusader Strike changes my active target to whoever is hit. /startattack switches my target in every case so I removed that.

Though it is closer, main issue still seems to be having nothing to enter into those empty braces to specify nearest enemy target, assuming they represent a second set of parameters.

Why would you want to keep yourself targeted while dpsing an enemy?

Because Crusader Strike builds up holy power, which is my best healing resource. It is a major annoyance to be near death in pvp and needing just one more holy power to get off another Word of Glory, and it suddenly changes my target off the person about to die.

You can’t cast an ability at the nearest enemy target without targeting it. Spells can only be cast at a valid unit, like target, target, focus, focustarget, etc.

You could do this:

#showtooltip
/targetnearestenemy [noharm]
/use [harm][@targettarget,harm][]Crusader Strike
/targetlasttarget [harm]

That will make the nearest enemy your target if and only if you don’t have an enemy targeted. If you have a friendly targeted, it will swap you back to that friendly after Crusader Strike fires.

Note that /targetnearestenemy is the same as tab targeting, so it may or may not target the enemy you want. It can grab somebody out of range rather than the melee beating your face in, for example.

Also note that the macro has no way to know whether /targetnearestenemy fired, or if it successfully picked a target, so you will likely see some unintended behavior from /targetlasttarget from time to time. For example, if you had recently targeted yourself, then manually targeted the enemy, the /targetlasttarget will swap your target back to yourself.

You might try this instead:

#showtooltip
/use [@mouseover,harm,nodead][harm][@targettarget,harm][]Crusader Strike

If you have yourself or a friendly (without a valid enemy target) targeted, you can mouseover the nearest enemy in melee range and still use CS to get your HP.

2 Likes

Thank you for such a detailed response! I believe the second option is more viable, though with some change. As it functions now:

#showtooltip
/use [@mouseover,harm,nodead][harm][@targettarget,harm][]Crusader Strike

  1. Casting while targeting an ally who has no target or a friendly target will deselect that friendly and target nearest enemy.
  2. If I have a mouseover target however it does not deselect my friendly target.

So for myself I would prefer it not to switch my target if an ally has no valid target selected, and instead do nothing until I have a valid mouseover target – is this a possibility?
Thanks again for the great answer.

Changing your heals to this (or some other mouseover/click cast system) and keeping an enemy targeted will make things so much more fluid.

Yeah, drop the [] from the end. That’s the default casting behavior, as though you pulled it out of the spellbook and dropped it on the bar.

Note that you won’t be able to use it without manually targeting an enemy if that’s the case - depending on your normal sequence when tabbing between mobs doing WQs or similar that difference could be imperceptible or insanely frustrating.

That said, I agree with @Elvenbane above - keeping the enemy targeted is easier for DPS as well as CC, interrupts, etc, and I personally find mouseover or click-casting to heal much easier and more comfortable.

1 Like

Thanks to both of you for the quick replies!
I think I am going to use a combination of both of these options, for one I never realized that a mouseover macro works on the party frames as well as their nameplates.
I don’t think I trust healing an enemies target, at least in pvp, with the possibility of them swapping so someone else (to cc or whatever) and my heals being wasted on a relatively high health friendly.

Either way my question has been more than answered, so thank you for that, and I’ll leave you alone now. :slight_smile:

Then don’t?

Show your target of target frame the same size and right next to the target frame, and if your enemy target has a high-health group member targeted, use the mouseover casting instead.

Thank you for posting a clarification of macros. I am trying to figure out how to get my DH to use Immolation Aura when I land from Infernal Strike, but it all cast at the same time. Is it possible to get Immolation to cast when I land vs before I jump? And would that violate the EULA? Or was that something totally different that I stumbled on? Thank you in advance.

You can’t automate it in any way I can think of. Just do it as two separate presses.