Macro Help

Hello,

I got this Counterspell macro that I use:

#showtooltip
/stopcasting
/run u,mf=“target”,“Counterspell”;if IsSpellInRange(mf,u)==1 and GetSpellCooldown(mf)==0 then SendChatMessage("<< Interrupted %t >>", IsInGroup(2) and “INSTANCE_CHAT” or IsInRaid() and “RAID” or “PARTY”) end
/use Counterspell

The macro allow me to cast Counterspell and announce when I cast it and on whom without spamming the announcement when ever I press the button. Overall it works great but it also create a ton of errors and there ain’t room for the clear errors script due to character limitations.

Is there any way I can achieve the same results but shorten or rework the macro and also get rid of all the errors?

// Nitzi

Remove the raid bit. People in raids don’t care. Usually people in parties don’t care but let’s leave that on the side.

Well I made it since people in raids do care, perhaps not a random PuG but more organized groups do, same with most other CC abilities that’s important in raids, especially in later phases when other raids arrive.

More organised groups would have voice comms

Yes and you don’t want to fill that with random chatter about CC’s, that’s what announcement macros are for.

1 Like

You can circumvent the Macro character limitation by splitting it up into multiple macros, drag them to actionbar(s) and then call the action-button you put it on from within your main macro.

Now I don’t know if it will work out for you, with the macro you have in mind, but just maybe it will. :slight_smile:

So I guess

/cast Counter Spell
/e (or /raid) has interrupted %t

is too simple for you?

Good point Driu!
Will try and work around that and see if I can make that work.

Yeah Dottie, that works but it will announce in chat every time you press the button which easily can get the chat filled with spam.

maybe you can simplify it to the group modifier instead of just raid or party? and then use the clear errors

What errors are you getting anyway?

edit

First of all, you’ve mixed up the parameters for IsSpellInRange. It takes the spellname first, then the target. Secondly, GetSpellCooldown returns several values. The second value it returns is 0 if the spell isnt on cooldown, and returns its full cooldown value if it is on cooldown (it doesnt “count down”).

Try this if it’s what you want.

#showtooltip
/stopcasting
/run _,cd,_,_=GetSpellCooldown(2139) if cd==0 and IsSpellInRange("Counterspell","target") and IsInGroup() then SendChatMessage("test","party") end
/cast Counterspell

That works like a charm apart from the range check but added ==1, huge thanks Riotblade. Also a follow up question, what’s the smartest way to make it post in raid chat if available but party chat otherwise?

Hm. Try something like

if IsInRaid() then c="raid" else c="party" end

and replace the “party” in the SendChatMessage with c

Not sure if it’ll fit though. In vanilla there was an addon that allowed you to make longer macros, but Im not sure if that is available in classic

1 Like

Hmm don’t get it to work as it should, how would the complete macro look like?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.