Code:
--[[ Boss - O'Brien.
Farmer O'Brien was a completely normal farmer with a wife and kids .. But one day, the forsaken came .. they ripped his wife apart and took his kids .. he were heartbroken .. The anger inside him were to overwhelming! He became the Forsaken Farmer .. He took the control of all farmers and now he is ready to rip you with his pitchfork!
~~End of Script Forenote
-- Viggo-xd, November 29th, 2008. ]]
----------------------------------------------------------------------------------------------------
function OBrien_OnLeaveCombat(pUnit, Event)
pUnit:SendChatMessage(14, 0, "You better run before i rape you with my pitchfork!")
end
function OBrien_Died(pUnit, Event)
pUnit:SendChatMessage(14, 0, "Assist me! Argh...")
x=GetX();
y=GetY();
z=GetZ();
o=GetO();
pUnit:SpawnCreature(58432, x-3, y+1, z, 0, 20, 0)
pUnit:SpawnCreature(58432, x-2, y+1, z, 0, 20, 0)
pUnit:SpawnCreature(58432, x-1, y+1, z, 0, 20, 0)
pUnit:SpawnCreature(58432, x+1, y+1, z, 0, 20, 0)
pUnit:SpawnCreature(58432, x+2, y+1, z, 0, 20, 0)
pUnit:SpawnCreature(58432, x+3, y+1, z, 0, 20, 0)
end
function OBrien_OnEnterCombat(pUnit, Event)
pUnit:SendChatMessage(14, 0, "Once, once I was a normal Human. `I` was the best farmer around, just like you... then one day, One cruel day, The Forsaken came and took all that I loved. Look who I am now. I am one of those, but I am more powerful than anyone! Even Arthas himself! Prepare for your defeat %T!")
pUnit:RegisterEvent("OBrien_Phase1",20000,1)
pUnit:RegisterEvent("OBrien_Phase2",20000,1)
pUnit:RegisterEvent("OBrien_Phase3",20000,1)
pUnit:RegisterEvent("OBrien_Phase4",20000,1)
end
function OBrien_KilledTarget(pUnit, Event)
pUnit:SendChatMessage(14, 0, "Beware of my minions, they are powerful!")
x=GetX();
y=GetY();
z=GetZ();
o=GetO();
pUnit:SpawnCreature(58432, x+2, y+2, z, 0, 20, 0)
end
-------------------------------------------------------------------------------------------------------
function OBrien_Phase1(pUnit, Event)
if pUnit:GetHealthPct() < 100 then
pUnit:RegisterEvent("OBrien_IntimidatingRoar", 20000, 1)
pUnit:RegisterEvent("OBrien_AgonizingStrike", 10000, 1)
end
end
function OBrien_IntimidatingRoar(pUnit, Event)
pUnit:FullCastSpellOnTarget(18508,pUnit:GetClosestPlayer())
pUnit:RemoveEvents()
end
function OBrien_AgonizingStrike(pUnit, Event)
pUnit:FullCastSpellOnTarget(58504,pUnit:GetClosestPlayer())
end
------------------------------------------------------------------------------------------------------------
function OBrien_Phase2(pUnit, Event)
if pUnit:GetHealthPct() < 75 then
pUnit:RegisterEvent("OBrien_Bladestorm", 15000,1)
pUnit:RegisterEvent("OBrien_ShadowBoltVolley", 20000,1)
end
end
function OBrien_BladeStorm(pUnit, Event)
pUnit:FullCastSpellOnTarget(46924,pUnit:GetClosestPlayer())
end
function OBrien_ShadowBoltVolley(pUnit, Event)
pUnit:FullCastSpellOnTarget(39175,pUnit:GetClosestPlayer())
end
function OBrien_Phase3(pUnit, Event)
if pUnit:GetHealthPct() < 50 then
pUnit:RegisterEvent("OBrien_IntimidatingRoar", 20000,1)
pUnit:RegisterEvent("OBrien_AgonizingStrike", 10000,1)
pUnit:RegisterEvent("OBrien_Bladestorm", 15000,1)
pUnit:RegisterEvent("OBrien_ShadowBoltVolley", 20000,1)
pUnit:RegisterEvent("OBrien_Enrage", 40000,1)
end
end
function OBrien_IntimidatingRoar(pUnit,Event)
pUnit:FullCastSpellOnTarget(18508,pUnit:GetClosestPlayer())
end
function OBrien_AgonizingStrike(pUnit,Event)
pUnit:FullCastSpellOnTarget(58504,pUnit:GetClosestPlayer())
end
function OBrien_Bladestorm(pUnit,Event)
pUnit:FullCastSpellOnTarget(46924,pUnit:GetClosestPlayer())
end
function OBrien_ShadowBoltVolley(pUnit,Event)
pUnit:FullCastSpellOnTarget(39175,pUnit:GetClosestPlayer())
end
function OBrien_Enrage(pUnit,Event)
pUnit:SendChatMessage(14, 0, "Your making me angry!")
pUnit:CastSpell(50420)
end
function OBrien_Phase4(pUnit, Event)
pUnit:RemoveEvents()
if pUnit:GetHealthPct() < 25 then
pUnit:RegisterEvent("OBrien_IntimidatingRoar", 20000,1)
pUnit:RegisterEvent("OBrien_AgonizingStrike", 10000,1)
pUnit:RegisterEvent("OBrien_Bladestorm", 15000,1)
pUnit:RegisterEvent("OBrien_ShadowBoltVolley", 20000,1)
pUnit:RegisterEvent("OBrien_Enrage", 40000,1)
pUnit:RegisterEvent("OBrien_DivineShield", 40000, 1)
pUnit:RegisterEvent("OBrien_GreaterHeal", 1000, 1)
end
end
function OBrien_DivineShield(pUnit,Event)
if pUnit:GetHealthPct() < 2 then
pUnit:CastSpell(50420)
end
end
function OBrien_GreaterHeal(pUnit,Event)
if pUnit:GetHealthPct() < 2 then
pUnit:CastSpell(49348)
end
end
------------------------------------------------------------------------------------
RegisterUnitEvent(95435, 1, "OBrien_OnEnterCombat")
RegisterUnitEvent(95435, 4, "OBrien_Died")
RegisterUnitEvent(95435, 3, "OBrien_KilledTarget")
RegisterUnitEvent(95435, 2, "OBrien_OnLeaveCombat")
Stoneharry bugchecked for me (: