Need help with DK Raise Ally macro
I'm using the Clique Addon. What I want to occur is when I mouseover a dead ally in a party/raid/instance, and press a hotkey (set in clique) it will put "Brezzing [target]" in a group appropriate chat, begin to Raise Ally, then whisper to the raised ally to "Rise" after a successful cast.
I am a complete WOW macro noob and have pieced this together from multiple sources, however I am not sure it will work as intended or if there is a more efficient way to complete the task. Thank you for your help beforehand. Code:
/run local c=IsInGroup(2) and "INSTANCE_CHAT" or IsInRaid() and "RAID" or IsInGroup(1) and "PARTY" if c then SendChatMessage("Brezzing %t",c) end |
There's no need to call gsub here:
Code:
/run SendChatMessage ("Rise","WHISPER",nil,GetUnitName("target",1):gsub(" ","",2)) Code:
/run SendChatMessage("Rise","WHISPER",nil,GetUnitName("target",1)) Quote:
Also, things like this are pretty annoying to the recipient -- if I'm getting a battle res, I don't need you to whisper me telling me I got a battle res, because I already know I got a battle res because the game already popped up a giant window in the middle of my screen telling me I got a battle res. You're not telling me anything new; you're just cluttering up my chat frame, and wasting my time by asking me to shift my attention to something totally irrelevant before I shift my attention back to the actually relevant giant window. But if you really want to do it anyway, instead of letting you copy some terrifyingly badly written garbage from ArenaJunkies, here is the right way (or at least as much as there is a right way to do this) to do it: Code:
/run if not RaiseAllyNotifier then local f, S, T = CreateFrame("Frame", "RaiseAllyNotifier"), GetSpellInfo(61999) f:RegisterUnitEvent("UNIT_SPELLCAST_SENT","player") f:RegisterUnitEvent("UNIT_SPELLCAST_SUCCEEDED","player") f:SetScript("OnEvent", function(_, e, _, n, _, t) if n == S then if type(t) == "string" then T = t else SendChatMessage("Rise", "WHISPER", nil, T) end end end) end |
Okay, I definitely see your point. I'll be sure to leave off the whisper. Thanks for your help.
|
This is what I have ended up with:
Code:
/use [@mouseover,dead]Raise Ally |
That'll work, though it would probably be better not to have it (temporarily) change your focus, since that will make it unusable with actual focus macros. Just use UnitName("mouseover") to get the name of your current mouseover unit.
Code:
/use [@mouseover,help,dead] Raise Ally |
That is perfect, once again, thank you very much for your help!
|
All times are GMT -6. The time now is 12:44 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI