local npcId = 200000
function OnEnterCombat(event, creature, victim)
creature:SendUnitYell("You are kidding... Right?", 0)
creature:RegisterEvent(ShadowCleave, 10000, 0)
creature:RegisterEvent(OnCheckHealth, 1000, 0)
end
function OnCheckHealth(event, delay, pCall, creature)
if (creature:GetHealthPct() <= 75) then
creature:RemoveEventById(event)
creature:CastSpell(target, 40000)
creature:RegisterEvent(OnCheckHealth1, 1000, 0)
end
end
function ShadowCleave(event, delay, pCall, creature)
creature:RemoveEventById(event)
creature:CastSpell(creature:GetVictim(), 69492, true)
end
function OnCheckHealth1(event, delay, pCall, creature)
local target = creature:GetAITarget(3, true)
if (creature:GetHealthPct() <= 25) then
creature:RemoveEventById(event)
creature:CastSpell(target, 40000)
end
end
function OnLeaveCombat(event, creature)
creature:SendUnitYell("Bring a challenge next time!", 0)
creature:CastSpell(creature, 23965, true)
creature:RemoveEvents()
end
function OnTargetDied(event, creature, victim)
creature:SendUnitYell("Seems like you are the weakest link!", 0)
end
function OnDied(event, creature, killer)
creature:RemoveEvents()
creature:SendUnitYell("This is just the... Beginning!", 0)
end
RegisterCreatureEvent(npcId, 1, OnEnterCombat)
RegisterCreatureEvent(npcId, 2, OnLeaveCombat)
RegisterCreatureEvent(npcId, 3, OnTargetDied)
RegisterCreatureEvent(npcId, 4, OnDied)