Code:
#showtooltip Pain Suppression
/cast [mod:alt,@player][@target]Pain Suppression
/stopmacro [mod:alt]
/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("<<<< "..GetSpellLink(ps).." ON "..UnitName(u):upper().." >>>>",c); SendChatMessage("<<<< "..GetSpellLink(ps).." ON YOU >>>>","WHISPER",nil,UnitName(u)) end
Code:
#showtooltip Power Infusion
/cast [mod:alt,@player][@target] Power Infusion
/stopmacro [mod:alt]
/script local u,pi="target","Power Infusion";if IsSpellInRange(pi,u)==1 and GetSpellCooldown(pi)==0 then SendChatMessage("<<< YOU JUST GOT "..GetSpellLink(pi).." !!!!!!!!!!!!!!!!!!!","WHISPER",nil,UnitName(u)) end
EDIT: Could swear that somebody once requested this already and I made a mini-addon for him that got rid of all the /script parts and allowed for mouseover etc. if needed. Sec, gonna check my post history.
EDIT2: Yup, this should work:
Code:
local a = CreateFrame("Frame")
a:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED")
a:SetScript("OnEvent", function(self,event,...)
local arg = {...}
self.pguid = self.pguid or UnitGUID("player")
if (arg[3] == self.pguid) and (arg[9] == 33206) and (arg[2] == "SPELL_CAST_SUCCESS") then
SendChatMessage("*** \124cff71d5ff\124Hspell:33206\124h[Pain Suppression]\124h\124r ON "..arg[7].." ***", GetRealNumRaidMembers()>0 and "RAID" or GetNumRaidMembers()>0 and "BATTLEGROUND" or GetNumPartyMembers()>0 and "PARTY" or "SAY")
SendChatMessage("*** \124cff71d5ff\124Hspell:33206\124h[Pain Suppression]\124h\124r ON YOU ***", "WHISPER", nil, arg[7])
end
if (arg[3] == self.pguid) and (arg[9] == 10060) and (arg[2] == "SPELL_CAST_SUCCESS") then
hen
SendChatMessage("*** \124cff71d5ff\124Hspell:10060\124h[Power Infusion]\124h\124r ON "..arg[7].." ***", GetRealNumRaidMembers()>0 and "RAID" or GetNumRaidMembers()>0 and "BATTLEGROUND" or GetNumPartyMembers()>0 and "PARTY" or "SAY")
SendChatMessage("*** \124cff71d5ff\124Hspell:10060\124h[Power Infusion]\124h\124r ON YOU ***", "WHISPER", nil, arg[7])
end
end)
How to implement