Code:
-- ==================== Let's define some stuff ===========================================================
local npcid = 88888888
local npcidtwo = 939373
local guardid = 88888889
local ironforge = 5595 -- This will depend on your server. By default it's this!
local God = 9597349
local Minion = 8748721
-- =================== ...and a logo to message to annoy people :) ========================================
print(" - ")
print(" Lua script made by stoneharry ")
print(" Have fun ")
print(" Report bugs to mmowned.com ")
print(" - ")
-- =============================== Starter ================================================================
function ggMedivh_OnGossipTalk(pUnit, event, player, pMisc)
pUnit:GossipCreateMenu(50, player, 0)
pUnit:GossipMenuAddItem(9, "Start the Raid on Ironforge so that the Prince can finnaly take over what is his.", 1, 0)
pUnit:GossipMenuAddItem(0, "Choose to leave before it is to late.", 2, 0)
pUnit:GossipSendMenu(player)
end
function ggMedivh_OnGossipSelect(pUnit, event, player, id, intid, code, pMisc)
if (intid == 1) then
player:SendBroadcastMessage("The Prince is unvailed!")
player:SendAreaTriggerMessage("The Prince is unvailed!")
player:SendBroadcastMessage("It is advised you stand behind The Prince.")
player:SendAreaTriggerMessage("It is advised you stand behind The Prince.")
pUnit:CastSpell(47820)
x = pUnit:GetX();
y = pUnit:GetY();
z = pUnit:GetZ();
o = pUnit:GetO();
pUnit:SpawnCreature(npcid, x, y, z, o, 35, 0);
pUnit:Despawn(1,0)
pUnit:GossipComplete(player)
end
if (intid == 2) then
pUnit:GossipComplete(player)
player:SendBroadcastMessage("You flee before you get into real trouble.")
player:SendAreaTriggerMessage("You flee before you get into real trouble.")
end
end
RegisterUnitGossipEvent(npcidtwo, 1, "ggMedivh_OnGossipTalk")
RegisterUnitGossipEvent(npcidtwo, 2, "ggMedivh_OnGossipSelect")
function zzzServent_Start(pUnit, Event)
pUnit:SendBroadcastMessage("The Battle for Ironforge is starting!")
pUnit:SendAreaTriggerMessage("The Battle for Ironforge is starting!")
pUnit:PlaySoundToSet(11708)
pUnit:CastSpell(35341)
pUnit:CastSpell(39180)
pUnit:CastSpell(42142)
pUnit:SendChatMessage(14, 0, "The day of judgement has come!")
pUnit:RegisterEvent("zzzWalk", 5000, 0)
pUnit:RegisterEvent("zzzVisual", 1000, 0)
end
function zzzVisual(pUnit, Event)
pUnit:CastSpell(35341)
pUnit:CastSpell(39180)
pUnit:CastSpell(42142)
end
function zzzWalk(pUnit, Event)
pUnit:RemoveEvents()
pUnit:MoveTo(-5036.641602, -816.969315, 495.126008, 5.429110)
pUnit:SendChatMessage(12, 0, "Come mortals; follow.")
pUnit:RegisterEvent("zzzSpawnHelp", 6000, 0)
end
function zzzSpawnHelp(pUnit, Event)
pUnit:RemoveEvents()
pUnit:SendChatMessage(12, 0, "The fall of the Alliance is today.")
pUnit:SpawnCreature(88888889, -5036, -811, 496, 5.442765, 2, 60000);
pUnit:SpawnCreature(88888889, -5036, -811, 496, 5.442765, 2, 60000);
pUnit:SpawnCreature(88888889, -5040, -816, 496, 5.442765, 2, 60000);
pUnit:SpawnCreature(88888889, -5040, -816, 496, 5.442765, 2, 60000);
pUnit:SpawnCreature(88888889, -5036, -811, 496, 5.442765, 2, 60000);
pUnit:SpawnCreature(88888889, -5036, -811, 496, 5.442765, 2, 60000);
pUnit:SpawnCreature(88888889, -5040, -816, 496, 5.442765, 2, 60000);
pUnit:RegisterEvent("zzzNuke", 10000, 0)
end
function zzzNuke(pUnit, Event)
pUnit:RemoveEvents()
pUnit:SendChatMessage(12, 0, "They shall die slowly...")
pUnit:CastSpellAoF(-5018,-836,496,4629)
pUnit:CastSpellAoF(-5018,-836,498,4629)
pUnit:CastSpellAoF(-5018,-836,500,4629)
pUnit:RegisterEvent("zzzKeepWalking", 5000, 0)
end
function zzzKeepWalking(pUnit, Event)
pUnit:RemoveEvents()
pUnit:SendChatMessage(12, 0, "Keep up with me.")
pUnit:MoveTo(-4987.641602, -874.969315, 496.126008, 5.429110)
pUnit:RegisterEvent("zzzAttackGuards", 26000, 0)
end
function zzzAttackGuards(pUnit, Event)
pUnit:RemoveEvents()
pUnit:SendChatMessage(12, 0, "My betrayers are loyal to me, that is good.")
pUnit:SpawnCreature(ironforge, -4978, -877, 502, 5.442765, 2, 60000);
pUnit:SpawnCreature(ironforge, -4988, -886, 502, 5.442765, 2, 60000);
pUnit:SpawnCreature(ironforge, -4978, -877, 502, 5.442765, 2, 60000);
pUnit:SpawnCreature(ironforge, -4988, -886, 502, 5.442765, 2, 60000);
pUnit:MoveTo(-4982.641602, -881.969315, 502.126008, 5.420105)
pUnit:RegisterEvent("zzzBurnStatue", 14000, 0)
end
function zzzBurnStatue(pUnit, Event)
pUnit:RemoveEvents()
pUnit:SendChatMessage(14, 0, "Watch as the city burns!")
pUnit:CastSpellAoF(-4971,-895,501,4629)
pUnit:CastSpellAoF(-4971,-895,503,4629)
pUnit:CastSpellAoF(-4971,-895,506,4629)
pUnit:CastSpellAoF(-4971,-895,508,4629)
pUnit:CastSpellAoF(-4971,-895,509,4629)
pUnit:CastSpellAoF(-4971,-895,510,4629)
pUnit:CastSpellAoF(-4971,-895,513,4629)
pUnit:CastSpellAoF(-4971,-895,515,4629)
pUnit:RegisterEvent("zzzBurnStatueAgain", 1000, 0)
pUnit:RegisterEvent("zzzEndBurning", 10000, 0)
end
function zzzBurnStatueAgain(pUnit, Event)
pUnit:CastSpellAoF(-4971,-895,501,4629)
pUnit:CastSpellAoF(-4971,-895,503,4629)
pUnit:CastSpellAoF(-4971,-895,506,4629)
pUnit:CastSpellAoF(-4971,-895,508,4629)
pUnit:CastSpellAoF(-4971,-895,509,4629)
pUnit:CastSpellAoF(-4971,-895,510,4629)
pUnit:CastSpellAoF(-4971,-895,513,4629)
pUnit:CastSpellAoF(-4971,-895,515,4629)
pUnit:CastSpellAoF(-4971,-895,518,4629)
pUnit:CastSpellAoF(-4971,-895,520,4629)
pUnit:CastSpellAoF(-4971,-895,525,4629)
pUnit:CastSpellAoF(-4971,-895,528,4629)
pUnit:CastSpellAoF(-4971,-895,529,4629)
pUnit:CastSpellAoF(-4971,-895,526,4629)
pUnit:CastSpellAoF(-4971,-895,516,4629)
end
function zzzEndBurning(pUnit, Event)
pUnit:RemoveEvents()
pUnit:SendChatMessage(12, 0, "Not much longer my friends, soon this city shall be wiped from the face of this planet.")
pUnit:MoveTo(-4967.641602, -880.969315, 502.126008, 0.292953)
pUnit:RegisterEvent("zzzWalkABit", 6500, 0)
end
function zzzWalkABit(pUnit, Event)
pUnit:RemoveEvents()
pUnit:SendChatMessage(12, 0, "Hang on. I sense something.. He is nearer than we thought.")
pUnit:MoveTo(-4957, -873.969315, 502.126008, 0.597743)
pUnit:SpawnCreature(God, -4911, -871, 502, 2.258573, 35, 0);
pUnit:RegisterEvent("zzzDael_One", 7500, 0)
end
function zzzDael_One(pUnit, Event)
pUnit:RemoveEvents()
pUnit:SendChatMessage(12, 0, "No it cant be...")
pUnit:RegisterEvent("zzzDael_Two", 3500, 0)
end
function zzzDael_Two(pUnit, Event)
pUnit:RemoveEvents()
pUnit:SendChatMessage(14, 0, "Groll, you should not be here.")
pUnit:Emote(45, 10000)
pUnit:RegisterEvent("zzzDael_Three", 7500, 0)
end
function zzzDael_Three(pUnit, Event)
pUnit:RemoveEvents()
pUnit:SendChatMessage(14, 0, "You do not understand! This city must fall... brother... even if I have to take you with it!")
pUnit:RegisterEvent("zzzDael_Four", 27500, 0)
end
function zzzDael_Four(pUnit, Event)
pUnit:RemoveEvents()
pUnit:SendChatMessage(14, 0, "Foolish! Don't you realise your minions are futile?!")
pUnit:SetFaction(2)
pUnit:StopMovement(60000)
end
RegisterUnitEvent(npcid, 18, "zzzServent_Start")
-- ========================= Cinematic mobs ================================================================
function zzzGuard_Start(pUnit, Event)
Choice=math.random(1, 2)
if Choice==1 then
pUnit:MoveTo(-5030.641602, -832.969315, 495.492004, 1.429110)
end
if Choice==2 then
pUnit:MoveTo(-5031.641602, -831.969315, 495.304008, 5.056357)
end
end
RegisterUnitEvent(guardid, 18, "zzzGuard_Start")
function zzzGod_Start(pUnit, Event)
pUnit:RegisterEvent("zzzGod_One", 5500, 0)
end
function zzzGod_One(pUnit, Event)
pUnit:RemoveEvents()
pUnit:SendChatMessage(14, 0, "I hear that the 'great' Dael'delar is here!")
pUnit:MoveTo(-4928, -851.969315, 502.126008, 3.804857)
pUnit:RegisterEvent("zzzGod_Two", 10000, 0)
end
function zzzGod_Two(pUnit, Event)
pUnit:RemoveEvents()
pUnit:SendChatMessage(14, 0, "You fool, you seek to destroy Ironforge, but you know I can not allow this!")
pUnit:MoveTo(-4939, -859.969315, 502.126008, 3.930515)
pUnit:RegisterEvent("zzzGod_Three", 7500, 0)
end
function zzzGod_Three(pUnit, Event)
pUnit:RemoveEvents()
pUnit:SendChatMessage(14, 0, "You leave me no choice.")
pUnit:MoveTo(-4950, -859.969315, 502.126008, 3.930515)
pUnit:RegisterEvent("zzzGod_Four", 6000, 0)
end
function zzzGod_Four(pUnit, Event)
pUnit:RemoveEvents()
pUnit:CastSpellAoF(-4914,-846,502,35341)
pUnit:CastSpellAoF(-4914,-846,502,39180)
pUnit:CastSpellAoF(-4914,-846,502,42142)
pUnit:CastSpellAoF(-4919,-839,502,35341)
pUnit:CastSpellAoF(-4919,-839,502,39180)
pUnit:CastSpellAoF(-4919,-839,502,42142)
pUnit:RegisterEvent("zzzGod_Five", 500, 0)
pUnit:RegisterEvent("zzzGod_Six", 20000, 0)
end
function zzzGod_Five(pUnit, Event)
Choice=math.random(1, 3)
if Choice==1 then
pUnit:SpawnCreature(Minion, -4913, -845, 502, 3.942198, 1, 37000);
pUnit:CastSpellAoF(-4919,-839,502,35341)
pUnit:CastSpellAoF(-4919,-839,502,42142)
end
if Choice==2 then
pUnit:SpawnCreature(Minion, -4919, -837, 502, 3.942198, 1, 40000);
pUnit:CastSpellAoF(-4914,-846,502,35341)
pUnit:CastSpellAoF(-4914,-846,502,42142)
end
if Choice==3 then
pUnit:SpawnCreature(Minion, -4915, -841, 502, 3.942198, 1, 35000);
pUnit:CastSpellAoF(-4914,-846,502,35341)
pUnit:CastSpellAoF(-4914,-846,502,42142)
pUnit:CastSpellAoF(-4919,-839,502,35341)
pUnit:CastSpellAoF(-4919,-839,502,42142)
end
end
function zzzGod_Six(pUnit, Event)
pUnit:RemoveEvents()
pUnit:SendChatMessage(12, 0, "I did not want this to happen, brother, you left me no choice...")
pUnit:MoveTo(-4928, -851.969315, 502.126008, 3.804857)
pUnit:RegisterEvent("zzzGod_Seven", 4500, 0)
end
function zzzGod_Seven(pUnit, Event)
pUnit:RemoveEvents()
pUnit:SpawnCreature(npcidtwo, -5059.468232, -788.401694, 496.059326, 5.399936, 35, 0);
pUnit:Despawn(1,0)
end
RegisterUnitEvent(God, 18, "zzzGod_Start")
function zzzminion_spawn(pUnit, Event)
Choice=math.random(1, 3)
if Choice==1 then
pUnit:MoveTo(-4949.742676, -876.969315, 502.304008, 3.898104)
end
if Choice==2 then
pUnit:MoveTo(-4954.742676, -870.969315, 502.304008, 3.898104)
end
if Choice==3 then
pUnit:MoveTo(-4959.742676, -866.969315, 502.304008, 3.898104)
end
end
RegisterUnitEvent(Minion, 18, "zzzminion_spawn")
-- ========================= And the end of the sciprt ============================================================
-- ====================== If it is not working try changing all the "spawn" registers... ==========================
-- ====================== ... to 6 instead of 18, or simple get a better Lua engine. ==============================
-- ================================= ~ Stoneharry ~ ===============================================================
Code:
insert into `creature_names` (`entry`, `name`, `subname`, `info_str`, `Flags1`, `type`, `family`, `rank`, `unk4`, `spelldataid`, `male_displayid`, `female_displayid`, `male_displayid2`, `female_displayid2`, `unknown_float1`, `unknown_float2`, `civilian`, `leader`) values('88888889','Horde Summon','Minion of The Prince','','0','0','0','1','0','0','22910','22911','0','0','1','1',NULL,NULL);
insert into `creature_names` (`entry`, `name`, `subname`, `info_str`, `Flags1`, `type`, `family`, `rank`, `unk4`, `spelldataid`, `male_displayid`, `female_displayid`, `male_displayid2`, `female_displayid2`, `unknown_float1`, `unknown_float2`, `civilian`, `leader`) values('88888888','Dael\'delar','The Prince','','0','0','0','3','0','0','26195','0','0','0','1','1',NULL,NULL);
insert into `creature_names` (`entry`, `name`, `subname`, `info_str`, `Flags1`, `type`, `family`, `rank`, `unk4`, `spelldataid`, `male_displayid`, `female_displayid`, `male_displayid2`, `female_displayid2`, `unknown_float1`, `unknown_float2`, `civilian`, `leader`) values('9597349','Groll','The Mountain God','','0','0','0','3','0','0','26705','0','0','0','1','1',NULL,'0');
insert into `creature_names` (`entry`, `name`, `subname`, `info_str`, `Flags1`, `type`, `family`, `rank`, `unk4`, `spelldataid`, `male_displayid`, `female_displayid`, `male_displayid2`, `female_displayid2`, `unknown_float1`, `unknown_float2`, `civilian`, `leader`) values('8748721','Corpse Grinder','Minion of Groll','','0','0','0','1','0','0','25592','0','0','0','1','1',NULL,'0');
insert into `creature_names` (`entry`, `name`, `subname`, `info_str`, `Flags1`, `type`, `family`, `rank`, `unk4`, `spelldataid`, `male_displayid`, `female_displayid`, `male_displayid2`, `female_displayid2`, `unknown_float1`, `unknown_float2`, `civilian`, `leader`) values('939373','Falar','The Horde','','0','0','0','3','0','0','27851','0','0','0','1','1',NULL,NULL);
insert into `creature_proto` (`entry`, `minlevel`, `maxlevel`, `faction`, `minhealth`, `maxhealth`, `mana`, `scale`, `npcflags`, `attacktime`, `attacktype`, `mindamage`, `maxdamage`, `can_ranged`, `rangedattacktime`, `rangedmindamage`, `rangedmaxdamage`, `respawntime`, `armor`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `combat_reach`, `bounding_radius`, `auras`, `boss`, `money`, `invisibility_type`, `death_state`, `walk_speed`, `run_speed`, `fly_speed`, `extra_a9_flags`, `spell1`, `spell2`, `spell3`, `spell4`, `spell_flags`, `modImmunities`) values('88888889','75','75','2','1','1','0','1','0','1000','0','3','2000','0','0','0','0','0','3973','0','0','0','0','0','0','1','1','0','0','0','0','0','2.5','8','14','0','0','0','0','0','0','0');
insert into `creature_proto` (`entry`, `minlevel`, `maxlevel`, `faction`, `minhealth`, `maxhealth`, `mana`, `scale`, `npcflags`, `attacktime`, `attacktype`, `mindamage`, `maxdamage`, `can_ranged`, `rangedattacktime`, `rangedmindamage`, `rangedmaxdamage`, `respawntime`, `armor`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `combat_reach`, `bounding_radius`, `auras`, `boss`, `money`, `invisibility_type`, `death_state`, `walk_speed`, `run_speed`, `fly_speed`, `extra_a9_flags`, `spell1`, `spell2`, `spell3`, `spell4`, `spell_flags`, `modImmunities`) values('88888888','83','83','35','1000000','10000000','32085','1.1','0','2552','0','2081','39784','0','0','0','0','0','353','0','0','0','0','0','0','1','1','0','0','0','0','0','2.5','8','14','0','0','0','0','0','0','0');
insert into `creature_proto` (`entry`, `minlevel`, `maxlevel`, `faction`, `minhealth`, `maxhealth`, `mana`, `scale`, `npcflags`, `attacktime`, `attacktype`, `mindamage`, `maxdamage`, `can_ranged`, `rangedattacktime`, `rangedmindamage`, `rangedmaxdamage`, `respawntime`, `armor`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `combat_reach`, `bounding_radius`, `auras`, `boss`, `money`, `invisibility_type`, `death_state`, `walk_speed`, `run_speed`, `fly_speed`, `extra_a9_flags`, `spell1`, `spell2`, `spell3`, `spell4`, `spell_flags`, `modImmunities`) values('9597349','80','80','35','100000','100000','50002','1','0','1000','0','4897','9888','0','0','0','0','0','9877','0','0','0','0','0','0','1','1','0','1','3856','0','0','2.5','8','14','0','0','0','0','0','0','0');
insert into `creature_proto` (`entry`, `minlevel`, `maxlevel`, `faction`, `minhealth`, `maxhealth`, `mana`, `scale`, `npcflags`, `attacktime`, `attacktype`, `mindamage`, `maxdamage`, `can_ranged`, `rangedattacktime`, `rangedmindamage`, `rangedmaxdamage`, `respawntime`, `armor`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `combat_reach`, `bounding_radius`, `auras`, `boss`, `money`, `invisibility_type`, `death_state`, `walk_speed`, `run_speed`, `fly_speed`, `extra_a9_flags`, `spell1`, `spell2`, `spell3`, `spell4`, `spell_flags`, `modImmunities`) values('8748721','83','83','1','10000','10000','0','1','0','1000','0','10000','10000','0','0','0','0','0','0','0','0','0','0','0','0','1','1','0','0','0','0','0','2.5','8','14','0','0','0','0','0','0','0');
insert into `creature_proto` (`entry`, `minlevel`, `maxlevel`, `faction`, `minhealth`, `maxhealth`, `mana`, `scale`, `npcflags`, `attacktime`, `attacktype`, `mindamage`, `maxdamage`, `can_ranged`, `rangedattacktime`, `rangedmindamage`, `rangedmaxdamage`, `respawntime`, `armor`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `combat_reach`, `bounding_radius`, `auras`, `boss`, `money`, `invisibility_type`, `death_state`, `walk_speed`, `run_speed`, `fly_speed`, `extra_a9_flags`, `spell1`, `spell2`, `spell3`, `spell4`, `spell_flags`, `modImmunities`) values('939373','80','80','15','10000','10000','3000','1.2','1','1000','0','2085','20222','0','0','0','0','3600','0','0','0','0','0','0','0','1','1','0','1','3563','0','0','2.5','8','14','0','0','0','0','0','0','0');