Originally Posted by
qzt
SIN_InterruptFrame = SIN_InterruptFrame or CreateFrame("FRAME", nil, UIParent)
function SIN_Interrupt_OnEvent(self, event, ...)
local type, hidecaster, srcGUID, srcName, _, _, destGUID = select(2, ...)
if event == "COMBAT_LOG_EVENT_UNFILTERED" then
if type == "SPELL_CAST_SUCCESS" then
if destGUID == UnitGUID("player") then
local spellId = select(13, ...)
local deathId = {
"Streuschuss", "Blenden","Paralyse", "Solarplexus"
}
for d = 1, #deathId do
if spellId == deathId[d] then
SpellStopCasting()
TargetUnit(srcName)
CastSpellByName("Schattenwort: Tod")
TargetLastTarget()
print ("Trying to Death")
end
end
local interruptId = {
"Tritt", "Zurechtweisung", "Windsto\195\188", "Zuschlagen", "Gedankenfrost", "Sch\195\164delsto\195\188"
}
for i = 1, #interruptId do
if spellId == interruptId[i] then
SpellStopCasting()
print ("Trying to Stopcast")
end
end
local innerfocusId = {
"Stille", "Gegenzauber", "Unterdr\195\188ckender Schuss", "Strangulieren", "Erdrosseln", "Sonnenstrahl", "Zaubersperre"
}
for f = 1, #innerfocusId do
if spellId == innerfocusId[f] then
SpellStopCasting()
CastSpellByID(89485)
print ("Trying to Innerfocus")
end
end
end
end
end
end
SIN_InterruptFrame:SetScript("OnEvent", SIN_Interrupt_OnEvent)
SIN_InterruptFrame:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED")