Code:
---------------------------------------------------------------------------------------------------------
--*** ---[ Achilles Script (Custom Boss) ]--- ***--
--******* ---[ Written by the Elemental Script Team ]--- *******--
--*********** ---[ Released by ~Pharcide and Joe~ ]--- ***********--
---------------------------------------------------------------------------------------------------------
-- Notes ~
--- 1. This script doesn't come with an sql, so you have to make your own
---- 2. You'll have to add your own npc i.ds on the last 4 lines
----- 3. If you find any errors or broken spells please tell us
------ 4. Feel free to change the bosses talks, we do our best but sometimes their corny
------- 5. This boss has 3 phases, 1st he is in battle stance, at 60% he goes into defensive, at 30% he goes into berserker
-------- 6. This script hasn't been thoroughly tested, so if you find errors we stress you to report them
---------------------------------------------------------------------------------------------------------
function Achilles_OnCombat(pUnit, Event)
local RandomTalk=math.random(1, 4);
if RandomTalk == 1 then
pUnit:SendChatMessage(14, 0, "Mortals dare challenge Achilles?")
elseif RandomTalk == 2 then
pUnit:SendChatMessage(14, 0, "Fools, you will suffer for your arrogance!")
elseif RandomTalk == 3 then
pUnit:SendChatMessage(14, 0, "I've been waiting for a real challenge, i suppose you'll do!")
elseif RandomTalk == 4 then
pUnit:SendChatMessage(14, 0, "I hope you brought an army... your pathetic band of warriors is no match!")
pUnit:CastSpell(53792) -- Graphic for the stance (Battle)
pUnit:CastSpell(41106) -- Aura for the stance
pUnit:RegisterEvent("Achilles_HeroicStrike", math.random(15000, 25000), 0) --Spell i.d [53395] 2500 - 3500 dmg
pUnit:RegisterEvent("Achilles_ThunderClap", math.random(17000, 28000), 0) -- Spell i.d [23931] 1400- 1500 dmg/100% less movement/60% less attack speed
pUnit:RegisterEvent("Achilles_Rend", 10000, 0) -- spell i.d[36991] 500 damage every 3 seconds for 16 seconds, Can be applied 100 times
pUnit:RegisterEvent("Achilles_Retaliation", 90000, 0) -- spell i.d[22857]Counterattack all attacks(From the front) for 15 seconds
pUnit:RegisterEvent("Achilles_Rend2", 10000, 0)
pUnit:RegisterEvent("Achilles_DefensiveStance", math.random(15000, 30000), 0)
end
end
function Achilles_Rend(pUnit, Event)
pUnit:FullCastSpellOnTarget(36991, pUnit:GetMainTank())
if pUnit:GetMainTank() == nil then
pUnit:FullCastSpellOnTarget(46028, pUnit:GetRandomPlayer(0)) -- glaive throw, 4000 - 5000 dmg (Jumps to 4 other targets)
if pUnit:GetMainTank() and pUnit:GetRandomPlayer(0) == nil then
return
end
end
end
function Achilles_ThunderClap(pUnit, Event)
pUnit:CastSpell(23931)
end
function Achilles_HeroicStrike(pUnit, Event)
pUnit:FullCastSpellOnTarget(53395, pUnit:GetMainTank())
if pUnit:GetMainTank() == nil then
pUnit:FullCastSpellOnTarget(46028, pUnit:GetRandomPlayer(0)) -- glaive throw
if pUnit:GetMainTank() and pUnit:GetRandomPlayer(0) == nil then
return
end
end
end
function Achilles_Rend2(pUnit, Event)
pUnit:FullCastSpellOnTarget(36991, pUnit:GetMainTank())
if pUnit:GetMainTank() == nil then
pUnit:FullCastSpellOnTarget(46028, pUnit:GetRandomPlayer(0)) -- glaive throw
if pUnit:GetMainTank() and pUnit:GetRandomPlayer(0) == nil then
return
end
end
end
function Achilles_Retaliation(pUnit, Event)
pUnit:CastSpell(22857)
end
function Achilles_DefensiveStance(pUnit, Event)
if pUnit:GetHealthPct() <= 60 then -- Change 60 to whatever health % you want the phase to change at
-- pUnit:SendChatMessage(14, 0, "PUT CHAT HERE") -- optional
pUnit:RemoveAura(41106)
pUnit:RemoveEvents()
-- pUnit:SetModel(Model i.d here) -- You can add this if you want, so he appears different in the new stance
pUnit:CastSpell(53790) -- Graphic for the stance (Defensive)
pUnit:CastSpell(41105) -- Aura for the stance
pUnit:RegisterEvent("Achilles_Devastate", math.random(20000, 25000), 0) -- Spell i.d[60018] 50% weapon damage+Sunder Effect
pUnit:RegisterEvent("Achilles_ShieldBlock", math.random(10000, 20000), 0) -- Spell i.d[32587] 100% block value(1 charge)
pUnit:RegisterEvent("Achilles_IronForm", math.random(25000, 30000), 0) -- spell i.d[52022] 20% armor and immunity to poisons ect.
pUnit:RegisterEvent("Achilles_Disarm", math.random(20000, 30000), 0) -- spell i.d[6713] Disarm target for 5 seconds
pUnit:RegisterEvent("Achilles_ShieldWall", 90000, 0) -- spell i.d[15062] 75% less damage taken for 10 seconds
pUnit:RegisterEvent("Achilles_BerserkerStance", math.random(15000, 30000), 0)
end
end
function Achilles_ShieldBlock(pUnit, Event)
pUnit:CastSpell(32587)
end
function Achilles_Devastate(pUnit, Event)
pUnit:FullCastSpellOnTarget(60018, pUnit:GetMainTank())
if pUnit:GetMainTank() == nil then
pUnit:CastSpell(20511) -- intimdating shout (8 second fear to all nearby targets)
end
end
function Achilles_Disarm(pUnit, Event)
pUnit:FullCastSpellOnTarget(6713, pUnit:GetMainTank())
if pUnit:GetMainTank() == nil then
pUnit:CastSpell(20511) -- intimidating shout
end
end
function Achilles_IronForm(pUnit, Event)
pUnit:CastSpell(52022)
end
function Achilles_ShieldWall(pUnit, Event)
pUnit:CastSpell(15062)
end
function Achilles_BerserkerStance(pUnit, Event)
if pUnit:GetHealthPct() <= 30 then -- Change 30 to the % you want the phase to change at
-- pUnit:SendChatMessage(14, 0, "PUT CHAT HERE") -- optional
pUnit:RemoveAura(41105)
pUnit:RemoveEvents()
-- pUnit:SetModel(Model i.d here) -- You can add this if you want, so he appears different in the new stance
pUnit:CastSpell(53791) -- Graphic for the stance (Berserker)
pUnit:CastSpell(41107) -- Aura for the stance
pUnit:RegisterEvent("Achilles_WhirlWind", math.random(25000, 30000), 0) -- spell i.d[52027] Channeled whirlind for 8 seconds
pUnit:RegisterEvent("Achilles_HeroicLeep", math.random(30000, 35000), 0) -- spell i.d[59688] Charge+2 second stun
pUnit:RegisterEvent("Achilles_DemoShout", math.random(15000, 20000), 0) -- spell i.d[61044] -20% attack power for nearby enemies
pUnit:RegisterEvent("Achilles_WoundingStrike", math.random(20000, 30000), 0) -- spell i.d[58830] 100% weapon damage/25% less healing/2000 damage bleed for 4 seconds
pUnit:RegisterEvent("Achilles_KnockBack", math.random(15000, 25000), 0) -- spell i.d[52029] 20% weapon damage+knockback to all nearby targets
end
end
function Achilles_DemoShout(pUnit, Event)
pUnit:CastSpell(61044)
end
function Achilles_KnockBack(pUnit, Event)
pUnit:CastSpell(52029)
end
function Achilles_HeroicLeap(pUnit, Event)
pUnit:FullCastSpellOnTarget(59688, pUnit:GetRandomPlayer(0))
if pUnit:GetRandomPlayer(0) == nil then
pUnit:CastSpell(13847) -- recklessness (100% chance to crit and -35% armor for 15 seconds
end
end
function Achilles_WhirlWind(pUnit, Event)
pUnit:FullCastSpell(52027)
end
function Achilles_WoundingStrike(pUnit, Event)
pUnit:FullCastSpellOnTarget(58830, pUnit:GetMainTank())
if pUnit:GetMainTank() == nil then
pUnit:CastSpell(13847) -- recklessness
end
end
function Achilles_OnLeaveCombat(pUnit, Event)
pUnit:SendChatMessage(14, 0, "I can't say i expected more...")
pUnit:RemoveEvents()
end
function Achilles_OnKilledTarget(pUnit, Event)
local RandomText=math.random(1, 3)
if RandomText == 1 then
pUnit:SendChatMessage(14, 0, "You will not be the last!")
elseif RandomText == 2 then
pUnit:SendChatMessage(14, 0, "Pathetic mortal!")
elseif RandomText == 3 then
pUnit:SendChatMessage(14, 0, "Shhh... it will all be over soon")
end
end
function Achilles_OnDied(pUnit, Event)
pUnit:SendChatMessage(14, 0, "This.... is..... impossible....!")
pUnit:RemoveEvents()
end
RegisterUnitEvent(NPC SPAWN I.D HERE, 1, "Achilles_OnCombat") -- Change NPC SPAWN I.D HERE on each line to the npc spawn i.d
RegisterUnitEvent(NPC SPAWN I.D HERE, 2, "Achilles_OnLeaveCombat")
RegisterUnitEvent(NPC SPAWN I.D HERE, 3, "Achilles_OnKilledTarget")
RegisterUnitEvent(NPC SPAWN I.D HERE, 4, "Achilles_OnDied")