Code:
function Lucius_OnCombat(Unit, Event)
Unit:SendChatMessage(14, 0, "Die you foul humans !")
Unit:RegisterEvent("Lucius_Phase1", 2000, 0)
end
RegisterUnitEvent(210801, 1, "Lucius_OnCombat")
function Lucius_Phase1(Unit, Event)
if Unit:GetHealthPct() <= 90 then
Unit:SendChatMessage(14, 0, "TAKE THIS !")
Unit:CastSpell(42945)
Unit:RemoveEvents() -- Stop the last repeating
Unit:RegisterEvent("Lucius_Phase2", 2000, 0) -- next
end
end
function Lucius_Phase2(Unit, Event)
if Unit:GetHealthPct() <= 80 then
Unit:SendChatMessage(14, 0, "YOU ARE SO WEAK !")
Unit:FullCastSpellOnTarget(48127, Unit:GetMainTank(0)) -- You missed the closing )
Unit:RemoveEvents() -- Stop the last repeating
Unit:RegisterEvent("Lucius_Summon1", 12000, 1) -- missed the closing ) again
end
end
function Lucius_Summon1(Unit, Event)
local x = Unit:GetX()
local y = Unit:GetY()
local z = Unit:GetZ() -- We don't need ; this isn't C++
local o = Unit:GetO()
Unit:SpawnCreature (210803, 10149.490234, 2551.358887, 1321.909180, 3.536894, 14 ,120000)
Unit:SpawnCreature (210803, 10149.490234, 2551.358887, 1321.909180, 3.536894, 14 ,120000) -- npcid, x, y, z, o, faction, time (correct I think)
Unit:SpawnCreature (210803, 10149.490234, 2551.358887, 1321.909180, 3.536894, 14 ,120000)
Unit:SendChatMessage(12, 0, "Let's see if you can handle this !")
Unit:RegisterEvent("Lucius_Phase3", 30000, 0) -- 200000 is a VERY long time, shortened it
end
function Lucius_Phase3(Unit, Event)
if Unit:GetHealthPct() <= 70 then
Unit:RemoveEvents() -- Stop last register repeating
Unit:SendChatMessage(14, 0, "KNEEL FOR ME YOU STUPID HUMANS")
Unit:CastSpell(42921)
Unit:RegisterEvent("Lucius_Phase4", 30009, 1)
end
end
function Lucius_Phase4(Unit, Event)
if Unit:GetHealthPct() <= 60 then
Unit:RemoveEvents()
Unit:SendChatMessage(14, 0, "Enough of this ! , UNGREADIAL TRANSFORM !")
Unit:SetModel(14508)
Unit:SetScale(2)
Unit:CastSpell(42926)
Unit:RegisterEvent("Lucius_Phase5", 2000, 0)
end
end
function Lucius_Phase5(Unit, Event)
if Unit:GetHealthPct() <= 50 then
Unit:RemoveEvents()
Unit:SendChatMessage(14, 0, "NO ONE CAN STOP ME !")
Unit:CastSpell(42950)
Unit:RegisterEvent("Lucius_Summon2", 12000, 0)
end
end
function Lucius_Summon2(Unit, Event)
Unit:RemoveEvents()
local x = Unit:GetX()
local y = Unit:GetY()
local z = Unit:GetZ() -- Again this isn't C++ no ;
local o = Unit:GetO()
Unit:SpawnCreature (210804, 10149.490234, 2551.358887, 1321.909180, 3.536894, 14 ,120000)
Unit:SpawnCreature (210804, 10149.490234, 2551.358887, 1321.909180, 3.536894, 14 ,120000)
Unit:SpawnCreature (210804, 10149.490234, 2551.358887, 1321.909180, 3.536894, 14 ,120000)
Unit:RegisterEvent("Lucius_Phase6", 2000, 0)
end
function Lucius_Phase6(Unit, Event)
if Unit:GetHealthPct() <= 40 then
Unit:RemoveEvents()
Unit:SendChatMessage(12, 0, "UNGREADIAL TRANSFORM !")
Unit:SetModel(1126)
Unit:SetScale(3)
Unit:CastSpell(42931)
Unit:RegisterEvent("Lucius_Phase7", 2000, 0) -- You missed a 0 on 200
end
end
function Lucius_Phase7(Unit, Event)
if Unit:GetHealthPct() <= 25 then
Unit:RemoveEvents()
Unit:SendChatMessage(14, 0, "FEEL THE POWER OF A TRUE GOD !")
Unit:FullCastSpellOnTarget(5, Unit:GetMainTank(0)) -- Missed the closing )
Unit:RegisterEvent("Lucius_Phase8", 20000, 0)
end
end
function Lucius_Phase8(Unit, Event)
if Unit:GetHealthPct() <= 25 then
Unit:SendChatMessage(14, 0, "NO NO NO! I WON'T DIE ! ,UNGREADIAL TRANSFORM !")
Unit:SetModel(10315)
Unit:RemoveEvents()
Unit:CastSpell(59159)
Unit:RegisterEvent("Lucius_Phase8", 2000, 0)
end
end
function Lucius_Phase9(Unit, Event)
if Unit:GetHealthPct() <= 5 then
Unit:RemoveEvents()
Unit:SendChatMessage(14, 0, "THIS CAN'T BE TRUE ! NOOOOOOOO.....")
Unit:CastSpell(61721)
end
end
function Lucius_OnLeaveCombat(Unit, Event)
Unit:RemoveEvents()
Unit:SendChatMessage(12, 0, "Haha you weaklings !")
end
RegisterUnitEvent(210801, 2, "Lucius_OnLeaveCombat")
function Lucius_OnKilledTarget(Unit, Event)
Unit:SendChatMessage(12, 0, "Kneel for your god !")
end
RegisterUnitEvent(210801, 3, "Lucius_OnKilledTarget")
function Lucius_OnDied(Unit, Event)
Unit:SendChatMessage(14, 0, "No..... SARCIUS !!!!!!!")
Unit:RemoveEvents()
end
RegisterUnitEvent(210801, 4, "Lucius_OnDied")