This site makes extensive use of JavaScript.
Please enable JavaScript in your browser.
Live
PTR
10.2.7
PTR
10.2.6
Beta
Macro: say something depending on the current stance
Post Reply
Return to board index
Post by
Shiverlynn
Hello, looking for help with this. I'd like to make a macro that announces which ability I have used based on my current stance.
Currently I have this one:
#showtooltip
/cast Retaliation; Shield Wall; Recklessness
and I want to modify it to also announce that I have just used Shield Wall or Retaliation or Recklessness.
Actually I only care about Shield Wall but it shouldn't say that I have used it when I pop Retaliation instead, so it might as well announce them all to avoid confusion.
Is that possible with a macro?
Post by
pelf
There's an addon that does this...
As for the macro ... I assume it would be a string of UnitHasBuff("player",__) things but I'm not sure it would be pretty or even fit.
EDIT
: Okay, okay...
#showtooltip
/cast Retaliation;Shield Wall;Recklessness
/run if UnitAura("player","Shield Wall") then SendChatMessage("SuperTank just popped Shield Wall!",GetNumRaidMembers()>0 and "RAID" or "PARTY") end
That will have the added benefit of only announcing if the Shield Wall buff actually appears on you (i.e. it won't announce if you hit it while it's on cooldown; but, it will announce if you hit it AGAIN while the buff is still up and the ability is on cooldown). It also won't announce for anything that isn't Shield Wall. This is all assuming I got the API calls right. It will produce an error if you use it out of any form of group ("You are not in a party.").
Post by
HighFive
I suggest
MacroTalk
if it still works.
Alternatively, you can try this:/#showtooltip
/cast Retaliation; Shield Wall; Recklessness
/run SendChatMessage("Using "..SecureCmdOptionParse(" Retaliation; Shield Wall; Recklessness"), "RAID")
Post by
pelf
Ew. I like mine better.
Post by
HighFive
But that won't work properly. The buff will be gained long after the macro has finished executing.
Also SecureCmdOptionParse brings all the readabilities in the world. All of them.
Post by
pelf
You think it won't be present after the cast? Is a round-trip required to apply a buff or does it apply and then check to see if it's okay and then un-do it if it isn't?
If that's true, then the problem with yours is that the message is dependent upon the stance, not the ability actually working. I would imagine he wouldn't want it to say he popped it if he didn't.
Post by
HighFive
You think it won't be present after the cast? Is a round-trip required to apply a buff or does it apply and then check to see if it's okay and then un-do it if it isn't?
Oh, yeah. At the very least, I know cooldown checks are server-side.
If that's true, then the problem with yours is that the message is dependent upon the stance, not the ability actually working. I would imagine he wouldn't want it to say he popped it if he didn't.
I guess so, but the OP didn't explicitly ask for that, so I thought he's not concerned about it.
Upon actually reading the post, looks like #showtooltip
/cast Retaliation; Shield Wall; Recklessness
/stopmacro
/ra Using Shield Wallwill do what he's looking for, sans the ability not going off issue.
That should be done by event listening (a Hack script or addon) IMO.
Post by
pelf
That tanking addon I was thinking of takes care of that anyway ... let's see...
...eh, nope. No idea what it was.
Post by
Shiverlynn
Thanks, both of you!
I'm not really concerned with the ability being on CD or not, I won't hit it if it's not available anyway. I tend to prefer HighFive's macro - although both work, I have to press pelf's one twice at least since there's indeed a small gap between the moment I press the key and the moment I gain the buff, so it won't announce that I have used Shield Wall.
Post by
pelf
Cheers
:)
. We like debating minutiae here.
Post Reply
You are not logged in. Please
log in
to post a reply or
register
if you don't already have an account.