Code:
function NecroKali_EnterCombat (pUnit, event)
pUnit:SendChatMessage(14, 0, "This is Sacrilige! You dare to defile my domain!")
X = pUnit:GetX();
Y = pUnit:GetY();
Z = pUnit:GetZ();
O = pUnit:GetO();
X = X - 4
Y = Y + 4
pUnit:SpawnCreature(250281, X, Y, Z, O, 73, 0);
X = pUnit:GetX();
Y = pUnit:GetY();
Z = pUnit:GetZ();
O = pUnit:GetO();
X = X + 4
Y = Y - 4
pUnit:SpawnCreature(250281, X, Y, Z, O, 73, 0);
pUnit:RegisterEvent("NecroKali_Breath", 1000, 1)
pUnit:RegisterEvent("NecroKali_Flame", 2000, 0)
pUnit:RegisterEvent("NecroKali_Sear", 5000, 0)
pUnit:RegisterEvent("NecroKali_Phase2", 1000, 0)
pUnit:SetFlying()
end
function NecroKali_Breath (pUnit, event)
pUnit:FullCastSpellOnTarget(38813, pUnit:GetClosestPlayer())
end
function NecroKali_Flame (pUnit, event)
pUnit:CastSpell(15636)
end
function NecroKali_Sear (pUnit, event)
pUnit:FullCastSpellOnTarget(38445, pUnit:GetMainTank())
end
function NecroKali_Phase2 (pUnit, event)
if pUnit:GetHealthPct() < 76 then
pUnit:RemoveEvents()
pUnit:SendChatMessage(14, 0, "The souls of the dead will deter you from this path!")
X = pUnit:GetX();
Y = pUnit:GetY();
Z = pUnit:GetZ();
O = pUnit:GetO();
X = X - 4
Y = Y + 4
pUnit:SpawnCreature(250281, X, Y, Z, O, 73, 0);
X = pUnit:GetX();
Y = pUnit:GetY();
Z = pUnit:GetZ();
O = pUnit:GetO();
X = X + 4
Y = Y - 4
pUnit:SpawnCreature(250281, X, Y, Z, O, 73, 0);
pUnit:RegisterEvent("NecroKali_Terror", 50000, 0)
pUnit:RegisterEvent("NecroKali_Ash", 15000, 0)
pUnit:RegisterEvent("NecroKali_Rain", 17000, 0)
pUnit:RegisterEvent("NecroKali_Phase3", 1000, 0)
pUnit:Land()
end
end
function NecroKali_Terror (pUnit, event)
pUnit:FullCastSpellOnTarget(39048, pUnit:GetMainTank())
end
function NecroKali_Ash (pUnit, event)
pUnit:FullCastSpellOnTarget(30130, pUnit:GetMainTank())
end
function NecroKali_Rain (pUnit, event)
pUnit:CastSpell(39671)
end
function NecroKali_Phase3 (pUnit, event)
if pUnit:GetHealthPct() < 49 then
pUnit:RemoveEvents()
X = pUnit:GetX();
Y = pUnit:GetY();
Z = pUnit:GetZ();
O = pUnit:GetO();
X = X - 4
Y = Y + 4
pUnit:SpawnCreature(250281, X, Y, Z, O, 73, 0);
X = pUnit:GetX();
Y = pUnit:GetY();
Z = pUnit:GetZ();
O = pUnit:GetO();
X = X + 4
Y = Y - 4
pUnit:SpawnCreature(250281, X, Y, Z, O, 73, 0);
pUnit:RegisterEvent("NecroKali_Blast", 20000, 0)
pUnit:RegisterEvent("NecroKali_Torrent", 15000, 0)
pUnit:RegisterEvent("NecroKali_Calamity", 50000, 0)
pUnit:RegisterEvent("NecroKali_Ire", 35000, 0)
pUnit:RegisterEvent("NecroKali_Phase4", 1000, 0)
pUnit:SetFlying()
end
end
function NecroKali_Blast (pUnit, event)
pUnit:CastSpell(17689)
end
function NecroKali_Torrent (pUnit, event)
pUnit:FullCastSpellOnTarget(22920, pUnit:GetMainTank())
end
function NecroKali_Calamity (pUnit, event)
pUnit:CastSpell(32964)
end
function NecroKali_Ire (pUnit, event)
pUnit:FullCastSpellOnTarget(30926, pUnit:GetRandomPlayer(0))
end
function NecroKali_Phase4 (pUnit, event)
if pUnit:GetHealthPct() < 20 then
pUnit:RemoveEvents()
pUnit:SendChatMessage(14, 0, "You cannot defeat me here...This is my sanctuary of POWER!")
X = pUnit:GetX();
Y = pUnit:GetY();
Z = pUnit:GetZ();
O = pUnit:GetO();
X = X + 4
Y = Y - 4
pUnit:SpawnCreature(250281, X, Y, Z, O, 73, 0);
X = pUnit:GetX();
Y = pUnit:GetY();
Z = pUnit:GetZ();
O = pUnit:GetO();
X = X - 4
Y = Y + 4
pUnit:SpawnCreature(250281, X, Y, Z, O, 73, 0);
X = pUnit:GetX();
Y = pUnit:GetY();
Z = pUnit:GetZ();
O = pUnit:GetO();
X = X - 4
Y = Y - 4
pUnit:SpawnCreature(250281, X, Y, Z, O, 73, 0);
pUnit:CastSpell(20474)
pUnit:Land()
end
end
function NecroKali_LeaveCombat (pUnit, event)
pUnit:RemoveEvents()
end
function NecroKali_Die (pUnit, event)
pUnit:RemoveEvents()
pUnit:SendChatMessage(14, 0, "Death... It is only the...Beginning")
end
RegisterUnitEvent(885432, 1, "NecroKali_EnterCombat")
RegisterUnitEvent(885432, 2, "NecroKali_LeaveCombat")
RegisterUnitEvent(885432, 4, "NecroKali_Die")
Minion
Code:
INSERT INTO creature_names (entry, name, subname, info_str, Flags1, type, family, rank, male_displayid, female_displayid, male_displayid2, female_displayid2, civilian, leader) VALUES ('885432','Necrodragon Kalish','','','0','6','0','3','18062','0','0','0','0','0')
INSERT INTO creature_proto (entry, minlevel, maxlevel, faction, minhealth, maxhealth, mana, scale, npcflags, attacktime, mindamage, maxdamage, rangedattacktime, rangedmindamage, rangedmaxdamage, mountdisplayid, equipmodel1, equipmodel2, equipmodel3, respawntime, armor, resistance1, resistance2, resistance3, resistance4, resistance5, resistance6, combat_reach, auras, boss, money, invisibility_type, death_state, walk_speed, run_speed, fly_speed) VALUES ('885432','71','71','1769','123122','123123','45567','0.75','2800','3123','4211','0','0','0','0','0','0','0','36000','2312','0','0','0','0','99','0','1','0','1','0','0','0','2.5','8','14','0')
INSERT INTO creature_names (entry, name, subname, info_str, Flags1, type, family, rank, male_displayid, female_displayid, male_displayid2, female_displayid2, civilian, leader) VALUES ('250281','Minion of Kalish','','','0','6','0','3','10627','0','0','0','0','0')
INSERT INTO creature_proto (entry, minlevel, maxlevel, faction, minhealth, maxhealth, mana, scale, npcflags, attacktime, mindamage, maxdamage, rangedattacktime, rangedmindamage, rangedmaxdamage, mountdisplayid, equipmodel1, equipmodel2, equipmodel3, respawntime, armor, resistance1, resistance2, resistance3, resistance4, resistance5, resistance6, combat_reach, auras, boss, money, invisibility_type, death_state, walk_speed, run_speed, fly_speed) VALUES ('250281','70','70','0','19232','20121','100','1','1500','1203','1734','0','0','0','0','0','0','0','36000','1445','0','0','0','0','0','0','1','0','1','0','0','0','2.5','8','14','0')