aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/FULL/world_script_texts.sql51
-rw-r--r--sql/FULL/world_scripts_full.sql13
-rw-r--r--sql/updates/5700_characters.sql3
-rw-r--r--sql/updates/5700_world.sql338
-rw-r--r--src/bindings/scripts/scripts/eastern_kingdoms/duskwood.cpp122
-rw-r--r--src/bindings/scripts/scripts/eastern_kingdoms/sunken_temple/def_sunken_temple.h22
-rw-r--r--src/bindings/scripts/scripts/eastern_kingdoms/sunken_temple/instance_sunken_temple.cpp229
-rw-r--r--src/bindings/scripts/scripts/eastern_kingdoms/sunken_temple/sunken_temple.cpp71
-rw-r--r--src/bindings/scripts/scripts/kalimdor/silithus.cpp898
-rw-r--r--src/bindings/scripts/scripts/kalimdor/zulfarrak/zulfarrak.cpp1
10 files changed, 1742 insertions, 6 deletions
diff --git a/sql/FULL/world_script_texts.sql b/sql/FULL/world_script_texts.sql
index 2d0c0269266..196301464c3 100644
--- a/sql/FULL/world_script_texts.sql
+++ b/sql/FULL/world_script_texts.sql
@@ -585,6 +585,39 @@ INSERT INTO `script_texts` (`npc_entry`,`entry`,`content_default`,`content_loc1`
-- -1 349 000 MARAUDON
+-- -1 350 000 Gates of Ahn'Qiraj Opening
+ (15381,-1350000,'We must act quickly or all shall be lost!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,0,1,'ANACHRONOS_SAY_1'),
+ (15381,-1350001,'NOW, STAGHELM! WE GO NOW! Prepare your magic!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,0,81,'ANACHRONOS_SAY_2'),
+ (15381,-1350002,'Stay close...',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,0,1,'ANACHRONOS_SAY_3'),
+ (15381,-1350003,'The sands of time will halt, but only for a moment! I will now conjure the barrier.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,0,1,'ANACHRONOS_SAY_4'),
+ (15381,-1350004,'FINISH THE SPELL STAGHELM! I CANNOT HOLD THE GLYPHS OF WARDING IN PLACE MUCH LONGER! CALL FORTH THE ROOTS!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,0,53,'ANACHRONOS_SAY_5'),
+ (15381,-1350005,'It... It is over, Lord Staghelm. We are victorious. Albeit the cost for this victory was great.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,0,1,'ANACHRONOS_SAY_6'),
+ (15381,-1350006,'There is but one duty that remains...',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,0,1,'ANACHRONOS_SAY_7'),
+ (15381,-1350007,'Before I leave this place, I make one final offreing to you, Lord Staghelm. Should a time arise in which you must gain entry to this accursed fortress, use the Scepter of the Shifting Sands on the sacred gong. The magic holding the barrier together will dissipate and the horrors of Ahn''Qiraj will be unleashed upon the world once more.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,0,1,'ANACHRONOS_SAY_8'),
+ (15381,-1350008,'Lord Staghelm, where are you going? You would shatter our bond for the sake of pride?',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,0,1,'ANACHRONOS_SAY_9'),
+ (15381,-1350009,'And now you know all that there is to know, mortal...',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,0,1,'ANACHRONOS_SAY_10'),
+ (15381,-1350010,'hands the Scepter of the Shifting Sands to Fandral Staghelm.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,2,0,1,'ANACHRONOS_EMOTE_1'),
+ (15381,-1350011,'shakes his head in dissapointment.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,2,0,274,'ANACHRONOS_EMOTE_2'),
+ (15381,-1350012,'kneels down to pick up the fragments of the shattered scepter.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,2,0,87,'ANACHRONOS_EMOTE_3'),
+ (15382,-1350013,'My forces cannot overcome the Qiraji defenses. We will not be able to get close enough to place your precious barrier, dragon.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,0,1,'FANDRAL_SAY_1'),
+ (15382,-1350014,'It is done dragon. Lead the way...',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,0,1,'FANDRAL_SAY_2'),
+ (15382,-1350015,'Ancient ones guide my hand... Wake from your slumber! WAKE AND SEAL THIS CURSED PLACE!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,0,1,'FANDRAL_SAY_3'),
+ (15382,-1350016,'After the savagery that my people have witnessed and felt, you expect me to accept another burden, dragon? Surely you are mad.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,0,25,'FANDRAL_SAY_4'),
+ (15382,-1350017,'I want nothing to do with Silithus, the Qiraji and least of all, any damned dragons!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,0,1,'FANDRAL_SAY_5'),
+ (15382,-1350018,'My son''s soul will find no comfort in this hollow victory, dragon. I will have him back.Thought it takes a millennia, I WILL have my son back!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,0,254,'FANDRAL_SAY_6'),
+ (15382,-1350019,'falls to one knee - exhausted.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,2,0,16,'FANDRAL_EMOTE_1'),
+ (15382,-1350020,'hurls the Scepter of the Shifting Sands into the barrier, shattering it.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,2,0,0,'FANDRAL_EMOTE_2'),
+ (15379,-1350021,'Aye, Fandral, remember these words: Let not your grief guide your faith. These thoughts you hold... dark places you go, night elf. Absolution cannot be had through misguided vengeance.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,0,1,'CAELESTRASZ_SAY_1'),
+ (15379,-1350022,'Do not forget the sacrifices made on this day, night elf. We have all suffered immensely at the hands of these beasts.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,0,1,'CAELESTRASZ_SAY_2'),
+ (15379,-1350023,'Alexstrasza grant me the resolve to drive our enemies back!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,1,0,53,'CAELESTRASZ_YELL_1'),
+ (15380,-1350024,'This distraction will give you and the young druid time enough to seal the gate. Do not falter. Now, let us see how they deal with chaotic magic.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,0,1,'ARYGOS_SAY_1'),
+ (15380,-1350025,'Let them feel the wrath of the Blue Flight! May Malygos protect me!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,1,0,53,'ARYGOS_YELL_1'),
+ (15380,-1350026,'nods knowingly.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,2,0,273,'ARYGOS_EMOTE_1'),
+ (15378,-1350027,'There is a way...',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,0,1,'MERITHRA_SAY_1'),
+ (15378,-1350028,'We will push them back, Anachronos. This I vow. Uphold the end of this task. Let not your hands falter as you seal our fates behind the barrier.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,0,1,'MERITHRA_SAY_2'),
+ (15378,-1350029,'Succumb to the endless dream, little ones. Let it consume you!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,1,0,53,'MERITHRA_YELL_1'),
+ (15378,-1350030,'glances at her compatriots.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,2,0,2,'MERITHRA_EMOTE_1'),
+
-- -1 389 000 RAGEFIRE CHASM
-- -1 409 000 MOLTEN CORE
@@ -2156,13 +2189,27 @@ INSERT INTO `creature_ai_scripts` VALUES
(2693004,26930,0,0,100,5,9000,9000,15000,16000,11,56936,1,0,0,0,0,0,0,0,0,0,'Grand Magus Telestra frost - cast blizzard H');
-- Used in guards.cpp, see GOSSIP_TEXT_INSCRIPTION
-DELETE FROM `npc_text` WHERE id IN (30000,30001);
+DELETE FROM `npc_text` WHERE `ID` IN (30000,30001);
INSERT INTO `npc_text` (`ID`,`text0_0`,`text0_1`,`lang0`,`prob0`,`em0_0`,`em0_1`,`em0_2`,`em0_3`,`em0_4`,`em0_5`,`text1_0`,`text1_1`,`lang1`,`prob1`,`em1_0`,`em1_1`,`em1_2`,`em1_3`,`em1_4`,`em1_5`,`text2_0`,`text2_1`,`lang2`,`prob2`,`em2_0`,`em2_1`,`em2_2`,`em2_3`,`em2_4`,`em2_5`,`text3_0`,`text3_1`,`lang3`,`prob3`,`em3_0`,`em3_1`,`em3_2`,`em3_3`,`em3_4`,`em3_5`,`text4_0`,`text4_1`,`lang4`,`prob4`,`em4_0`,`em4_1`,`em4_2`,`em4_3`,`em4_4`,`em4_5`,`text5_0`,`text5_1`,`lang5`,`prob5`,`em5_0`,`em5_1`,`em5_2`,`em5_3`,`em5_4`,`em5_5`,`text6_0`,`text6_1`,`lang6`,`prob6`,`em6_0`,`em6_1`,`em6_2`,`em6_3`,`em6_4`,`em6_5`,`text7_0`,`text7_1`,`lang7`,`prob7`,`em7_0`,`em7_1`,`em7_2`,`em7_3`,`em7_4`,`em7_5`) VALUES
('30000','Here you will find the Inscription Trainer.','Here you will find the Inscription Trainer.','0','1','0','0','0','0','0','0','So you want to be a Inscriber? Well here you will find the trainer.','So you want to be a Inscriber? Well here you will find the trainer.','0','0','0','0','0','0','0','0',NULL,NULL,'0','0','0','0','0','0','0','0',NULL,NULL,'0','0','0','0','0','0','0','0',NULL,NULL,'0','0','0','0','0','0','0','0',NULL,NULL,'0','0','0','0','0','0','0','0',NULL,NULL,'0','0','0','0','0','0','0','0',NULL,NULL,'0','0','0','0','0','0','0','0'),
('30001','So you are looking for a Inscription Trainer? Well you can''t find the trainer out here, better head to the nearest city.\r\n','So you are looking for a Inscription Trainer? Well you can''t find the trainer out here, better head to the nearest city.\r\n','0','0','0','0','0','0','0','0','So you want to be a Inscriber? Well you can''t find the trainer out here, better head to the nearest city.','So you want to be a Inscriber? Well you can''t find the trainer out here, better head to the nearest city.','0','0','0','0','0','0','0','0',NULL,NULL,'0','0','0','0','0','0','0','0',NULL,NULL,'0','0','0','0','0','0','0','0',NULL,NULL,'0','0','0','0','0','0','0','0',NULL,NULL,'0','0','0','0','0','0','0','0',NULL,NULL,'0','0','0','0','0','0','0','0',NULL,NULL,'0','0','0','0','0','0','0','0');
+-- Used in Gates of Ahn'Quiraj Opening Event
+DELETE FROM `game_event_npc_gossip` WHERE `guid` IN (135161,135162);
+INSERT INTO `game_event_npc_gossip` (`guid`,`event_id`,`textid`) VALUES
+ (135161,22,16000),
+ (135162,22,16001);
+DELETE FROM `npc_text` WHERE `ID` IN (16000,16001);
+INSERT INTO `npc_text` (`ID`,`text0_0`,`text0_1`,`prob0`,`lang0`) VALUES
+ (16000,'The current situation in the front lines look like this:$B$B Iron $2000w % $B Thorium $2001w % $B Stranglekeep $2002w % $B Arthas Tears $2003w % $B Light Leather $2004w % $B Medium Leather $2005w % $B Linen Bandages $2006w % $B Silk Bandages $2007w % $B Rainbow Fin Albacore $2008w % $B Roast Raptor $2009w % $B$B Allongside with the Horde, we managed to gather: $B Copper $2020w % $B Purple Lotus $2021w % $B Thick Leather $2022w % $B Runecloth Bandage $2023w % $B Spotted Yellowtail $2024w. $B that is the current state of the effort, Aid us $N.','The current situation in the front lines look like this:$B$B Iron $2000w % $B Thorium $2001w % $B Stranglekeep $2002w % $B Arthas Tears $2003w % $B Light Leather $2004w % $B Medium Leather $2005w % $B Linen Bandages $2006w % $B Silk Bandages $2007w % $B Rainbow Fin Albacore $2008w % $B Roast Raptor $2009w % $B$B Allongside with the Horde, we managed to gather: $B Copper $2020w % $B Purple Lotus $2021w % $B Thick Leather $2022w % $B Runecloth Bandage $2023w % $B Spotted Yellowtail $2024w. $B that is the current state of the effort, Aid us $N.',100,0),
+ (16001,'The current situation in the front lines look like this:$B$B Tin $2010w % $B Mithril $2011w % $B PeaceBloom $2012w % $B FireBloom $2013w % $B Heavy Leather $2014w % $B Rugged Leather $2015w % $B Wool Bandages $2016w % $B Mageweave Bandages $2017w % $B Lean Wolf Steaks $2018w % $B Baked Salmon $2019w % $B$B Allongside with the Alliance, we managed to gather: $B Copper $2020w % $B Purple Lotus $2021w % $B Thick Leather $2022w % $B Runecloth Bandage $2023w % $B Spotted Yellowtail $2024w. $B that is the current state of the effort, Aid us $N.','The current situation in the front lines look like this:$B$B Tin $2010w % $B Mithril $2011w % $B PeaceBloom $2012w % $B FireBloom $2013w % $B Heavy Leather $2014w % $B Rugged Leather $2015w % $B Wool Bandages $2016w % $B Mageweave Bandages $2017w % $B Lean Wolf Steaks $2018w % $B Baked Salmon $2019w % $B$B Allongside with the Alliance, we managed to gather: $B Copper $2020w % $B Purple Lotus $2021w % $B Thick Leather $2022w % $B Runecloth Bandage $2023w % $B Spotted Yellowtail $2024w. $B that is the current state of the effort, Aid us $N.',100,0);
+DELETE FROM `npc_gossip` WHERE `npc_guid` IN (135161,135162);
+INSERT INTO `npc_gossip` (`npc_guid`,`textid`) VALUES
+ (135161,16000),
+ (135162,16001);
+
-- Dual Spec `npc_option` change
UPDATE `npc_option` SET `id`=52,`action`=19 WHERE `id`=51 AND `action`=18 AND `option_text`='UNIT_NPC_FLAG_OUTDOORPVP';
DELETE FROM `npc_option` WHERE `id`=51;
-INSERT INTO `npc_option` (`id`,`gossip_id`,`npcflag`,`icon`,`action`,`box_money`,`coded`,`option_text`,`box_text`) values
+INSERT INTO `npc_option` (`id`,`gossip_id`,`npcflag`,`icon`,`action`,`box_money`,`coded`,`option_text`,`box_text`) VALUES
('51','0','16','0','18','10000000','0','Purchase a Dual Talent Specialization.','Are you sure you wish to purchase a Dual Talent Specialization?');
diff --git a/sql/FULL/world_scripts_full.sql b/sql/FULL/world_scripts_full.sql
index 971d99e2f49..beb47e74101 100644
--- a/sql/FULL/world_scripts_full.sql
+++ b/sql/FULL/world_scripts_full.sql
@@ -449,6 +449,9 @@ UPDATE `creature_template` SET `ScriptName`='npc_narm_faulk' WHERE `entry`=6177;
/* DUROTAR */
/* DUSKWOOD */
+DELETE FROM `areatrigger_scripts` WHERE `entry`=4017;
+INSERT INTO `areatrigger_scripts` (`entry`,`ScriptName`) VALUES (4017,'at_twilight_grove');
+UPDATE `creature_template` SET `ScriptName`='boss_twilight_corrupter' WHERE `entry`=15625;
/* DUSTWALLOW MARSH */
UPDATE `creature_template` SET `ScriptName`='mobs_risen_husk_spirit' WHERE `entry` IN (23554,23555);
@@ -867,6 +870,10 @@ UPDATE `creature_template` SET `ScriptName`='npc_avatar_of_freya' WHERE `entry`=
UPDATE `creature_template` SET `ScriptName`='npcs_rutgar_and_frankal' WHERE `entry` IN (15170,15171);
UPDATE `creature_template` SET `ScriptName`='npc_highlord_demitrian' WHERE `entry`=14347;
UPDATE `gameobject_template` SET `ScriptName`='go_gauntlet_gate' WHERE `entry`=175357;
+UPDATE `gameobject_template` SET `ScriptName`='go_crystalline_tear' WHERE `entry`=180633;
+UPDATE `creature_template` SET `ScriptName`='mob_qiraj_war_spawn' WHERE `entry` IN (15414,15422,15424,15423);
+UPDATE `creature_template` SET `ScriptName`='npc_anachronos_the_ancient' WHERE `entry`=15381;
+UPDATE `creature_template` SET `ScriptName`='npc_anachronos_quest_trigger' WHERE `entry`=15454;
/* SILVERMOON */
UPDATE `creature_template` SET `ScriptName`='npc_blood_knight_stillblade' WHERE `entry`=17768;
@@ -915,6 +922,11 @@ UPDATE `creature_template` SET `ScriptName`='mob_restless_soul' WHERE `entry`=11
UPDATE `creature_template` SET `ScriptName`='mob_freed_soul' WHERE `entry`=11136;
/* SUNKEN TEMPLE */
+UPDATE `instance_template` SET `script`='instance_sunken_temple' WHERE `map`=109;
+UPDATE `gameobject_template` SET `ScriptName`='go_atalai_statue' WHERE `entry` IN (148830,148831,148832,148833,148834,148835);
+UPDATE `creature_template` SET `ScriptName`='boss_twilight_corrupter' WHERE `entry`=15625;
+DELETE FROM `areatrigger_scripts` WHERE `entry`=4016;
+INSERT INTO `areatrigger_scripts` (`entry`,`ScriptName`) VALUES (4016,'at_malfurion_stormrage');
/* SUNWELL PLATEAU */
UPDATE `instance_template` SET `script`='instance_sunwell_plateau' WHERE `map`=580;
@@ -1323,4 +1335,3 @@ INSERT INTO `creature_ai_scripts`
(`id`, `creature_id`, `event_type`, `event_inverse_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action1_type`, `action1_param1`, `action1_param2`, `action1_param3`, `action2_type`, `action2_param1`, `action2_param2`, `action2_param3`, `action3_type`, `action3_param1`, `action3_param2`, `action3_param3`, `comment`)
VALUES
(2566901, 25669, 10, 0, 100, 3, 1, 20, 2000, 2000, 33, 25669, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Scout Warsong Granary - Killed Moster at LOS'),(2567101, 25671, 10, 0, 100, 3, 1, 20, 2000, 2000, 33, 25671, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Scout Torp''s Farm - Killed Moster at LOS'),(2567201, 25672, 10, 0, 100, 3, 1, 20, 2000, 2000, 33, 25672, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Scout Warsong Slaughterhouse - Killed Moster at LOS');
-
diff --git a/sql/updates/5700_characters.sql b/sql/updates/5700_characters.sql
new file mode 100644
index 00000000000..e410dab3b5f
--- /dev/null
+++ b/sql/updates/5700_characters.sql
@@ -0,0 +1,3 @@
+
+DELETE `game_event_condition_save` FROM `game_event_condition_save` WHERE `event_id` in (22,75,76,77);
+DELETE `game_event_save` FROM `game_event_save` WHERE `event_id` in (22,75,76,77);
diff --git a/sql/updates/5700_world.sql b/sql/updates/5700_world.sql
new file mode 100644
index 00000000000..1722fbad843
--- /dev/null
+++ b/sql/updates/5700_world.sql
@@ -0,0 +1,338 @@
+
+-- A LOT of this file needs to be included in TDB!!
+
+-- Sunken temple (already in world_scripts_full.sql)
+UPDATE `instance_template` SET `script`='instance_sunken_temple' WHERE `map`=109;
+UPDATE `gameobject_template` SET `ScriptName`='go_atalai_statue' WHERE `entry` IN (148830,148831,148832,148833,148834,148835);
+DELETE FROM `areatrigger_scripts` WHERE `entry`=4016;
+INSERT INTO `areatrigger_scripts` (`entry`,`ScriptName`) VALUES (4016,'at_malfurion_stormrage');
+
+-- Duskwood (already in world_scripts_full.sql)
+DELETE FROM `areatrigger_scripts` WHERE `entry`=4017;
+INSERT INTO `areatrigger_scripts` (`entry`,`ScriptName`) VALUES (4017,'at_twilight_grove');
+UPDATE `creature_template` SET `ScriptName`='boss_twilight_corrupter' WHERE `entry`=15625;
+
+-- quest data: Long Forgotten Memories
+UPDATE `quest_template` SET `method`=0 WHERE `entry`=8305;
+-- quest data: A pawn on the eternal board
+-- Already in world_scripts_full.sql
+UPDATE `gameobject_template` SET `ScriptName`='go_crystalline_tear' WHERE `entry`=180633;
+UPDATE `creature_template` SET `ScriptName`='mob_qiraj_war_spawn' WHERE `entry` IN (15414,15422,15424,15423);
+UPDATE `creature_template` SET `ScriptName`='npc_anachronos_the_ancient' WHERE `entry`=15381;
+UPDATE `creature_template` SET `ScriptName`='npc_anachronos_quest_trigger' WHERE `entry`=15454;
+
+-- Already in world_script_texts.sql
+INSERT INTO `script_texts` (`npc_entry`,`entry`,`content_default`,`type`,`emote`,`comment`) VALUES
+ (15381,-1350000,'We must act quickly or all shall be lost!',0,1,'ANACHRONOS_SAY_1'),
+ (15381,-1350001,'NOW, STAGHELM! WE GO NOW! Prepare your magic!',0,81,'ANACHRONOS_SAY_2'),
+ (15381,-1350002,'Stay close...',0,1,'ANACHRONOS_SAY_3'),
+ (15381,-1350003,'The sands of time will halt, but only for a moment! I will now conjure the barrier.',0,1,'ANACHRONOS_SAY_4'),
+ (15381,-1350004,'FINISH THE SPELL STAGHELM! I CANNOT HOLD THE GLYPHS OF WARDING IN PLACE MUCH LONGER! CALL FORTH THE ROOTS!',0,53,'ANACHRONOS_SAY_5'),
+ (15381,-1350005,'It... It is over, Lord Staghelm. We are victorious. Albeit the cost for this victory was great.',0,1,'ANACHRONOS_SAY_6'),
+ (15381,-1350006,'There is but one duty that remains...',0,1,'ANACHRONOS_SAY_7'),
+ (15381,-1350007,'Before I leave this place, I make one final offreing to you, Lord Staghelm. Should a time arise in which you must gain entry to this accursed fortress, use the Scepter of the Shifting Sands on the sacred gong. The magic holding the barrier together will dissipate and the horrors of Ahn''Qiraj will be unleashed upon the world once more.',0,1,'ANACHRONOS_SAY_8'),
+ (15381,-1350008,'Lord Staghelm, where are you going? You would shatter our bond for the sake of pride?',0,1,'ANACHRONOS_SAY_9'),
+ (15381,-1350009,'And now you know all that there is to know, mortal...',0,1,'ANACHRONOS_SAY_10'),
+ (15381,-1350010,'hands the Scepter of the Shifting Sands to Fandral Staghelm.',2,1,'ANACHRONOS_EMOTE_1'),
+ (15381,-1350011,'shakes his head in dissapointment.',2,274,'ANACHRONOS_EMOTE_2'),
+ (15381,-1350012,'kneels down to pick up the fragments of the shattered scepter.',2,87,'ANACHRONOS_EMOTE_3'),
+ (15382,-1350013,'My forces cannot overcome the Qiraji defenses. We will not be able to get close enough to place your precious barrier, dragon.',0,1,'FANDRAL_SAY_1'),
+ (15382,-1350014,'It is done dragon. Lead the way...',0,1,'FANDRAL_SAY_2'),
+ (15382,-1350015,'Ancient ones guide my hand... Wake from your slumber! WAKE AND SEAL THIS CURSED PLACE!',0,1,'FANDRAL_SAY_3'),
+ (15382,-1350016,'After the savagery that my people have witnessed and felt, you expect me to accept another burden, dragon? Surely you are mad.',0,25,'FANDRAL_SAY_4'),
+ (15382,-1350017,'I want nothing to do with Silithus, the Qiraji and least of all, any damned dragons!',0,1,'FANDRAL_SAY_5'),
+ (15382,-1350018,'My son''s soul will find no comfort in this hollow victory, dragon. I will have him back.Thought it takes a millennia, I WILL have my son back!',0,254,'FANDRAL_SAY_6'),
+ (15382,-1350019,'falls to one knee - exhausted.',2,16,'FANDRAL_EMOTE_1'),
+ (15382,-1350020,'hurls the Scepter of the Shifting Sands into the barrier, shattering it.',2,0,'FANDRAL_EMOTE_2'),
+ (15379,-1350021,'Aye, Fandral, remember these words: Let not your grief guide your faith. These thoughts you hold... dark places you go, night elf. Absolution cannot be had through misguided vengeance.',0,1,'CAELESTRASZ_SAY_1'),
+ (15379,-1350022,'Do not forget the sacrifices made on this day, night elf. We have all suffered immensely at the hands of these beasts.',0,1,'CAELESTRASZ_SAY_2'),
+ (15379,-1350023,'Alexstrasza grant me the resolve to drive our enemies back!',1,53,'CAELESTRASZ_YELL_1'),
+ (15380,-1350024,'This distraction will give you and the young druid time enough to seal the gate. Do not falter. Now, let us see how they deal with chaotic magic.',0,1,'ARYGOS_SAY_1'),
+ (15380,-1350025,'Let them feel the wrath of the Blue Flight! May Malygos protect me!',1,53,'ARYGOS_YELL_1'),
+ (15380,-1350026,'nods knowingly.',2,273,'ARYGOS_EMOTE_1'),
+ (15378,-1350027,'There is a way...',0,1,'MERITHRA_SAY_1'),
+ (15378,-1350028,'We will push them back, Anachronos. This I vow. Uphold the end of this task. Let not your hands falter as you seal our fates behind the barrier.',0,1,'MERITHRA_SAY_2'),
+ (15378,-1350029,'Succumb to the endless dream, little ones. Let it consume you!',1,53,'MERITHRA_YELL_1'),
+ (15378,-1350030,'glances at her compatriots.',2,2,'MERITHRA_EMOTE_1');
+
+-- AQ Gates data
+UPDATE `game_event` SET `end_time`='2020-12-30 22:00:00',`world_event`=1 WHERE `entry`=22;
+UPDATE `game_event` SET `length`=0 WHERE `entry`=22;
+INSERT INTO `game_event_creature` (`guid`, `event`) VALUES
+ (135121,22),(135122,22),(135123,22),(135124,22),(135125,22),
+ (135126,22),(135127,22),(135128,22),(135129,22),(135130,22),
+ (135131,22),(135132,22),(135133,22),(135134,22),(135135,22),
+ (135136,22),(135137,22),(135138,22),(135139,22),(135140,22),
+ (135141,22),(135142,22),(135143,22),(135144,22),(135145,22),
+ (135146,22),(135147,22),(135148,22),(135149,22),(135150,22),
+ (135151,22),(135152,22),(135153,22),(135154,22),(135155,22),
+ (135156,22),(135157,22),(135158,22),(135159,22),(135160,22),
+ (135161,22),(135162,22);
+
+INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`DeathState`,`MovementType`) VALUES
+-- Ironforge NPCs
+ (135121,15383,0,1,1,0,0,-4929.00,-1226.00,501.66,4.00,180,5,0,844,0,0,1),
+ (135122,15431,0,1,1,0,0,-4919.80,-1226.16,501.66,4.00,180,0,0,844,0,0,0),
+ (135123,15432,0,1,1,0,0,-4913.99,-1233.25,501.66,4.00,180,10,0,881,0,0,1),
+ (135124,15434,0,1,1,0,0,-4949.20,-1272.96,501.66,1.50,180,0,0,6100,0,0,0),
+ (135125,15437,0,1,1,0,0,-4943.54,-1278.49,501.66,1.50,180,0,0,2000,0,0,0),
+ (135126,15445,0,1,1,0,0,-4947.45,-1270.83,501.66,1.50,180,0,0,3900,0,0,0),
+ (135127,15446,0,1,1,0,0,-4979.34,-1171.01,501.66,4.50,180,0,0,6800,0,0,0),
+ (135128,15448,0,1,1,0,0,-4969.70,-1181.49,501.66,0.00,180,10,0,3400,0,0,1),
+ (135129,15450,0,1,1,0,0,-4976.90,-1183.89,501.66,0.00,180,10,0,881,0,0,1),
+ (135130,15451,0,1,1,0,0,-4990.51,-1157.65,501.66,5.00,180,0,0,844,0,0,0),
+ (135131,15452,0,1,1,0,0,-4980.24,-1152.63,501.66,5.00,180,10,0,2700,0,0,1),
+ (135132,15453,0,1,1,0,0,-4999.72,-1143.44,501.66,5.00,180,10,0,881,0,0,1),
+ (135133,15455,0,1,1,0,0,-4940.09,-1274.89,501.66,1.50,180,0,0,844,0,0,0),
+ (135134,15456,0,1,1,0,0,-4934.47,-1279.39,501.66,2.00,180,0,0,844,0,0,0),
+ (135135,15457,0,1,1,0,0,-4934.56,-1273.68,501.66,1.80,180,0,0,881,0,0,0),
+-- Orgrimmar NPCs
+ (135136,15459,1,1,1,0,0,1647.23,-4123.34,31.234,1.70,180,0,0,807,0,0,0),
+ (135137,15460,1,1,1,0,0,1663.15,-4113.42,34.156,1.70,180,0,0,844,0,0,0),
+ (135138,15469,1,1,1,0,0,1656.99,-4116.07,33.160,1.70,180,0,0,881,0,0,0),
+ (135139,15477,1,1,1,0,0,1616.93,-4143.40,34.560,1.50,180,0,0,5960,0,0,0),
+ (135140,15508,1,1,1,0,0,1623.98,-4148.34,35.990,1.70,180,0,0,6430,0,0,0),
+ (135141,15512,1,1,1,0,0,1630.03,-4152.75,38.420,1.90,180,0,0,5000,0,0,0),
+ (135142,15515,1,1,1,0,0,1586.35,-4181.89,40.310,3.14,180,0,0,5960,0,0,0),
+ (135143,15522,1,1,1,0,0,1590.62,-4159.70,36.920,3.14,180,0,0,5000,0,0,0),
+ (135144,15525,1,1,1,0,0,1594.49,-4172.66,39.220,3.00,180,0,0,5000,0,0,0),
+ (135145,15528,1,1,1,0,0,1580.69,-4119.78,34.440,4.61,180,0,0,5960,0,0,0),
+ (135146,15529,1,1,1,0,0,1572.15,-4122.62,36.280,4.85,180,0,0,5000,0,0,0),
+ (135147,15532,1,1,1,0,0,1567.91,-4127.32,37.000,5.02,180,0,0,5000,0,0,0),
+ (135148,15533,1,1,1,0,0,1641.95,-4086.75,36.700,4.72,180,0,0,807,0,0,0),
+ (135149,15534,1,1,1,0,0,1632.56,-4095.93,34.210,4.87,180,0,0,844,0,0,0),
+ (135150,15535,1,1,1,0,0,1630.00,-4108.75,29.400,5.12,180,7,0,15260,0,0,1),
+-- War Effort Commanders
+ (135151,15701,0,1,1,0,0,-4956.31,-1198.15,501.66,0.00,180,0,0,2900,0,0,2),
+ (135152,15700,1,1,1,0,0,1582.41,-4209.28,42.508,0.00,180,0,0,3400,0,0,2),
+-- War Effort Recruiters
+ (135153,15702,1,1,1,0,0,-1204.90,107.38,134.42,1.6,180,0,0,4120,0,0,0),
+ (135154,15703,0,1,1,0,0,1573.93,273.84,-43.1,5.3,180,0,0,1700,0,0,0),
+ (135155,15704,1,1,1,0,0,1648.18,-4405.40,17.43,0,180,15,0,6900,0,0,1),
+ (135156,15707,0,1,1,0,0,-4972.66,-945.77,501.66,5,180,0,0,1100,0,0,0),
+ (135157,15708,0,1,1,0,0,-8813.4,654.195,96.0776,4.5185,180,0,0,6900,0,0,0),
+ (135158,15709,1,1,1,0,0,9951.02,2482.53,1316.20,0,180,10,0,881,0,0,1),
+ (135159,21155,530,1,1,0,0,9526.54,-7189.49,16.14,1.57,180,0,0,6900,2434,0,0),
+ (135160,21156,530,1,1,0,0,-3934.23,-11606.23,-138.58,4.5,180,0,0,6900,0,0,0),
+-- War Effort Ambassadors
+ (135161,15539,0,1,1,0,0,-4984.12,-1205.16,501.66,3.14,180,0,0,1800,0,0,0),
+ (135162,15458,1,1,1,0,0,1632.00,-4116.88,31.24,1.7,180,0,0,910,0,0,0);
+
+-- War Effort Commanders paths
+INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`) VALUES
+ (1351510,1,-4992.88,-1148.14,501.66),
+ (1351510,2,-5018.99,-1182.52,501.66),
+ (1351510,3,-4981.63,-1217.63,501.66),
+ (1351510,4,-4941.99,-1263.46,501.66),
+ (1351510,5,-4920.39,-1242.94,501.66),
+ (1351510,6,-4896.23,-1254.96,501.87),
+ (1351510,7,-4920.39,-1242.94,501.66),
+ (1351510,8,-4945.89,-1206.33,501.66),
+ (1351510,9,-4933.98,-1176.06,501.68),
+ (1351510,10,-4956.31,-1198.15,501.66),
+ (1351520,1,1582.41,-4209.28,42.51),
+ (1351520,2,1577.13,-4173.25,43.28),
+ (1351520,3,1604.33,-4124.16,29.67),
+ (1351520,4,1659.62,-4097.64,33.62),
+ (1351520,5,1697.91,-4085.99,39.23),
+ (1351520,6,1660.63,-4095.52,34.52),
+ (1351520,7,1602.48,-4123.29,29.58),
+ (1351520,8,1576.30,-4176.98,37.99);
+
+-- War Effort Commanders Mounts
+INSERT INTO `creature_template_addon` (`entry`,`mount`) VALUES
+ (15701,14347),
+ (15700,14573),
+ (15458,14346),
+ (15539,14575);
+UPDATE `creature_template` SET `MovementType`=2 WHERE `entry` IN(15700,15701);
+UPDATE `creature` SET `spawnMask`=0 WHERE `guid`=86424;
+UPDATE `creature_template` SET `faction_A`=64,`faction_H`=64 WHERE `entry`=15707;
+DELETE `creature_questrelation` FROM `creature_questrelation` WHERE `id`=15452;
+DELETE `creature_involvedrelation` FROM `creature_involvedrelation` WHERE `id`=15452;
+INSERT INTO `creature_questrelation` (`id`,`quest`) VALUES
+(15452,8520),(15452,8521);
+INSERT INTO `creature_involvedrelation` (`id`,`quest`) VALUES
+(15452,8520),(15452,8521);
+UPDATE `quest_template` SET `PrevQuestId`=0 WHERE `entry`=8520;
+INSERT INTO `game_event_quest_condition` (`quest`,`event_id`,`condition_id`,`num`) VALUES
+-- Alliance only quests
+ (8495,22,1,20),(8494,22,1,20),
+ (8500,22,2,20),(8499,22,2,20),
+ (8504,22,3,20),(8503,22,3,20),
+ (8510,22,4,20),(8509,22,4,20),
+ (8512,22,5,10),(8511,22,5,10),
+ (8514,22,6,10),(8513,22,6,10),
+ (8518,22,7,20),(8517,22,7,20),
+ (8521,22,8,20),(8520,22,8,20),
+ (8525,22,9,20),(8524,22,9,20),
+ (8527,22,10,20),(8526,22,10,20),
+-- Horde only Quests
+ (8543,22,11,20),(8542,22,11,20),
+ (8546,22,12,20),(8545,22,12,20),
+ (8550,22,13,20),(8549,22,13,20),
+ (8583,22,14,20),(8582,22,14,20),
+ (8589,22,15,10),(8588,22,15,10),
+ (8601,22,16,10),(8600,22,16,10),
+ (8605,22,17,20),(8604,22,17,20),
+ (8608,22,18,20),(8607,22,18,20),
+ (8612,22,19,20),(8611,22,19,20),
+ (8616,22,20,20),(8615,22,20,20),
+-- Shared quests
+ (8493,22,21,20),(8492,22,21,20),(8533,22,21,20),(8532,22,21,20),
+ (8506,22,22,20),(8505,22,22,20),(8581,22,22,20),(8580,22,22,20),
+ (8516,22,23,10),(8515,22,23,10),(8591,22,23,10),(8590,22,23,10),
+ (8523,22,24,20),(8522,22,24,20),(8610,22,24,20),(8609,22,24,20),
+ (8529,22,25,20),(8528,22,25,20),(8614,22,25,20),(8613,22,25,20);
+INSERT INTO `game_event_condition` (`event_id`,`condition_id`,`req_num`,`max_world_state_field`,`done_world_state_field`,`description`) VALUES
+-- Alliance reqs
+ (22,1,28000,0,2000,'Iron'),
+ (22,2,24000,0,2001,'Thorium'),
+ (22,3,33000,0,2002,'Stranglekeep'),
+ (22,4,20000,0,2003,'Arthas Tears'),
+ (22,5,180000,0,2004,'Light Leather'),
+ (22,6,110000,0,2005,'Medium Leather'),
+ (22,7,800000,0,2006,'Linen Bandages'),
+ (22,8,600000,0,2007,'Silk Bandages'),
+ (22,9,14000,0,2008,' Rainbow Fin Albacore'),
+ (22,10,20000,0,2009,'Roast Raptor'),
+-- Horde reqs
+ (22,11,22000,0,2010,'Tin Bars'),
+ (22,12,18000,0,2011,'Mithril Bars'),
+ (22,13,96000,0,2012,'PeaceBloom'),
+ (22,14,19000,0,2013,'FireBloom'),
+ (22,15,60000,0,2014,'Heavy Leather'),
+ (22,16,60000,0,2015,'Rugged Leather'),
+ (22,17,250000,0,2016,'Wool Bandages'),
+ (22,18,250000,0,2017,'Mageweave Bandages'),
+ (22,19,10000,0,2018,'Lean Wolf Steaks'),
+ (22,20,10000,0,2019,'Baked Salmon'),
+-- World Reqs
+ (22,21,90000,0,2020,'Copper'),
+ (22,22,26000,0,2021,'Purple Lotus'),
+ (22,23,80000,0,2022,'Thick Leather'),
+ (22,24,400000,0,2023,'Runecloth Bandages'),
+ (22,25,17000,0,2024,'Spotted Yellowtail');
+
+-- Already in world_script_texts.sql
+INSERT INTO `game_event_npc_gossip` (`guid`,`event_id`,`textid`) VALUES
+ (135161,22,16000),
+ (135162,22,16001);
+INSERT INTO `npc_text` (`ID`,`text0_0`,`text0_1`,`prob0`,`lang0`) VALUES
+ (16000,'The current situation in the front lines look like this:$B$B Iron $2000w % $B Thorium $2001w % $B Stranglekeep $2002w % $B Arthas Tears $2003w % $B Light Leather $2004w % $B Medium Leather $2005w % $B Linen Bandages $2006w % $B Silk Bandages $2007w % $B Rainbow Fin Albacore $2008w % $B Roast Raptor $2009w % $B$B Allongside with the Horde, we managed to gather: $B Copper $2020w % $B Purple Lotus $2021w % $B Thick Leather $2022w % $B Runecloth Bandage $2023w % $B Spotted Yellowtail $2024w. $B that is the current state of the effort, Aid us $N.','The current situation in the front lines look like this:$B$B Iron $2000w % $B Thorium $2001w % $B Stranglekeep $2002w % $B Arthas Tears $2003w % $B Light Leather $2004w % $B Medium Leather $2005w % $B Linen Bandages $2006w % $B Silk Bandages $2007w % $B Rainbow Fin Albacore $2008w % $B Roast Raptor $2009w % $B$B Allongside with the Horde, we managed to gather: $B Copper $2020w % $B Purple Lotus $2021w % $B Thick Leather $2022w % $B Runecloth Bandage $2023w % $B Spotted Yellowtail $2024w. $B that is the current state of the effort, Aid us $N.',100,0),
+ (16001,'The current situation in the front lines look like this:$B$B Tin $2010w % $B Mithril $2011w % $B PeaceBloom $2012w % $B FireBloom $2013w % $B Heavy Leather $2014w % $B Rugged Leather $2015w % $B Wool Bandages $2016w % $B Mageweave Bandages $2017w % $B Lean Wolf Steaks $2018w % $B Baked Salmon $2019w % $B$B Allongside with the Alliance, we managed to gather: $B Copper $2020w % $B Purple Lotus $2021w % $B Thick Leather $2022w % $B Runecloth Bandage $2023w % $B Spotted Yellowtail $2024w. $B that is the current state of the effort, Aid us $N.','The current situation in the front lines look like this:$B$B Tin $2010w % $B Mithril $2011w % $B PeaceBloom $2012w % $B FireBloom $2013w % $B Heavy Leather $2014w % $B Rugged Leather $2015w % $B Wool Bandages $2016w % $B Mageweave Bandages $2017w % $B Lean Wolf Steaks $2018w % $B Baked Salmon $2019w % $B$B Allongside with the Alliance, we managed to gather: $B Copper $2020w % $B Purple Lotus $2021w % $B Thick Leather $2022w % $B Runecloth Bandage $2023w % $B Spotted Yellowtail $2024w. $B that is the current state of the effort, Aid us $N.',100,0);
+INSERT INTO `npc_gossip` (`npc_guid`,`textid`) VALUES
+ (135161,16000),
+ (135162,16001);
+
+UPDATE `creature_template` SET `npcflag`=1 WHERE `entry`=15458;
+INSERT INTO `creature_questrelation` (`id`,`quest`) VALUES
+ (15535,8616);
+INSERT INTO `creature_involvedrelation` (`id`,`quest`) VALUES
+ (15535,8616);
+UPDATE `quest_template` SET `SpecialFlags`=1 WHERE `entry` IN
+ (8495,8500,8504,8510,8512,8514,8518,8521,8525,8527,8543,8546,8550,8583,8589,8601,8605,8608,8612,8616,8493,8533,8506,8581,8516,8591,5824,8610,8529,8614);
+INSERT INTO `game_event` (`entry`,`start_time`,`end_time`,`occurence`,`length`,`description`,`world_event`) VALUES
+ (75,'0000-00-00 00:00:00','2020-12-30 22:00:00',5184000,14400,'AQ War Effort - The Transfer',1);
+INSERT INTO `game_event_prerequisite` (`event_id`,`prerequisite_event`) VALUES
+ (75,22),(76,75),(77,76);
+INSERT INTO `game_event_creature` (`guid`, `event`) VALUES
+ (135163,75);
+INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`DeathState`,`MovementType`) VALUES
+ (135163,1,0,1,1,0,0,-8813.4,654.195,96.0776,4.5185,180,0,0,7000000,0,0,0);
+INSERT INTO `game_event` (`entry`,`start_time`,`end_time`,`occurence`,`length`,`description`,`world_event`) VALUES
+ (76,'0000-00-00 00:00:00','2020-12-30 22:00:00',5184000,0,'AQ War Effort - Armies Gathered',1),
+ (77,'0000-00-00 00:00:00','2020-12-30 22:00:00',5184000,720,'AQ War Effort - Gong Time',1);
+INSERT INTO `game_event_quest_condition` (`quest`,`event_id`,`condition_id`,`num`) VALUES
+ (8743,76,1,1);
+INSERT INTO `game_event_condition` (`event_id`,`condition_id`,`req_num`,`max_world_state_field`,`done_world_state_field`,`description`) VALUES
+ (76,1,1,0,0,'First Banger!');
+INSERT INTO `game_event_gameobject_quest` (`id`,`quest`,`event`) VALUES
+ (180717,8743,76),(180717,8743,77);
+INSERT INTO `gameobject_involvedrelation` (`id`,`quest`) VALUES
+ (180717,8743);
+INSERT INTO `gameobject_questrelation` (`id`,`quest`) VALUES
+ (180717,8743);
+INSERT INTO `game_event_gameobject` (`guid`,`event`) VALUES
+ (100000,76),(100001,77),(49451,-77);
+INSERT INTO `gameobject` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`position_x`,`position_y`,`position_z`,`orientation`,`rotation0`,`rotation1`,`rotation2`,`rotation3`,`spawntimesecs`,`animprogress`,`state`) VALUES
+ (100000,180717,1,1,1,-8069.05,1641.72,27.03,-1.53589,0,0,0.694658,-0.71934,900,100,1),
+ (100001,180717,1,1,1,-8069.05,1641.72,27.03,-1.53589,0,0,0.694658,-0.71934,900,100,1);
+-- quest data: Bang a gong!
+UPDATE `quest_template` SET `CharTitleId`=46 WHERE `entry`=8743;
+UPDATE `quest_template` SET `Method`=0 WHERE `entry`=8743;
+UPDATE `quest_template` SET `Type`=82 WHERE `entry`=8743;
+UPDATE `quest_template` SET `QuestFlags`=2 WHERE `entry`=8743;
+UPDATE `gameobject_template` SET `type`=10 WHERE `entry`=180718;
+UPDATE `gameobject_template` SET `type`=2 WHERE `entry`=180717;
+UPDATE `gameobject_template` SET `flags`=0 WHERE `entry`=180717;
+-- AQ Doors
+INSERT INTO `game_event_gameobject` (`guid`,`event`) VALUES
+ (100002,22),(100003,22),(100004,22),
+ (100005,75),(100006,75),(100007,75),
+ (100008,76),(100009,76),(100010,76);
+INSERT INTO `gameobject` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`position_x`,`position_y`,`position_z`,`orientation`,`rotation0`,`rotation1`,`rotation2`,`rotation3`,`spawntimesecs`,`animprogress`,`state`) VALUES
+ (100002,176148,1,1,1,-8130,1525,17.5,0,0,0,0,0,10,100,1),
+ (100003,176147,1,1,1,-8130,1525,17.5,0,0,0,0,0,10,100,1),
+ (100004,176146,1,1,1,-8130,1525,17.5,0,0,0,0,0,10,100,1),
+ (100005,176148,1,1,1,-8130,1525,17.5,0,0,0,0,0,10,100,1),
+ (100006,176147,1,1,1,-8130,1525,17.5,0,0,0,0,0,10,100,1),
+ (100007,176146,1,1,1,-8130,1525,17.5,0,0,0,0,0,10,100,1),
+ (100008,176148,1,1,1,-8130,1525,17.5,0,0,0,0,0,10,100,1),
+ (100009,176147,1,1,1,-8130,1525,17.5,0,0,0,0,0,10,100,1),
+ (100010,176146,1,1,1,-8130,1525,17.5,0,0,0,0,0,10,100,1);
+INSERT INTO `game_event_creature` (`guid`,`event`) VALUES
+ (135164,77),(135165,77),(135166,77),(135167,77),(135168,77),
+ (135169,77),(135170,77),(135171,77),(135172,77),(135173,77),
+ (135174,77),(135175,77),(135176,77),(135177,77),(135178,77),
+ (135179,77),(135180,77),(135181,77),(135182,77),(135183,77),
+ (135184,77),(135185,77),(135186,77),(135187,77),(135188,77),
+ (135189,77),(135190,77),(135191,77),(135192,77),(135193,77),
+ (135194,77),(135195,77),(135196,77),(135197,77),(135198,77),
+ (135199,77),(135200,77);
+INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`DeathState`,`MovementType`) VALUES
+-- General Rajaxx
+ (135164,15341,1,1,1,0,0,-8130.05,1525.05,37.90,0,180,0,0,416375,0,0,0),
+-- Hive Collossus
+ (135165,15740,1,1,1,0,0,-7298.00,1665.00,-35.6,-1.53589,180,200,0,3331000,0,0,1),
+ (135166,15741,1,1,1,0,0,-7782.50,516.72,-39.85,-1.53589,180,200,0,3331000,0,0,1),
+ (135167,15742,1,1,1,0,0,-6530.05,977.13,0.43,-1.53589,180,200,0,3331000,0,0,1),
+-- Anubisah Colossus
+ (135168,15743,1,1,1,0,0,-8055.51,1478.02,2.60,-1.53589,180,20,0,356070,0,0,1),
+ (135169,15743,1,1,1,0,0,-8062.05,1527.77,2.61,0,180,15,0,356070,0,0,1),
+ (135170,15743,1,1,1,0,0,-8006.14,1556.79,2.63,0,180,15,0,356070,0,0,1),
+ (135171,15743,1,1,1,0,0,-7971.34,1436.62,27.03,-0.15,180,35,0,356070,0,0,1),
+ (135172,15743,1,1,1,0,0,-8192.27,1628.45,2.59,-1.53589,180,5,0,356070,0,0,1),
+ (135173,15743,1,1,1,0,0,-8256.22,1528.53,-4.49,0,180,25,0,356070,0,0,1),
+ (135174,15743,1,1,1,0,0,-8272.40,1436.73,9.99,1,180,10,0,356070,0,0,1),
+-- Qiraji Champions
+ (135175,15252,1,1,1,0,0,-8117.14,1512.34,3.88,0,180,0,0,266480,0,0,0),
+ (135176,15252,1,1,1,0,0,-8116.27,1536.37,3.48,0,180,0,0,266480,0,0,0),
+-- Anubisath Sentinels
+ (135177,15264,1,1,1,0,0,-8090.60,1576.85,14.33,0,180,0,0,110040,0,0,0),
+ (135178,15264,1,1,1,0,0,-8041.13,1579.14,13.88,3.1415,180,0,0,110040,0,0,0),
+ (135179,15264,1,1,1,0,0,-8271.16,1681.18,25.95,-0.79,180,0,0,110040,0,0,0),
+ (135180,15264,1,1,1,0,0,-8288.46,1661.79,24.99,-0.79,180,0,0,110040,0,0,0),
+ (135181,15264,1,1,1,0,0,-8289.26,1715.53,25.29,0.79,180,0,0,110040,0,0,0),
+ (135182,15264,1,1,1,0,0,-8324.89,1677.27,25.84,-2.20,180,0,0,110040,0,0,0),
+-- Anubisath Defender
+ (135183,15277,1,1,1,0,0,-8149.52,1525.93,4.41,0,180,0,0,485550,0,0,0),
+-- Qiraji Warriors
+ (135184,15537,1,1,1,0,0,-8167.79,1504.59,7.49,0.42,180,15,0,38844,0,0,1),
+ (135185,15537,1,1,1,0,0,-8175.52,1521.04,4.19,0,180,15,0,38844,0,0,1),
+ (135186,15537,1,1,1,0,0,-8158.94,1543.86,4.28,-0.2,180,15,0,38844,0,0,1),
+ (135187,15537,1,1,1,0,0,-8180.07,1562.58,2.36,-0.4,180,15,0,38844,0,0,1),
+ (135188,15537,1,1,1,0,0,-8226.91,1592.79,4.37,-0.3,180,15,0,38844,0,0,1),
+ (135189,15537,1,1,1,0,0,-8262.60,1639.70,17.45,-1.53589,180,15,0,38844,0,0,1),
+ (135190,15537,1,1,1,0,0,-8270.04,1592.54,9.25,-0.2,180,15,0,38844,0,0,1),
+ (135191,15537,1,1,1,0,0,-8204.95,1558.74,4.02,-0.15,180,15,0,38844,0,0,1),
+ (135192,15537,1,1,1,0,0,-8193.70,1513.13,5.02,0.2,180,15,0,38844,0,0,1),
+ (135193,15537,1,1,1,0,0,-8196.39,1536.41,4.25,0,180,15,0,38844,0,0,1),
+ (135194,15537,1,1,1,0,0,-8216.25,1533.89,1.44,0,180,15,0,38844,0,0,1),
+ (135195,15537,1,1,1,0,0,-8258.04,1565.02,-5.00,0,180,15,0,38844,0,0,1),
+ (135196,15537,1,1,1,0,0,-8295.32,1518.27,0.16,0,180,15,0,38844,0,0,1),
+ (135197,15537,1,1,1,0,0,-8193.51,1438.81,2.33,0.7,180,15,0,38844,0,0,1),
+ (135198,15537,1,1,1,0,0,-8245.27,1453.14,6.33,0.3,180,15,0,38844,0,0,1),
+ (135199,15537,1,1,1,0,0,-8269.06,1480.93,5.85,0,180,15,0,38844,0,0,1),
+ (135200,15537,1,1,1,0,0,-8319.30,1474.29,6.55,0,180,15,0,38844,0,0,1);
+
diff --git a/src/bindings/scripts/scripts/eastern_kingdoms/duskwood.cpp b/src/bindings/scripts/scripts/eastern_kingdoms/duskwood.cpp
new file mode 100644
index 00000000000..90b06863ea9
--- /dev/null
+++ b/src/bindings/scripts/scripts/eastern_kingdoms/duskwood.cpp
@@ -0,0 +1,122 @@
+/* Copyright (C) 2006 - 2009 kb_z
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+/* ScriptData
+SDName: Duskwood
+SD%Complete: 100
+SDComment: Quest Support:8735
+SDCategory: Duskwood
+EndScriptData */
+
+#include "precompiled.h"
+
+/*######
+# at_twilight_grove
+######*/
+
+bool AreaTrigger_at_twilight_grove(Player* pPlayer, AreaTriggerEntry *at)
+{
+ if (pPlayer->HasQuestForItem(21149))
+ {
+ Unit* TCorrupter = pPlayer->SummonCreature(15625,-10328.16,-489.57,49.95,0,TEMPSUMMON_MANUAL_DESPAWN,60000);
+ TCorrupter->setFaction(14);
+ TCorrupter->SetMaxHealth(832750);
+ Unit* CorrupterSpeaker = pPlayer->SummonCreature(1,pPlayer->GetPositionX(),pPlayer->GetPositionY(),pPlayer->GetPositionZ()-1,0,TEMPSUMMON_TIMED_DESPAWN,15000);
+ CorrupterSpeaker->SetName("Twilight Corrupter");
+ CorrupterSpeaker->SetVisibility(VISIBILITY_ON);
+ CorrupterSpeaker->MonsterYell("Come, $N. See what the Nightmare brings...",0,pPlayer->GetGUID());
+ }
+return false;
+};
+
+/*######
+# boss_twilight_corrupter
+######*/
+
+#define SPELL_SOUL_CORRUPTION 25805
+#define SPELL_CREATURE_OF_NIGHTMARE 25806
+#define SPELL_LEVEL_UP 24312
+
+struct TRINITY_DLL_DECL boss_twilight_corrupterAI : public ScriptedAI
+{
+ boss_twilight_corrupterAI(Creature *c) : ScriptedAI(c) {}
+
+ uint32 SoulCorruption_Timer;
+ uint32 CreatureOfNightmare_Timer;
+ uint8 KillCount;
+
+ void Reset()
+ {
+ SoulCorruption_Timer = 15000;
+ CreatureOfNightmare_Timer = 30000;
+ KillCount = 0;
+ }
+ void EnterCombat(Unit* who)
+ {
+ m_creature->MonsterYell("The Nightmare cannot be stopped!",0,m_creature->GetGUID());
+ }
+
+ void KilledUnit(Unit* victim)
+ {
+ if (victim->GetTypeId() == TYPEID_PLAYER)
+ {
+ ++KillCount;
+ m_creature->MonsterTextEmote("Twilight Corrupter squeezes the last bit of life out of $N and swallows their soul.", victim->GetGUID(),true);
+
+ if (KillCount == 3)
+ {
+ DoCast(m_creature, SPELL_LEVEL_UP, true);
+ KillCount = 0;
+ }
+ }
+ }
+
+ void UpdateAI(const uint32 diff)
+ {
+ if(!UpdateVictim())
+ return;
+ if(SoulCorruption_Timer < diff)
+ {
+ DoCast(m_creature->getVictim(),SPELL_SOUL_CORRUPTION);
+ SoulCorruption_Timer = rand()%4000+15000; //gotta confirm Timers
+ } else SoulCorruption_Timer-=diff;
+ if(CreatureOfNightmare_Timer < diff)
+ {
+ DoCast(m_creature->getVictim(),SPELL_SOUL_CORRUPTION);
+ CreatureOfNightmare_Timer = 45000; //gotta confirm Timers
+ } else CreatureOfNightmare_Timer-=diff;
+ DoMeleeAttackIfReady();
+ };
+};
+CreatureAI* GetAI_boss_twilight_corrupter(Creature* pCreature)
+{
+ return new boss_twilight_corrupterAI (pCreature);
+}
+
+void AddSC_duskwood()
+{
+ Script *newscript;
+
+ newscript = new Script;
+ newscript->Name="boss_twilight_corrupter";
+ newscript->GetAI = &GetAI_boss_twilight_corrupter;
+ newscript->RegisterSelf();
+
+ newscript = new Script;
+ newscript->Name="at_twilight_grove";
+ newscript->pAreaTrigger = &AreaTrigger_at_twilight_grove;
+ newscript->RegisterSelf();
+}
diff --git a/src/bindings/scripts/scripts/eastern_kingdoms/sunken_temple/def_sunken_temple.h b/src/bindings/scripts/scripts/eastern_kingdoms/sunken_temple/def_sunken_temple.h
new file mode 100644
index 00000000000..82245095c31
--- /dev/null
+++ b/src/bindings/scripts/scripts/eastern_kingdoms/sunken_temple/def_sunken_temple.h
@@ -0,0 +1,22 @@
+/* Copyright (C) 2006 - 2009 kb_z
+ * This program is free software licensed under GPL version 2
+ * Please see the included DOCS/LICENSE.TXT for more information */
+
+#ifndef DEF_SUNKEN_TEMPLE_H
+#define DEF_SUNKEN_TEMPLE_H
+
+#define TROLLBOSS1_DEATH 1
+#define TROLLBOSS2_DEATH 2
+#define TROLLBOSS3_DEATH 3
+#define TROLLBOSS4_DEATH 4
+#define TROLLBOSS5_DEATH 5
+#define TROLLBOSS6_DEATH 6
+#define JAMMALAN_DEATH 7
+#define MORPHAZ_DEATH 8
+#define HAZZAS_DEATH 9
+#define ERANIKUS_DEATH 10
+#define ATALALARION_DEATH 11 //optional
+
+#define EVENT_STATE 1
+#endif
+
diff --git a/src/bindings/scripts/scripts/eastern_kingdoms/sunken_temple/instance_sunken_temple.cpp b/src/bindings/scripts/scripts/eastern_kingdoms/sunken_temple/instance_sunken_temple.cpp
new file mode 100644
index 00000000000..42ec8d5d784
--- /dev/null
+++ b/src/bindings/scripts/scripts/eastern_kingdoms/sunken_temple/instance_sunken_temple.cpp
@@ -0,0 +1,229 @@
+/* Copyright (C) 2006 - 2009 kb_z
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+/* ScriptData
+SDName: Instance_Sunken_Temple
+SD%Complete: 100
+SDComment:Place Holder
+SDCategory: Sunken Temple
+EndScriptData */
+
+#include "precompiled.h"
+#include "def_sunken_temple.h"
+
+#define GO_ATALAI_STATUE1 148830
+#define GO_ATALAI_STATUE2 148831
+#define GO_ATALAI_STATUE3 148832
+#define GO_ATALAI_STATUE4 148833
+#define GO_ATALAI_STATUE5 148834
+#define GO_ATALAI_STATUE6 148835
+#define GO_ATALAI_IDOL 148836
+
+#define GO_ATALAI_LIGHT1 148883
+#define GO_ATALAI_LIGHT2 148937
+
+#define NPC_MALFURION_STORMRAGE 15362
+
+struct TRINITY_DLL_DECL instance_sunken_temple : public ScriptedInstance
+{
+ instance_sunken_temple(Map* pMap) : ScriptedInstance(pMap)
+ {
+ Initialize();
+ };
+
+ GameObject* AtalaiStatue1;
+ GameObject* AtalaiStatue2;
+ GameObject* AtalaiStatue3;
+ GameObject* AtalaiStatue4;
+ GameObject* AtalaiStatue5;
+ GameObject* AtalaiStatue6;
+ GameObject* AtalaiIdol;
+
+ uint64 GOAtalaiStatue1;
+ uint64 GOAtalaiStatue2;
+ uint64 GOAtalaiStatue3;
+ uint64 GOAtalaiStatue4;
+ uint64 GOAtalaiStatue5;
+ uint64 GOAtalaiStatue6;
+ uint64 GOAtalaiIdol;
+ uint32 State;
+
+ bool s1;
+ bool s2;
+ bool s3;
+ bool s4;
+ bool s5;
+ bool s6;
+
+ void Initialize()
+ {
+ GOAtalaiStatue1 = 0;
+ GOAtalaiStatue2 = 0;
+ GOAtalaiStatue3 = 0;
+ GOAtalaiStatue4 = 0;
+ GOAtalaiStatue5 = 0;
+ GOAtalaiStatue6 = 0;
+ GOAtalaiIdol = 0;
+ State = 0;
+ AtalaiStatue1 = NULL;
+ AtalaiStatue2 = NULL;
+ AtalaiStatue3 = NULL;
+ AtalaiStatue4 = NULL;
+ AtalaiStatue5 = NULL;
+ AtalaiStatue6 = NULL;
+ AtalaiIdol = NULL;
+ s1 = false;
+ s2 = false;
+ s3 = false;
+ s4 = false;
+ s5 = false;
+ s6 = false;
+ }
+
+ void OnGameObjectCreate(GameObject* pGo, bool add)
+ {
+ switch(pGo->GetEntry())
+ {
+ case GO_ATALAI_STATUE1:
+ AtalaiStatue1 = pGo;
+ GOAtalaiStatue1 = pGo->GetGUID();
+ break;
+ case GO_ATALAI_STATUE2:
+ AtalaiStatue2 = pGo;
+ GOAtalaiStatue2 = pGo->GetGUID();
+ break;
+ case GO_ATALAI_STATUE3:
+ AtalaiStatue3 = pGo;
+ GOAtalaiStatue3 = pGo->GetGUID();
+ break;
+ case GO_ATALAI_STATUE4:
+ AtalaiStatue4 = pGo;
+ GOAtalaiStatue4 = pGo->GetGUID();
+ break;
+ case GO_ATALAI_STATUE5:
+ AtalaiStatue5 = pGo;
+ GOAtalaiStatue5 = pGo->GetGUID();
+ break;
+ case GO_ATALAI_STATUE6:
+ AtalaiStatue6 = pGo;
+ GOAtalaiStatue6 = pGo->GetGUID();
+ break;
+ case GO_ATALAI_IDOL:
+ AtalaiIdol = pGo;
+ GOAtalaiIdol = pGo->GetGUID();
+ break;
+ }
+ };
+
+
+ virtual void Update(uint32 diff) // correct order goes form 1-6
+ {
+ switch(State)
+ {
+ case GO_ATALAI_STATUE1:
+ if(!s1 && !s2 && !s3 && !s4 && !s5 && !s6)
+ {
+ UseStatue(AtalaiStatue1);
+ s1 = true;
+ State = 0;
+ };
+ break;
+ case GO_ATALAI_STATUE2:
+ if(s1 && !s2 && !s3 && !s4 && !s5 && !s6)
+ {
+ UseStatue(AtalaiStatue2);
+ s2 = true;
+ State = 0;
+ };
+ break;
+ case GO_ATALAI_STATUE3:
+ if(s1 && s2 && !s3 && !s4 && !s5 && !s6)
+ {
+ UseStatue(AtalaiStatue3);
+ s3 = true;
+ State = 0;
+ };
+ break;
+ case GO_ATALAI_STATUE4:
+ if(s1 && s2 && s3 && !s4 && !s5 && !s6)
+ {
+ UseStatue(AtalaiStatue4);
+ s4 = true;
+ State = 0;
+ }
+ break;
+ case GO_ATALAI_STATUE5:
+ if(s1 && s2 && s3 && s4 && !s5 && !s6)
+ {
+ UseStatue(AtalaiStatue5);
+ s5 = true;
+ State = 0;
+ }
+ break;
+ case GO_ATALAI_STATUE6:
+ if(s1 && s2 && s3 && s4 && s5 && !s6)
+ {
+ UseLastStatue(AtalaiStatue6);
+ s6 = true;
+ State = 0;
+ }
+ break;
+ }
+ };
+
+ void UseStatue(GameObject* pGo)
+ {
+ pGo->SummonGameObject(GO_ATALAI_LIGHT1,pGo->GetPositionX(),pGo->GetPositionY(),pGo->GetPositionZ(),0,0,0,0,0,0);
+ pGo->SetUInt32Value(GAMEOBJECT_FLAGS, 4);
+ }
+ void UseLastStatue(GameObject* pGo)
+ {
+ AtalaiStatue1->SummonGameObject(GO_ATALAI_LIGHT2,AtalaiStatue1->GetPositionX(),AtalaiStatue1->GetPositionY(),AtalaiStatue1->GetPositionZ(),0,0,0,0,0,100000);
+ AtalaiStatue2->SummonGameObject(GO_ATALAI_LIGHT2,AtalaiStatue2->GetPositionX(),AtalaiStatue2->GetPositionY(),AtalaiStatue2->GetPositionZ(),0,0,0,0,0,100000);
+ AtalaiStatue3->SummonGameObject(GO_ATALAI_LIGHT2,AtalaiStatue3->GetPositionX(),AtalaiStatue3->GetPositionY(),AtalaiStatue3->GetPositionZ(),0,0,0,0,0,100000);
+ AtalaiStatue4->SummonGameObject(GO_ATALAI_LIGHT2,AtalaiStatue4->GetPositionX(),AtalaiStatue4->GetPositionY(),AtalaiStatue4->GetPositionZ(),0,0,0,0,0,100000);
+ AtalaiStatue5->SummonGameObject(GO_ATALAI_LIGHT2,AtalaiStatue5->GetPositionX(),AtalaiStatue5->GetPositionY(),AtalaiStatue5->GetPositionZ(),0,0,0,0,0,100000);
+ AtalaiStatue6->SummonGameObject(GO_ATALAI_LIGHT2,AtalaiStatue6->GetPositionX(),AtalaiStatue6->GetPositionY(),AtalaiStatue6->GetPositionZ(),0,0,0,0,0,100000);
+ pGo->SummonGameObject(148838,-488.997,96.61,-189.019,-1.52,0,0,0,0,100000);
+ }
+
+ void SetData(uint32 type, uint32 data)
+ {
+ if (type == EVENT_STATE)
+ State = data;
+ }
+
+ uint32 GetData(uint32 type)
+ {
+ if (type == EVENT_STATE)
+ return State;
+ return 0;
+ }
+};
+
+InstanceData* GetInstanceData_instance_sunken_temple(Map* pMap)
+{
+ return new instance_sunken_temple(pMap);
+}
+
+void AddSC_instance_sunken_temple()
+{
+ Script *newscript;
+ newscript = new Script;
+ newscript->Name = "instance_sunken_temple";
+ newscript->GetInstanceData = &GetInstanceData_instance_sunken_temple;
+ newscript->RegisterSelf();
+}
diff --git a/src/bindings/scripts/scripts/eastern_kingdoms/sunken_temple/sunken_temple.cpp b/src/bindings/scripts/scripts/eastern_kingdoms/sunken_temple/sunken_temple.cpp
new file mode 100644
index 00000000000..a757c7ac4f2
--- /dev/null
+++ b/src/bindings/scripts/scripts/eastern_kingdoms/sunken_temple/sunken_temple.cpp
@@ -0,0 +1,71 @@
+/* Copyright (C) 2006 - 2009 kb_z
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+/* ScriptData
+SDName: Sunken_Temple
+SD%Complete: 100
+SDComment: Area Trigger + Puzzle event support
+SDCategory: Sunken Temple
+EndScriptData */
+
+/* ContentData
+at_malfurion_Stormrage_trigger
+EndContentData */
+
+#include "precompiled.h"
+#include "def_sunken_temple.h"
+
+/*#####
+# at_malfurion_Stormrage_trigger
+#####*/
+
+bool AreaTrigger_at_malfurion_stormrage(Player* pPlayer, AreaTriggerEntry *at)
+{
+ if (ScriptedInstance* pInstance = pPlayer->GetInstanceData())
+ {
+ if (!pPlayer->FindNearestCreature(15362,15))
+ Unit* Malfurion = pPlayer->SummonCreature(15362, pPlayer->GetPositionX(), pPlayer->GetPositionY(), pPlayer->GetPositionZ(), -1. 52, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 100000);
+ return false;
+ }
+return false;
+}
+/*#####
+# go_atalai_statue
+#####*/
+
+bool GOHello_go_atalai_statue(Player* pPlayer, GameObject* pGo)
+{
+ ScriptedInstance* pInstance = pPlayer->GetInstanceData();
+ if (!pInstance)
+ return false;
+ pInstance->SetData(EVENT_STATE,pGo->GetEntry());
+ return false;
+}
+
+void AddSC_sunken_temple()
+{
+ Script *newscript;
+
+ newscript = new Script;
+ newscript->Name = "at_malfurion_stormrage";
+ newscript->pAreaTrigger = &AreaTrigger_at_malfurion_stormrage;
+ newscript->RegisterSelf();
+
+ newscript = new Script;
+ newscript->Name = "go_atalai_statue";
+ newscript->pGOHello = &GOHello_go_atalai_statue;
+ newscript->RegisterSelf();
+}
diff --git a/src/bindings/scripts/scripts/kalimdor/silithus.cpp b/src/bindings/scripts/scripts/kalimdor/silithus.cpp
index fce271a351d..5d9e4f79ae1 100644
--- a/src/bindings/scripts/scripts/kalimdor/silithus.cpp
+++ b/src/bindings/scripts/scripts/kalimdor/silithus.cpp
@@ -17,13 +17,14 @@
/* ScriptData
SDName: Silithus
SD%Complete: 100
-SDComment: Quest support: 7785, 8304.
+SDComment: Quest support: 7785, 8304, 8507.
SDCategory: Silithus
EndScriptData */
/* ContentData
npc_highlord_demitrian
npcs_rutgar_and_frankal
+quest_a_pawn_on_the_eternal_pawn
EndContentData */
#include "precompiled.h"
@@ -200,13 +201,904 @@ bool GossipSelect_npcs_rutgar_and_frankal(Player* pPlayer, Creature* pCreature,
return true;
}
-/*###
-##
+/*####
+# quest_a_pawn_on_the_eternal_board (Defines)
####*/
+enum
+{
+ QUEST_A_PAWN_ON_THE_ETERNAL_BOARD = 8519,
+
+ FACTION_HOSTILE = 14,
+ FACTION_FRIENDLY = 35,
+
+ C_ANACHRONOS = 15381,
+ C_FANDRAL_STAGHELM = 15382,
+ C_ARYGOS = 15380,
+ C_MERITHRA = 15378,
+ C_CAELESTRASZ = 15379,
+
+ ANACHRONOS_SAY_1 = -1350000,
+ ANACHRONOS_SAY_2 = -1350001,
+ ANACHRONOS_SAY_3 = -1350002,
+ ANACHRONOS_SAY_4 = -1350003,
+ ANACHRONOS_SAY_5 = -1350004,
+ ANACHRONOS_SAY_6 = -1350005,
+ ANACHRONOS_SAY_7 = -1350006,
+ ANACHRONOS_SAY_8 = -1350007,
+ ANACHRONOS_SAY_9 = -1350008,
+ ANACHRONOS_SAY_10 = -1350009,
+ ANACHRONOS_EMOTE_1 = -1350010,
+ ANACHRONOS_EMOTE_2 = -1350011,
+ ANACHRONOS_EMOTE_3 = -1350012,
+
+ FANDRAL_SAY_1 = -1350013,
+ FANDRAL_SAY_2 = -1350014,
+ FANDRAL_SAY_3 = -1350015,
+ FANDRAL_SAY_4 = -1350016,
+ FANDRAL_SAY_5 = -1350017,
+ FANDRAL_SAY_6 = -1350018,
+ FANDRAL_EMOTE_1 = -1350019,
+ FANDRAL_EMOTE_2 = -1350020,
+
+ CAELESTRASZ_SAY_1 = -1350021,
+ CAELESTRASZ_SAY_2 = -1350022,
+ CAELESTRASZ_YELL_1 = -1350023,
+
+ ARYGOS_SAY_1 = -1350024,
+ ARYGOS_YELL_1 = -1350025,
+ ARYGOS_EMOTE_1 = -1350026,
+
+ MERITHRA_SAY_1 = -1350027,
+ MERITHRA_SAY_2 = -1350028,
+ MERITHRA_YELL_1 = -1350029,
+ MERITHRA_EMOTE_1 = -1350030,
+
+ GO_GATE_OF_AHN_QIRAJ = 176146,
+ GO_GLYPH_OF_AHN_QIRAJ = 176148,
+ GO_ROOTS_OF_AHN_QIRAJ = 176147
+};
+/*#####
+# Quest: A Pawn on the Eternal Board
+#####*/
+
+/* ContentData
+A Pawn on the Eternal Board - creatures, gameobjects and defines
+mob_qiraj_war_spawn : Adds that are summoned in the Qiraj gates battle.
+npc_anachronos_the_ancient : Creature that controls the event.
+npc_anachronos_quest_trigger: controls the spawning of the BG War mobs.
+go_crystalline_tear : GameObject that begins the event and hands out quest
+TO DO: get correct spell IDs and timings for spells cast upon dragon transformations
+TO DO: Dragons should use the HandleEmoteCommand(EMOTE_ONESHOT_LIFTOFF) after transformation,but for some unknown reason it doesnt work.
+EndContentData */
+
+#define QUEST_A_PAWN_ON_THE_ETERNAL_BOARD 8519
+#define EVENT_AREA_RADIUS 65 //65yds
+#define EVENT_COOLDOWN 500000 //in ms. appear after event completed or failed (should be = Adds despawn time)
+
+struct QuestCinematic
+{
+ int32 TextId;
+ uint32 Creature, Timer;
+};
+
+// Creature 0 - Anachronos, 1 - Fandral, 2 - Arygos, 3 - Merithra, 4 - Caelestrasz
+static QuestCinematic EventAnim[]=
+{
+ {ANACHRONOS_SAY_1, 0, 2000},
+ {FANDRAL_SAY_1, 1, 4000},
+ {MERITHRA_EMOTE_1, 3, 500},
+ {MERITHRA_SAY_1, 3, 500},
+ {ARYGOS_EMOTE_1, 2, 2000},
+ {CAELESTRASZ_SAY_1, 4, 8000},
+ {MERITHRA_SAY_2, 3, 6000},
+ {NULL,3,2000},
+ {MERITHRA_YELL_1, 3, 2500},
+ {NULL, 3, 3000},//Morph
+ {NULL,3,4000},//EmoteLiftoff
+ {NULL, 3, 4000},// spell
+ {NULL, 3, 1250},//fly
+ {NULL, 3, 250},//remove flags
+ {ARYGOS_SAY_1, 2, 3000},
+ {NULL,3,2000},
+ {ARYGOS_YELL_1, 2, 3000},
+ {NULL, 3, 3000},//Morph
+ {NULL,3,4000},//EmoteLiftoff
+ {NULL, 3, 4000},// spell
+ {NULL, 3, 1000},//fly
+ {NULL, 3, 1000},//remove flags
+ {CAELESTRASZ_SAY_2, 4, 5000},
+ {NULL,3,3000},
+ {CAELESTRASZ_YELL_1, 4, 3000},
+ {NULL, 3, 3000},//Morph
+ {NULL,3,4000},//EmoteLiftoff
+ {NULL, 3, 2500},// spell
+ {ANACHRONOS_SAY_2, 0, 2000},
+ {NULL, 3, 250},//fly
+ {NULL, 3, 25},//remove flags
+ {FANDRAL_SAY_2, 1, 3000},
+ {ANACHRONOS_SAY_3, 0, 10000},//Both run through the armies
+ {NULL,3,2000},// Sands will stop
+ {NULL,3,8000},// Summon Gate
+ {ANACHRONOS_SAY_4, 0, 4000},
+ {NULL, 0, 2000},//spell 1-> Arcane cosmetic (Mobs freeze)
+ {NULL, 0, 5000}, //Spell 2-> Arcane long cosmetic (barrier appears) (Barrier -> Glyphs)
+ {NULL, 0, 7000},//BarrieR
+ {NULL, 0, 4000},//Glyphs
+ {ANACHRONOS_SAY_5, 0, 2000},
+ {NULL, 0, 4000},// Roots
+ {FANDRAL_SAY_3, 1, 3000},//Root Text
+ {FANDRAL_EMOTE_1, 1, 3000},//falls knee
+ {ANACHRONOS_SAY_6, 0, 3000},
+ {ANACHRONOS_SAY_7, 0, 3000},
+ {ANACHRONOS_SAY_8, 0, 8000},
+ {ANACHRONOS_EMOTE_1, 0, 1000},//Give Scepter
+ {FANDRAL_SAY_4, 1, 3000},
+ {FANDRAL_SAY_5, 1, 3000},//->Equip hammer~Scepter, throw it at door
+ {FANDRAL_EMOTE_2, 1, 3000},//Throw hammer at door.
+ {ANACHRONOS_SAY_9, 0, 3000},
+ {FANDRAL_SAY_6, 1, 3000}, //fandral goes away
+ {ANACHRONOS_EMOTE_2, 0, 3000},
+ {ANACHRONOS_EMOTE_3, 0, 3000},
+ {NULL, 0, 2000},
+ {NULL, 0, 2000},
+ {NULL, 0, 4000},
+ {ANACHRONOS_SAY_10, 0, 3000},
+ {NULL, 0, 2000},
+ {NULL, 0, 3000},
+ {NULL, 0, 15000},
+ {NULL, 0, 5000},
+ {NULL, 0, 3500},
+ {NULL, 0, 5000},
+ {NULL, 0, 3500},
+ {NULL, 0, 5000},
+ {NULL, 0, NULL}
+};
+
+struct Location
+{
+ float x, y, z, o;
+};
+
+//Cordinates for Spawns
+static Location SpawnLocation[]=
+{
+ {-8085, 1528, 2.61, 3.141592},//Kaldorei Infantry
+ {-8080, 1526, 2.61, 3.141592},//Kaldorei Infantry
+ {-8085, 1524, 2.61, 3.141592},//Kaldorei Infantry
+ {-8080, 1522, 2.61, 3.141592},//Kaldorei Infantry
+ {-8085, 1520, 2.61, 3.141592},//Kaldorei Infantry
+
+ {-8085, 1524, 2.61, 3.141592},//Kaldorei Infantry
+ {-8080, 1522, 2.61, 3.141592},//Kaldorei Infantry
+ {-8085, 1520, 2.61, 3.141592},//Kaldorei Infantry
+ {-8080, 1518, 2.61, 3.141592},//Kaldorei Infantry
+ {-8085, 1516, 2.61, 3.141592},//Kaldorei Infantry
+
+ {-8085, 1518, 2.61, 3.141592},//Kaldorei Infantry
+ {-8080, 1516, 2.61, 3.141592},//Kaldorei Infantry
+ {-8080, 1520, 2.61, 3.141592},//Kaldorei Infantry
+ {-8080, 1424, 2.61, 3.141592},//Kaldorei Infantry
+ {-8085, 1422, 2.61, 3.141592},//Kaldorei Infantry
+ // 2 waves of warriors
+ {-8082, 1528, 2.61, 3.141592},//Kaldorei Infantry
+ {-8078, 1525, 2.61, 3.141592},//Kaldorei Infantry
+ {-8082, 1524, 2.61, 3.141592},//Kaldorei Infantry
+ {-8078, 1526, 2.61, 3.141592},//Kaldorei Infantry
+ {-8082, 1527, 2.61, 3.141592},//Kaldorei Infantry
+
+ {-8082, 1524, 2.61, 3.141592},//Kaldorei Infantry
+ {-8078, 1522, 2.61, 3.141592},//Kaldorei Infantry
+ {-8082, 1520, 2.61, 3.141592},//Kaldorei Infantry
+ {-8078, 1518, 2.61, 3.141592},//Kaldorei Infantry
+ {-8082, 1516, 2.61, 3.141592},//Kaldorei Infantry
+
+ {-8082, 1523, 2.61, 3.141592},//Kaldorei Infantry
+ {-8078, 1521, 2.61, 3.141592},//Kaldorei Infantry
+ {-8082, 1528, 2.61, 3.141592},//Kaldorei Infantry
+ {-8078, 1519, 2.61, 3.141592},//Kaldorei Infantry
+ {-8082, 1526, 2.61, 3.141592},//Kaldorei Infantry
+
+ {-8082, 1524, 2.61, 3.141592},//Kaldorei Infantry
+ {-8078, 1522, 2.61, 3.141592},//Kaldorei Infantry
+ {-8082, 1520, 2.61, 3.141592},//Kaldorei Infantry
+ {-8078, 1518, 2.61, 3.141592},//Kaldorei Infantry
+ {-8082, 1516, 2.61, 3.141592},//Kaldorei Infantry
+
+ {-8088, 1510, 2.61, 0},//Anubisath Conqueror
+ {-8084, 1520, 2.61, 0},//Anubisath Conqueror
+ {-8088, 1530, 2.61, 0},//Anubisath Conqueror
+
+ {-8080, 1513, 2.61, 0},//Qiraj Wasp
+ {-8082, 1523, 2.61, 0},//Qiraj Wasp
+ {-8085, 1518, 2.61, 0},//Qiraj Wasp
+ {-8082, 1516, 2.61, 0},//Qiraj Wasp
+ {-8085, 1520, 2.61, 0},//Qiraj Wasp
+ {-8080, 1528, 2.61, 0},//Qiraj Wasp
+
+ {-8082, 1513, 2.61, 0},//Qiraj Wasp
+ {-8079, 1523, 2.61, 0},//Qiraj Wasp
+ {-8080, 1531, 2.61, 0},//Qiraj Wasp
+ {-8079, 1516, 2.61, 0},//Qiraj Wasp
+ {-8082, 1520, 2.61, 0},//Qiraj Wasp
+ {-8080, 1518, 2.61, 0},//Qiraj Wasp
+
+ {-8081, 1514, 2.61, 0},//Qiraj Tank
+ {-8081, 1520, 2.61, 0},//Qiraj Tank
+ {-8081, 1526, 2.61, 0},//Qiraj Tank
+ {-8081, 1512, 2.61, 0},//Qiraj Tank
+ {-8082, 1520, 2.61, 0},//Qiraj Tank
+ {-8081, 1528, 2.61, 0},//Qiraj Tank
+
+ {-8082, 1513, 2.61, 3.141592},//Anubisath Conqueror
+ {-8082, 1520, 2.61, 3.141592},//Anubisath Conqueror
+ {-8082, 1527, 2.61, 3.141592},//Anubisath Conqueror
+};
+
+struct WaveData
+{
+ uint8 SpawnCount, UsedSpawnPoint;
+ uint32 CreatureId, SpawnTimer, YellTimer, DespTimer;
+ int32 WaveTextId;
+};
+
+static WaveData WavesInfo[] =
+{
+ {30, 0, 15423, 0, 0,24000, NULL}, //Kaldorei Soldier
+ {3, 35, 15424, 0, 0,24000, NULL}, //Anubisath Conqueror
+ {12, 38, 15414, 0, 0,24000, NULL}, //Qiraji Wasps
+ {6, 50, 15422, 0, 0,24000, NULL}, //Qiraji Tanks
+ {15, 15, 15423, 0, 0,24000, NULL} //Kaldorei Soldier
+
+};
+
+struct SpawnSpells
+{
+ uint32 Timer1, Timer2, SpellId;
+};
+
+static SpawnSpells SpawnCast[]=//
+{
+ {100000, 2000, 33652}, // Stop Time
+ {38500, 300000, 28528}, // Poison Cloud
+ {58000, 300000, 35871}, // Frost Debuff (need correct spell)
+ {80950, 300000, 42075}, // Fire Explosion (need correct spell however this one looks cool)
+};
+/*#####
+# npc_anachronos_the_ancient
+######*/
+struct TRINITY_DLL_DECL npc_anachronos_the_ancientAI : public ScriptedAI
+{
+ npc_anachronos_the_ancientAI(Creature* c) : ScriptedAI(c) {}
+
+ uint32 AnimationTimer;
+ uint8 AnimationCount;
+
+ uint64 AnachronosQuestTriggerGUID;
+ uint64 MerithraGUID;
+ uint64 ArygosGUID;
+ uint64 CaelestraszGUID;
+ uint64 FandralGUID;
+ uint64 PlayerGUID;
+ bool eventEnd;
+
+ void Reset()
+ {
+ AnimationTimer = 1500;
+ AnimationCount = 0;
+ AnachronosQuestTriggerGUID = 0;
+ MerithraGUID = 0;
+ ArygosGUID = 0;
+ CaelestraszGUID = 0;
+ FandralGUID = 0;
+ PlayerGUID = 0;
+ eventEnd = false;
+
+ m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
+ }
+
+ void HandleAnimation()
+ {
+ Player* plr = Unit::GetPlayer(PlayerGUID);
+ Unit* Fandral = plr->FindNearestCreature(C_FANDRAL_STAGHELM, 100, m_creature);
+ Unit* Arygos = plr->FindNearestCreature(C_ARYGOS, 100,m_creature);
+ Unit* Caelestrasz = plr->FindNearestCreature(C_CAELESTRASZ, 100, m_creature);
+ Unit* Merithra = plr->FindNearestCreature(C_MERITHRA, 100,m_creature);
+ Unit* mob;
+ AnimationTimer = EventAnim[AnimationCount].Timer;
+ if (eventEnd == false)
+ {
+ switch(AnimationCount)
+ {
+ case 0:
+ DoScriptText(ANACHRONOS_SAY_1, m_creature , Fandral);
+ break;
+ case 1:
+ Fandral->SetUInt64Value(UNIT_FIELD_TARGET, m_creature->GetGUID());
+ DoScriptText(FANDRAL_SAY_1, Fandral,m_creature);
+ break;
+ case 2:
+ Fandral->SetUInt64Value(UNIT_FIELD_TARGET,NULL);
+ DoScriptText(MERITHRA_EMOTE_1,Merithra);
+ break;
+ case 3:
+ DoScriptText(MERITHRA_SAY_1,Merithra);
+ break;
+ case 4:
+ DoScriptText(ARYGOS_EMOTE_1,Arygos);
+ break;
+ case 5:
+ Caelestrasz->SetUInt64Value(UNIT_FIELD_TARGET, Fandral->GetGUID());
+ DoScriptText(CAELESTRASZ_SAY_1, Caelestrasz);
+ break;
+ case 6:
+ DoScriptText(MERITHRA_SAY_2, Merithra);
+ break;
+ case 7:
+ Caelestrasz->SetUInt64Value(UNIT_FIELD_TARGET, NULL);
+ Merithra->GetMotionMaster()->MoveCharge(-8065,1530,2.61,10);
+ break;
+ case 8:
+ DoScriptText(MERITHRA_YELL_1,Merithra);
+ break;
+ case 9:
+ Merithra->CastSpell(Merithra,25105,true);
+ break;
+ case 10:
+ Merithra->HandleEmoteCommand(EMOTE_ONESHOT_LIFTOFF);
+ Merithra->AddUnitMovementFlag(MOVEMENTFLAG_LEVITATING);
+ Merithra->GetMotionMaster()->MoveCharge(-8065,1530,6.61,3);
+ break;
+ case 11:
+ Merithra->CastSpell(Merithra,24818,false);
+ break;
+ case 12:
+ Merithra->GetMotionMaster()->MoveCharge(-8150,1530,50,7);
+ break;
+ case 13:
+ break;
+ case 14:
+ DoScriptText(ARYGOS_SAY_1,Arygos);
+ break;
+ case 15:
+ Arygos->GetMotionMaster()->MoveCharge(-8065,1530,2.61,10);
+ Merithra->SetVisibility(VISIBILITY_OFF);
+ break;
+ case 16:
+ DoScriptText(ARYGOS_YELL_1, Arygos);
+ break;
+ case 17:
+ Arygos->CastSpell(Arygos,25107,true);
+ break;
+ case 18:
+ Arygos->HandleEmoteCommand(EMOTE_ONESHOT_LIFTOFF);
+ Arygos->AddUnitMovementFlag(MOVEMENTFLAG_LEVITATING);
+ Arygos->GetMotionMaster()->MoveCharge(-8065,1530,6.61,3);
+ break;
+ case 19:
+ Arygos->CastSpell(Arygos,50505,false);
+ break;
+ case 20:
+ Arygos->GetMotionMaster()->MoveCharge(-8150,1530,50,7);
+ break;
+ case 21:
+ break;
+ case 22:
+ DoScriptText(CAELESTRASZ_SAY_2,Caelestrasz, Fandral);
+ break;
+ case 23:
+ Caelestrasz->GetMotionMaster()->MoveCharge(-8065,1530,2.61,10);
+ Arygos->SetVisibility(VISIBILITY_OFF);
+ break;
+ case 24:
+ DoScriptText(CAELESTRASZ_YELL_1, Caelestrasz);
+ break;
+ case 25:
+ Caelestrasz->CastSpell(Caelestrasz,25106,true);
+ break;
+ case 26:
+ Caelestrasz->HandleEmoteCommand(254);
+ Caelestrasz->AddUnitMovementFlag(MOVEMENTFLAG_LEVITATING);
+ Caelestrasz->GetMotionMaster()->MoveCharge(-8065,1530,7.61,3);
+ break;
+ case 27:
+ Caelestrasz->CastSpell(Caelestrasz,54293,false);
+ break;
+ case 28:
+ DoScriptText(ANACHRONOS_SAY_2,m_creature, Fandral);
+ break;
+ case 29:
+ Caelestrasz->GetMotionMaster()->MoveCharge(-8150,1530,50,7);
+ DoScriptText(FANDRAL_SAY_2, Fandral, m_creature);
+ break;
+ case 30:
+ break;
+ case 31:
+ DoScriptText(ANACHRONOS_SAY_3, m_creature, Fandral);
+ break;
+ case 32:
+ Caelestrasz->SetVisibility(VISIBILITY_OFF);
+ Fandral->GetMotionMaster()->MoveCharge(-8108,1529,2.77,8);
+ m_creature->GetMotionMaster()->MoveCharge(-8113,1525,2.77,8);
+ break;//both run to the gate
+ case 33:
+ DoScriptText(ANACHRONOS_SAY_4, m_creature);
+ Caelestrasz->GetMotionMaster()->MoveCharge(-8165,1530,65,7);
+ break; //Text: sands will stop
+ case 34:
+ m_creature->CastSpell(plr, 23017, true);//Arcane Channeling
+ break;
+ case 35:
+ m_creature->CastSpell(-8088,1520.43,2.67,25158,true);
+ break;
+ case 36:
+ m_creature->CastSpell(plr, 25159, true);
+ break;
+ case 37:
+ m_creature->SummonGameObject(GO_GATE_OF_AHN_QIRAJ,-8130,1525,17.5,0,0,0,0,0,0);
+ break;
+ case 38:
+ m_creature->CastSpell(plr, 25166, true);
+ m_creature->SummonGameObject(GO_GLYPH_OF_AHN_QIRAJ,-8130,1525,17.5,0,0,0,0,0,0);
+ break;
+ case 39:
+ DoScriptText(ANACHRONOS_SAY_5, m_creature, Fandral);
+ break;
+ case 40:
+ Fandral->CastSpell(m_creature, 25167, true);
+ break;
+ case 41:
+ Fandral->SummonGameObject(GO_ROOTS_OF_AHN_QIRAJ,-8130,1525,17.5,0,0,0,0,0,0);
+ DoScriptText(FANDRAL_SAY_3, Fandral);
+ break;
+ case 42:
+ m_creature->CastStop();
+ DoScriptText(FANDRAL_EMOTE_1, Fandral);
+ break;
+ case 43:
+ Fandral->CastStop();
+ break;
+ case 44:
+ DoScriptText(ANACHRONOS_SAY_6, m_creature);
+ break;
+ case 45:
+ DoScriptText(ANACHRONOS_SAY_7, m_creature);
+ break;
+ case 46:
+ DoScriptText(ANACHRONOS_SAY_8, m_creature);
+ m_creature->GetMotionMaster()->MoveCharge(-8110,1527,2.77,4);
+ break;
+ case 47:
+ DoScriptText(ANACHRONOS_EMOTE_1, m_creature);
+ break;
+ case 48:
+ DoScriptText(FANDRAL_SAY_4,Fandral,m_creature);
+ break;
+ case 49:
+ DoScriptText(FANDRAL_SAY_5,Fandral,m_creature);
+ break;
+ case 50:
+ DoScriptText(FANDRAL_EMOTE_2,Fandral);
+ Fandral->CastSpell(-8127,1525,17.5,33806,true);
+ break;
+ case 51:
+ while (mob = plr->FindNearestCreature(15423,50,m_creature))
+ mob->RemoveFromWorld();
+ while (mob = plr->FindNearestCreature(15424,50,m_creature))
+ mob->RemoveFromWorld();
+ while (mob = plr->FindNearestCreature(15414,50,m_creature))
+ mob->RemoveFromWorld();
+ while (mob = plr->FindNearestCreature(15422,50,m_creature))
+ mob->RemoveFromWorld();
+ break;
+ case 52:
+ Fandral->GetMotionMaster()->MoveCharge(-8028.75, 1538.795, 2.61,4);
+ DoScriptText(ANACHRONOS_SAY_9, m_creature,Fandral);
+ break;
+ case 53:
+ DoScriptText(FANDRAL_SAY_6,Fandral);
+ break;
+ case 54:
+ DoScriptText(ANACHRONOS_EMOTE_2,m_creature);
+ break;
+ case 55:
+ Fandral->SetVisibility(VISIBILITY_OFF);
+ break;
+ case 56:
+ DoScriptText(ANACHRONOS_EMOTE_3, m_creature);
+ m_creature->GetMotionMaster()->MoveCharge(-8116,1522,3.65,4);
+ break;
+ case 57:
+ m_creature->GetMotionMaster()->MoveCharge(-8116.7,1527,3.7,4);
+ break;
+ case 58:
+ m_creature->GetMotionMaster()->MoveCharge(-8112.67,1529.9,2.86,4);
+ break;
+ case 59:
+ m_creature->GetMotionMaster()->MoveCharge(-8117.99,1532.24,3.94,4);
+ break;
+ case 60:
+ if(plr)
+ DoScriptText(ANACHRONOS_SAY_10, m_creature,plr);
+ m_creature->GetMotionMaster()->MoveCharge(-8113.46,1524.16,2.89,4);
+ break;
+ case 61:
+ m_creature->GetMotionMaster()->MoveCharge(-8057.1,1470.32,2.61,6);
+ if(plr->IsInRange(m_creature,0,15))
+ plr->GroupEventHappens(QUEST_A_PAWN_ON_THE_ETERNAL_BOARD ,m_creature);
+ break;
+ case 62:
+ m_creature->SetDisplayId(15500);
+ break;
+ case 63:
+ m_creature->HandleEmoteCommand(254);
+ m_creature->AddUnitMovementFlag(MOVEMENTFLAG_LEVITATING);
+ break;
+ case 64:
+ m_creature->GetMotionMaster()->MoveCharge(-8000,1400,150,9);
+ break;
+ case 65:
+ m_creature->SetVisibility(VISIBILITY_OFF);
+ if(Creature* AnachronosQuestTrigger = (Unit::GetCreature(*m_creature, AnachronosQuestTriggerGUID)))
+ {
+ DoScriptText(ARYGOS_YELL_1,m_creature);
+ AnachronosQuestTrigger->AI()->EnterEvadeMode();
+ eventEnd=true;
+ }
+ break;
+ }
+ }
+ ++AnimationCount;
+ }
+ void UpdateAI(const uint32 diff)
+ {
+ if(AnimationTimer)
+ {
+ if(AnimationTimer <= diff)
+ HandleAnimation();
+ else AnimationTimer -= diff;
+ }
+ if(AnimationCount < 65)
+ m_creature->CombatStop();
+ if(AnimationCount == 65 || eventEnd)
+ m_creature->AI()->EnterEvadeMode();
+ }
+};
+
+/*######
+# mob_qiraj_war_spawn
+######*/
+
+struct TRINITY_DLL_DECL mob_qiraj_war_spawnAI : public ScriptedAI
+{
+ mob_qiraj_war_spawnAI(Creature* c) : ScriptedAI(c) {}
+
+ uint64 MobGUID;
+ uint64 PlayerGUID;
+ uint32 SpellTimer1, SpellTimer2, SpellTimer3,SpellTimer4;
+ bool Timers;
+ bool hasTarget;
+ Unit* trigger;
+ void Reset()
+ {
+ MobGUID = 0;
+ PlayerGUID = 0;
+ Timers = false;
+ hasTarget = false;
+ }
+
+ void EnterCombat(Unit* who) {}
+ void JustDied(Unit* slayer);
+
+ void UpdateAI(const uint32 diff)
+ {
+ Unit* target;
+ Player* plr = m_creature->GetPlayer(PlayerGUID);
+
+ if(!Timers)
+ {
+ if(m_creature->GetEntry() == 15424 || m_creature->GetEntry() == 15422 || m_creature->GetEntry() == 15414) //all but Kaldorei Soldiers
+ {
+ SpellTimer1 = SpawnCast[1].Timer1;
+ SpellTimer2 = SpawnCast[2].Timer1;
+ SpellTimer3 = SpawnCast[3].Timer1;
+ }
+ if(m_creature->GetEntry() == 15423 || m_creature->GetEntry() == 15424 || m_creature->GetEntry() == 15422 || m_creature->GetEntry() == 15414)
+ SpellTimer4 = SpawnCast[0].Timer1;
+ Timers = true;
+ }
+ if(m_creature->GetEntry() == 15424 || m_creature->GetEntry() == 15422|| m_creature->GetEntry() == 15414)
+ {
+ if(SpellTimer1 < diff)
+ {
+ DoCast(m_creature, SpawnCast[1].SpellId);
+ DoCast(m_creature, 24319);
+ SpellTimer1 = SpawnCast[1].Timer2;
+ } else SpellTimer1 -= diff;
+ if(SpellTimer2 < diff)
+ {
+ DoCast(m_creature, SpawnCast[2].SpellId);
+ SpellTimer2 = SpawnCast[2].Timer2;
+ } else SpellTimer2 -= diff;
+ if(SpellTimer3 < diff)
+ {
+ DoCast(m_creature, SpawnCast[3].SpellId);
+ SpellTimer3 = SpawnCast[3].Timer2;
+ } else SpellTimer3 -= diff;
+ }
+ if (m_creature->GetEntry() == 15423 || m_creature->GetEntry() == 15424 || m_creature->GetEntry() == 15422 || m_creature->GetEntry() == 15414)
+ {
+ if(SpellTimer4 < diff)
+ {
+ m_creature->RemoveAllAttackers();
+ m_creature->AttackStop();
+ DoCast(m_creature, 15533);
+ SpellTimer4 = SpawnCast[0].Timer2;
+ } else SpellTimer4 -= diff;
+ }
+ if (!hasTarget)
+ {
+ if (m_creature->GetEntry() == 15424 || m_creature->GetEntry() == 15422 || m_creature->GetEntry() == 15414)
+ target = m_creature->FindNearestCreature(15423,20,true);
+ if (m_creature->GetEntry() == 15423)
+ {
+ uint8 tar;
+ tar = rand()%3;
+
+ if (tar == 0)
+ target = m_creature->FindNearestCreature(15422,20,true);
+ else if (tar == 1)
+ target = m_creature->FindNearestCreature(15424,20,true);
+ else if (tar == 2)
+ target = m_creature->FindNearestCreature(15414,20,true);
+ }
+ hasTarget = true;
+ m_creature->AI()->AttackStart(target);
+ }
+ if (!(trigger = m_creature->FindNearestCreature(15379,100)))
+ DoCast(m_creature, 33652);
+
+ if (!UpdateVictim())
+ {
+ hasTarget = false;
+ return;
+ }
+
+ DoMeleeAttackIfReady();
+ }
+};
+
+/*#####
+# npc_anachronos_quest_trigger
+#####*/
+
+struct TRINITY_DLL_DECL npc_anachronos_quest_triggerAI : public ScriptedAI
+{
+ npc_anachronos_quest_triggerAI(Creature* c) : ScriptedAI(c) {}
+
+ uint64 PlayerGUID;
+
+ uint32 WaveTimer;
+ uint32 AnnounceTimer;
+
+ int8 LiveCount;
+ uint8 WaveCount;
+
+ bool EventStarted;
+ bool Announced;
+ bool Failed;
+
+ void Reset()
+ {
+ PlayerGUID = 0;
+
+ WaveTimer = 2000;
+ AnnounceTimer = 1000;
+ LiveCount = 0;
+ WaveCount = 0;
+
+ EventStarted = false;
+ Announced = false;
+ Failed = false;
+
+ m_creature->SetVisibility(VISIBILITY_OFF);
+ }
+
+ void SummonNextWave()
+ {
+ uint8 count = WavesInfo[WaveCount].SpawnCount;
+ uint8 locIndex = WavesInfo[WaveCount].UsedSpawnPoint;
+ srand(time(NULL));//initializing random seed
+ uint8 KaldoreiSoldierCount = 0;
+ uint8 AnubisathConquerorCount = 0;
+ uint8 QirajiWaspCount = 0;
+ for(uint8 i = 0; i < 67; ++i)
+ {
+ Creature* Spawn = NULL;
+ float X = SpawnLocation[locIndex + i].x;
+ float Y = SpawnLocation[locIndex + i].y;
+ float Z = SpawnLocation[locIndex + i].z;
+ float O = SpawnLocation[locIndex + i].o;
+ uint32 desptimer = WavesInfo[WaveCount].DespTimer;
+ Spawn = m_creature->SummonCreature(WavesInfo[WaveCount].CreatureId, X, Y, Z, O, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, desptimer);
+
+ if(Spawn)
+ {
+ Spawn->LoadCreaturesAddon();
+ if (Spawn->GetGUID()== 15423)
+ Spawn->SetUInt32Value(UNIT_FIELD_DISPLAYID,15427+rand()%4);
+ if (i >= 30) WaveCount = 1;
+ if (i >= 33) WaveCount = 2;
+ if (i >= 45) WaveCount = 3;
+ if (i >= 51) WaveCount = 4;
+ }
+
+ if(WaveCount < 5) //1-4 Wave
+ {
+ ((mob_qiraj_war_spawnAI*)Spawn->AI())->MobGUID = m_creature->GetGUID();
+ ((mob_qiraj_war_spawnAI*)Spawn->AI())->PlayerGUID = PlayerGUID;
+ }
+ }
+ WaveTimer = WavesInfo[WaveCount].SpawnTimer;
+ AnnounceTimer = WavesInfo[WaveCount].YellTimer;
+ }
+
+ void CheckEventFail()
+ {
+ Player* pPlayer = Unit::GetPlayer(PlayerGUID);
+
+ if(!pPlayer)
+ return;
+
+ if(Group *EventGroup = pPlayer->GetGroup())
+ {
+ Player* GroupMember;
+
+ uint8 GroupMemberCount = 0;
+ uint8 DeadMemberCount = 0;
+ uint8 FailedMemberCount = 0;
+
+ const Group::MemberSlotList members = EventGroup->GetMemberSlots();
+
+ for(Group::member_citerator itr = members.begin(); itr!= members.end(); itr++)
+ {
+ GroupMember = (Unit::GetPlayer(itr->guid));
+ if(!GroupMember)
+ continue;
+ if(!GroupMember->IsWithinDistInMap(m_creature, EVENT_AREA_RADIUS) && GroupMember->GetQuestStatus(QUEST_A_PAWN_ON_THE_ETERNAL_BOARD) == QUEST_STATUS_INCOMPLETE)
+ {
+ GroupMember->FailQuest(QUEST_A_PAWN_ON_THE_ETERNAL_BOARD);
+ GroupMember->SetQuestStatus(QUEST_A_PAWN_ON_THE_ETERNAL_BOARD, QUEST_STATUS_NONE);
+ ++FailedMemberCount;
+ }
+ ++GroupMemberCount;
+
+ if(GroupMember->isDead())
+ ++DeadMemberCount;
+ }
+
+ if(GroupMemberCount == FailedMemberCount || !pPlayer->IsWithinDistInMap(m_creature, EVENT_AREA_RADIUS))
+ Failed = true; //only so event can restart
+ }
+ }
+
+ void LiveCounter()
+ {
+ --LiveCount;
+ if(!LiveCount)
+ Announced = false;
+ }
+
+ void UpdateAI(const uint32 diff)
+ {
+ if(!PlayerGUID || !EventStarted)
+ return;
+
+ if(WaveCount < 4)
+ {
+ if(!Announced && AnnounceTimer < diff)
+ {
+ DoScriptText(WavesInfo[WaveCount].WaveTextId, m_creature);
+ Announced = true;
+ } else AnnounceTimer -= diff;
+
+ if(WaveTimer < diff)
+ SummonNextWave();
+ else WaveTimer -= diff;
+ }
+ CheckEventFail();
+ if (WaveCount == 4 || Failed)
+ EnterEvadeMode();
+ };
+};
+void mob_qiraj_war_spawnAI::JustDied(Unit* slayer)
+{
+ m_creature->RemoveCorpse();
+ if(Creature* Mob = (Unit::GetCreature(*m_creature, MobGUID)))
+ ((npc_anachronos_quest_triggerAI*)Mob->AI())->LiveCounter();
+
+};
+/*#####
+# go_crystalline_tear
+######*/
+
+bool GOQuestAccept_GO_crystalline_tear(Player* plr, GameObject* go, Quest const* quest)
+{
+ if(quest->GetQuestId() == QUEST_A_PAWN_ON_THE_ETERNAL_BOARD)
+ {
+
+ Unit* Anachronos_Quest_Trigger = go->FindNearestCreature(15454, 100, plr);
+
+ Unit *Merithra = Anachronos_Quest_Trigger->SummonCreature(15378,-8034.535,1535.14,2.61,0,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,150000);
+ Unit *Caelestrasz = Anachronos_Quest_Trigger->SummonCreature(15379,-8032.767, 1533.148,2.61, 1.5,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,150000);
+ Unit *Arygos = Anachronos_Quest_Trigger->SummonCreature(15380,-8034.52, 1537.843, 2.61, 5.7,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,150000);
+ Unit *Fandral = Anachronos_Quest_Trigger->SummonCreature(15382,-8028.462, 1535.843, 2.61, 3.141592,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,215000);
+ Unit *Anachronos = Anachronos_Quest_Trigger->SummonCreature(15381,-8028.75, 1538.795, 2.61, 4,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,220000);
+
+ Merithra->SetUInt32Value(UNIT_NPC_FLAGS, 0);
+ Merithra->SetUInt32Value(UNIT_FIELD_BYTES_1,0);
+ Merithra->SetUInt32Value(UNIT_FIELD_DISPLAYID,15420);
+ Merithra->setFaction(35);
+
+ Caelestrasz->SetUInt32Value(UNIT_NPC_FLAGS, 0);
+ Caelestrasz->SetUInt32Value(UNIT_FIELD_BYTES_1,0);
+ Caelestrasz->SetUInt32Value(UNIT_FIELD_DISPLAYID,15419);
+ Caelestrasz->setFaction(35);
+
+ Arygos->SetUInt32Value(UNIT_NPC_FLAGS, 0);
+ Arygos->SetUInt32Value(UNIT_FIELD_BYTES_1,0);
+ Arygos->SetUInt32Value(UNIT_FIELD_DISPLAYID,15418);
+ Arygos->setFaction(35);
+
+ if(Anachronos_Quest_Trigger && Anachronos)
+ {
+ ((npc_anachronos_the_ancientAI*)((Creature*)Anachronos)->AI())->PlayerGUID = plr->GetGUID();
+ ((npc_anachronos_quest_triggerAI*)((Creature*)Anachronos_Quest_Trigger)->AI())->Failed=false;
+ ((npc_anachronos_quest_triggerAI*)((Creature*)Anachronos_Quest_Trigger)->AI())->PlayerGUID = plr->GetGUID();
+ ((npc_anachronos_quest_triggerAI*)((Creature*)Anachronos_Quest_Trigger)->AI())->EventStarted=true;
+ ((npc_anachronos_quest_triggerAI*)((Creature*)Anachronos_Quest_Trigger)->AI())->Announced=true;
+ }
+ }
+ return true;
+}
+
+CreatureAI* GetAI_npc_anachronos_quest_trigger(Creature* c)
+{
+ return new npc_anachronos_quest_triggerAI(c);
+}
+
+CreatureAI* GetAI_mob_qiraj_war_spawn(Creature* c)
+{
+ return new mob_qiraj_war_spawnAI(c);
+}
+
+CreatureAI* GetAI_npc_anachronos_the_ancient(Creature* c)
+{
+ return new npc_anachronos_the_ancientAI(c);
+}
void AddSC_silithus()
{
Script *newscript;
+
+ newscript = new Script;
+ newscript->Name = "go_crystalline_tear";
+ newscript->pGOQuestAccept = &GOQuestAccept_GO_crystalline_tear;
+ newscript->RegisterSelf();
+
+ newscript = new Script;
+ newscript->Name = "npc_anachronos_quest_trigger";
+ newscript->GetAI = &GetAI_npc_anachronos_quest_trigger;
+ newscript->RegisterSelf();
+
+ newscript = new Script;
+ newscript->Name = "npc_anachronos_the_ancient";
+ newscript->GetAI = &GetAI_npc_anachronos_the_ancient;
+ newscript->RegisterSelf();
+
+ newscript = new Script;
+ newscript->Name = "mob_qiraj_war_spawn";
+ newscript->GetAI = &GetAI_mob_qiraj_war_spawn;
+ newscript->RegisterSelf();
newscript = new Script;
newscript->Name = "npc_highlord_demitrian";
diff --git a/src/bindings/scripts/scripts/kalimdor/zulfarrak/zulfarrak.cpp b/src/bindings/scripts/scripts/kalimdor/zulfarrak/zulfarrak.cpp
index 2ac360faa09..aa67f0dc82b 100644
--- a/src/bindings/scripts/scripts/kalimdor/zulfarrak/zulfarrak.cpp
+++ b/src/bindings/scripts/scripts/kalimdor/zulfarrak/zulfarrak.cpp
@@ -245,6 +245,7 @@ bool AreaTrigger_at_zumrah(Player* pPlayer, AreaTriggerEntry *at)
return false;
Zumrah->setFaction(ZUMRAH_HOSTILE_FACTION);
+ return true;
}
void AddSC_zulfarrak()