diff options
author | maximius <none@none> | 2009-10-01 20:08:14 -0700 |
---|---|---|
committer | maximius <none@none> | 2009-10-01 20:08:14 -0700 |
commit | b00b00ab9a4829b3aabc07bb75979de91c9aab77 (patch) | |
tree | 8ea5604d865b6c13b99b94d90c1c8c448bdc7bc8 | |
parent | 340db23ea99bb642d5a9631d7dab562778c29f44 (diff) |
*Azjol'Nerub - Register instance script & GO handling for first boss door, by Tartalo
*Krik'thir the Gatewatcher - Fix compile on *nix + merge npc AIs, by Tartalo
*Halls of Stone - Merge from SD2, scripting by ckegg, merge by Tartalo
--HG--
branch : trunk
14 files changed, 1850 insertions, 81 deletions
diff --git a/sql/FULL/world_script_texts.sql b/sql/FULL/world_script_texts.sql index ea871ed7bb0..5993f04b78e 100644 --- a/sql/FULL/world_script_texts.sql +++ b/sql/FULL/world_script_texts.sql @@ -1798,18 +1798,18 @@ INSERT INTO `script_texts` (`npc_entry`,`entry`,`content_default`,`content_loc1` (24664,-1585028,'Do not... get too comfortable.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,12420,1,0,0,'kaelthas MT SAY_RECAST_GRAVITY'), (24664,-1585029,'My demise accomplishes nothing! The Master will have you! You will drown in your own blood! This world shall burn! Aaaghh!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,12421,1,0,0,'kaelthas MT SAY_DEATH'), --- 1 590 000 VAULT OF ARCHAVON +-- -1 590 000 VAULT OF ARCHAVON (33993,-1590000,'Emalon the Storm Watcher overcharges a Tempest Minion!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,3,0,0,'emalon EMOTE_OVERCHARGE_TEMPEST_MINION'), (33993,-1590001,'A Tempest Minion appears to defend Emalon!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,3,0,0,'emalon EMOTE_MINION_RESPAWN'), (33993,-1590002,'Archavon the Stone Watcher goes into a berserker rage!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,2,0,0,'archavon EMOTE_BERSERK'), --- 1 601 000 AZJOL-NERUB +-- -1 601 000 AZJOL-NERUB (28684,-1601000, 'This kingdom belongs to the Scourge! Only the dead may enter.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1, 0, 0, 'SAY_AGGRO boss_krik_thir'), (28684,-1601001, 'You were foolish to come.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1, 0, 0, 'SAY_SLAY_1 boss_krik_thir'), (28684,-1601002, 'As Anub''Arak commands!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1, 0, 0, 'SAY_SLAY_2 boss_krik_thir'), (28684,-1601003, 'I should be grateful. But I long ago lost the capacity.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1, 0, 0, 'SAY_DEATH boss_krik_thir'), --- 1 602 000 HALLS OF LIGHTNING +-- -1 602 000 HALLS OF LIGHTNING /* Bjarngrim */ (28586,-1602000,'I am the greatest of my father''s sons! Your end has come!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,14149,1,0,0,'bjarngrim SAY_AGGRO'), (28586,-1602001,'So ends your curse!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,14153,1,0,0,'bjarngrim SAY_SLAY_1'), @@ -1855,7 +1855,7 @@ INSERT INTO `script_texts` (`npc_entry`,`entry`,`content_default`,`content_loc1` (28587,-1602041,'%s runs to his anvil!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,3,0,0,'volkhan EMOTE_TO_ANVIL'), (28587,-1602042,'%s prepares to shatter his Brittle Golems!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,3,0,0,'volkhan EMOTE_SHATTER'), --- 1 603 000 HALLS OF STONE +-- -1 603 000 HALLS OF STONE /* Maiden of Grief */ (27975,-1603000,'You shouldn''t have come...now you will die!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,13487,1,0,0,'maiden of grief SAY_AGGRO'), (27975,-1603001,'Why must it be this way?',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,13488,1,0,0,'maiden of grief SAY_SLAY_1'), @@ -1864,8 +1864,71 @@ INSERT INTO `script_texts` (`npc_entry`,`entry`,`content_default`,`content_loc1` (27975,-1603004,'This is your own fault!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,13491,1,0,0,'maiden of grief SAY_SLAY_4'), (27975,-1603005,'I hope you all rot! I never...wanted...this.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,13493,1,0,0,'maiden of grief SAY_DEATH'), (27975,-1603006,'So much lost time... that you''ll never get back!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,13492,1,0,0,'maiden of grief SAY_STUN'), - --- 1 604 000 GUNDRAK +/* Krystallus */ + (27977,-1603007,'Crush....',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,14176,1,0,0,'krystallus SAY_AGGRO'), + (27977,-1603008,'Ha...ha...ha...ha...',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,14177,1,0,0,'krystallus SAY_KILL'), + (27977,-1603009,'Uuuuhhhhhhhhhh......',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,14179,1,0,0,'krystallus SAY_DEATH'), + (27977,-1603010,'Break.... you....',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,14178,1,0,0,'krystallus SAY_SHATTER'), +/* Sjonnir */ + (27978,-1603011,'Soft, vulnerable shells. Brief, fragile lives. You can not escape the curse of flesh!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,1,0,0,'Sjonnir SAY_AGGRO'), + (27978,-1603012,'Flesh is no match for iron!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,1,0,0,'Sjonnir SAY_SLAY_1'), + (27978,-1603013,'Armies of iron will smother the world!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,1,0,0,'Sjonnir SAY_SLAY_2'), + (27978,-1603015,'Loken will not rest, until the forge is retaken. You changed nothing!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,1,0,0,'Sjonnir SAY_DEATH'), + (28070,-1603012,'Now that''s owning your supper!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,14244,1,0,0,'brann SAY_KILL_1'), + (28070,-1603013,'Press on, that''s the way!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,14245,1,0,0,'brann SAY_KILL_2'), + (28070,-1603014,'Keep it up now. Plenty of death-dealing for everyone!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,14246,1,0,0,'brann SAY_KILL_3'), + (28070,-1603015,'I''m all kinds of busted up. Might not... make it...',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,14257,1,0,0,'brann SAY_LOW_HEALTH'), + (28070,-1603016,'Not yet, not... yet-',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,14258,1,0,0,'brann SAY_DEATH'), + (28070,-1603017,'I''m doing everything I can!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,14260,1,0,0,'brann SAY_PLAYER_DEATH_1'), + (28070,-1603018,'Light preserve you!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,14261,1,0,0,'brann SAY_PLAYER_DEATH_2'), + (28070,-1603019,'I hope this is all worth it!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,14262,1,0,0,'brann SAY_PLAYER_DEATH_3'), + (28070,-1603020,'Time to get some answers! Let''s get this show on the road!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,14259,1,0,0,'brann SAY_ESCORT_START'), + (28070,-1603021,'Don''t worry. Old Brann has got your back. Keep that metal monstrosity busy and I''ll see if I can sweet talk this machine into helping you.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,14274,1,0,0,'brann SAY_SPAWN_DWARF'), + (28070,-1603022,'This is a wee bit trickier that before... Oh, bloody--incomin''!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,14275,1,0,0,'brann SAY_SPAWN_TROGG'), + (28070,-1603023,'What in the name o'' Madoran did THAT do? Oh! Wait: I just about got it...',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,14276,1,0,0,'brann SAY_SPAWN_OOZE'), + (28070,-1603024,'Ha, that did it. Help''s a-coming. Take this you glow-eying brute!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,14277,1,0,0,'brann SAY_SPAWN_EARTHEN'), + (28070,-1603025,'Take a moment and relish this with me! Soon all will be revealed! Okay then, let''s do this!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,14247,1,0,0,'brann SAY_EVENT_INTRO_1'), + (28070,-1603026,'Now keep an eye out! I''ll have this licked in two shakes of a--',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,14248,1,0,0,'brann SAY_EVENT_INTRO_2'), + (28070,-1603027,'Warning! Life form pattern not recognized. Archival processing terminated. Continued interference will result in targeted response.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,13765,1,0,0,'brann SAY_EVENT_INTRO_3_ABED'), + (28070,-1603028,'Oh, that doesn''t sound good. We might have a complication or two...',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,14249,1,0,0,'brann SAY_EVENT_A_1'), + (28070,-1603029,'Security breach in progress. Analysis of historical archives transferred to lower priority queue. Countermeasures engaged.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,13756,1,0,0,'brann SAY_EVENT_A_2_KADD'), + (28070,-1603030,'Ah, you want to play hardball, eh? That''s just my game!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,14250,1,0,0,'brann SAY_EVENT_A_3'), + (28070,-1603031,'Couple more minutes and I''ll--',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,14251,1,0,0,'brann SAY_EVENT_B_1'), + (28070,-1603032,'Threat index threshold exceeded. Celestial archive aborted. Security level heightened.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,13761,1,0,0,'brann SAY_EVENT_B_2_MARN'), + (28070,-1603033,'Heightened? What''s the good news?',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,14252,1,0,0,'brann SAY_EVENT_B_3'), + (28070,-1603034,'So that was the problem? Now I''m makin'' progress...',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,14253,1,0,0,'brann SAY_EVENT_C_1'), + (28070,-1603035,'Critical threat index. Void analysis diverted. Initiating sanitization protocol.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,13767,1,0,0,'brann SAY_EVENT_C_2_ABED'), + (28070,-1603036,'Hang on! Nobody''s gonna'' be sanitized as long as I have a say in it!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,14254,1,0,0,'brann SAY_EVENT_C_3'), + (28070,-1603037,'Ha! The old magic fingers finally won through! Now let''s get down to-',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,14255,1,0,0,'brann SAY_EVENT_D_1'), + (28070,-1603038,'Alert! Security fail safes deactivated. Beginning memory purge...',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,13768,1,0,0,'brann SAY_EVENT_D_2_ABED'), + (28070,-1603039,'Purge? No no no no no! Where did I-- Aha, this should do the trick...',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,14256,1,0,0,'brann SAY_EVENT_D_3'), + (28070,-1603040,'System online. Life form pattern recognized. Welcome Branbronzan. Query?',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,13769,1,0,0,'brann SAY_EVENT_D_4_ABED'), + (28070,-1603041,'Query? What do you think I�m here for? Tea and biscuits? Spill the beans already!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,14263,1,0,0,'brann SAY_EVENT_END_01'), + (28070,-1603042,'Tell me how that dwarfs came to be! And start at the beginning!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,14264,1,0,0,'brann SAY_EVENT_END_02'), + (28070,-1603043,'Accessing prehistoric data. Retrieved. In the beginning Earthen were created to-',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,13770,1,0,0,'brann SAY_EVENT_END_03_ABED'), + (28070,-1603044,'Right, right! I know that the Earthen were made of stone to shape the deep reaches of the world but what about the anomalies? Matrix non-stabilizing and whatnot.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,14265,1,0,0,'brann SAY_EVENT_END_04'), + (28070,-1603045,'Accessing. In the early stages of its development cycle Azeroth suffered infection by parasitic, necrophotic symbiotes.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,13771,1,0,0,'brann SAY_EVENT_END_05_ABED'), + (28070,-1603046,'Necro-what? Speak bloody common will ya?',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,14266,1,0,0,'brann SAY_EVENT_END_06'), + (28070,-1603047,'Designation: Old Gods. Old Gods rendered all systems, including Earthen defenseless in order to facilitate assimilation. This matrix destabilization has been termed the Curse of Flesh. Effects of destabilization increased over time.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,13772,1,0,0,'brann SAY_EVENT_END_07_ABED'), + (28070,-1603048,'Old Gods eh? So they zapped the Earthen with this Curse of Flesh. And then what?',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,14267,1,0,0,'brann SAY_EVENT_END_08'), + (28070,-1603049,'Accessing. Creators arrived to extirpate symbiotic infection. Assessment revealed that Old God infestation had grown malignant. Excising parasites would result in loss of host.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,13757,1,0,0,'brann SAY_EVENT_END_09_KADD'), + (28070,-1603050,'If they killed the Old Gods Azeroth would have been destroyed.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,14268,1,0,0,'brann SAY_EVENT_END_10'), + (28070,-1603051,'Correct. Creators neutralized parasitic threat and contained it within the host. Forge of Wills and other systems were instituted to create new Earthen. Safeguards were implemented and protectors were appointed.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,13758,1,0,0,'brann SAY_EVENT_END_11_KADD'), + (28070,-1603052,'What protectors?',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,14269,1,0,0,'brann SAY_EVENT_END_12'), + (28070,-1603053,'Designations: Aesir and Vanir or in common nomenclator Storm and Earth Giants. Sentinel Loken designated supreme. Dragon Aspects appointed to monitor evolution of Azeroth.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,13759,1,0,0,'brann SAY_EVENT_END_13_KADD'), + (28070,-1603054,'Aesir and Vanir. Okay. So the Forge of Wills started to make new Earthen. But what happened to the old ones?',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,14270,1,0,0,'brann SAY_EVENT_END_14'), + (28070,-1603055,'Additional background is relevant to your query. Following global combat between-',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,13762,1,0,0,'brann SAY_EVENT_END_15_MARN'), + (28070,-1603056,'Hold everything! The Aesir and Vanir went to war? Why?',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,14271,1,0,0,'brann SAY_EVENT_END_16'), + (28070,-1603057,'Unknown. Data suggests that impetus for global combat originated with prime designate Loken who neutralized all remaining Aesir and Vanir affecting termination of conflict. Prime designate Loken then initiated stasis of several seed races including Earthen, Giant and Vrykul at designated holding facilities.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,13763,1,0,0,'brann SAY_EVENT_END_17_MARN'), + (28070,-1603058,'This Loken sounds like a nasty character. Glad we don�t have to worry about the likes of him anymore. So if I�m understanding you lads the original Earthen eventually woke up from this statis. And by that time this destabily-whatever had turned them into our brother dwarfs. Or at least dwarf ancestors. Hm?',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,14272,1,0,0,'brann SAY_EVENT_END_18'), + (28070,-1603059,'Essentially that is correct.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,13764,1,0,0,'brann SAY_EVENT_END_19_MARN'), + (28070,-1603060,'Well now. That�s a lot to digest. I�m gonna need some time to take all of this in. Thank you!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,14273,1,0,0,'brann SAY_EVENT_END_20'), + (28070,-1603061,'Acknowledged Branbronzan. Session terminated.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,13773,1,0,0,'brann SAY_EVENT_END_21_ABED'), + (28070,-1603062,'Loken?! That''s downright bothersome... We might''ve neutralized the iron dwarves, but I''d lay odds there''s another machine somewhere else churnin'' out a whole mess o'' these iron vrykul!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,14278,1,0,0,'brann SAY_VICTORY_SJONNIR_1'), + (28070,-1603063,'I''ll use the forge to make badtches o'' earthen to stand guard... But our greatest challenge still remains: find and stop Loken!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,14279,1,0,0,'brann SAY_VICTORY_SJONNIR_2'), + (28070,-1603064,'I think it''s time to see what''s behind the door near the entrance. I''m going to sneak over there, nice and quiet. Meet me at the door and I''ll get us in.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,1,0,0,'brann SAY_ENTRANCE_MEET'), + +-- -1 604 000 GUNDRAK /* Moorabi */ (29305,-1604010,'We fought back da Scourge. What chance joo be thinkin'' JOO got?',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,1,0,0,'SAY_AGGRO boss_moorabi'), (29305,-1604012,'Who gonna stop me; you? ',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,1,0,0,'SAY_SLAY_2 boss_moorabi'), diff --git a/sql/FULL/world_script_waypoints.sql b/sql/FULL/world_script_waypoints.sql index db5fa818df7..727bf52b75c 100644 --- a/sql/FULL/world_script_waypoints.sql +++ b/sql/FULL/world_script_waypoints.sql @@ -1617,4 +1617,29 @@ INSERT INTO `script_waypoint` VALUES (29173, 7, 2257.479, -5296.702, 82.165, 0, 'being kicked by Lich King'), (29173, 8, 2261.237, -5294.983, 82.167, 0, 'throw'), (29173, 9, 2259.34, -5294.379, 82.167, 0, 'event end'); -
\ No newline at end of file + + +DELETE FROM script_waypoint WHERE `entry`=28070; +INSERT INTO script_waypoint VALUES + (28070, 0, 1053.789795, 476.639343, 207.744, 0, ''), + (28070, 1, 1032.293945, 467.623444, 207.736, 0, ''), + (28070, 2, 1017.908752, 454.765656, 207.719, 0, ''), + (28070, 3, 1004.810120, 441.305115, 207.373, 0, ''), + (28070, 4, 988.694214, 424.422485, 207.425, 0, ''), + (28070, 5, 984.816345, 422.177917, 205.994, 0, ''), + (28070, 6, 977.204468, 420.026917, 205.994, 0, ''), + (28070, 7, 962.388123, 421.983307, 205.994, 0, ''), + (28070, 8, 950.419556, 416.515198, 205.994, 0, ''), + (28070, 9, 943.972290, 403.071228, 205.994, 0, ''), + (28070, 10, 947.921936, 387.683563, 205.994, 0, ''), + (28070, 11, 946.554749, 383.270782, 205.994, 0, ''), + (28070, 12, 944.654724, 380.630859, 207.286, 0, ''), + (28070, 13, 941.101563, 377.373413, 207.421, 0, 'reach tribunal, set pause'), + (28070, 14, 935.217896, 370.557343, 207.421, 0, ''), + (28070, 15, 928.035950, 363.026733, 204.018, 0, ''), + (28070, 16, 909.287292, 344.392792, 203.706, 0, ''), + (28070, 17, 897.946838, 333.634735, 203.706, 0, 'reach panel'), + (28070, 18, 918.914429, 351.312866, 203.706, 0, 'reach floor disc (end event begin)'), + (28070, 19, 928.070068, 363.296326, 204.091, 0, 'stealth'), + (28070, 20, 934.817627, 370.136261, 207.421, 0, ''), + (28070, 21, 941.501465, 377.254456, 207.421, 0, ''); diff --git a/sql/FULL/world_scripts_full.sql b/sql/FULL/world_scripts_full.sql index e782ecdd0bb..ce3486335c9 100644 --- a/sql/FULL/world_scripts_full.sql +++ b/sql/FULL/world_scripts_full.sql @@ -171,7 +171,15 @@ UPDATE `creature_template` SET `ScriptName`='boss_ambassador_hellmaw' WHERE `ent UPDATE `creature_template` SET `ScriptName`='mob_voidtraveler' WHERE `entry`=19226; /* AZJOL-NERUB */ -UPDATE `creature_template` SET `ScriptName`='boss_krik_thir' where `entry`=28684; +UPDATE `instance_template` SET `script`='instance_azjol_nerub' WHERE `map`=601; +UPDATE creature_template SET `ScriptName`='npc_watcher_narjil' WHERE `entry`=28729; +UPDATE creature_template SET `ScriptName`='npc_watcher_silthik' WHERE `entry`=28731; +UPDATE creature_template SET `ScriptName`='npc_anub_ar_warrior' WHERE `entry`=28732; +UPDATE creature_template SET `ScriptName`='npc_watcher_gashra' WHERE `entry`=28730; +UPDATE creature_template SET `ScriptName`='boss_krik_thir' WHERE `entry`=28684; +UPDATE creature_template SET `ScriptName`='npc_skittering_infector' WHERE `entry`=28736; +UPDATE creature_template SET `ScriptName`='npc_anub_ar_skirmisher' WHERE `entry`=28734; +UPDATE creature_template SET `ScriptName`='npc_anub_ar_shadowcaster' WHERE `entry`=28733; /* AHN'KAHET: THE OLD KINGDOM */ UPDATE `instance_template` SET `script`='instance_ahnkahet' WHERE `map`=619; @@ -550,6 +558,13 @@ UPDATE `creature_template` SET `ScriptName`='boss_ionar' WHERE `entry`=28546; UPDATE `creature_template` SET `ScriptName`='mob_spark_of_ionar' WHERE `entry`=28926; /* HALLS OF STONE */ +UPDATE `instance_template` SET `script`='instance_halls_of_stone' WHERE `map`=599; +/* Krystallus */ +UPDATE `creature_template` SET `ScriptName`='boss_krystallus' WHERE `entry`=27977; +/* Sjonnir */ +UPDATE `creature_template` SET `ScriptName`='boss_sjonnir' WHERE `entry`=27978; +UPDATE `creature_template` SET `ScriptName`='mob_tribuna_controller' WHERE `entry`=28234; +UPDATE `creature_template` SET `ScriptName`='npc_brann_hos' WHERE `entry`=28070; /* Maiden of Grief */ UPDATE `creature_template` SET `ScriptName`='boss_maiden_of_grief' WHERE `entry`=27975; diff --git a/sql/updates/5794_world_scripts.sql b/sql/updates/5794_world_scripts.sql new file mode 100644 index 00000000000..11c41fec91d --- /dev/null +++ b/sql/updates/5794_world_scripts.sql @@ -0,0 +1,110 @@ +-- Azjol-Nerub +UPDATE `instance_template` SET `script`='instance_azjol_nerub' WHERE `map`=601; +-- Krik'thir the Gatewatcher +UPDATE creature_template SET `ScriptName`='npc_watcher_narjil' WHERE `entry`=28729; +UPDATE creature_template SET `ScriptName`='npc_watcher_silthik' WHERE `entry`=28731; +UPDATE creature_template SET `ScriptName`='npc_anub_ar_warrior' WHERE `entry`=28732; +UPDATE creature_template SET `ScriptName`='npc_watcher_gashra' WHERE `entry`=28730; +UPDATE creature_template SET `ScriptName`='boss_krik_thir' WHERE `entry`=28684; +UPDATE creature_template SET `ScriptName`='npc_skittering_infector' WHERE `entry`=28736; +UPDATE creature_template SET `ScriptName`='npc_anub_ar_skirmisher' WHERE `entry`=28734; +UPDATE creature_template SET `ScriptName`='npc_anub_ar_shadowcaster' WHERE `entry`=28733; + +-- Halls of Stone +-- scripts +UPDATE `instance_template` SET `script`='instance_halls_of_stone' WHERE `map`=599; +UPDATE `creature_template` SET `ScriptName`='boss_krystallus' WHERE `entry`=27977; +UPDATE `creature_template` SET `ScriptName`='boss_sjonnir' WHERE `entry`=27978; +UPDATE `creature_template` SET `ScriptName`='mob_tribuna_controller' WHERE `entry`=28234; +UPDATE `creature_template` SET `ScriptName`='npc_brann_hos' WHERE `entry`=28070; +-- waypoints +DELETE FROM script_waypoint WHERE `entry`=28070; +INSERT INTO script_waypoint VALUES + (28070, 0, 1053.789795, 476.639343, 207.744, 0, ''), + (28070, 1, 1032.293945, 467.623444, 207.736, 0, ''), + (28070, 2, 1017.908752, 454.765656, 207.719, 0, ''), + (28070, 3, 1004.810120, 441.305115, 207.373, 0, ''), + (28070, 4, 988.694214, 424.422485, 207.425, 0, ''), + (28070, 5, 984.816345, 422.177917, 205.994, 0, ''), + (28070, 6, 977.204468, 420.026917, 205.994, 0, ''), + (28070, 7, 962.388123, 421.983307, 205.994, 0, ''), + (28070, 8, 950.419556, 416.515198, 205.994, 0, ''), + (28070, 9, 943.972290, 403.071228, 205.994, 0, ''), + (28070, 10, 947.921936, 387.683563, 205.994, 0, ''), + (28070, 11, 946.554749, 383.270782, 205.994, 0, ''), + (28070, 12, 944.654724, 380.630859, 207.286, 0, ''), + (28070, 13, 941.101563, 377.373413, 207.421, 0, 'reach tribunal, set pause'), + (28070, 14, 935.217896, 370.557343, 207.421, 0, ''), + (28070, 15, 928.035950, 363.026733, 204.018, 0, ''), + (28070, 16, 909.287292, 344.392792, 203.706, 0, ''), + (28070, 17, 897.946838, 333.634735, 203.706, 0, 'reach panel'), + (28070, 18, 918.914429, 351.312866, 203.706, 0, 'reach floor disc (end event begin)'), + (28070, 19, 928.070068, 363.296326, 204.091, 0, 'stealth'), + (28070, 20, 934.817627, 370.136261, 207.421, 0, ''), + (28070, 21, 941.501465, 377.254456, 207.421, 0, ''); +-- texts +DELETE FROM `script_texts` WHERE `npc_entry` IN (27977,27978,28070); +INSERT INTO `script_texts` (`npc_entry`,`entry`,`content_default`,`content_loc1`,`content_loc2`,`content_loc3`,`content_loc4`,`content_loc5`,`content_loc6`,`content_loc7`,`content_loc8`,`sound`,`type`,`language`,`emote`,`comment`) VALUES +/* Krystallus */ + (27977,-1603007,'Crush....',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,14176,1,0,0,'krystallus SAY_AGGRO'), + (27977,-1603008,'Ha...ha...ha...ha...',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,14177,1,0,0,'krystallus SAY_KILL'), + (27977,-1603009,'Uuuuhhhhhhhhhh......',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,14179,1,0,0,'krystallus SAY_DEATH'), + (27977,-1603010,'Break.... you....',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,14178,1,0,0,'krystallus SAY_SHATTER'), +/* Sjonnir */ + (27978,-1603011,'Soft, vulnerable shells. Brief, fragile lives. You can not escape the curse of flesh!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,1,0,0,'Sjonnir SAY_AGGRO'), + (27978,-1603012,'Flesh is no match for iron!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,1,0,0,'Sjonnir SAY_SLAY_1'), + (27978,-1603013,'Armies of iron will smother the world!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,1,0,0,'Sjonnir SAY_SLAY_2'), + (27978,-1603015,'Loken will not rest, until the forge is retaken. You changed nothing!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,1,0,0,'Sjonnir SAY_DEATH'), + (28070,-1603012,'Now that''s owning your supper!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,14244,1,0,0,'brann SAY_KILL_1'), + (28070,-1603013,'Press on, that''s the way!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,14245,1,0,0,'brann SAY_KILL_2'), + (28070,-1603014,'Keep it up now. Plenty of death-dealing for everyone!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,14246,1,0,0,'brann SAY_KILL_3'), + (28070,-1603015,'I''m all kinds of busted up. Might not... make it...',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,14257,1,0,0,'brann SAY_LOW_HEALTH'), + (28070,-1603016,'Not yet, not... yet-',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,14258,1,0,0,'brann SAY_DEATH'), + (28070,-1603017,'I''m doing everything I can!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,14260,1,0,0,'brann SAY_PLAYER_DEATH_1'), + (28070,-1603018,'Light preserve you!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,14261,1,0,0,'brann SAY_PLAYER_DEATH_2'), + (28070,-1603019,'I hope this is all worth it!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,14262,1,0,0,'brann SAY_PLAYER_DEATH_3'), + (28070,-1603020,'Time to get some answers! Let''s get this show on the road!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,14259,1,0,0,'brann SAY_ESCORT_START'), + (28070,-1603021,'Don''t worry. Old Brann has got your back. Keep that metal monstrosity busy and I''ll see if I can sweet talk this machine into helping you.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,14274,1,0,0,'brann SAY_SPAWN_DWARF'), + (28070,-1603022,'This is a wee bit trickier that before... Oh, bloody--incomin''!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,14275,1,0,0,'brann SAY_SPAWN_TROGG'), + (28070,-1603023,'What in the name o'' Madoran did THAT do? Oh! Wait: I just about got it...',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,14276,1,0,0,'brann SAY_SPAWN_OOZE'), + (28070,-1603024,'Ha, that did it. Help''s a-coming. Take this you glow-eying brute!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,14277,1,0,0,'brann SAY_SPAWN_EARTHEN'), + (28070,-1603025,'Take a moment and relish this with me! Soon all will be revealed! Okay then, let''s do this!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,14247,1,0,0,'brann SAY_EVENT_INTRO_1'), + (28070,-1603026,'Now keep an eye out! I''ll have this licked in two shakes of a--',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,14248,1,0,0,'brann SAY_EVENT_INTRO_2'), + (28070,-1603027,'Warning! Life form pattern not recognized. Archival processing terminated. Continued interference will result in targeted response.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,13765,1,0,0,'brann SAY_EVENT_INTRO_3_ABED'), + (28070,-1603028,'Oh, that doesn''t sound good. We might have a complication or two...',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,14249,1,0,0,'brann SAY_EVENT_A_1'), + (28070,-1603029,'Security breach in progress. Analysis of historical archives transferred to lower priority queue. Countermeasures engaged.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,13756,1,0,0,'brann SAY_EVENT_A_2_KADD'), + (28070,-1603030,'Ah, you want to play hardball, eh? That''s just my game!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,14250,1,0,0,'brann SAY_EVENT_A_3'), + (28070,-1603031,'Couple more minutes and I''ll--',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,14251,1,0,0,'brann SAY_EVENT_B_1'), + (28070,-1603032,'Threat index threshold exceeded. Celestial archive aborted. Security level heightened.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,13761,1,0,0,'brann SAY_EVENT_B_2_MARN'), + (28070,-1603033,'Heightened? What''s the good news?',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,14252,1,0,0,'brann SAY_EVENT_B_3'), + (28070,-1603034,'So that was the problem? Now I''m makin'' progress...',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,14253,1,0,0,'brann SAY_EVENT_C_1'), + (28070,-1603035,'Critical threat index. Void analysis diverted. Initiating sanitization protocol.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,13767,1,0,0,'brann SAY_EVENT_C_2_ABED'), + (28070,-1603036,'Hang on! Nobody''s gonna'' be sanitized as long as I have a say in it!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,14254,1,0,0,'brann SAY_EVENT_C_3'), + (28070,-1603037,'Ha! The old magic fingers finally won through! Now let''s get down to-',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,14255,1,0,0,'brann SAY_EVENT_D_1'), + (28070,-1603038,'Alert! Security fail safes deactivated. Beginning memory purge...',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,13768,1,0,0,'brann SAY_EVENT_D_2_ABED'), + (28070,-1603039,'Purge? No no no no no! Where did I-- Aha, this should do the trick...',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,14256,1,0,0,'brann SAY_EVENT_D_3'), + (28070,-1603040,'System online. Life form pattern recognized. Welcome Branbronzan. Query?',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,13769,1,0,0,'brann SAY_EVENT_D_4_ABED'), + (28070,-1603041,'Query? What do you think I�m here for? Tea and biscuits? Spill the beans already!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,14263,1,0,0,'brann SAY_EVENT_END_01'), + (28070,-1603042,'Tell me how that dwarfs came to be! And start at the beginning!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,14264,1,0,0,'brann SAY_EVENT_END_02'), + (28070,-1603043,'Accessing prehistoric data. Retrieved. In the beginning Earthen were created to-',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,13770,1,0,0,'brann SAY_EVENT_END_03_ABED'), + (28070,-1603044,'Right, right! I know that the Earthen were made of stone to shape the deep reaches of the world but what about the anomalies? Matrix non-stabilizing and whatnot.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,14265,1,0,0,'brann SAY_EVENT_END_04'), + (28070,-1603045,'Accessing. In the early stages of its development cycle Azeroth suffered infection by parasitic, necrophotic symbiotes.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,13771,1,0,0,'brann SAY_EVENT_END_05_ABED'), + (28070,-1603046,'Necro-what? Speak bloody common will ya?',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,14266,1,0,0,'brann SAY_EVENT_END_06'), + (28070,-1603047,'Designation: Old Gods. Old Gods rendered all systems, including Earthen defenseless in order to facilitate assimilation. This matrix destabilization has been termed the Curse of Flesh. Effects of destabilization increased over time.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,13772,1,0,0,'brann SAY_EVENT_END_07_ABED'), + (28070,-1603048,'Old Gods eh? So they zapped the Earthen with this Curse of Flesh. And then what?',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,14267,1,0,0,'brann SAY_EVENT_END_08'), + (28070,-1603049,'Accessing. Creators arrived to extirpate symbiotic infection. Assessment revealed that Old God infestation had grown malignant. Excising parasites would result in loss of host.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,13757,1,0,0,'brann SAY_EVENT_END_09_KADD'), + (28070,-1603050,'If they killed the Old Gods Azeroth would have been destroyed.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,14268,1,0,0,'brann SAY_EVENT_END_10'), + (28070,-1603051,'Correct. Creators neutralized parasitic threat and contained it within the host. Forge of Wills and other systems were instituted to create new Earthen. Safeguards were implemented and protectors were appointed.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,13758,1,0,0,'brann SAY_EVENT_END_11_KADD'), + (28070,-1603052,'What protectors?',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,14269,1,0,0,'brann SAY_EVENT_END_12'), + (28070,-1603053,'Designations: Aesir and Vanir or in common nomenclator Storm and Earth Giants. Sentinel Loken designated supreme. Dragon Aspects appointed to monitor evolution of Azeroth.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,13759,1,0,0,'brann SAY_EVENT_END_13_KADD'), + (28070,-1603054,'Aesir and Vanir. Okay. So the Forge of Wills started to make new Earthen. But what happened to the old ones?',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,14270,1,0,0,'brann SAY_EVENT_END_14'), + (28070,-1603055,'Additional background is relevant to your query. Following global combat between-',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,13762,1,0,0,'brann SAY_EVENT_END_15_MARN'), + (28070,-1603056,'Hold everything! The Aesir and Vanir went to war? Why?',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,14271,1,0,0,'brann SAY_EVENT_END_16'), + (28070,-1603057,'Unknown. Data suggests that impetus for global combat originated with prime designate Loken who neutralized all remaining Aesir and Vanir affecting termination of conflict. Prime designate Loken then initiated stasis of several seed races including Earthen, Giant and Vrykul at designated holding facilities.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,13763,1,0,0,'brann SAY_EVENT_END_17_MARN'), + (28070,-1603058,'This Loken sounds like a nasty character. Glad we don�t have to worry about the likes of him anymore. So if I�m understanding you lads the original Earthen eventually woke up from this statis. And by that time this destabily-whatever had turned them into our brother dwarfs. Or at least dwarf ancestors. Hm?',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,14272,1,0,0,'brann SAY_EVENT_END_18'), + (28070,-1603059,'Essentially that is correct.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,13764,1,0,0,'brann SAY_EVENT_END_19_MARN'), + (28070,-1603060,'Well now. That�s a lot to digest. I�m gonna need some time to take all of this in. Thank you!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,14273,1,0,0,'brann SAY_EVENT_END_20'), + (28070,-1603061,'Acknowledged Branbronzan. Session terminated.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,13773,1,0,0,'brann SAY_EVENT_END_21_ABED'), + (28070,-1603062,'Loken?! That''s downright bothersome... We might''ve neutralized the iron dwarves, but I''d lay odds there''s another machine somewhere else churnin'' out a whole mess o'' these iron vrykul!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,14278,1,0,0,'brann SAY_VICTORY_SJONNIR_1'), + (28070,-1603063,'I''ll use the forge to make badtches o'' earthen to stand guard... But our greatest challenge still remains: find and stop Loken!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,14279,1,0,0,'brann SAY_VICTORY_SJONNIR_2'), + (28070,-1603064,'I think it''s time to see what''s behind the door near the entrance. I''m going to sneak over there, nice and quiet. Meet me at the door and I''ll get us in.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,1,0,0,'brann SAY_ENTRANCE_MEET'), diff --git a/src/bindings/scripts/CMakeLists.txt b/src/bindings/scripts/CMakeLists.txt index 7f718f7c582..7aed9945245 100644 --- a/src/bindings/scripts/CMakeLists.txt +++ b/src/bindings/scripts/CMakeLists.txt @@ -359,6 +359,7 @@ SET(trinityscript_LIB_SRCS scripts/northrend/ulduar/halls_of_stone/boss_krystallus.cpp scripts/northrend/ulduar/halls_of_stone/boss_sjonnir.cpp scripts/northrend/ulduar/halls_of_stone/def_halls_of_stone.h + scripts/northrend/ulduar/halls_of_stone/halls_of_stone.cpp scripts/northrend/ulduar/halls_of_lightning/instance_halls_of_lightning.cpp scripts/northrend/ulduar/halls_of_lightning/boss_bjarngrim.cpp scripts/northrend/ulduar/halls_of_lightning/boss_ionar.cpp diff --git a/src/bindings/scripts/scripts/northrend/azjol_nerub/azjol_nerub/boss_krikthir_the_gatewatcher.cpp b/src/bindings/scripts/scripts/northrend/azjol_nerub/azjol_nerub/boss_krikthir_the_gatewatcher.cpp index 358575fe3db..536addeace4 100644 --- a/src/bindings/scripts/scripts/northrend/azjol_nerub/azjol_nerub/boss_krikthir_the_gatewatcher.cpp +++ b/src/bindings/scripts/scripts/northrend/azjol_nerub/azjol_nerub/boss_krikthir_the_gatewatcher.cpp @@ -63,7 +63,35 @@ enum Yells SAY_SWARM_2 = -1601008, SAY_PREFIGHT_1 = -1601009, SAY_PREFIGHT_2 = -1601010, - SAY_PREFIGHT_3 = -1601011 + SAY_PREFIGHT_3 = -1601011, + + //npc spells + + H_SPELL_ACID_SPLASH = 59363, + SPELL_ACID_SPLASH = 52446, + + SPELL_CHARGE = 16979,//maybe is another spell + SPELL_BACKSTAB = 52540, + + SPELL_SHADOW_BOLT = 52534, + H_SPELL_SHADOW_BOLT = 59357, + SPELL_SHADOW_NOVA = 52535, + H_SPELL_SHADOW_NOVA = 59358, + + SPELL_STRIKE = 52532, + SPELL_CLEAVE = 49806, + + SPELL_ENRAGE = 52470, + + SPELL_INFECTED_BITE = 52469, + H_SPELL_INFECTED_BITE = 59364, + SPELL_WEB_WRAP = 52086,//the spell is not working propperly + + SPELL_BLINDING_WEBS = 52524, + H_SPELL_BLINDING_WEBS = 59365, + + SPELL_POSION_SPRAY = 52493, + H_SPELL_POSION_SPRAY = 59366, }; @@ -173,7 +201,11 @@ struct TRINITY_DLL_DECL boss_krik_thirAI : public ScriptedAI if (victim == m_creature) return; - DoScriptText(RAND(SAY_SLAY_1,SAY_SLAY_2), m_creature); + switch (rand()%2) + { + case 0: DoScriptText(SAY_SLAY_1, m_creature); break; + case 1: DoScriptText(SAY_SLAY_1, m_creature); break; + } } void JustSummoned(Creature* summoned) @@ -183,11 +215,338 @@ struct TRINITY_DLL_DECL boss_krik_thirAI : public ScriptedAI } }; +struct TRINITY_DLL_DECL npc_skittering_infectorAI : public ScriptedAI +{ + npc_skittering_infectorAI(Creature *c) : ScriptedAI(c) {} + + void JustDied(Unit* killer) + { //The spell is not working propperly + DoCast(m_creature->getVictim(),HeroicMode ? H_SPELL_ACID_SPLASH : SPELL_ACID_SPLASH,true); + } + +}; + +struct TRINITY_DLL_DECL npc_anub_ar_skirmisherAI : public ScriptedAI +{ + npc_anub_ar_skirmisherAI(Creature *c) : ScriptedAI(c) {} + + uint32 ChargeTimer; + uint32 BackstabTimer; + + void Reset() + { + ChargeTimer = 15000; + BackstabTimer = 7000; + } + + void UpdateAI(const uint32 diff) + { + if (!UpdateVictim()) + return; + + if(ChargeTimer < diff) + { + Unit *target = SelectUnit(SELECT_TARGET_RANDOM,0); + while (target && target->GetTypeId() != TYPEID_PLAYER) + target = SelectUnit(SELECT_TARGET_RANDOM,0); + if (target) + { + DoResetThreat(); + m_creature->AddThreat(target,1.0f); + DoCast(target,SPELL_CHARGE,true); + } + + ChargeTimer = 15000; + }else ChargeTimer -= diff; + + if(BackstabTimer < diff) + { + DoCast(m_creature->getVictim(),SPELL_BACKSTAB); + + BackstabTimer = 7000; + }else BackstabTimer -= diff; + + DoMeleeAttackIfReady(); + + } +}; + +struct TRINITY_DLL_DECL npc_anub_ar_shadowcasterAI : public ScriptedAI +{ + npc_anub_ar_shadowcasterAI(Creature *c) : ScriptedAI(c) {} + + uint32 ShadowBoltTimer; + uint32 ShadowNovaTimer; + + void Reset() + { + ShadowBoltTimer = 6000; + ShadowNovaTimer = 20000; + } + + void UpdateAI(const uint32 diff) + { + if (!UpdateVictim()) + return; + + if(ShadowBoltTimer < diff) + { + Unit *target = SelectUnit(SELECT_TARGET_RANDOM,0); + while (target && target->GetTypeId() != TYPEID_PLAYER) + target = SelectUnit(SELECT_TARGET_RANDOM,0); + + if (target) + DoCast(target, HeroicMode ? H_SPELL_SHADOW_BOLT : SPELL_SHADOW_BOLT,true); + + ShadowBoltTimer = 6000; + }else ShadowBoltTimer -= diff; + + if(ShadowNovaTimer < diff) + { + + DoCast(m_creature->getVictim(), HeroicMode ? H_SPELL_SHADOW_NOVA : SPELL_SHADOW_NOVA,true); + + ShadowNovaTimer = 20000; + }else ShadowNovaTimer -= diff; + + DoMeleeAttackIfReady(); + } +}; + +struct TRINITY_DLL_DECL npc_anub_ar_warriorAI : public ScriptedAI +{ + npc_anub_ar_warriorAI(Creature *c) : ScriptedAI(c){} + + uint32 CleaveTimer; + uint32 StrikeTimer; + + void Reset() + { + CleaveTimer = 15000; + StrikeTimer = 6000; + } + + void UpdateAI(const uint32 diff) + { + if (!UpdateVictim()) + return; + + if(StrikeTimer < diff) + { + + m_creature->CastSpell(m_creature->getVictim(),SPELL_STRIKE,true); + + StrikeTimer = 6000; + }else StrikeTimer -= diff; + + if(CleaveTimer < diff) + { + + m_creature->CastSpell(m_creature->getVictim(), SPELL_CLEAVE ,true); + + CleaveTimer = 15000; + }else CleaveTimer -= diff; + + DoMeleeAttackIfReady(); + + } + +}; + +struct TRINITY_DLL_DECL npc_watcher_gashraAI : public ScriptedAI +{ + npc_watcher_gashraAI(Creature *c) : ScriptedAI(c) {} + + uint32 WebWrapTimer; + uint32 InfectedBiteTimer; + + void Reset() + { + WebWrapTimer = 12000; + InfectedBiteTimer = 5000; + } + + + void EnterCombat(Unit* who) + { + + m_creature->CastSpell(m_creature,SPELL_ENRAGE,true); + + } + + void UpdateAI(const uint32 diff) + { + if (!UpdateVictim()) + return; + + if(WebWrapTimer < diff) + { + Unit *target = SelectUnit(SELECT_TARGET_RANDOM,0); + while (target && target->GetTypeId() != TYPEID_PLAYER) + target = SelectUnit(SELECT_TARGET_RANDOM,0); + if (target) + m_creature->CastSpell(target, SPELL_WEB_WRAP,true); + + WebWrapTimer = 15000; + }else WebWrapTimer -= diff; + + if(InfectedBiteTimer < diff) + { + + DoCast(m_creature->getVictim(), HeroicMode ? H_SPELL_INFECTED_BITE : SPELL_INFECTED_BITE,true); + + InfectedBiteTimer = 6000; + }else InfectedBiteTimer -= diff; + + DoMeleeAttackIfReady(); + } +}; + +struct TRINITY_DLL_DECL npc_watcher_narjilAI : public ScriptedAI +{ + npc_watcher_narjilAI(Creature *c) : ScriptedAI(c) {} + + uint32 WebWrapTimer; + uint32 InfectedBiteTimer; + uint32 BlindingWebsTimer; + + void Reset() + { + WebWrapTimer = 16000; + InfectedBiteTimer = 12000; + BlindingWebsTimer = 10000; + } + + void UpdateAI(const uint32 diff) + { + if (!UpdateVictim()) + return; + + if(WebWrapTimer < diff) + { + Unit *target = SelectUnit(SELECT_TARGET_RANDOM,0); + while (target && target->GetTypeId() != TYPEID_PLAYER) + target = SelectUnit(SELECT_TARGET_RANDOM,0); + if (target) + DoCast(target, SPELL_WEB_WRAP,true); + + WebWrapTimer = 16000; + }else WebWrapTimer -= diff; + + if(InfectedBiteTimer < diff) + { + + DoCast(m_creature->getVictim(), HeroicMode ? H_SPELL_INFECTED_BITE : SPELL_INFECTED_BITE,true); + + InfectedBiteTimer = 12000; + }else InfectedBiteTimer -= diff; + + if(BlindingWebsTimer < diff) + { + + DoCast(m_creature->getVictim(), HeroicMode ? H_SPELL_BLINDING_WEBS : SPELL_BLINDING_WEBS, true); + + BlindingWebsTimer = 10000; + }else BlindingWebsTimer -= diff; + + DoMeleeAttackIfReady(); + } +}; + +struct TRINITY_DLL_DECL npc_watcher_silthikAI : public ScriptedAI +{ + npc_watcher_silthikAI(Creature *c) : ScriptedAI(c) {} + + uint32 WebWrapTimer; + uint32 InfectedBiteTimer; + uint32 PosionSprayTimer; + + void Reset() + { + WebWrapTimer = 12000; + InfectedBiteTimer = 8000; + PosionSprayTimer = 5000; + } + + + void UpdateAI(const uint32 diff) + { + if (!UpdateVictim()) + return; + + if(WebWrapTimer < diff) + { + Unit *target = SelectUnit(SELECT_TARGET_RANDOM,0); + while (target && target->GetTypeId() != TYPEID_PLAYER) + target = SelectUnit(SELECT_TARGET_RANDOM,0); + if (target) + DoCast(target, SPELL_WEB_WRAP,true); + + WebWrapTimer = 12000; + }else WebWrapTimer -= diff; + + if(InfectedBiteTimer < diff) + { + + DoCast(m_creature->getVictim(), HeroicMode ? H_SPELL_INFECTED_BITE : SPELL_INFECTED_BITE,true); + + InfectedBiteTimer = 8000; + }else InfectedBiteTimer -= diff; + + if(PosionSprayTimer < diff) + { + + DoCast(m_creature->getVictim(), HeroicMode ? H_SPELL_POSION_SPRAY : SPELL_POSION_SPRAY ,true); + + PosionSprayTimer = 5000; + }else PosionSprayTimer -= diff; + + DoMeleeAttackIfReady(); + + } +}; + CreatureAI* GetAI_boss_krik_thir(Creature* pCreature) { return new boss_krik_thirAI (pCreature); } +CreatureAI* GetAI_npc_anub_ar_skirmisher (Creature* pCreature) +{ + return new npc_anub_ar_skirmisherAI (pCreature); +} + +CreatureAI* GetAI_npc_skittering_infector (Creature* pCreature) +{ + return new npc_skittering_infectorAI (pCreature); +} + +CreatureAI* GetAI_npc_anub_ar_shadowcaster (Creature* pCreature) +{ + return new npc_anub_ar_shadowcasterAI (pCreature); +} + +CreatureAI* GetAI_npc_anub_ar_warrior (Creature* pCreature) +{ + return new npc_anub_ar_warriorAI (pCreature); +} + +CreatureAI* GetAI_npc_watcher_gashra (Creature* pCreature) +{ + return new npc_watcher_gashraAI (pCreature); +} + +CreatureAI* GetAI_npc_watcher_narjil (Creature* pCreature) +{ + return new npc_watcher_narjilAI (pCreature); +} + +CreatureAI* GetAI_npc_watcher_silthik (Creature* pCreature) +{ + return new npc_watcher_silthikAI (pCreature); +} + + void AddSC_boss_krik_thir() { Script *newscript; @@ -196,4 +555,39 @@ void AddSC_boss_krik_thir() newscript->Name="boss_krik_thir"; newscript->GetAI = &GetAI_boss_krik_thir; newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name="npc_skittering_infector"; + newscript->GetAI = &GetAI_npc_skittering_infector; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name="npc_anub_ar_skirmisher"; + newscript->GetAI = &GetAI_npc_anub_ar_skirmisher; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name="npc_anub_ar_shadowcaster"; + newscript->GetAI = &GetAI_npc_anub_ar_shadowcaster; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name="npc_watcher_gashra"; + newscript->GetAI = &GetAI_npc_watcher_gashra; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name="npc_anub_ar_warrior"; + newscript->GetAI = &GetAI_npc_anub_ar_warrior; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name="npc_watcher_silthik"; + newscript->GetAI = &GetAI_npc_watcher_silthik; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name="npc_watcher_narjil"; + newscript->GetAI = &GetAI_npc_watcher_narjil; + newscript->RegisterSelf(); } diff --git a/src/bindings/scripts/scripts/northrend/azjol_nerub/azjol_nerub/instance_azjol_nerub.cpp b/src/bindings/scripts/scripts/northrend/azjol_nerub/azjol_nerub/instance_azjol_nerub.cpp index bac772acc6f..5a2159345e5 100644 --- a/src/bindings/scripts/scripts/northrend/azjol_nerub/azjol_nerub/instance_azjol_nerub.cpp +++ b/src/bindings/scripts/scripts/northrend/azjol_nerub/azjol_nerub/instance_azjol_nerub.cpp @@ -41,6 +41,8 @@ struct TRINITY_DLL_DECL instance_azjol_nerub : public ScriptedInstance uint64 m_uiKrikthir; uint64 m_uiHadronox; uint64 m_uiAnubarak; + + uint64 m_uiKrikthirDoor; uint32 m_auiEncounter[MAX_ENCOUNTER]; @@ -51,6 +53,7 @@ struct TRINITY_DLL_DECL instance_azjol_nerub : public ScriptedInstance m_uiKrikthir = 0; m_uiHadronox = 0; m_uiAnubarak =0; + m_uiKrikthirDoor = 0; } bool IsEncounterInProgress() const @@ -72,6 +75,18 @@ struct TRINITY_DLL_DECL instance_azjol_nerub : public ScriptedInstance } } + + void OnGameObjectCreate(GameObject* pGo, bool add) + { + switch (pGo->GetEntry()) + { + case 192395: + m_uiKrikthirDoor = pGo->GetGUID(); + if (m_auiEncounter[0] == DONE) + HandleGameObject(NULL,true,pGo); + break; + } + } uint64 GetData64(uint32 identifier) { @@ -90,7 +105,10 @@ struct TRINITY_DLL_DECL instance_azjol_nerub : public ScriptedInstance switch(type) { case DATA_KRIKTHIR_THE_GATEWATCHER_EVENT: - m_auiEncounter[0] = data;break; + m_auiEncounter[0] = data; + if (data == DONE) + HandleGameObject(m_uiKrikthirDoor,true); + break; case DATA_HADRONOX_EVENT: m_auiEncounter[1] = data; break; case DATA_ANUBARAK_EVENT: diff --git a/src/bindings/scripts/scripts/northrend/ulduar/halls_of_stone/boss_krystallus.cpp b/src/bindings/scripts/scripts/northrend/ulduar/halls_of_stone/boss_krystallus.cpp index 35f10fee50c..3ca96886189 100644 --- a/src/bindings/scripts/scripts/northrend/ulduar/halls_of_stone/boss_krystallus.cpp +++ b/src/bindings/scripts/scripts/northrend/ulduar/halls_of_stone/boss_krystallus.cpp @@ -10,46 +10,126 @@ Script Data End */ update creature_template set scriptname = 'boss_krystallus' where entry = ''; *** SQL END ***/ #include "precompiled.h" +#include "def_halls_of_stone.h" -//Spells -#define SPELL_BOULDER_TOSS 50843 -#define SPELL_BOULDER_TOSS_2 59742 -#define SPELL_GROUND_SPIKE 59750 -#define SPELL_SHATTER 50810 -#define SPELL_SHATTER_2 61546 -#define SPELL_STOMP 48131 -#define SPELL_STOMP_2 59744 +enum Spells +{ + SPELL_BOULDER_TOSS = 50843, + H_SPELL_BOULDER_TOSS = 59742, + SPELL_GROUND_SPIKE = 59750, + SPELL_GROUND_SLAM = 50827, + SPELL_SHATTER = 50810, + H_SPELL_SHATTER = 61546, + SPELL_STOMP = 48131, + H_SPELL_STOMP = 59744 +}; -//not in db -//Yell -#define SAY_AGGRO -1599000 -#define SAY_KILL -1599001 -#define SAY_DEATH -1599002 -#define SAY_SHATTER -1599003 +enum Yells +{ + SAY_AGGRO = -1603007, + SAY_KILL = -1603008, + SAY_DEATH = -1603009, + SAY_SHATTER = -1603010 +}; struct TRINITY_DLL_DECL boss_krystallusAI : public ScriptedAI { - boss_krystallusAI(Creature *c) : ScriptedAI(c) {} + boss_krystallusAI(Creature *c) : ScriptedAI(c) + { + pInstance = c->GetInstanceData(); + } + + uint32 uiBoulderTossTimer; + uint32 uiGroundSpikeTimer; + uint32 uiGroundSlamTimer; + uint32 uiShatterTimer; + uint32 uiStompTimer; + + bool bIsSlam; + + ScriptedInstance* pInstance; - void Reset() {} + void Reset() + { + bIsSlam = false; + + uiBoulderTossTimer = 3000 + rand()%6000; + uiGroundSpikeTimer = 9000 + rand()%5000; + uiGroundSlamTimer = 15000 + rand()%3000; + uiStompTimer = 20000 + rand()%9000; + uiShatterTimer = 0; + + if (pInstance) + pInstance->SetData(DATA_KRYSTALLUS_EVENT, NOT_STARTED); + } void EnterCombat(Unit* who) { DoScriptText(SAY_AGGRO, m_creature); + + if (pInstance) + pInstance->SetData(DATA_KRYSTALLUS_EVENT, IN_PROGRESS); } - void AttackStart(Unit* who) {} - void MoveInLineOfSight(Unit* who) {} + void UpdateAI(const uint32 diff) { //Return since we have no target if (!UpdateVictim()) return; + + if (uiBoulderTossTimer < diff) + { + Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0); + while (pTarget && pTarget->GetTypeId() != TYPEID_PLAYER) + pTarget = SelectUnit(SELECT_TARGET_RANDOM,0); + if (pTarget) + DoCast(pTarget, HeroicMode ? H_SPELL_BOULDER_TOSS : SPELL_BOULDER_TOSS); + uiBoulderTossTimer = 9000 + rand()%6000; + } else uiBoulderTossTimer -= diff; + + if (uiGroundSpikeTimer < diff) + { + Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0); + while (pTarget && pTarget->GetTypeId() != TYPEID_PLAYER) + pTarget = SelectUnit(SELECT_TARGET_RANDOM,0); + if (pTarget) + DoCast(pTarget, SPELL_GROUND_SPIKE); + uiBoulderTossTimer = 12000 + rand()%5000; + } else uiGroundSpikeTimer < diff; + + if (uiStompTimer < diff) + { + DoCast(m_creature, HeroicMode ? H_SPELL_STOMP : SPELL_STOMP); + uiStompTimer = 20000 + rand()%9000; + } else uiStompTimer -= diff; + + if (uiGroundSlamTimer < diff) + { + DoCast(m_creature, SPELL_GROUND_SLAM); + bIsSlam = true; + uiShatterTimer = 10000; + uiGroundSlamTimer = 15000 + rand()%3000; + } else uiGroundSlamTimer -= diff; + + if (bIsSlam) + { + if(uiShatterTimer < diff) + { + DoCast(m_creature, HeroicMode ? H_SPELL_SHATTER : SPELL_SHATTER); + bIsSlam = false; + } else uiShatterTimer -= diff; + } DoMeleeAttackIfReady(); } + void JustDied(Unit* killer) { DoScriptText(SAY_DEATH, m_creature); + + if (pInstance) + pInstance->SetData(DATA_KRYSTALLUS_EVENT, DONE); } + void KilledUnit(Unit *victim) { if (victim == m_creature) diff --git a/src/bindings/scripts/scripts/northrend/ulduar/halls_of_stone/boss_maiden_of_grief.cpp b/src/bindings/scripts/scripts/northrend/ulduar/halls_of_stone/boss_maiden_of_grief.cpp index 50462a4666c..01664ee0090 100644 --- a/src/bindings/scripts/scripts/northrend/ulduar/halls_of_stone/boss_maiden_of_grief.cpp +++ b/src/bindings/scripts/scripts/northrend/ulduar/halls_of_stone/boss_maiden_of_grief.cpp @@ -10,24 +10,29 @@ Script Data End */ update creature_template set scriptname = 'boss_maiden_of_grief' where entry = ''; *** SQL END ***/ #include "precompiled.h" +#include "def_halls_of_stone.h" -//Spell -#define SPELL_PARTING_SORROW 59723 -#define SPELL_STORM_OF_GRIEF_N 50752 -#define SPELL_STORM_OF_GRIEF_H 59772 -#define SPELL_SHOCK_OF_SORROW_N 50760 -#define SPELL_SHOCK_OF_SORROW_H 59726 -#define SPELL_PILLAR_OF_WOE_N 50761 -#define SPELL_PILLAR_OF_WOE_H 59727 - -//Yell -#define SAY_AGGRO -1603000 -#define SAY_SLAY_1 -1603001 -#define SAY_SLAY_2 -1603002 -#define SAY_SLAY_3 -1603003 -#define SAY_SLAY_4 -1603004 -#define SAY_DEATH -1603005 -#define SAY_STUN -1603006 +enum Spells +{ + SPELL_PARTING_SORROW = 59723, + SPELL_STORM_OF_GRIEF_N = 50752, + SPELL_STORM_OF_GRIEF_H = 59772, + SPELL_SHOCK_OF_SORROW_N = 50760, + SPELL_SHOCK_OF_SORROW_H = 59726, + SPELL_PILLAR_OF_WOE_N = 50761, + SPELL_PILLAR_OF_WOE_H = 59727 +}; + +enum Yells +{ + SAY_AGGRO = -1603000, + SAY_SLAY_1 = -1603001, + SAY_SLAY_2 = -1603002, + SAY_SLAY_3 = -1603003, + SAY_SLAY_4 = -1603004, + SAY_DEATH = -1603005, + SAY_STUN = -1603006 +}; struct TRINITY_DLL_DECL boss_maiden_of_griefAI : public ScriptedAI { @@ -52,14 +57,16 @@ struct TRINITY_DLL_DECL boss_maiden_of_griefAI : public ScriptedAI ShockOfSorrowTimer = 20000+rand()%5000; PillarOfWoeTimer = 5000 + rand()%10000; - //Missing support for instance data (and door?) + if (pInstance) + pInstance->SetData(DATA_MAIDEN_OF_GRIEF_EVENT, NOT_STARTED); } void EnterCombat(Unit* who) { DoScriptText(SAY_AGGRO, m_creature); - //Missing support for instance data (and door?) + if (pInstance) + pInstance->SetData(DATA_MAIDEN_OF_GRIEF_EVENT, IN_PROGRESS); } void UpdateAI(const uint32 diff) @@ -113,7 +120,8 @@ struct TRINITY_DLL_DECL boss_maiden_of_griefAI : public ScriptedAI { DoScriptText(SAY_DEATH, m_creature); - //Missing support for instance data (and door?) + if (pInstance) + pInstance->SetData(DATA_MAIDEN_OF_GRIEF_EVENT, DONE); } void KilledUnit(Unit *victim) { diff --git a/src/bindings/scripts/scripts/northrend/ulduar/halls_of_stone/boss_sjonnir.cpp b/src/bindings/scripts/scripts/northrend/ulduar/halls_of_stone/boss_sjonnir.cpp index 181ebdc2d30..70f2fc41f6c 100644 --- a/src/bindings/scripts/scripts/northrend/ulduar/halls_of_stone/boss_sjonnir.cpp +++ b/src/bindings/scripts/scripts/northrend/ulduar/halls_of_stone/boss_sjonnir.cpp @@ -10,61 +10,172 @@ Script Data End */ update creature_template set scriptname = 'boss_sjonnir' where entry = ''; *** SQL END ***/ #include "precompiled.h" +#include "def_halls_of_stone.h" -//Spells -#define SPELL_LIGHTING_RING_1 50840 //Periodic Trigger (interval 2s) spell = 50841 -#define SPELL_LIGHTING_RING_2 51849 //Periodic Trigger (interval 2s) spell = 50841 -#define SPELL_LIGHTING_RING_2 59848 //Periodic Trigger (interval 2s) spell = 59849 -#define SPELL_LIGHTING_RING_3 59861 //Periodic Trigger (interval 2s) spell = 59849 -#define SPELL_STATIC_CHARGE_1 50834 //Periodic Trigger 2s interval, spell =50835 -#define SPELL_STATIC_CHARGE_2 59846 //Periodic Trigger 2s interval, spell =50847 -#define SPELL_CHAIN_LIGHTING_1 50830 -#define SPELL_CHAIN_LIGHTING_2 59844 -#define SPELL_LIGHTING_SHIELD_1 50831 -#define SPELL_LIGHTING_SHIELD_2 59845 -#define SPELL_FRENZY 28747 +enum Spells +{ + SPELL_LIGHTING_RING = 51849, //Periodic Trigger (interval 2s) spell = 50841 + H_SPELL_LIGHTING_RING = 59861, //Periodic Trigger (interval 2s) spell = 59849 + SPELL_LIGHTING_RING_1 = 50840, //Periodic Trigger (interval 2s) spell = 50841 + H_SPELL_LIGHTING_RING_1 = 59848, //Periodic Trigger (interval 2s) spell = 59849 + SPELL_STATIC_CHARGE = 50834, //Periodic Trigger 2s interval, spell =50835 + H_SPELL_STATIC_CHARGE = 59846, //Periodic Trigger 2s interval, spell =50847 + SPELL_CHAIN_LIGHTING = 50830, + H_SPELL_CHAIN_LIGHTING = 59844, + SPELL_LIGHTING_SHIELD = 50831, + H_SPELL_LIGHTING_SHIELD = 59845, + SPELL_FRENZY = 28747 +}; + +enum Yells +{ + SAY_AGGRO = -1603011, + SAY_SLAY_1 = -1603012, + SAY_SLAY_2 = -1603013, + SAY_SLAY_3 = -1603014, + SAY_DEATH = -1603015 +}; + +#define EMOTE_GENERIC_FRENZY -1000002 -//not in db -//Yell -#define SAY_AGGRO -1599011 -#define SAY_SLAY_1 -1599012 -#define SAY_SLAY_2 -1599013 -#define SAY_SLAY_3 -1599014 -#define SAY_DEATH -1599015 +enum Creatures +{ + CREATURE_FORGED_IRON_TROGG = 27979, + CREATURE_MALFORMED_OOZE = 27981, + CREATURE_FORGED_IRON_DWARF = 27982 +}; + +struct Locations +{ + float x, y, z; +}; + +static Locations PipeLocations[] = +{ + {1295.44, 734.07, 200.3}, //left + {1297.7, 595.6, 199.9} //right +}; struct TRINITY_DLL_DECL boss_sjonnirAI : public ScriptedAI { - boss_sjonnirAI(Creature *c) : ScriptedAI(c) {} + boss_sjonnirAI(Creature *c) : ScriptedAI(c) + { + pInstance = c->GetInstanceData(); + } + + bool bIsFrenzy; + + uint32 uiChainLightningTimer; + uint32 uiLightningShieldTimer; + uint32 uiStaticChargeTimer; + uint32 uiLightningRingTimer; + uint32 uiSummonTimer; + uint32 uiFrenzyTimer; + + ScriptedInstance* pInstance; - void Reset() {} + void Reset() + { + bIsFrenzy = false; + + uiChainLightningTimer = 3000 + rand()%5000; + uiLightningShieldTimer = 20000 + rand()%5000; + uiStaticChargeTimer = 20000 + rand()%5000; + uiLightningRingTimer = 30000 + rand()%5000; + uiSummonTimer = 5000; + uiFrenzyTimer = 300000; //5 minutes + + if (pInstance) + pInstance->SetData(DATA_SJONNIR_EVENT, NOT_STARTED); + } + void EnterCombat(Unit* who) { DoScriptText(SAY_AGGRO, m_creature); + + if (pInstance) + pInstance->SetData(DATA_SJONNIR_EVENT, IN_PROGRESS); } - void AttackStart(Unit* who) {} - void MoveInLineOfSight(Unit* who) {} + void UpdateAI(const uint32 diff) { //Return since we have no target if (!UpdateVictim()) return; + + if (uiChainLightningTimer < diff) + { + Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0); + while (pTarget && pTarget->GetTypeId() != TYPEID_PLAYER) + pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0); + if (pTarget) + DoCast(pTarget, HeroicMode ? H_SPELL_CHAIN_LIGHTING : SPELL_CHAIN_LIGHTING); + uiChainLightningTimer = 10000 + rand()%5000; + } else uiChainLightningTimer -= diff; + + if (uiLightningShieldTimer < diff) + { + DoCast(m_creature, HeroicMode ? H_SPELL_LIGHTING_SHIELD : SPELL_LIGHTING_SHIELD); + uiLightningShieldTimer -= diff; + } + + if (uiStaticChargeTimer < diff) + { + DoCast(m_creature->getVictim(), HeroicMode ? H_SPELL_STATIC_CHARGE : SPELL_STATIC_CHARGE); + uiStaticChargeTimer = 20000 + rand()%5000; + } uiStaticChargeTimer -= diff; + + if (uiLightningRingTimer < diff) + { + if (m_creature->IsNonMeleeSpellCasted(false)) + m_creature->InterruptNonMeleeSpells(false); + DoCast(m_creature, HeroicMode ? H_SPELL_LIGHTING_RING : SPELL_LIGHTING_RING); + uiLightningRingTimer = 30000 + rand()%5000; + } else uiLightningRingTimer -= diff; + + if (uiSummonTimer < diff) + { + uint32 uiSummonPipe = rand()%2; + m_creature->SummonCreature(RAND(CREATURE_FORGED_IRON_DWARF,CREATURE_FORGED_IRON_TROGG,CREATURE_MALFORMED_OOZE), + PipeLocations[uiSummonPipe].x, PipeLocations[uiSummonPipe].y, PipeLocations[uiSummonPipe].z, 0.0f, + TEMPSUMMON_CORPSE_TIMED_DESPAWN, 30000); + uiSummonTimer = 20000; + } else uiSummonTimer -= diff; + + if (!bIsFrenzy) + { + if (uiFrenzyTimer < diff) + { + DoCast(m_creature, SPELL_FRENZY); + bIsFrenzy = true; + } + else uiFrenzyTimer -= diff; + } DoMeleeAttackIfReady(); } + + void JustSummoned(Creature* summon) + { + Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0); + while (pTarget && pTarget->GetTypeId() != TYPEID_PLAYER) + pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0); + if (pTarget) + summon->AI()->AttackStart(pTarget); + } + void JustDied(Unit* killer) { DoScriptText(SAY_DEATH, m_creature); + + if (pInstance) + pInstance->SetData(DATA_SJONNIR_EVENT, DONE); } void KilledUnit(Unit *victim) { if (victim == m_creature) return; - switch(rand()%3) - { - case 0: DoScriptText(SAY_SLAY_1, m_creature);break; - case 1: DoScriptText(SAY_SLAY_2, m_creature);break; - case 2: DoScriptText(SAY_SLAY_3, m_creature);break; - } + DoScriptText(RAND(SAY_SLAY_1,SAY_SLAY_2,SAY_SLAY_3), m_creature); } }; diff --git a/src/bindings/scripts/scripts/northrend/ulduar/halls_of_stone/def_halls_of_stone.h b/src/bindings/scripts/scripts/northrend/ulduar/halls_of_stone/def_halls_of_stone.h index ade934ad921..0e5d59ae6d5 100644 --- a/src/bindings/scripts/scripts/northrend/ulduar/halls_of_stone/def_halls_of_stone.h +++ b/src/bindings/scripts/scripts/northrend/ulduar/halls_of_stone/def_halls_of_stone.h @@ -1,4 +1,24 @@ #ifndef DEF_HALLS_OF_STONE_H #define DEF_HALLS_OF_STONE_H - +enum Data +{ + DATA_KRYSTALLUS_EVENT, + DATA_MAIDEN_OF_GRIEF_EVENT, + DATA_SJONNIR_EVENT, + DATA_BRANN_EVENT +}; +enum Data64 +{ + DATA_KRYSTALLUS, + DATA_MAIDEN_OF_GRIEF, + DATA_SJONNIR, + DATA_KADDRAK, + DATA_MARNAK, + DATA_ABEDNEUM, + DATA_GO_TRIBUNAL_CONSOLE, + DATA_GO_KADDRAK, + DATA_GO_MARNAK, + DATA_GO_ABEDNEUM, + DATA_GO_SKY_FLOOR +}; #endif diff --git a/src/bindings/scripts/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.cpp b/src/bindings/scripts/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.cpp new file mode 100644 index 00000000000..b0450e83dbb --- /dev/null +++ b/src/bindings/scripts/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.cpp @@ -0,0 +1,691 @@ +#include "precompiled.h" +#include "escort_ai.h" +#include "def_halls_of_stone.h" + +enum Texts +{ + SAY_KILL_1 = -1603012, + SAY_KILL_2 = -1603013, + SAY_KILL_3 = -1603014, + SAY_LOW_HEALTH = -1603015, + SAY_DEATH = -1603016, + SAY_PLAYER_DEATH_1 = -1603017, + SAY_PLAYER_DEATH_2 = -1603018, + SAY_PLAYER_DEATH_3 = -1603019, + SAY_ESCORT_START = -1603020, + + SAY_SPAWN_DWARF = -1603021, + SAY_SPAWN_TROGG = -1603022, + SAY_SPAWN_OOZE = -1603023, + SAY_SPAWN_EARTHEN = -1603024, + + SAY_EVENT_INTRO_1 = -1603025, + SAY_EVENT_INTRO_2 = -1603026, + SAY_EVENT_INTRO_3_ABED = -1603027, + + SAY_EVENT_A_1 = -1603028, + SAY_EVENT_A_2_KADD = -1603029, + SAY_EVENT_A_3 = -1603030, + + SAY_EVENT_B_1 = -1603031, + SAY_EVENT_B_2_MARN = -1603032, + SAY_EVENT_B_3 = -1603033, + + SAY_EVENT_C_1 = -1603034, + SAY_EVENT_C_2_ABED = -1603035, + SAY_EVENT_C_3 = -1603036, + + SAY_EVENT_D_1 = -1603037, + SAY_EVENT_D_2_ABED = -1603038, + SAY_EVENT_D_3 = -1603039, + SAY_EVENT_D_4_ABED = -1603040, + + SAY_EVENT_END_01 = -1603041, + SAY_EVENT_END_02 = -1603042, + SAY_EVENT_END_03_ABED = -1603043, + SAY_EVENT_END_04 = -1603044, + SAY_EVENT_END_05_ABED = -1603045, + SAY_EVENT_END_06 = -1603046, + SAY_EVENT_END_07_ABED = -1603047, + SAY_EVENT_END_08 = -1603048, + SAY_EVENT_END_09_KADD = -1603049, + SAY_EVENT_END_10 = -1603050, + SAY_EVENT_END_11_KADD = -1603051, + SAY_EVENT_END_12 = -1603052, + SAY_EVENT_END_13_KADD = -1603053, + SAY_EVENT_END_14 = -1603054, + SAY_EVENT_END_15_MARN = -1603055, + SAY_EVENT_END_16 = -1603056, + SAY_EVENT_END_17_MARN = -1603057, + SAY_EVENT_END_18 = -1603058, + SAY_EVENT_END_19_MARN = -1603059, + SAY_EVENT_END_20 = -1603060, + SAY_EVENT_END_21_ABED = -1603061, + + SAY_VICTORY_SJONNIR_1 = -1603062, + SAY_VICTORY_SJONNIR_2 = -1603063, + + SAY_ENTRANCE_MEET = -1603064, + + TEXT_ID_START = 13100, + TEXT_ID_PROGRESS = 13101 +}; + +enum Creatures +{ + CREATURE_TRIBUNAL_OF_THE_AGES = 28234, + CREATURE_BRANN_BRONZEBEARD = 28070, + CREATURE_DARK_MATTER_TARGET = 28237, + CREATURE_SEARING_GAZE_TARGET = 28265, + CREATURE_DARK_RUNE_PROTECTOR = 27983, + CREATURE_DARK_RUNE_STORMCALLER = 27984, + CREATURE_IRON_GOLEM_CUSTODIAN = 27985, + CREATURE_KADDRAK = 30898 +}; + +enum Spells +{ + SPELL_STEALTH = 58506, + //Kadrak + SPELL_GLARE_OF_THE_TRIBUNAL = 50988, + H_SPELL_GLARE_OF_THE_TRIBUNAL = 59868, + //Marnak + SPELL_DARK_MATTER = 51012, + H_SPELL_DARK_MATTER = 59868, + //Abedneum + SPELL_SEARING_GAZE = 51136, + H_SPELL_SEARING_GAZE = 59867 +}; + +enum Quests +{ + QUEST_HALLS_OF_STONE = 13207 +}; + +#define GOSSIP_ITEM_START "Brann, it would be our honor!" +#define GOSSIP_ITEM_PROGRESS "Let's move Brann, enough of the history lessons!" + +struct Locations +{ + float x, y, z; +}; + +static Locations SpawnLocations[]= +{ + {946.992, 397.016, 208.374}, + {960.748, 382.944, 208.374}, +}; + +struct TRINITY_DLL_DECL mob_tribuna_controllerAI : public ScriptedAI +{ + mob_tribuna_controllerAI(Creature *c) : ScriptedAI(c) + { + pInstance = c->GetInstanceData(); + SetCombatMovement(false); + } + + ScriptedInstance* pInstance; + + uint32 uiKaddrakEncounterTimer; + uint32 uiMarnakEncounterTimer; + uint32 uiAbedneumEncounterTimer; + + bool bKaddrakActivated; + bool bMarnakActivated; + bool bAbedneumActivated; + + std::list<Creature*> lKaddrakGUIDList; + + void Reset() + { + uiKaddrakEncounterTimer = 1500; + uiMarnakEncounterTimer = 10000; + uiAbedneumEncounterTimer = 10000; + + bKaddrakActivated = false; + bMarnakActivated = false; + bAbedneumActivated = false; + + lKaddrakGUIDList.clear(); + } + + void UpdateFacesList() + { + /*GetCreatureListWithEntryInGrid(lKaddrakGUIDList, m_creature, CREATURE_KADDRAK, 50.0f); + if (!lKaddrakGUIDList.empty()) + { + uint32 uiPositionCounter = 0; + for(std::list<Creature*>::iterator itr = lKaddrakGUIDList.begin(); itr != lKaddrakGUIDList.end(); ++itr) + { + if ((*itr)->isAlive()) + { + if (uiPositionCounter == 0) + { + (*itr)->GetMap()->CreatureRelocation((*itr), 927.265, 333.200, 218.780, (*itr)->GetOrientation()); + (*itr)->SendMonsterMove(927.265, 333.200, 218.780, 0, (*itr)->GetMovementFlags(), 1); + } + else + { + (*itr)->GetMap()->CreatureRelocation((*itr), 921.745, 328.076, 218.780, (*itr)->GetOrientation()); + (*itr)->SendMonsterMove(921.745, 328.076, 218.780, 0, (*itr)->GetMovementFlags(), 1); + } + } + ++uiPositionCounter; + } + }*/ + } + + void UpdateAI(const uint32 diff) + { + if(bKaddrakActivated) + { + if (uiKaddrakEncounterTimer < diff) + { + Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0); + while (pTarget && pTarget->GetTypeId() != TYPEID_PLAYER) + pTarget = SelectUnit(SELECT_TARGET_RANDOM,0); + if (pTarget && !lKaddrakGUIDList.empty()) + for(std::list<Creature*>::iterator itr = lKaddrakGUIDList.begin(); itr != lKaddrakGUIDList.end(); ++itr) + if ((*itr)->isAlive()) + (*itr)->CastSpell(pTarget, HeroicMode ? H_SPELL_GLARE_OF_THE_TRIBUNAL : SPELL_GLARE_OF_THE_TRIBUNAL, true); + uiKaddrakEncounterTimer = 1500; + } else uiKaddrakEncounterTimer -= diff; + } + if (bMarnakActivated) + { + if (uiMarnakEncounterTimer < diff) + { + Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0); + while (pTarget && pTarget->GetTypeId() != TYPEID_PLAYER) + pTarget = SelectUnit(SELECT_TARGET_RANDOM,0); + if (pTarget) + { + if (Creature* pSummon = m_creature->SummonCreature(CREATURE_DARK_MATTER_TARGET, pTarget->GetPositionX(), pTarget->GetPositionY(), pTarget->GetPositionZ(), 0.0f, TEMPSUMMON_TIMED_DESPAWN, 1000)) + { + pSummon->SetDisplayId(11686); + pSummon->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + pSummon->CastSpell(pTarget, HeroicMode ? H_SPELL_DARK_MATTER : SPELL_DARK_MATTER, true); + } + } + uiMarnakEncounterTimer = 30000 + rand()%1000; + } else uiMarnakEncounterTimer -= diff; + } + if (bAbedneumActivated) + { + if (uiAbedneumEncounterTimer < diff) + { + Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0); + while (pTarget && pTarget->GetTypeId() != TYPEID_PLAYER) + pTarget = SelectUnit(SELECT_TARGET_RANDOM,0); + if (pTarget) + { + if (Creature* pSummon = m_creature->SummonCreature(CREATURE_SEARING_GAZE_TARGET, pTarget->GetPositionX(), pTarget->GetPositionY(), pTarget->GetPositionZ(), 0.0f, TEMPSUMMON_TIMED_DESPAWN, 1000)) + { + pSummon->SetDisplayId(11686); + pSummon->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + pSummon->CastSpell(pTarget, HeroicMode ? H_SPELL_SEARING_GAZE : SPELL_SEARING_GAZE, true); + } + } + uiAbedneumEncounterTimer = 30000 + rand()%1000; + } else uiAbedneumEncounterTimer -= diff; + } + } +}; + +struct TRINITY_DLL_DECL npc_brann_hosAI : public npc_escortAI +{ + npc_brann_hosAI(Creature *c) : npc_escortAI(c) + { + pInstance = c->GetInstanceData(); + } + + uint32 uiStep; + uint32 uiPhaseTimer; + + uint64 uiControllerGUID; + std::list<uint64> lDwarfGUIDList; + + ScriptedInstance* pInstance; + + bool bIsBattle; + bool bIsLowHP; + + void Reset() + { + if (!IsBeingEscorted) + { + bIsLowHP = false; + bIsBattle = false; + uiStep = 0; + uiPhaseTimer = 0; + uiControllerGUID = 0; + + DespawnDwarf(); + + if (pInstance) + pInstance->SetData(DATA_BRANN_EVENT, NOT_STARTED); + } + } + + void DespawnDwarf() + { + if (lDwarfGUIDList.empty()) + return; + for (std::list<uint64>::iterator itr = lDwarfGUIDList.begin(); itr != lDwarfGUIDList.end(); ++itr) + { + Creature* pTemp = Unit::GetCreature(*m_creature, pInstance ? (*itr) : 0); + if (pTemp && pTemp->isAlive()) + pTemp->ForcedDespawn(); + } + lDwarfGUIDList.clear(); + } + + void WaypointReached(uint32 uiPointId) + { + switch(uiPointId) + { + case 7: + if (Creature* pCreature = GetClosestCreatureWithEntry(m_creature, CREATURE_TRIBUNAL_OF_THE_AGES, 100.0f)) + { + if (!pCreature->isAlive()) + pCreature->Respawn(); + ((mob_tribuna_controllerAI*)pCreature->AI())->UpdateFacesList(); + uiControllerGUID = pCreature->GetGUID(); + } + break; + case 13: + DoScriptText(SAY_EVENT_INTRO_1, m_creature); + IsOnHold = true; + SetRun(true); + JumpToNextStep(20000); + break; + case 17: + DoScriptText(SAY_EVENT_INTRO_2, m_creature); + if (pInstance) + pInstance->HandleGameObject(pInstance->GetData64(DATA_GO_TRIBUNAL_CONSOLE),true); + m_creature->SetStandState(UNIT_STAND_STATE_KNEEL); + IsOnHold = true; + JumpToNextStep(8500); + break; + case 18: + IsOnHold = true; + break; + } + } + + void SpawnDwarf(uint32 uiType) + { + switch(uiType) + { + case 1: + { + uint32 uiSpawnNumber = (HeroicMode ? 3 : 2); + for (uint8 i = 0; i < uiSpawnNumber; ++i) + m_creature->SummonCreature(CREATURE_DARK_RUNE_PROTECTOR, SpawnLocations[0].x, SpawnLocations[0].y, SpawnLocations[0].z, 0.0f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 30000); + m_creature->SummonCreature(CREATURE_DARK_RUNE_STORMCALLER, SpawnLocations[0].x, SpawnLocations[0].y, SpawnLocations[0].z, 0.0f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 30000); + break; + } + case 2: + for (uint8 i = 0; i < 2; ++i) + m_creature->SummonCreature(CREATURE_DARK_RUNE_STORMCALLER, SpawnLocations[1].x, SpawnLocations[1].y, SpawnLocations[1].z, 0.0f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 30000); + break; + case 3: + m_creature->SummonCreature(CREATURE_IRON_GOLEM_CUSTODIAN, SpawnLocations[1].x, SpawnLocations[1].y, SpawnLocations[1].z, 0.0f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 30000); + break; + } + } + + void JustSummoned(Creature* pSummoned) + { + lDwarfGUIDList.push_back(pSummoned->GetGUID()); + pSummoned->AddThreat(m_creature, 0.0f); + pSummoned->AI()->AttackStart(m_creature); + } + + void JumpToNextStep(uint32 uiTimer) + { + uiPhaseTimer = uiTimer; + uiStep++; + } + + void StartWP() + { + m_creature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); + IsOnHold = false; + uiStep = 1; + } + + void UpdateEscortAI(const uint32 uiDiff) + { + if (uiPhaseTimer < uiDiff) + { + switch(uiStep) + { + case 1: + if (pInstance) + { + if (pInstance->GetData(DATA_BRANN_EVENT) != NOT_STARTED) + return; + pInstance->SetData(DATA_BRANN_EVENT, IN_PROGRESS); + } + bIsBattle = false; + DoScriptText(SAY_ESCORT_START, m_creature); + JumpToNextStep(0); + break; + case 3: + IsOnHold = false; + JumpToNextStep(0); + break; + case 5: + if (pInstance) + if (Creature* pTemp = (Unit::GetCreature(*m_creature, pInstance->GetData64(DATA_ABEDNEUM)))) + DoScriptText(SAY_EVENT_INTRO_3_ABED, pTemp); + JumpToNextStep(8500); + break; + case 6: + DoScriptText(SAY_EVENT_A_1, m_creature); + JumpToNextStep(6500); + break; + case 7: + if (pInstance) + if (Creature* pTemp = Unit::GetCreature(*m_creature, pInstance->GetData64(DATA_KADDRAK))) + DoScriptText(SAY_EVENT_A_2_KADD, pTemp); + JumpToNextStep(12500); + break; + case 8: + DoScriptText(SAY_EVENT_A_3, m_creature); + if (pInstance) + pInstance->HandleGameObject(pInstance->GetData64(DATA_GO_KADDRAK),true); + if (Creature* pTemp = Unit::GetCreature(*m_creature, uiControllerGUID)) + ((mob_tribuna_controllerAI*)pTemp->AI())->bKaddrakActivated = true; + JumpToNextStep(5000); + break; + case 9: + SpawnDwarf(1); + JumpToNextStep(20000); + break; + case 10: + DoScriptText(SAY_EVENT_B_1, m_creature); + JumpToNextStep(6000); + break; + case 11: + if (pInstance) + if (Creature* pTemp = Unit::GetCreature(*m_creature, pInstance->GetData64(DATA_MARNAK))) + DoScriptText(SAY_EVENT_B_2_MARN, pTemp); + SpawnDwarf(1); + JumpToNextStep(20000); + break; + case 12: + DoScriptText(SAY_EVENT_B_3, m_creature); + if (pInstance) + pInstance->HandleGameObject(pInstance->GetData64(DATA_GO_MARNAK),true); + if (Creature* pTemp = Unit::GetCreature(*m_creature, uiControllerGUID)) + ((mob_tribuna_controllerAI*)pTemp->AI())->bMarnakActivated = true; + JumpToNextStep(10000); + break; + case 13: + SpawnDwarf(1); + JumpToNextStep(10000); + break; + case 14: + SpawnDwarf(2); + JumpToNextStep(20000); + break; + case 15: + DoScriptText(SAY_EVENT_C_1, m_creature); + SpawnDwarf(1); + JumpToNextStep(10000); + break; + case 16: + SpawnDwarf(2); + JumpToNextStep(20000); + break; + case 17: + if (pInstance) + if (Creature* pTemp = Unit::GetCreature(*m_creature, pInstance->GetData64(DATA_ABEDNEUM))) + DoScriptText(SAY_EVENT_C_2_ABED, pTemp); + SpawnDwarf(1); + JumpToNextStep(20000); + break; + case 18: + DoScriptText(SAY_EVENT_C_3, m_creature); + if (pInstance) + pInstance->HandleGameObject(pInstance->GetData64(DATA_GO_ABEDNEUM),true); + if (Creature* pTemp = Unit::GetCreature(*m_creature, uiControllerGUID)) + ((mob_tribuna_controllerAI*)pTemp->AI())->bAbedneumActivated = true; + JumpToNextStep(5000); + break; + case 19: + SpawnDwarf(2); + JumpToNextStep(10000); + break; + case 20: + SpawnDwarf(1); + JumpToNextStep(15000); + break; + case 21: + DoScriptText(SAY_EVENT_D_1, m_creature); + SpawnDwarf(3); + JumpToNextStep(20000); + break; + case 22: + if (pInstance) + if (Creature* pTemp = Unit::GetCreature(*m_creature, pInstance->GetData64(DATA_ABEDNEUM))) + DoScriptText(SAY_EVENT_D_2_ABED, pTemp); + SpawnDwarf(1); + JumpToNextStep(5000); + break; + case 23: + SpawnDwarf(2); + JumpToNextStep(15000); + break; + case 24: + DoScriptText(SAY_EVENT_D_3, m_creature); + SpawnDwarf(3); + JumpToNextStep(5000); + break; + case 25: + SpawnDwarf(1); + JumpToNextStep(5000); + break; + case 26: + SpawnDwarf(2); + JumpToNextStep(10000); + break; + case 27: + if (pInstance) + if (Creature* pTemp = Unit::GetCreature(*m_creature, pInstance->GetData64(DATA_ABEDNEUM))) + DoScriptText(SAY_EVENT_D_4_ABED, pTemp); + SpawnDwarf(1); + JumpToNextStep(10000); + break; + case 28: + DoScriptText(SAY_EVENT_END_01, m_creature); + m_creature->SetStandState(UNIT_STAND_STATE_STAND); + if (pInstance) + pInstance->HandleGameObject(pInstance->GetData64(DATA_GO_SKY_FLOOR),true); + if (Creature* pTemp = Unit::GetCreature(*m_creature, uiControllerGUID)) + pTemp->DealDamage(pTemp, pTemp->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + bIsBattle = true; + IsOnHold = false; + JumpToNextStep(6500); + break; + case 29: + DoScriptText(SAY_EVENT_END_02, m_creature); + JumpToNextStep(5500); + break; + case 30: + if (pInstance) + if (Creature* pTemp = Unit::GetCreature(*m_creature, pInstance->GetData64(DATA_ABEDNEUM))) + DoScriptText(SAY_EVENT_END_03_ABED, pTemp); + JumpToNextStep(8500); + break; + case 31: + DoScriptText(SAY_EVENT_END_04, m_creature); + JumpToNextStep(11500); + break; + case 32: + if (pInstance) + if (Creature* pTemp = Unit::GetCreature(*m_creature, pInstance->GetData64(DATA_ABEDNEUM))) + DoScriptText(SAY_EVENT_END_05_ABED, pTemp); + JumpToNextStep(11500); + break; + case 33: + DoScriptText(SAY_EVENT_END_06, m_creature); + JumpToNextStep(4500); + break; + case 34: + if (pInstance) + if (Creature* pTemp = Unit::GetCreature(*m_creature, pInstance->GetData64(DATA_ABEDNEUM))) + DoScriptText(SAY_EVENT_END_07_ABED, pTemp); + JumpToNextStep(22500); + break; + case 35: + DoScriptText(SAY_EVENT_END_08, m_creature); + JumpToNextStep(7500); + break; + case 36: + if (pInstance) + if (Creature* pTemp = Unit::GetCreature(*m_creature, pInstance->GetData64(DATA_KADDRAK))) + DoScriptText(SAY_EVENT_END_09_KADD, pTemp); + JumpToNextStep(18500); + break; + case 37: + DoScriptText(SAY_EVENT_END_10, m_creature); + JumpToNextStep(5500); + break; + case 38: + if (pInstance) + if (Creature* pTemp = Unit::GetCreature(*m_creature, pInstance->GetData64(DATA_KADDRAK))) + DoScriptText(SAY_EVENT_END_11_KADD, pTemp); + JumpToNextStep(20500); + break; + case 39: + DoScriptText(SAY_EVENT_END_12, m_creature); + JumpToNextStep(2500); + break; + case 40: + if (pInstance) + if (Creature* pTemp = Unit::GetCreature(*m_creature, pInstance->GetData64(DATA_KADDRAK))) + DoScriptText(SAY_EVENT_END_13_KADD, pTemp); + JumpToNextStep(19500); + break; + case 41: + DoScriptText(SAY_EVENT_END_14, m_creature); + JumpToNextStep(10500); + break; + case 42: + if (pInstance) + if (Creature* pTemp = Unit::GetCreature(*m_creature, pInstance->GetData64(DATA_MARNAK))) + DoScriptText(SAY_EVENT_END_15_MARN, pTemp); + JumpToNextStep(6500); + break; + case 43: + DoScriptText(SAY_EVENT_END_16, m_creature); + JumpToNextStep(6500); + break; + case 44: + if (pInstance) + if (Creature* pTemp = Unit::GetCreature(*m_creature, pInstance->GetData64(DATA_MARNAK))) + DoScriptText(SAY_EVENT_END_17_MARN, pTemp); + JumpToNextStep(25500); + break; + case 45: + DoScriptText(SAY_EVENT_END_18, m_creature); + JumpToNextStep(23500); + break; + case 46: + if (pInstance) + if (Creature* pTemp = Unit::GetCreature(*m_creature, pInstance->GetData64(DATA_MARNAK))) + DoScriptText(SAY_EVENT_END_19_MARN, pTemp); + JumpToNextStep(3500); + break; + case 47: + DoScriptText(SAY_EVENT_END_20, m_creature); + JumpToNextStep(8500); + break; + case 48: + if (pInstance) + if (Creature* pTemp = Unit::GetCreature(*m_creature, pInstance->GetData64(DATA_ABEDNEUM))) + DoScriptText(SAY_EVENT_END_21_ABED, pTemp); + JumpToNextStep(5500); + break; + case 49: + { + if (pInstance) + { + pInstance->HandleGameObject(pInstance->GetData64(DATA_GO_KADDRAK),true); + pInstance->HandleGameObject(pInstance->GetData64(DATA_GO_MARNAK),true); + pInstance->HandleGameObject(pInstance->GetData64(DATA_GO_ABEDNEUM),true); + pInstance->HandleGameObject(pInstance->GetData64(DATA_GO_SKY_FLOOR),true); + pInstance->SetData(DATA_BRANN_EVENT, DONE); + } + Player* pPlayer = GetPlayerForEscort(); + if (pPlayer) + pPlayer->GroupEventHappens(QUEST_HALLS_OF_STONE, m_creature); + m_creature->SetUInt32Value(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); + m_creature->SetUInt32Value(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER); + JumpToNextStep(180000); + break; + } + case 50: + IsOnHold = false; + break; + } + } else uiPhaseTimer -= uiDiff; + + if (!bIsLowHP && (m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) <= 30) + { + DoScriptText(SAY_LOW_HEALTH, m_creature); + bIsLowHP = true; + } else if (bIsLowHP && (m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) > 30) + bIsLowHP = false; + } +}; + +bool GossipHello_npc_brann_hos(Player* pPlayer, Creature* pCreature) +{ + if (pCreature->isQuestGiver()) + pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_START, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + pPlayer->SEND_GOSSIP_MENU(TEXT_ID_START, pCreature->GetGUID()); +} + +bool GossipSelect_npc_brann_hos(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + if (uiAction == GOSSIP_ACTION_INFO_DEF+1 || uiAction == GOSSIP_ACTION_INFO_DEF+2) + { + pPlayer->CLOSE_GOSSIP_MENU(); + ((npc_brann_hosAI*)pCreature->AI())->StartWP(); + } + + return true; +} + +CreatureAI* GetAI_mob_tribuna_controller(Creature* pCreature) +{ + return new mob_tribuna_controllerAI(pCreature); +} + +CreatureAI* GetAI_npc_brann_hos(Creature* pCreature) +{ + return new npc_brann_hosAI(pCreature); +} + +void AddSC_halls_of_stone() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "npc_brann_hos"; + newscript->GetAI = &GetAI_npc_brann_hos; + newscript->pGossipHello = &GossipHello_npc_brann_hos; + newscript->pGossipSelect = &GossipSelect_npc_brann_hos; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_tribuna_controller"; + newscript->GetAI = &GetAI_mob_tribuna_controller; + newscript->RegisterSelf(); +}
\ No newline at end of file diff --git a/src/bindings/scripts/scripts/northrend/ulduar/halls_of_stone/instance_halls_of_stone.cpp b/src/bindings/scripts/scripts/northrend/ulduar/halls_of_stone/instance_halls_of_stone.cpp index fa2dd83637f..44872cede03 100644 --- a/src/bindings/scripts/scripts/northrend/ulduar/halls_of_stone/instance_halls_of_stone.cpp +++ b/src/bindings/scripts/scripts/northrend/ulduar/halls_of_stone/instance_halls_of_stone.cpp @@ -1,9 +1,232 @@ #include "precompiled.h" #include "def_halls_of_stone.h" +#define MAX_ENCOUNTER 4 + +/* Halls of Stone encounters: +0- Krystallus +1- Maiden of Grief +2- Escort Event +3- Sjonnir The Ironshaper +*/ + struct TRINITY_DLL_DECL instance_halls_of_stone : public ScriptedInstance { instance_halls_of_stone(Map* pMap) : ScriptedInstance(pMap) {Initialize();}; + + uint64 uiMaidenOfGrief; + uint64 uiKrystallus; + uint64 uiSjonnir; + + uint64 uiKaddrak; + uint64 uiAbedneum; + uint64 uiMarnak; + uint64 uiBrann; + + uint64 uiMaidenOfGriefDoor; + uint64 uiSjonnirDoor; + uint64 uiBrannDoor; + uint64 uiTribunalConsole; + uint64 uiTribunalChest; + uint64 uiTribunalSkyFloor; + uint64 uiKaddrakGo; + uint64 uiAbedneumGo; + uint64 uiMarnakGo; + + uint32 m_auiEncounter[MAX_ENCOUNTER]; + + std::string str_data; + + void Initialize() + { + uiMaidenOfGrief = 0; + uiKrystallus = 0; + uiSjonnir = 0; + + uiKaddrak = 0; + uiMarnak = 0; + uiAbedneum = 0; + uiBrann = 0; + + uiMaidenOfGriefDoor = 0; + uiSjonnirDoor = 0; + uiBrannDoor = 0; + uiKaddrakGo = 0; + uiMarnakGo = 0; + uiAbedneumGo = 0; + uiTribunalConsole = 0; + uiTribunalChest = 0; + uiTribunalSkyFloor = 0; + + for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) + m_auiEncounter[i] = NOT_STARTED; + } + + void OnCreatureCreate(Creature* pCreature, bool add) + { + switch(pCreature->GetEntry()) + { + case 27975: uiMaidenOfGrief = pCreature->GetGUID(); break; + case 27977: uiKrystallus = pCreature->GetGUID(); break; + case 27978: uiSjonnir = pCreature->GetGUID(); break; + case 30897: uiMarnak = pCreature->GetGUID(); break; + case 30898: uiKaddrak = pCreature->GetGUID(); break; + case 30099: uiAbedneum = pCreature->GetGUID(); break; + case 28070: uiBrann = pCreature->GetGUID(); break; + } + } + + void OnGameObjectCreate(GameObject* pGo, bool add) + { + switch(pGo->GetEntry()) + { + case 191669: + uiAbedneumGo = pGo->GetGUID(); + break; + case 192170: + uiMarnakGo = pGo->GetGUID(); + break; + case 192171: + uiKaddrakGo = pGo->GetGUID(); + break; + case 191292: + uiMaidenOfGriefDoor = pGo->GetGUID(); + if (m_auiEncounter[0] == DONE) + pGo->SetGoState(GO_STATE_ACTIVE); + else + pGo->SetGoState(GO_STATE_READY); + break; + case 191295: + uiBrannDoor = pGo->GetGUID(); + if (m_auiEncounter[1] == DONE) + pGo->SetGoState(GO_STATE_ACTIVE); + else + pGo->SetGoState(GO_STATE_READY); + break; + case 191296: + uiSjonnirDoor = pGo->GetGUID(); + if (m_auiEncounter[2] == DONE) + pGo->SetGoState(GO_STATE_ACTIVE); + else + pGo->SetGoState(GO_STATE_READY); + break; + case 193907: + uiTribunalConsole = pGo->GetGUID(); + break; + case 190586: + uiTribunalChest = pGo->GetGUID(); + break; + case 191527: + uiTribunalSkyFloor = pGo->GetGUID(); + break; + } + } + + void SetData(uint32 type, uint32 data) + { + switch(type) + { + case DATA_MAIDEN_OF_GRIEF_EVENT: + m_auiEncounter[1] = data; + if (m_auiEncounter[1] == DONE) + HandleGameObject(uiBrannDoor,true); + break; + case DATA_KRYSTALLUS_EVENT: + m_auiEncounter[0] = data; + if (m_auiEncounter[0] == DONE) + HandleGameObject(uiMaidenOfGriefDoor,true); + break; + case DATA_SJONNIR_EVENT: + m_auiEncounter[3] = data; + break; + case DATA_BRANN_EVENT: + m_auiEncounter[2] = data; + if (m_auiEncounter[2] == DONE) + HandleGameObject(uiSjonnirDoor,true); + break; + } + + if (data == DONE) + SaveToDB(); + } + + uint32 GetData(uint32 type) + { + switch(type) + { + case DATA_MAIDEN_OF_GRIEF_EVENT: return m_auiEncounter[0]; + case DATA_KRYSTALLUS_EVENT: return m_auiEncounter[1]; + case DATA_SJONNIR_EVENT: return m_auiEncounter[2]; + case DATA_BRANN_EVENT: return m_auiEncounter[3]; + } + + return 0; + } + + uint64 GetData64(uint32 identifier) + { + switch(identifier) + { + case DATA_MAIDEN_OF_GRIEF: return uiMaidenOfGrief; + case DATA_KRYSTALLUS: return uiKrystallus; + case DATA_SJONNIR: return uiSjonnir; + case DATA_KADDRAK: return uiKaddrak; + case DATA_MARNAK: return uiMarnak; + case DATA_ABEDNEUM: return uiAbedneum; + case DATA_GO_TRIBUNAL_CONSOLE: return uiTribunalConsole; + case DATA_GO_KADDRAK: return uiKaddrakGo; + case DATA_GO_ABEDNEUM: return uiAbedneumGo; + case DATA_GO_MARNAK: return uiMarnakGo; + case DATA_GO_SKY_FLOOR: return uiTribunalSkyFloor; + } + + return 0; + } + + std::string GetSaveData() + { + OUT_SAVE_INST_DATA; + + std::ostringstream saveStream; + saveStream << "H S " << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2] << " " << m_auiEncounter[3]; + + str_data = saveStream.str(); + + OUT_SAVE_INST_DATA_COMPLETE; + return str_data; + } + + void Load(const char* in) + { + if (!in) + { + OUT_LOAD_INST_DATA_FAIL; + return; + } + + OUT_LOAD_INST_DATA(in); + + char dataHead1, dataHead2; + uint16 data0, data1, data2, data3; + + std::istringstream loadStream(in); + loadStream >> dataHead1 >> dataHead2 >> data0 >> data1 >> data2 >> data3; + + if (dataHead1 == 'H' && dataHead2 == 'S') + { + m_auiEncounter[0] = data0; + m_auiEncounter[1] = data1; + m_auiEncounter[2] = data2; + m_auiEncounter[3] = data3; + + for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) + if (m_auiEncounter[i] == IN_PROGRESS) + m_auiEncounter[i] = NOT_STARTED; + + } else OUT_LOAD_INST_DATA_FAIL; + + OUT_LOAD_INST_DATA_COMPLETE; + } }; InstanceData* GetInstanceData_instance_halls_of_stone(Map* pMap) diff --git a/src/bindings/scripts/system/ScriptLoader.cpp b/src/bindings/scripts/system/ScriptLoader.cpp index 8c06c9206b7..977cb40c45a 100644 --- a/src/bindings/scripts/system/ScriptLoader.cpp +++ b/src/bindings/scripts/system/ScriptLoader.cpp @@ -267,8 +267,9 @@ extern void AddSC_boss_drakkari_colossus(); extern void AddSC_boss_gal_darah(); extern void AddSC_boss_eck(); extern void AddSC_instance_gundrak(); +extern void AddSC_boss_krik_thir(); //Azjol-Nerub +extern void AddSC_instance_azjol_nerub(); extern void AddSC_instance_ahnkahet(); //Azjol-Nerub Ahn'kahet -extern void AddSC_boss_krik_thir(); extern void AddSC_boss_taldaram(); extern void AddSC_boss_elder_nadox(); extern void AddSC_boss_volazj(); @@ -301,6 +302,10 @@ extern void AddSC_boss_ionar(); extern void AddSC_boss_volkhan(); extern void AddSC_instance_halls_of_lightning(); extern void AddSC_boss_maiden_of_grief(); //Ulduar Halls of Stone +extern void AddSC_boss_krystallus(); +extern void AddSC_boss_sjonnir(); +extern void AddSC_instance_halls_of_stone(); +extern void AddSC_halls_of_stone(); extern void AddSC_boss_auriaya(); //Ulduar Ulduar extern void AddSC_boss_flame_leviathan(); extern void AddSC_boss_ignis(); @@ -685,7 +690,8 @@ void AddScripts() AddSC_boss_elder_nadox(); AddSC_boss_volazj(); AddSC_instance_ahnkahet(); - AddSC_boss_krik_thir(); //Azjol-Nerub Azjol-Nerub + AddSC_boss_krik_thir(); //Azjol-Nerub Azjol-Nerub + AddSC_instance_azjol_nerub(); AddSC_boss_anubrekhan(); //Naxxramas AddSC_boss_maexxna(); AddSC_boss_patchwerk(); @@ -715,6 +721,10 @@ void AddScripts() AddSC_boss_volkhan(); AddSC_instance_halls_of_lightning(); AddSC_boss_maiden_of_grief(); //Ulduar Halls of Stone + AddSC_boss_krystallus(); + AddSC_boss_sjonnir(); + AddSC_instance_halls_of_stone(); + AddSC_halls_of_stone(); AddSC_boss_auriaya(); //Ulduar Ulduar AddSC_boss_flame_leviathan(); AddSC_boss_ignis(); |