Skip to content

Instantly share code, notes, and snippets.

@fanzeyi
Created June 10, 2012 14:34
Show Gist options
  • Save fanzeyi/2905940 to your computer and use it in GitHub Desktop.
Save fanzeyi/2905940 to your computer and use it in GitHub Desktop.
local SaySapped = CreateFrame("Frame")
SaySapped:SetScript("OnEvent",function(_, _, _, eventType, _, _, _, _, _, _, destName, _, _, spellID)
if ((eventType == "SPELL_AURA_APPLIED" or eventType == "SPELL_AURA_REFRESH") and (destName == UnitName("player"))) then
if (spellID == 6770) then
SendChatMessage("<<有贼>>", "SAY")
elseif (spellID == 6771) then
SendChatMessage("<<有贼2>>", "SAY")
end
end
end)
SaySapped:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment