Hi. I'm trying to create a macro that spams /yell once my cooldowns have been succesfully casts. I have two problems with this:
A) I can do it without the macro being aware that the spell has been cast or not. The result is that I /yell spam as I'm spamming my cooldown until it pops.
B) I can do it but it exceeds 255 characters.
Here's what I have bound to my "f" key:
/cast [target=mouseover,help] Lay on Hands
/run local name = UnitName("mouseover") f=RbA or CreateFrame("Frame","RbA") f:SetScript("OnEvent",function(s,e,u,p) if u=="player" and p=="Lay on Hands" then SendChatMessage("Casting [Lay on Hands] on " .. name .. ". 7 minute cooldown", "yell", nil, name) end end) f:RegisterEvent("UNIT_SPELLCAST_SUCCEEDED")
The end goal is to have that not do anything while LoH is on cooldown, and whenever i mouse hover over a friendly unitframe and hit 'f' and LoH is available, it prints "Casting [Lay on Hands] on (targetname). 7 minute cooldown" only once.
Unfortunately, this macro is 354 characters.
Any thoughts?