Code:
-- Well of the Forgotten
-- By Justin/Dr. Livingstone of MMOwned
-- Hope you enjoy!
local Thoradin = 300000
local ThoradinGuard = 300001
local ThoradinGuard1 = 300002
local ThoradinGuard2 = 300003
local RisenCompanion = 300004
function Thoradin_OnCombat(pUnit, event)
pUnit:SendChatMessage(14, 0, "The darkness has overtaken those who fell in war... Now it shall overtake you!")
pUnit:PlaySoundToSet(8831)
pUnit:RegisterEvent("ThoradinPhase1", 1000, 0)
end
-- Phase 1 --
function ThoradinPhase1(pUnit, event)
if pUnit:GetHealthPct() <= 95 then
pUnit:RemoveEvents()
local casttime = math.random(10000, 17000)
local casttime1 = math.random(12000, 19000)
pUnit:SendChatMessage(14, 0, "I was once the most powerful man in Azeroth. Now... I am nothing...")
pUnit:RegisterEvent("Phase1Cast1", casttime, 0)
pUnit:RegisterEvent("Phase1Cast2", casttime1, 0)
pUnit:RegisterEvent("ThoradinPhase2", 1000, 0)
end
end
function Phase1Cast1(pUnit, event)
pUnit:FullCastSpellOnTarget(59035, pUnit:GetMainTank())
end
function Phase1Cast2(pUnit, event)
pUnit:FullCastSpellOnTarget(42724, pUnit:GetMainTank())
end
-- Phase 2 --
function ThoradinPhase2(pUnit, event)
if pUnit:GetHealthPct() <= 75 then
pUnit:RemoveEvents()
local casttime2 = math.random(12000, 17000)
local casttime3 = math.random(9000, 12000)
pUnit:SendChatMessage(14, 0, "My people were more powerful than any other people on Azeroth! Now you feel will their wrath.")
pUnit:RegisterEvent("Phase2Cast1", casttime2, 0)
pUnit:RegisterEvent("Phase2Cast2", casttime3, 0)
pUnit:RegisterEvent("Phase2Spawns", 20000, 1)
pUnit:RegisterEvent("ThoradinPhase3", 1000, 0)
end
end
function Phase2Cast1(pUnit, event)
pUnit:FullCastSpellOnTarget(59035, pUnit:GetMainTank())
end
function Phase2Cast2(pUnit, event)
pUnit:FullCastSpellOnTarget(42724, pUnit:GetMainTank())
end
function Phase2Spawns(pUnit, event)
local spawnpoint = pUnit:GetRandomPlayer(0)
local X = spawnpoint:GetX()
local Y = spawnpoint:GetY()
local Z = spawnpoint:GetZ()
local O = spawnpoint:GetO()
local spawn = math.random(1, 3)
if spawn == 1 then
pUnit:SpawnCreature(ThoradinGuard, X + 3, Y + 4, Z + 1, O, 1720, 35000)
pUnit:SpawnCreature(ThoradinGuard2, X + 1, Y + 2, Z + 1, O, 1720, 35000)
end
if spawn == 2 then
pUnit:SpawnCreature(ThoradinGuard1, X + 3, Y + 4, Z + 1, O, 1720, 35000)
pUnit:SpawnCreature(ThoradinGuard, X + 1, Y + 2, Z + 1, O, 1720, 35000)
end
if spawn == 3 then
pUnit:SpawnCreature(ThoradinGuard2, X + 3, Y + 4, Z + 1, O, 1720, 35000)
pUnit:SpawnCreature(ThoradinGuard1, X + 1, Y + 2, Z + 1, O, 1720, 35000)
end
end
-- Phase 3 --
function ThoradinPhase3(pUnit, event)
if pUnit:GetHealthPct() <= 45 then
pUnit:RemoveEvents()
local casttime4 = math.random(8000, 11000)
local casttime5 = math.random(9000, 12000)
pUnit:SendChatMessage(14, 0, "Arathor was so grand!... but now look at us. We are all left in this place to rot for eternity! It is not fair that you still live on!")
pUnit:RegisterEvent("Phase3Cast", casttime4, 0)
pUnit:RegisterEvent("Phase3Cast1", casttime5, 0)
pUnit:RegisterEvent("Phase3Enrage", 150000, 0)
pUnit:RegisterEvent("ThoradinPhase4", 1000, 0)
end
end
function Phase3Cast(pUnit, event)
pUnit:FullCastSpellOnTarget(59035, pUnit:GetMainTank())
end
function Phase3Cast1(pUnit, event)
pUnit:FullCastSpellOnTarget(42724, pUnit:GetMainTank())
end
function Phase3Enrage(pUnit, event)
pUnit:CastSpell(24318)
end
-- Phase 4 --
function ThoradinPhase4(pUnit, event)
if pUnit:GetHealthPct() <= 20 then
pUnit:RemoveEvents()
pUnit:SendChatMessage(14, 0, "Arathor has been destroyed... My life was meaningless... Now I shall take yours!")
local casttime6 = math.random(6500, 10000)
local casttime7 = math.random(8000, 12000)
pUnit:RegisterEvent("Phase4Cast", casttime6, 0)
pUnit:RegisterEvent("Phase4Cast1", casttime7, 0)
pUnit:RegisterEvent("MindControl", 20000, 1)
end
end
function Phase4Cast(pUnit, event)
pUnit:FullCastSpellOnTarget(59035, pUnit:GetMainTank())
end
function Phase4Cast1(pUnit, event)
pUnit:CastSpell(15589)
end
function MindControl(pUnit, event)
pUnit:CastSpellOnTarget(15859, pUnit:GetRandomPlayer(7))
end
-- Other Events --
function Thoradin_OnLeaveCombat(pUnit, event)
pUnit:RemoveEvents()
pUnit:SendChatMessage(14, 0, "Arathor is more powerful than ever before!")
end
function Thoradin_OnDied(pUnit, Event)
pUnit:SendChatMessage(14, 0, "My eternal pain is finally ended...")
end
function Thoradin_OnKilledTarget(pUnit, Event)
pUnit:SendChatMessage(14, 0, "Now you shall feel the eternal agony of death!")
pUnit:SpawnCreature(RisenCompanion, X + 1, Y + 2, Z + 1, O, 1720, 35000)
end
RegisterUnitEvent(300000, 1, "Thoradin_OnEnterCombat")
RegisterUnitEvent(300000, 2, "Thoradin_OnLeaveCombat")
RegisterUnitEvent(300000, 3, "Thoradin_OnDied")
RegisterUnitEvent(300000, 4, "Thoradin_OnKilledTarget")
-- Arthor Knight Script
function Knight_OnCombat(pUnit, event)
pUnit:RegisterEvent("Cleave", 11000, 0)
pUnit:RegisterEvent("Disarm", 21000, 1)
end
function Cleave(pUnit, event)
pUnit:FullCastSpelOnTarget(56909, pUnit:GetMainTank())
end
function Disarm(pUnit, event)
pUnit:FullCastSpellOnTarget(30013, pUnit:GetMainTank())
end
RegisterUnitEvent(300001, 1, "Knight_OnCombat")
-- Arathor Defender Script
function Defender_OnCombat(pUnit, event)
pUnit:RegisterEvent("HammerOfJustice", 20000, 1)
pUnit:RegisterEvent("Bubble", 30000, 0)
end
function HammerOfJustice(pUnit, event)
pUnit:FullCastSpellOnTarget(37369, pUnit:GetRandomPlayer(1))
end
function Bubble(pUnit, event)
pUnit:CastSpell(642)
end
RegisterUnitEvent(300002, 1, "Defender_OnCombat")
-- Arathor Champion Script
function Champion_OnCombat(pUnit, event)
pUnit:RegisterEvent("HeroicStrike", 11000, 1)
pUnit:RegisterEvent("Heal", 21000, 0)
end
function HeroicStrike(pUnit, event)
pUnit:FullCastSpellOnTarget(41975, pUnit:GetMainTank())
end
function Heal(pUnit, event)
pUnit:FullCastSpell(23954)
end
RegisterUnitEvent(300003, 1, "Champion_OnCombat")
-- Fallen Companion Script
function Companion_OnCombat(pUnit, event)
pUnit:RegisterEvent("Gnaw", 11000, 1)
pUnit:RegisterEvent("Something", 12000, 1)
end
function Gnaw(pUnit, event)
pUnit:FullCastSpellOnTarget(50046, pUnit:GetMainTank())
end
function Something(pUnit, event)
pUnit:FullCastSpellOnTarget(60945, pUnit:GetMainTank())
end
RegisterUnitEvent(300004, 1, "Companion_OnCombat")
I am currently working on this project by myself. If you are interested in joining me contact me on MSN at