handy conditional announce macro

fungchewuchi

Master of the Flying Guillotine
I had to make a new version of a common macro template I use today, and I thought it might be handy for others. I'm not going to explain how all this works, you can search the functions and syntax yourself. It has been handy for me for years in different forms; this version has a little bit of everything I might use parts of. As it is, it only messages party or raid with "pain suppression on [targetname]" when the spell will actually be cast. Could be altered with more fewer or other conditions, msging say yell whisper etc.


#showtooltip
/script local u,ps,c="Target","Pain Suppression",GetNumRaidMembers()>0 and "RAID" or "PARTY";if IsSpellInRange(ps,u)==1 and GetSpellCooldown(ps)==0 then SendChatMessage(ps.." on "..UnitName(u),c) end
/cast [target] Pain Suppression
 
here's another handy macro for checking how fast you're moving, useful to see +speed effects and such

/script x=GetUnitSpeed("player") DEFAULT_CHAT_FRAME:AddMessage(format("Speed: %d yds/sec, %.1f kph, %.1f mph, %d%% normal run speed",x,x*3600/1093.6133,x*45/22,x/7*100))
 

Users who are viewing this thread

Top