Code:
--[[=========================>
======Death Knight========>
====one helluva fight=======>
=========================>
Base outline:
When a player approaches he'll warn him. //Doesn't work since the core doesn't supprt this yet.
Phase 1:
Demon Armor every 30 seconds
Phase 2: <96%
Demon Armor every 30 seconds
Desecration every 15 seconds - 512 damage over 8 seconds in an area
Phase 3: <80%
Demon Armor every 30 seconds
Desecration every 15 seconds - 512 damage over 8 seconds in an area
Shadowsurge (debuff) the tank every 20 seconds for 5 seconds.
425 - 575 damage to all enemies in 45 yard radius every 31 seconds
Immunity to fire and shadow for 3 seconds every 11 seconds
Phase 4: <60%
Increase shadow damage taken by tank by 60% for 15 seconds every 20 seconds
He also starts to heal himself, cast Death and Decay, all the former spells and more
Also all the previous stuff
Phase 5: <20%
Does everything faster now
]]
function DK_DND (pUnit, Event)
pUnit:CastSpellOnTarget(37788, pUnit:GetMainTank())
end
function DK_Desecrate (pUnit, Event)
pUnit:CastSpell(36473, pUnit:GetMainTank())
end
function DK_Chastice (pUnit, Event)
pUnit:CastSpell(36863, pUnit:GetMainTank())
end
function DK_Heal (pUnit, Event)
pUnit:CastSpell(16588)
end
function DK_NetherProt (pUnit, Event)
pUnit:CastSpell(30300)
end
function DK_DemonicDoom (pUnit, Event)
pUnit:CastSpellOnTarget(23298, pUnit:GetMainTank())
end
function DK_DemonicProt (pUnit, Event)
pUnit:CastSpell(31901)
end
function DK_CrushingShadows (pUnit, Event)
pUnit:CastSpellOnTarget(40243, pUnit:GetMainTank())
end
function DK_ShadowCleave (pUnit, Event)
pUnit:CastSpellOnTarget(30495, pUnit:GetMainTank())
end
function DK_DarkShell (pUnit, Event)
pUnit:CastSpell(32358)
end
function DK_DarkStrike (pUnit, Event)
pUnit:CastSpellOnTarget(22574, pUnit:GetMainTank())
end
function DK_ShadowSurge (pUnit, Event)
pUnit:CastSpellOnTarget(36518, pUnit:GetMainTank())
end
function DK_ShadowStorm (pUnit, Event)
pUnit:CastSpellOnTarget(14297, pUnit:GetMainTank())
end
function DK_DemonArmor (pUnit, Event)
pUnit:CastSpell(34881)
end
--===========================--
--=======Setting Phases=======--
--==========================--
function DK_Death (pUnit, Event)
pUnit:RemoveEvents()
pUnit:SendChatMessage(11, 0, "You may have defeated me, mortals. But we are LEGION!")
end
function DK_Phase6 (pUnit, Event)
if pUnit:GetHealthPct() < 20 then
--Is that all you got?!
pUnit:RemoveEvents()
--Give me more! Give me MORE!!
pUnit:SendChatMessage(12, 0, "AARGH!") --Cheesy, I know.
pUnit:RegisterEvent("DK_DemonArmor", 29000, 0)
pUnit:RegisterEvent("DK_CrushingShadows", 10000, 0) --Take this, tank!
pUnit:RegisterEvent("DK_ShadowCleave", 6000, 0)
pUnit:RegisterEvent("DK_DemonicProt", 12000, 0)
pUnit:RegisterEvent("DK_ShadowSurge", 16000, 0)
pUnit:RegisterEvent("DK_Heal", 17500, 0)
pUnit:RegisterEvent("DK_DND", 22500, 0)
pUnit:RegisterEvent("DK_NetherProt", 9000, 0)
pUnit:RegisterEvent("DK_DarkShell", 11000, 0)
pUnit:RegisterEvent("DK_DemonicDoom", 19000, 0)
pUnit:RegisterEvent("DK_ShadowStorm", 18000, 0)
pUnit:RegisterEvent("DK_Chastice", 5000, 0)
pUnit:RegisterEvent("DK_DarkStrike", 3000, 0)
end
end
function DK_Phase5 (pUnit, Event)
if pUnit:GetHealthPct() < 40 then
--No way these noobs are gonna kill us.
pUnit:RemoveEvents()
--Harder Better Faster Stronger
pUnit:SendChatMessage(12, 0, "FOR THE KING!")
pUnit:RegisterEvent("DK_DemonArmor", 29000, 0)
pUnit:RegisterEvent("DK_CrushingShadows", 17000, 0) --Take this, tank!
pUnit:RegisterEvent("DK_ShadowCleave", 7000, 0)
pUnit:RegisterEvent("DK_DemonicProt", 14000, 0)
pUnit:RegisterEvent("DK_ShadowSurge", 16000, 0)
pUnit:RegisterEvent("DK_Heal", 23500, 0)
pUnit:RegisterEvent("DK_DND", 26500, 0)
pUnit:RegisterEvent("DK_NetherProt", 9000, 0)
pUnit:RegisterEvent("DK_DarkShell", 13000, 0)
pUnit:RegisterEvent("DK_DemonicDoom", 19000, 0)
pUnit:RegisterEvent("DK_ShadowStorm", 21000, 0)
pUnit:RegisterEvent("DK_Chastice", 6000, 0)
pUnit:RegisterEvent("DK_Phase6", 1000, 0)
end
end
function DK_Phase4 (pUnit, Event)
if pUnit:GetHealthPct() < 60 then
--Time to take out the tank.
pUnit:RemoveEvents()
pUnit:SendChatMessage(12, 0, "Take this!")
pUnit:RegisterEvent("DK_DemonArmor", 29000, 0)
pUnit:RegisterEvent("DK_CrushingShadows", 20000, 0) --Take this, tank!
pUnit:RegisterEvent("DK_ShadowCleave", 9000, 0)
pUnit:RegisterEvent("DK_DemonicProt", 19000, 0)
pUnit:RegisterEvent("DK_ShadowSurge", 22000, 0)
pUnit:RegisterEvent("DK_Heal", 23500, 0)
pUnit:RegisterEvent("DK_DND", 30500, 0)
pUnit:RegisterEvent("DK_NetherProt", 11000, 0)
pUnit:RegisterEvent("DK_DarkShell", 17000, 0)
pUnit:RegisterEvent("DK_Phase5", 1000, 0)
end
end
function DK_Phase3 (pUnit, Event)
if pUnit:GetHealthPct() < 80 then
pUnit:RemoveEvents()
pUnit:SendChatMessage(11, 0, "You haven't seen NOTHING yet!")
pUnit:RegisterEvent("DK_DemonArmor", 30000, 0)
pUnit:RegisterEvent("DK_Desecrate", 15000, 0)
pUnit:RegisterEvent("DK_ShadowSurge", 20000, 0)
pUnit:RegisterEvent("DK_ShadowStorm", 31000, 0)
pUnit:RegisterEvent("DK_NetherProt", 11000, 0)
pUnit:RegisterEvent("DK_Phase4", 1000, 0)
end
end
function DK_Phase2 (pUnit, Event)
if pUnit:GetHealthPct() < 96 then
--Oooh stfu noobs
pUnit:RemoveEvents()
pUnit:RegisterEvent("DK_DemonArmor", 30000, 0)
pUnit:RegisterEvent("DK_Desecrate", 15000, 0)
pUnit:RegisterEvent("DK_Phase3", 1000, 0)
end
end
function DK_Attack (pUnit, Event)
pUnit:SendChatMessage(11, 0, "Foolish choice, mortals.")
--cue action biggrin.gif
pUnit:RegisterEvent("DK_DemonArmor", 30000, 0) --In case the attackers steal / dispel it sad.gif
pUnit:RegisterEvent("DK_Phase2", 1000, 0)
end
function DK_Approach (pUnit, Event)
pUnit:SendChatMessage(11, 0, "Do not make one step further. Know that I am stronger than you'll ever be.")
end
RegisterUnitEvent(73000, 10, "DK_Approach")
RegisterUnitEvent(73000, 1, "DK_Attack")
RegisterUnitEvent(73000, 4, "DK_Death")
Code:
INSERT INTO `creature_names` (`name`, `subname`, `info_str`, `type`, `family`, `rank`, `male_displayid`, `female_displayid`, `civilian`, `Leader`, `entry`) VALUES ('Death Knight', '', '', '7', '0', '3', '14591', '0', '0', NULL, '73000');
INSERT INTO `creature_proto` (`minlevel`, `maxlevel`, `Faction`, `minhealth`, `maxhealth`, `mana`, `Scale`, `npcflags`, `attacktime`, `mindamage`, `maxdamage`, `rangedattacktime`, `rangedmindamage`, `rangedmaxdamage`, `combat_reach`, `boss`, `equipmodel1`, `equipmodel2`, `equipmodel3`, `respawntime`, `auras`, `invisibility_type`, `death_state`, `entry`) VALUES ('80', '80', '168', '1300000', '1300000', '125000', '1', '0', '1500', '2512', '3115', '0', '0', '0', '1', '1', '0', '35575', '0', '3600', '0', '0', '0', '73000');