From 7032f2bd92de6827f4e918c7f722085b3d4c7fa1 Mon Sep 17 00:00:00 2001 From: Gultask <100873791+Gultask@users.noreply.github.com> Date: Wed, 1 Mar 2023 20:17:32 -0300 Subject: [PATCH] fix(DB/SAI): Rewrite Deathblow to the Legion and Turning Point in SmartAI (#15182) --- .../rev_1677165107723442200.sql | 280 +++++ .../scripts/Outland/zone_netherstorm.cpp | 1024 ----------------- .../scripts/Outland/zone_shattrath_city.cpp | 117 -- 3 files changed, 280 insertions(+), 1141 deletions(-) create mode 100644 data/sql/updates/pending_db_world/rev_1677165107723442200.sql diff --git a/data/sql/updates/pending_db_world/rev_1677165107723442200.sql b/data/sql/updates/pending_db_world/rev_1677165107723442200.sql new file mode 100644 index 000000000..04ffac6ac --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1677165107723442200.sql @@ -0,0 +1,280 @@ +-- Delete old custom creature_template entries +DELETE FROM `creature_template` WHERE `entry` IN ( +61021, -- Adyen the Lightwarden +50004, -- Adyen Trigger +50002, -- Exarch Orelis +50001 -- Anchorite Karja +); + +-- Delete Adyen Trigger +DELETE FROM `creature` WHERE `id1`=50004 AND `guid`=3110359; + +DELETE FROM `creature_equip_template` WHERE (`CreatureID` IN (50001, 50002, 61021)); + +DELETE FROM `creature_template_spell` WHERE (`CreatureID` IN (50001, 50002, 61021)); + +-- Delete old waypoints +DELETE FROM `waypoint_data` WHERE `id` IN ( +610210, -- ADYEN_PATH_ID +500010, -- KARJA_PATH_ID +500020, -- ORELIS_PATH_ID +207940, -- KAYLAAN_PATH_ID1 +207941, -- KAYLAAN_PATH_ID2 +500050 -- ISHANAH_PATH_ID +); + +-- Delete old texts +DELETE FROM `creature_text` WHERE `creatureid`=61021; +DELETE FROM `creature_text` WHERE `creatureid`=18537; +INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES +(18537, 0, 0, 'We\'re here for you, lost brother. It is custom to offer you a chance to repent before you are destroyed. We offer you this chance, as the naaru\'s law commands.', 12, 0, 100, 0, 0, 0, 18389, 0, ''), +(18537, 1, 0, 'We may be few, Socrethar, but our faith is strong. Something you will never understand. Now that custom has been served, prepare to meet your end.', 12, 0, 100, 0, 0, 0, 18391, 0, ''), +(18537, 2, 0, 'How... how could you?!', 12, 0, 100, 0, 0, 0, 18393, 0, ''), +(18537, 3, 0, 'Socrethar is clouding your mind, Kaylaan! You do not mean these words! I remember training you when you were but a youngling. Your will was strong even then!', 12, 0, 100, 0, 0, 0, 18397, 0, ''); + +-- Add proper trigger creature +DELETE FROM `creature` WHERE `id1`=23491; +INSERT INTO `creature` (`guid`, `id1`, `map`, `zoneId`, `areaId`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `VerifiedBuild`) VALUES +(111111, 23491, 530, 3523, 3742, 4819.2363, 3775.88, 210.25194, 5.515240192413330078, 120, 48069); + +-- Adyen (18537) +UPDATE `creature_template` SET `AIName` = 'SmartAI', `ScriptName` = '' WHERE (`entry` IN ( +18537, -- Adyen the Lightwarden +18538, -- Ishanah +19466, -- Exarch Orelis +19467, -- Anchorite Karja +20132, -- Socrethar +20794, -- Kaylaan the Lost +23491 -- Socrethar Event Trigger +)); + +-- Orelis (19466) +DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = -69725); +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(-69725, 0, 0, 0, 1, 0, 100, 512, 0, 30000, 180000, 240000, 0, 80, 1946600, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Exarch Orelis - OOC - Run Script'); + +-- Karja (19467) +UPDATE `creature_template_addon` SET `bytes1` = 0, `bytes2` = 1 WHERE (`entry` = 19467); +DELETE FROM `creature_addon` WHERE (`guid` = 69727); +INSERT INTO `creature_addon` (`guid`, `path_id`, `mount`, `bytes1`, `bytes2`, `emote`, `visibilityDistanceType`, `auras`) VALUES +(69727, 0, 0, 6, 4097, 0, 0, NULL); + +UPDATE `creature` SET `position_x`=4946.936, `position_y`=3849.2083, `position_z`=211.5767, `orientation`=3.892084121704101562, `VerifiedBuild`=48069 WHERE `id1`=20132; + +-- Waypoints +DELETE FROM `waypoints` WHERE `entry` IN (1853700, 2079400, 2079401, 2079402, 1853800, 1853801); +INSERT INTO `waypoints` (`entry`, `pointid`, `position_x`, `position_y`, `position_z`, `orientation`, `point_comment`) VALUES +-- Adyen +(1853700,1,4819.1963,3769.3455,210.50163,NULL,'Adyen the Lightwarden'), +(1853700,2,4842.374,3776.3086,206.5136,NULL,'Adyen the Lightwarden'), +(1853700,3,4860.4517,3791.8281,199.58647,NULL,'Adyen the Lightwarden'), +(1853700,4,4883.19,3808.0283,198.98213,NULL,'Adyen the Lightwarden'), +(1853700,5,4898.159,3817.5452,208.13782,NULL,'Adyen the Lightwarden'), +(1853700,6,4912.548,3827.1858,211.50491,NULL,'Adyen the Lightwarden'), +(1853700,7,4925.748,3835.356,211.49062,NULL,'Adyen the Lightwarden'), +-- Kaylaan +(2079400,1,4950.1494,3887.8508,212.33162,NULL,'Kaylaan the Lost'), +(2079400,2,4946.882,3872.5073,211.48543,NULL,'Kaylaan the Lost'), +(2079400,3,4939.2324,3853.8499,211.48567,NULL,'Kaylaan the Lost'), +(2079400,4,4941.726,3852.1892,211.46687,NULL,'Kaylaan the Lost'), -- Kneel +(2079401,1,4940.221,3847.4336,211.49857,NULL,'Kaylaan the Lost'), -- Stand by Socrethar +(2079402,1,4938.0044,3834.3682,211.35002,NULL,'Kaylaan the Lost'), -- Stand by Ishanah +-- Ishanah - The Decomposed Waypoints are to avoid floating/flying. If in the future movement is changed then they could be safely removed +(1853800,1 ,4881.5283,3806.9114,199.50269,NULL,'Ishanah - Decomposed Waypoint'), +(1853800,2 ,4883.5283,3808.6614,199.50269,NULL,'Ishanah - Decomposed Waypoint'), +(1853800,3 ,4885.7783,3810.4114,199.50269,NULL,'Ishanah - Decomposed Waypoint'), +(1853800,4 ,4889.5283,3812.4114,202.75269,NULL,'Ishanah - Decomposed Waypoint'), +(1853800,5 ,4894.203,3814.9324,205.52324,NULL,'Ishanah'), +(1853800,6 ,4898.7446,3817.81,208.48784,NULL,'Ishanah - Decomposed Waypoint'), +(1853800,7 ,4907.2446,3822.81,211.73784,NULL,'Ishanah - Decomposed Waypoint'), +(1853800,8 ,4909.8877,3824.375,211.50648,NULL,'Ishanah'), +(1853800,9 ,4910.0957,3824.607,211.6725,NULL,'Ishanah - Decomposed Waypoint'), +(1853800,10,4919.0957,3826.607,211.6725,NULL,'Ishanah - Decomposed Waypoint'), +(1853800,11,4919.5957,3826.607,211.6725,NULL,'Ishanah - Decomposed Waypoint'), +(1853800,12,4922.5957,3827.357,211.6725,NULL,'Ishanah - Decomposed Waypoint'), +(1853800,13,4923.284,3827.5364,211.48683,NULL,'Ishanah'), +(1853800,14,4926.301,3828.2864,211.71806,NULL,'Ishanah - Decomposed Waypoint'), +(1853800,15,4932.801,3829.7864,211.71806,NULL,'Ishanah - Decomposed Waypoint'), +(1853800,16,4933.633,3830.1167,211.43718,NULL,'Ishanah'), +(1853800,17,4935.647,3831.1455,211.39305,NULL,'Ishanah'), +(1853800,18,4937.065,3832.6042,211.42769,NULL,'Ishanah'); + +-- Spawning Event +DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 23491); +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(23491, 0, 0, 0, 38, 0, 100, 0, 1, 1, 0, 0, 0, 107, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Socrethar Event Trigger - On Data Set 1 1 - Summon Creature Group 0'); + +DELETE FROM `creature_summon_groups` WHERE `summonerId`=23491 AND `summonerType`=0 AND `Comment` LIKE 'Deathblow to the Legion%'; +INSERT INTO `creature_summon_groups` (`summonerId`, `summonerType`, `groupId`, `entry`, `position_x`, `position_y`, `position_z`, `orientation`, `summonType`, `summonTime`, `Comment`) VALUES +(23491, 0, 0, 18537, 4805.796, 3774.1116, 210.61717, 5.550147056579589843, 6, 60000, 'Deathblow to the Legion - Adyen'), +(23491, 0, 0, 19466, 4804.807, 3775.562, 210.6171, 5.532693862915039062, 6, 60000, 'Deathblow to the Legion - Orelis'), +(23491, 0, 0, 19467, 4803.6367, 3773.8438, 210.61761, 5.602506637573242187, 6, 60000, 'Deathblow to the Legion - Karja'); + +-- Gossips +DELETE FROM `gossip_menu` WHERE (`MenuID` = 8117); +INSERT INTO `gossip_menu` (`MenuID`, `TextID`) VALUES +(8117, 10051), +(8117, 10210); + +DELETE FROM `gossip_menu_option` WHERE (`MenuID` = 8117); +INSERT INTO `gossip_menu_option` (`MenuID`, `OptionID`, `OptionIcon`, `OptionText`, `OptionBroadcastTextID`, `OptionType`, `OptionNpcFlag`, `ActionMenuID`, `ActionPoiID`, `BoxCoded`, `BoxMoney`, `BoxText`, `BoxBroadcastTextID`, `VerifiedBuild`) VALUES +(8117, 0, 0, 'I\'m ready, Adyen.', 18591, 1, 1, 0, 0, 0, 0, '', 0, 0); + +DELETE FROM `conditions` WHERE (`SourceTypeOrReferenceId` IN (14, 15)) AND (`SourceGroup` IN (7735, 8117)); +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +-- Adyen Gossip +(14, 8117, 10051, 0, 0, 23, 1, 3742, 0, 0, 1, 0, 0, '', 'Show text when outside Socrethar\'s Seat'), +(14, 8117, 10210, 0, 0, 23, 1, 3742, 0, 0, 0, 0, 0, '', 'Show text when inside Socrethar\'s Seat'), +(15, 8117, 0, 0, 0, 23, 1, 3742, 0, 0, 0, 0, 0, '', 'Show gossip option only when inside Socrethar\'s Seat'), +(15, 8117, 0, 0, 0, 29, 1, 20132, 200, 0, 0, 0, 0, '', 'Show gossip option only when Socrethar is alive'), +(15, 8117, 0, 0, 0, 29, 1, 20794, 200, 0, 1, 0, 0, '', 'Show gossip option only when Kaylaan hasn\'t spawned'), +(15, 8117, 0, 0, 0, 9, 0, 10409, 0, 0, 0, 0, 0, '', 'Show gossip option only if player has quest \'Deathblow to the Legion\''), +-- Ishanah Gossip +(14, 7735, 9457, 0, 0, 23, 1, 3703, 0, 0, 0, 0, 0, '', 'Show text only when inside Shattrath'), +(15, 7735, 0, 0, 0, 23, 1, 3703, 0, 0, 0, 0, 0, '', 'Show gossip option only when inside Shattrath'), +(15, 7735, 1, 0, 0, 23, 1, 3703, 0, 0, 0, 0, 0, '', 'Show gossip option only when inside Shattrath'); + +-- SAI Conditions +DELETE FROM `conditions` WHERE (`SourceTypeOrReferenceId` = 22) AND (`SourceEntry` = 23491); +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(22, 1, 23491, 0, 0, 29, 1, 18537, 200, 0, 1, 0, 0, '', 'Do not spawn Socrethar Event group if there is already one spawned within 200y'), +(22, 1, 23491, 0, 0, 29, 1, 20794, 200, 0, 1, 0, 0, '', 'Do not spawn Socrethar Event group if Kaylaan has already spawned within 200y'); + +-- Spell Conditions +DELETE FROM `conditions` WHERE (`SourceTypeOrReferenceId` = 13) AND (`SourceEntry` IN (35598, 35599, 35600)); +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(13, 1, 35598, 0, 0, 31, 0, 3, 18538, 0, 0, 0, 0, '', 'Wrath of Socrethar (35598) targets Ishanah'), +(13, 1, 35599, 0, 0, 31, 0, 3, 18538, 0, 0, 0, 0, '', 'Resurrection (35599) targets Ishanah'), +(13, 1, 35600, 0, 0, 31, 0, 3, 20794, 0, 0, 0, 0, '', 'Wrath of Socrethar (35600) targets Kaylaan the Lost'); + +UPDATE `gameobject_template` SET `AIName` = 'SmartGameObjectAI' WHERE `entry` = 184604; +DELETE FROM `smart_scripts` WHERE (`source_type` = 1 AND `entryorguid` = 184604); +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(184604, 1, 0, 0, 63, 0, 100, 0, 0, 0, 0, 0, 0, 45, 1, 1, 0, 0, 0, 0, 10, 111111, 23491, 0, 0, 0, 0, 0, 0, 'Portal to Socrethar\'s Seat - On Just Created - Set Data 1 1'); + +DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` IN (18537, 18538, 19466, 19467, 20132, 20794)); +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(18537, 0, 0, 0, 54, 0, 100, 0, 0, 0, 0, 0, 0, 81, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Adyen the Lightwarden - On Just Summoned - Set Npc Flags Gossip'), +(18537, 0, 1, 2, 62, 0, 100, 0, 8117, 0, 0, 0, 0, 64, 1, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 'Adyen the Lightwarden - On Gossip Option 0 Selected - Store Targetlist'), +(18537, 0, 2, 3, 61, 0, 100, 0, 0, 0, 0, 0, 0, 72, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Adyen the Lightwarden - On Gossip Option 0 Selected - Close Gossip'), +(18537, 0, 3, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 80, 1853700, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Adyen the Lightwarden - On Gossip Option 0 Selected - Run Script'), +(18537, 0, 4, 5, 58, 0, 100, 0, 7, 1853700, 0, 0, 0, 45, 1, 1, 0, 0, 0, 0, 10, 71631, 20132, 0, 0, 0, 0, 0, 0, 'Adyen the Lightwarden - On Waypoint Finished - Set Data 1 1 on Socrethar (Request Event Start)'), +(18537, 0, 5, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 100, 1, 0, 0, 0, 0, 0, 10, 71631, 20132, 0, 0, 0, 0, 0, 0, 'Adyen the Lightwarden - On Waypoint Finished - Send Target List to Socrethar'), +(18537, 0, 6, 0, 4, 0, 100, 0, 0, 0, 0, 0, 0, 39, 30, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Adyen the Lightwarden - On Aggro - Call For Help'), +(18537, 0, 7, 0, 0, 0, 100, 0, 0, 3500, 2000, 7500, 0, 11, 14518, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Adyen the Lightwarden - In Combat - Cast \'Crusader Strike\''), +(18537, 0, 8, 0, 0, 0, 100, 0, 15000, 40000, 20000, 60000, 0, 11, 13005, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Adyen the Lightwarden - In Combat - Cast \'Hammer of Justice\''), +(18538, 0, 0, 1, 38, 0, 100, 0, 1, 1, 0, 0, 0, 53, 1, 1853800, 0, 0, 0, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Ishanah - On Data Set 1 1 - Start Waypoint'), +(18538, 0, 1, 2, 61, 0, 100, 0, 0, 0, 0, 0, 0, 83, 3, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Ishanah - On Data Set 1 1 - Remove Npc Flags Gossip & Questgiver'), +(18538, 0, 2, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 2, 250, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Ishanah - On Data Set 1 1 - Set Faction 250'), +(18538, 0, 3, 0, 40, 0, 100, 0, 18, 1853800, 0, 0, 0, 80, 1853800, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Ishanah - On Waypoint 18 Reached - Run Script'), +(18538, 0, 4, 0, 8, 0, 100, 0, 35598, 0, 0, 0, 0, 11, 29266, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Ishanah - On Spellhit \'Wrath of Socrethar\' - Cast \'Permanent Feign Death\''), -- Yes, these are sniffed +(18538, 0, 5, 0, 8, 0, 100, 0, 35599, 0, 0, 0, 0, 28, 29266, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Ishanah - On Spellhit \'Resurrection\' - Remove Aura \'Permanent Feign Death\''), +(18538, 0, 6, 0, 4, 0, 100, 0, 0, 0, 0, 0, 0, 39, 50, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Ishanah - On Aggro - Call For Help'), +(18538, 0, 7, 0, 0, 0, 100, 0, 0, 3500, 2500, 7500, 0, 11, 15238, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Ishanah - In Combat - Cast \'Holy Smite\''), +(18538, 0, 8, 0, 14, 0, 100, 0, 5000, 40, 30000, 60000, 0, 11, 35096, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Ishanah - Friendly At 5000 Health - Cast \'Greater Heal\''), +(18538, 0, 9, 0, 14, 0, 100, 0, 3000, 40, 45000, 75000, 0, 11, 22187, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Ishanah - Friendly At 3000 Health - Cast \'Power Word: Shield\''), +(19466, 0, 0, 0, 54, 0, 100, 0, 0, 0, 0, 0, 0, 81, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Exarch Orelis - On Just Summoned - Set Npc Flag '), +(19466, 0, 1, 0, 38, 0, 100, 0, 1, 1, 0, 0, 0, 80, 1946601, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Exarch Orelis - On Data Set 1 1 - Run Script'), +(19466, 0, 2, 0, 0, 0, 100, 0, 0, 3500, 15000, 21000, 0, 11, 29426, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Exarch Orelis - In Combat - Cast \'Heroic Strike\''), +(19466, 0, 3, 0, 0, 0, 100, 0, 10000, 15000, 30000, 30000, 0, 11, 16509, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Exarch Orelis - In Combat - Cast \'Rend\''), +(19466, 0, 4, 0, 0, 0, 100, 0, 7500, 21000, 20000, 45000, 0, 11, 13730, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Exarch Orelis - In Combat - Cast \'Demoralizing Shout\''), +(19467, 0, 0, 0, 54, 0, 100, 0, 0, 0, 0, 0, 0, 81, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Anchorite Karja - On Just Summoned - Set Npc Flag '), +(19467, 0, 1, 0, 38, 0, 100, 0, 1, 1, 0, 0, 0, 80, 1946701, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Anchorite Karja - On Data Set 1 1 - Run Script'), +(19467, 0, 2, 0, 0, 0, 100, 0, 3500, 10000, 7500, 15000, 0, 11, 9734, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Anchorite Karja - In Combat - Cast \'Holy Smite\''), +(19467, 0, 3, 0, 14, 0, 100, 0, 4000, 40, 15000, 30000, 0, 11, 35096, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Anchorite Karja - Friendly At 4000 Health - Cast \'Greater Heal\''), +(20132, 0, 0, 0, 38, 0, 100, 0, 1, 1, 0, 0, 0, 80, 2013200, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Socrethar - On Data Set 1 1 - Run Script'), +(20132, 0, 1, 0, 38, 0, 100, 0, 2, 2, 0, 0, 0, 11, 35596, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Socrethar - On Data Set 2 2 - Cast \'Power of the Legion\''), +(20132, 0, 2, 0, 38, 0, 100, 0, 3, 3, 0, 0, 0, 66, 0, 0, 0, 0, 0, 0, 19, 18538, 50, 0, 0, 0, 0, 0, 0, 'Socrethar - On Data Set 3 3 - Set Orientation Closest Creature \'Ishanah\''), +(20132, 0, 3, 0, 38, 0, 100, 0, 4, 4, 0, 0, 0, 80, 2013201, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Socrethar - On Data Set 4 4 - Run Script'), +(20132, 0, 4, 0, 38, 0, 100, 0, 5, 5, 0, 0, 0, 80, 2013202, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Socrethar - On Data Set 5 5 - Run Script'), +(20132, 0, 5, 6, 6, 0, 100, 0, 0, 0, 0, 0, 0, 11, 35762, 3, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Socrethar - On Just Died - Cast \'Serverside - Socrethar Quest Credit\''), +(20132, 0, 6, 7, 61, 0, 100, 0, 0, 0, 0, 0, 0, 82, 3, 0, 0, 0, 0, 0, 19, 18538, 100, 0, 0, 0, 0, 0, 0, 'Socrethar - On Just Died - Add Npc Flags Gossip & Questgiver to Ishanah'), +(20132, 0, 7, 8, 61, 0, 100, 0, 0, 0, 0, 0, 0, 41, 60000, 0, 0, 0, 0, 0, 19, 20794, 100, 0, 0, 0, 0, 0, 0, 'Socrethar - On Just Died - Cleanup Event'), +(20132, 0, 8, 9, 61, 0, 100, 0, 0, 0, 0, 0, 0, 41, 60000, 0, 0, 0, 0, 0, 19, 18537, 100, 0, 0, 0, 0, 0, 0, 'Socrethar - On Just Died - Cleanup Event'), +(20132, 0, 9, 10, 61, 0, 100, 0, 0, 0, 0, 0, 0, 41, 150000, 0, 0, 0, 0, 0, 19, 18538, 100, 0, 0, 0, 0, 0, 0, 'Socrethar - On Just Died - Cleanup Event'), +(20132, 0, 10, 11, 61, 0, 100, 0, 0, 0, 0, 0, 0, 41, 60000, 0, 0, 0, 0, 0, 19, 19466, 100, 0, 0, 0, 0, 0, 0, 'Socrethar - On Just Died - Cleanup Event'), +(20132, 0, 11, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 41, 60000, 0, 0, 0, 0, 0, 19, 19467, 100, 0, 0, 0, 0, 0, 0, 'Socrethar - On Just Died - Cleanup Event'), +(20132, 0, 12, 0, 23, 0, 100, 0, 37539, 0, 3600, 3600, 0, 11, 37539, 32, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Socrethar - On Missing Aura \'Nether Protection\' - Cast \'Nether Protection\''), +(20132, 0, 13, 0, 0, 0, 100, 0, 2500, 7500, 15000, 25000, 0, 11, 15496, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Socrethar - In Combat - Cast \'Cleave\''), +(20132, 0, 14, 0, 0, 0, 100, 0, 10000, 15000, 40000, 60000, 0, 11, 37538, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Socrethar - In Combat - Cast \'Anti-Magic Shield\''), +(20132, 0, 15, 0, 0, 0, 100, 0, 17000, 24000, 10000, 35000, 0, 11, 28448, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Socrethar - In Combat - Cast \'Shadow Bolt Volley\''), +(20132, 0, 16, 0, 0, 0, 100, 0, 30000, 40000, 30000, 40000, 0, 11, 37540, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Socrethar - In Combat - Cast \'Fireball Barrage\''), +(20132, 0, 17, 0, 0, 0, 100, 0, 30000, 45000, 35000, 50000, 0, 11, 37537, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Socrethar - In Combat - Cast \'Backlash\''), +(20794, 0, 0, 0, 38, 0, 100, 0, 1, 1, 0, 0, 0, 53, 0, 2079400, 0, 0, 0, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Kaylaan the Lost - On Data Set 1 1 - Start Waypoint'), +(20794, 0, 1, 0, 58, 0, 100, 0, 4, 2079400, 0, 0, 0, 80, 2079400, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Kaylaan the Lost - On Waypoint Finished - Run Script'), +(20794, 0, 2, 0, 2, 0, 100, 1, 0, 25, 0, 0, 0, 80, 2079401, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Kaylaan the Lost - Between 0-25% Health - Run Script (No Repeat)'), +(20794, 0, 3, 0, 38, 0, 100, 0, 2, 2, 0, 0, 0, 66, 0, 0, 0, 0, 0, 0, 19, 18538, 50, 0, 0, 0, 0, 0, 0, 'Kaylaan the Lost - On Data Set 2 2 - Set Orientation Closest Creature \'Ishanah\''), +(20794, 0, 4, 0, 38, 0, 100, 0, 3, 3, 0, 0, 0, 90, 8, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Kaylaan the Lost - On Data Set 3 3 - Set Flag Standstate Kneel'), +(20794, 0, 5, 0, 38, 0, 100, 0, 4, 4, 0, 0, 0, 80, 2079402, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Kaylaan the Lost - On Data Set 4 4 - Run Script'), +(20794, 0, 6, 0, 8, 0, 100, 0, 35600, 0, 0, 0, 0, 11, 29266, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Kaylaan the Lost - On Spellhit \'Wrath of Socrethar\' - Cast \'Permanent Feign Death\''), +(20794, 0, 7, 0, 0, 0, 100, 0, 2500, 7500, 3500, 8500, 0, 11, 37552, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Kaylaan the Lost - In Combat - Cast \'Burning Light\''), +(20794, 0, 8, 0, 0, 0, 100, 0, 8000, 12000, 12000, 21000, 0, 11, 37553, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Kaylaan the Lost - In Combat - Cast \'Consecration\''); + +DELETE FROM `smart_scripts` WHERE (`source_type` = 9 AND `entryorguid` IN (1853700, 1946601, 1946701, 2013200, 2079400, 2079401, 1853800, 2013201, 2079402, 2013202)); +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(1853700, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 45, 1, 1, 0, 0, 0, 0, 19, 19466, 15, 0, 0, 0, 0, 0, 0, 'Adyen the Lightwarden - Actionlist - Set Data 1 1 on Exarch Orelis (Start Follow, Set Faction)'), +(1853700, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 45, 1, 1, 0, 0, 0, 0, 19, 19467, 15, 0, 0, 0, 0, 0, 0, 'Adyen the Lightwarden - Actionlist - Set Data 1 1 on Anchorite Karja (Start Follow, Set Faction)'), +(1853700, 9, 2, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 83, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Adyen the Lightwarden - Actionlist - Remove Npc Flags Gossip'), +(1853700, 9, 3, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 2, 495, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Adyen the Lightwarden - Actionlist - Set Faction 495'), +(1853700, 9, 4, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 18, 33600, 0, 0, 0, 0, 0, 10, 71631, 20132, 0, 0, 0, 0, 0, 0, 'Adyen the Lightwarden - Actionlist - Set Socrethar Flags Immune To Players & Immune To NPC\'s'), +(1853700, 9, 5, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 53, 0, 1853700, 0, 0, 0, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Adyen the Lightwarden - Actionlist - Start Waypoint'), +(1946601, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 2, 495, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Exarch Orelis - Actionlist - Set Faction 495'), +(1946601, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 29, 2, 120, 0, 0, 0, 0, 19, 18537, 15, 0, 0, 0, 0, 0, 0, 'Exarch Orelis - Actionlist - Start Follow Closest Creature \'Adyen the Lightwarden\''), +(1946601, 9, 2, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 19, 512, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Exarch Orelis - Actionlist - Remove Flags Immune To NPC\'s'), +(1946701, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 2, 495, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Anchorite Karja - Actionlist - Set Faction 495'), +(1946701, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 29, 2, 240, 0, 0, 0, 0, 19, 18537, 15, 0, 0, 0, 0, 0, 0, 'Anchorite Karja - Actionlist - Start Follow Closest Creature \'Adyen the Lightwarden\''), +(1946701, 9, 2, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 19, 512, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Anchorite Karja - Actionlist - Remove Flags Immune To NPC\'s'), +(2013200, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 19, 18537, 40, 0, 0, 0, 0, 0, 0, 'Socrethar - Actionlist - Say Line 0 (Adyen the Lightwarden)'), +(2013200, 9, 1, 0, 0, 0, 100, 0, 6000, 6000, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Socrethar - Actionlist - Say Line 0 (Socrethar)'), +(2013200, 9, 2, 0, 0, 0, 100, 0, 6000, 6000, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 19, 18537, 40, 0, 0, 0, 0, 0, 0, 'Socrethar - Actionlist - Say Line 1 (Adyen the Lightwarden)'), +(2013200, 9, 3, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 12, 20794, 6, 180000, 0, 0, 0, 8, 0, 0, 0, 0, 4955.0845, 3921.3977, 209.04483, 4.570129871368408, 'Socrethar - Actionlist - Summon Creature \'Kaylaan the Lost\''), +(2013200, 9, 5, 0, 0, 0, 100, 0, 6600, 6600, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Socrethar - Actionlist - Say Line 1 (Socrethar)'), +(2013200, 9, 6, 0, 0, 0, 100, 0, 800, 800, 0, 0, 0, 45, 1, 1, 0, 0, 0, 0, 19, 20794, 100, 0, 0, 0, 0, 0, 0, 'Socrethar - Actionlist - Set Data 1 1'), +(2079400, 9, 0, 0, 0, 0, 100, 0, 600, 600, 0, 0, 0, 90, 8, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Kaylaan the Lost - Actionlist - Set Flag Standstate Kneel'), +(2079400, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 1, 2, 0, 0, 0, 0, 0, 19, 18537, 40, 0, 0, 0, 0, 0, 0, 'Kaylaan the Lost - Actionlist - Say Line 2 (Adyen the Lightwarden)'), +(2079400, 9, 2, 0, 0, 0, 100, 0, 3400, 3400, 0, 0, 0, 91, 8, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Kaylaan the Lost - Actionlist - Set Flag Standstate Stand Up'), +(2079400, 9, 3, 0, 0, 0, 100, 0, 2000, 2000, 0, 0, 0, 53, 0, 2079401, 0, 0, 0, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Kaylaan the Lost - Actionlist - Start Waypoint'), +(2079400, 9, 4, 0, 0, 0, 100, 0, 2200, 2200, 0, 0, 0, 66, 0, 0, 0, 0, 0, 0, 19, 18537, 40, 0, 0, 0, 0, 0, 0, 'Kaylaan the Lost - Actionlist - Set Orientation Closest Creature \'Adyen the Lightwarden\''), +(2079400, 9, 5, 0, 0, 0, 100, 0, 3800, 3800, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Kaylaan the Lost - Actionlist - Say Line 0 (Self)'), +(2079400, 9, 6, 0, 0, 0, 100, 0, 8500, 8500, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Kaylaan the Lost - Actionlist - Say Line 1 (Self)'), +(2079400, 9, 7, 0, 0, 0, 100, 0, 8500, 8500, 0, 0, 0, 1, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Kaylaan the Lost - Actionlist - Say Line 2 (Self)'), +(2079400, 9, 8, 0, 0, 0, 100, 0, 6000, 6000, 0, 0, 0, 1, 3, 0, 0, 0, 0, 0, 19, 18537, 40, 0, 0, 0, 0, 0, 0, 'Kaylaan the Lost - Actionlist - Say Line 3 (Adyen the Lightwarden)'), +(2079400, 9, 9, 0, 0, 0, 100, 0, 6400, 6400, 0, 0, 0, 1, 3, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Kaylaan the Lost - Actionlist - Say Line 3 (Self)'), +(2079400, 9, 10, 0, 0, 0, 100, 0, 6400, 6400, 0, 0, 0, 45, 2, 2, 0, 0, 0, 0, 10, 71631, 20132, 0, 0, 0, 0, 0, 0, 'Kaylaan the Lost - Actionlist - Set Data 2 2 on Socrethar - Cast \'Power of the Legion\''), +(2079400, 9, 11, 0, 0, 0, 100, 0, 3600, 3600, 0, 0, 0, 2, 14, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Kaylaan the Lost - Actionlist - Set Faction 14'), +(2079400, 9, 12, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 1, 2, 0, 0, 0, 0, 0, 10, 71631, 20132, 0, 0, 0, 0, 0, 0, 'Kaylaan the Lost - Actionlist - Say Line 2 (Socrethar)'), +(2079400, 9, 13, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 42, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Kaylaan the Lost - Actionlist - Set Invincibility Hp 1'), +(2079400, 9, 14, 0, 0, 0, 100, 0, 100, 100, 0, 0, 0, 49, 0, 0, 0, 0, 0, 0, 19, 18537, 40, 0, 0, 0, 0, 0, 0, 'Kaylaan the Lost - Actionlist - Start Attacking'), +(2079401, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 18, 768, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Kaylaan the Lost - Actionlist - Set Flags Immune To Players & Immune To NPC\'s'), +(2079401, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 24, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Kaylaan the Lost - Actionlist - Evade'), +(2079401, 9, 2, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 1, 3, 0, 0, 0, 0, 0, 10, 71631, 20132, 0, 0, 0, 0, 0, 0, 'Kaylaan the Lost - Actionlist - Say Line 3 (Socrethar)'), +(2079401, 9, 3, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 12, 18538, 6, 180000, 0, 0, 0, 8, 0, 0, 0, 0, 4866.1997, 3799.0156, 199.14102, 0.46805843710899353, 'Kaylaan the Lost - Actionlist - Summon Creature \'Ishanah\''), +(2079401, 9, 4, 0, 0, 0, 100, 0, 1200, 1200, 0, 0, 0, 45, 1, 1, 0, 0, 0, 0, 19, 18538, 100, 0, 0, 0, 0, 0, 0, 'Kaylaan the Lost - Actionlist - Set Data 1 1 on Ishanah - Start WP'), +(2079401, 9, 5, 0, 0, 0, 100, 0, 5000, 5000, 0, 0, 0, 1, 4, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Kaylaan the Lost - Actionlist - Say Line 4 (Self)'), +(2079401, 9, 6, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 18, 256, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Kaylaan the Lost - Actionlist - Set Flags Immune To Players'), +(1853800, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 45, 2, 2, 0, 0, 0, 0, 19, 20794, 50, 0, 0, 0, 0, 0, 0, 'Ishanah - Actionlist - Set Data 2 2 on Kaylaan - Set Facing'), +(1853800, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 45, 3, 3, 0, 0, 0, 0, 10, 71631, 20132, 0, 0, 0, 0, 0, 0, 'Ishanah - Actionlist - Set Data 3 3 on Socrethar - Set Facing'), +(1853800, 9, 2, 0, 0, 0, 100, 0, 100, 100, 0, 0, 0, 1, 5, 0, 0, 0, 0, 0, 19, 20794, 50, 0, 0, 0, 0, 0, 0, 'Ishanah - Actionlist - Say Line 5 (Kaylaan)'), +(1853800, 9, 3, 0, 0, 0, 100, 0, 6000, 6000, 0, 0, 0, 45, 3, 3, 0, 0, 0, 0, 19, 20794, 50, 0, 0, 0, 0, 0, 0, 'Ishanah - Actionlist - Set Data 3 3 on Kaylaan - Set Standstate'), +(1853800, 9, 4, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Ishanah - Actionlist - Say Line 0 (Self)'), +(1853800, 9, 5, 0, 0, 0, 100, 0, 6200, 6200, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Ishanah - Actionlist - Say Line 1 (Self)'), +(1853800, 9, 6, 0, 0, 0, 100, 0, 7000, 7000, 0, 0, 0, 1, 4, 0, 0, 0, 0, 0, 10, 71631, 20132, 0, 0, 0, 0, 0, 0, 'Ishanah - Actionlist - Say Line 4 (Socrethar)'), +(1853800, 9, 7, 0, 0, 0, 100, 0, 3400, 3400, 0, 0, 0, 45, 4, 4, 0, 0, 0, 0, 10, 71631, 20132, 0, 0, 0, 0, 0, 0, 'Ishanah - Actionlist - Set Data 4 4 on Socrethar - Start Script'), +(2013201, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 11, 35598, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Socrethar - Actionlist - Cast \'Wrath of Socrethar\''), +(2013201, 9, 1, 0, 0, 0, 100, 0, 7300, 7300, 0, 0, 0, 45, 4, 4, 0, 0, 0, 0, 19, 20794, 50, 0, 0, 0, 0, 0, 0, 'Socrethar - Actionlist - Set Data 4 4 on Kaylaan - Start Script'), +(2079402, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 1, 6, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Kaylaan the Lost - Actionlist - Say Line 6'), +(2079402, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 91, 8, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Kaylaan the Lost - Actionlist - Remove FlagStandstate Kneel'), +(2079402, 9, 2, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 11, 35597, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Kaylaan the Lost - Actionlist - Cast \'Cancel Power of the Legion\''), +(2079402, 9, 3, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 53, 0, 2079402, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Kaylaan the Lost - Actionlist - Start Waypoint'), +(2079402, 9, 4, 0, 0, 0, 100, 0, 5600, 5600, 0, 0, 0, 2, 290, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Kaylaan the Lost - Actionlist - Set Faction 290'), +(2079402, 9, 5, 0, 0, 0, 100, 0, 4000, 4000, 0, 0, 0, 1, 7, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Kaylaan the Lost - Actionlist - Say Line 7'), +(2079402, 9, 6, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 11, 13874, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Kaylaan the Lost - Actionlist - Cast \'Divine Shield\''), +(2079402, 9, 7, 0, 0, 0, 100, 0, 1200, 1200, 0, 0, 0, 11, 35599, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Kaylaan the Lost - Actionlist - Cast \'Resurrection\''), +(2079402, 9, 8, 0, 0, 0, 100, 0, 6000, 6000, 0, 0, 0, 45, 5, 5, 0, 0, 0, 0, 10, 71631, 20132, 0, 0, 0, 0, 0, 0, 'Kaylaan the Lost - Actionlist - Set Data 5 5 on Socrethar - Start Last Script'), +(2013202, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 1, 5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Socrethar - Actionlist - Say Line 5'), +(2013202, 9, 1, 0, 0, 0, 100, 0, 6000, 6000, 0, 0, 0, 11, 35600, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Socrethar - Actionlist - Cast \'Wrath of Socrethar\''), +(2013202, 9, 2, 0, 0, 0, 100, 0, 3600, 3600, 0, 0, 0, 19, 768, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Socrethar - Actionlist - Remove Flags Immune To Players & Immune To NPC\'s'), +(2013202, 9, 3, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 49, 0, 0, 0, 0, 0, 0, 19, 18538, 50, 0, 0, 0, 0, 0, 0, 'Socrethar - Actionlist - Start Attacking'); + +-- Remove Civilian flag, Add IMMUNE_TO_PLAYERS instead +UPDATE `creature_template` SET `flags_extra`=`flags_extra`&~2, `unit_flags`=`unit_flags`|256 WHERE (`entry` IN (19466, 19467, 18538, 18537)); diff --git a/src/server/scripts/Outland/zone_netherstorm.cpp b/src/server/scripts/Outland/zone_netherstorm.cpp index 8936a0598..06526c199 100644 --- a/src/server/scripts/Outland/zone_netherstorm.cpp +++ b/src/server/scripts/Outland/zone_netherstorm.cpp @@ -37,1023 +37,6 @@ EndContentData */ #include "ScriptedGossip.h" #include "SpellInfo.h" -/* ################################### - # QUEST: Deathblow to the legion # - ################################### -*/ - -enum DeathblowToTheLegion -{ - ADYEN_THE_LIGHTBRINGER = 61021, - ANCHORITE_KARJA = 50001, - EXARCH_ORELIS = 50002, - SOCRETHAR = 20132, - KAYLAAN_THE_LOST = 20794, - ISHANAH_HIGH_PRIESTESS = 18538, - - DEATHBLOW_TO_THE_LEGION = 10409, // Quest ID - TURNING_POINT = 10507, // Quest ID - SOCRETHAR_QUEST_CREDIT = 35762, // Quest spell - SOCRETHAR_TP_STONE = 29796 -}; - -enum RoleplayActions -{ - // ADYEN TEXTS - EVENT_ADYEN_SAY_1 = 1, - EVENT_ADYEN_SAY_2 = 2, - EVENT_ADYEN_SAY_3 = 3, - EVENT_ADYEN_SAY_4 = 4, - - // SOCRETHAR TEXT - EVENT_SOCRETHAR_SAY_1 = 5, - EVENT_SOCRETHAR_SAY_2 = 6, - EVENT_SOCRETHAR_SAY_3 = 7, - EVENT_SOCRETHAR_SAY_4 = 8, - EVENT_SOCRETHAR_SAY_5 = 9, - EVENT_SOCRETHAR_SAY_6 = 10, - - // KAYLAAN TEXT - EVENT_KAYLAAN_SAY_1 = 11, - EVENT_KAYLAAN_SAY_2 = 12, - EVENT_KAYLAAN_SAY_3 = 13, - EVENT_KAYLAAN_SAY_4 = 14, - EVENT_KAYLAAN_SAY_5 = 15, // Spawn Ishanah at this point - EVENT_KAYLAAN_SAY_6 = 16, - EVENT_KAYLAAN_SAY_7 = 17, - - // ISHANAH TEXT - EVENT_ISHANAH_SAY_1 = 18, // Make kaylaan bow - EVENT_ISHANAH_SAY_2 = 19, - - // SOCRETHAR ROLEPLAY EVENTS - EVENT_KILL_ISHANAH = 20, - EVENT_KILL_KAYLAAN = 21, - EVENT_FINAL_FIGHT = 22, // On death grant credit to all players on threat list - - // KAYLAAN ROLEPLAY EVENTS - EVENT_KAYLAAN_WALK_TO_ADYEN = 23, // Adyen talks and 3s later he triggers next event - EVENT_KAYLAAN_RESSURECTION = 24, // Ress Ishanah - EVENT_FIGHT_ALDOR = 25, - EVENT_END_ALDOR_FIGHT = 26, - RESET_DEATHBLOW_EVENT = 27 -}; - -enum Adyen -{ - // ADYEN SPELL EVENTS - EVENT_CRUSADER_STRIKE = 1, - EVENT_HAMMER_OF_JUSTICE = 2, - EVENT_HOLY_LIGHT = 3, - - // ADYEN ROLEPLAY EVENTS - EVENT_START_PLAYER_READY = 4, - - // ADYEN SPELLS - CRUSADER_STRIKE = 14518, - HAMMER_OF_JUSTICE = 13005, - HOLY_LIGHT = 13952, - REDEMPTION = 7328, - DIVINE_SHIELD = 40733, - - ADYEN_PATH_ID = 610210 -}; - -enum Karja -{ - // KARJA SPELL EVENTS - EVENT_SPELL_HOLY_SMITE = 1, - - // KARJA ROLEPLAY EVENTS - EVENT_KARJA_WALK = 2, - - // KARJA SPELLS - HOLY_SMITE_KARJA = 9734, - - KARJA_PATH_ID = 500010 -}; - -enum Orelis -{ - // ORELIS SPELL EVENTS - EVENT_SPELL_DEMORALIZING_SHOUT = 1, - EVENT_SPELL_HEROIC_STRIKE = 2, - EVENT_SPELL_REND = 3, - - // ORELIS ROLEPLAY EVENTS - EVENT_ORELIS_WALK = 4, - - // ORELIS SPELLS - DEMORALIZING_SHOUT = 13730, - HEROIC_STRIKE = 29426, - REND = 16509, - - ORELIS_PATH_ID = 500020 -}; - -enum Kaylaan -{ - // KAYLAAN SPELL EVENTS - EVENT_SPELL_BURNING_LIGHT = 6, - EVENT_SPELL_CONSECRATION = 7, - - // KAYLAAN SPELLS - BURNING_LIGHT = 37552, - CONSECRATION = 37553, - - KAYLAAN_PATH_ID1 = 207940, - KAYLAAN_PATH_ID2 = 207941 -}; - -enum Socrethar -{ - // SOCRETHAR SPELL EVENTS # start high to avoid issues with RP enum - EVENT_SPELL_ANTI_MAGIC_SHIELD = 40, - EVENT_SPELL_BACKLASH = 41, - EVENT_SPELL_CLEAVE = 42, - EVENT_SPELL_FIREBALL_BARRAGE = 43, - EVENT_SPELL_NETHER_PROTECTION = 44, - EVENT_SPELL_POWER_OF_THE_LEGION = 45, - EVENT_SPELL_SHADOW_BOLT_VOLLEY = 46, - EVENT_ISHANAH_DIES = 47, - EVENT_KAYLAAN_DIES = 48, - EVENT_ISHANAH_IS_BACK_AGAIN = 49, - - // SOCRETHAR SPELLS - ANTI_MAGIC_SHIELD = 37538, - BACKLASH = 37537, - CLEAVE = 15496, - FIREBALL_BARRAGE = 37540, - NETHER_PROTECTION = 37539, - POWER_OF_THE_LEGION = 35596, - SHADOW_BOLT_VOLLEY = 28448, - WRATH_OF_SOCRETHAR = 35600 -}; - -enum Ishanah -{ - ISHANAH_PATH_ID = 500050 -}; - -// Ishanah script part is in zone shattrath city . cpp - -const Position AdyenSpawnPosition { 4804.839355f, 3773.218750f, 210.530884f, 5.517495f }; -const Position OrelisSpawnPosition { 4805.345215f, 3774.829346f, 210.535095f, 5.517495f }; -const Position KarjaSpawnPosition { 4803.249512f, 3772.649170f, 210.535095f, 5.517495f }; -const Position KaylaanSpawnPosition { 4955.089355f, 3916.570557f, 209.577209f, 4.603052f }; -const Position IshanahSpawnPosition { 4926.066895f, 3825.549072f, 211.494125f, 0.510522f }; - -class deathblow_to_the_legion_trigger : public CreatureScript -{ -public: - deathblow_to_the_legion_trigger() : CreatureScript("deathblow_to_the_legion_trigger") { } - - CreatureAI* GetAI(Creature* creature) const override - { - return new deathblow_to_the_legion_triggerAI(creature); - } - - struct deathblow_to_the_legion_triggerAI : public ScriptedAI - { - deathblow_to_the_legion_triggerAI(Creature* creature) : ScriptedAI(creature), _summons(me) { } - - EventMap _events; - SummonList _summons; - - void JustSummoned(Creature* cr) override { _summons.Summon(cr); } - - void MoveInLineOfSight(Unit* who) override - { - if (who->GetTypeId() == TYPEID_PLAYER && who->IsAlive()) - { - if (who->ToPlayer()->GetQuestStatus(DEATHBLOW_TO_THE_LEGION) == QUEST_STATUS_INCOMPLETE && me->FindNearestCreature(SOCRETHAR, 500.0f, true)) - { - if (!_summons.HasEntry(ADYEN_THE_LIGHTBRINGER)) - { - _summons.RemoveNotExisting(); - me->SummonCreature(ADYEN_THE_LIGHTBRINGER, AdyenSpawnPosition, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 300000); - if (!_summons.HasEntry(EXARCH_ORELIS)) - me->SummonCreature(EXARCH_ORELIS, OrelisSpawnPosition, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 300000); - if (!_summons.HasEntry(ANCHORITE_KARJA)) - me->SummonCreature(ANCHORITE_KARJA, KarjaSpawnPosition, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 300000); - } - } - } - } - }; -}; - -class adyen_the_lightbringer : public CreatureScript -{ -public: - adyen_the_lightbringer(): CreatureScript("adyen_the_lightbringer") { } - - bool OnGossipHello(Player* player, Creature* creature) override - { - if (player->GetQuestStatus(DEATHBLOW_TO_THE_LEGION) == QUEST_STATUS_INCOMPLETE) - AddGossipItemFor(player, ADYEN_THE_LIGHTBRINGER, 0, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); - - SendGossipMenuFor(player, player->GetGossipTextId(creature), creature->GetGUID()); - - return true; - } - - bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) override - { - ClearGossipMenuFor(player); - - if (action == GOSSIP_ACTION_INFO_DEF + 1) - { - CloseGossipMenuFor(player); - creature->RemoveNpcFlag(UNIT_NPC_FLAG_GOSSIP); - creature->AI()->DoAction(EVENT_START_PLAYER_READY); - if (Creature* orelis = creature->FindNearestCreature(EXARCH_ORELIS, 15.0f, true)) - orelis->AI()->DoAction(EVENT_ORELIS_WALK); - if (Creature* karja = creature->FindNearestCreature(ANCHORITE_KARJA, 15.0f, true)) - karja->AI()->DoAction(EVENT_KARJA_WALK); - if (Creature* socrethar = creature->FindNearestCreature(SOCRETHAR, 500.0f, true)) - socrethar->SetUnitFlag(UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_DISABLE_MOVE); - } - - return true; - } - - struct adyen_the_lightbringerAI : public ScriptedAI - { - adyen_the_lightbringerAI(Creature* creature) : ScriptedAI(creature), event_started(false) { } - - EventMap _events; - uint32 eventTimer, eventPhase; - bool event_started = false; - - void DoAction(int32 param) override - { - if (param == EVENT_START_PLAYER_READY) - { - me->GetMotionMaster()->MovePath(ADYEN_PATH_ID, false); - event_started = true; - } - else if (param == RESET_DEATHBLOW_EVENT) - { - me->ClearInCombat(); - me->AttackStop(); - me->GetMotionMaster()->MoveTargetedHome(); - me->DespawnOrUnsummon(15000); - } - } - - void MovementInform(uint32 type, uint32 point) override - { - if (type != POINT_MOTION_TYPE) - if (point == 9) - { - if (Creature* socrethar = me->FindNearestCreature(SOCRETHAR, 50.0f, true)) - socrethar->AI()->DoAction(EVENT_ADYEN_SAY_1); - me->SetHomePosition(me->GetPosition()); - } - } - - void JustEngagedWith(Unit* /*who*/) override - { - _events.ScheduleEvent(EVENT_CRUSADER_STRIKE, 3000); - _events.ScheduleEvent(EVENT_HAMMER_OF_JUSTICE, 6000); - _events.ScheduleEvent(EVENT_HOLY_LIGHT, 1000); - } - - void UpdateAI(uint32 diff) override - { - if (!UpdateVictim()) - return; - - if (me->HasUnitState(UNIT_STATE_CASTING)) - return; - - _events.Update(diff); - - while (uint32 eventId = _events.ExecuteEvent()) - { - switch (eventId) - { - case EVENT_CRUSADER_STRIKE: - me->CastSpell(me->GetVictim(), CRUSADER_STRIKE, false); - _events.RepeatEvent(3500); - break; - case EVENT_HAMMER_OF_JUSTICE: - me->CastSpell(me->GetVictim(), HAMMER_OF_JUSTICE, false); - _events.RepeatEvent(urand(10000, 14000)); - break; - case EVENT_HOLY_LIGHT: - // if low enough will heal and trigger again in 18s. - if (me->GetHealthPct() <= 45) - { - me->CastSpell(me, HOLY_LIGHT, false); - _events.RepeatEvent(urand(18000, 22000)); - } - else if (Unit* who = me->FindNearestCreature(ANCHORITE_KARJA, 30.0f, true)) - { - if (who->GetHealthPct() <= 45) - { - me->CastSpell(who, HOLY_LIGHT, false); - _events.RepeatEvent(urand(18000, 22000)); - } - } - else if (Unit* who = me->FindNearestCreature(EXARCH_ORELIS, 30.0f, true)) - { - if (who->GetHealthPct() <= 45) - { - me->CastSpell(who, HOLY_LIGHT, false); - _events.RepeatEvent(urand(18000, 22000)); - } - } - else - _events.RepeatEvent(1000); - break; - } - } - - DoMeleeAttackIfReady(); - } - }; - - CreatureAI* GetAI(Creature* creature) const override - { - return new adyen_the_lightbringerAI(creature); - } -}; - -class anchorite_karja : public CreatureScript -{ -public: - anchorite_karja() : CreatureScript("anchorite_karja") { } - - struct anchorite_karjaAI : public ScriptedAI - { - anchorite_karjaAI(Creature* creature) : ScriptedAI(creature) { } - - EventMap _events; - - void DoAction(int32 param) override - { - if (param == EVENT_KARJA_WALK) - { - me->GetMotionMaster()->MovePath(KARJA_PATH_ID, false); - me->RemoveNpcFlag(UNIT_NPC_FLAG_GOSSIP); - } - else if (param == RESET_DEATHBLOW_EVENT) - { - me->ClearInCombat(); - me->AttackStop(); - me->GetMotionMaster()->MoveTargetedHome(); - me->DespawnOrUnsummon(15000); - } - } - - void MovementInform(uint32 type, uint32 point) override - { - if (type != POINT_MOTION_TYPE) - if (point == 11) - me->SetHomePosition(me->GetPosition()); - } - - void JustEngagedWith(Unit* who) override - { - AttackStart(who); - _events.ScheduleEvent(EVENT_SPELL_HOLY_SMITE, 1000); - } - - void UpdateAI(uint32 diff) override - { - _events.Update(diff); - - if (!UpdateVictim()) - return; - - if (me->HasUnitState(UNIT_STATE_CASTING)) - return; - - switch ( _events.ExecuteEvent()) - { - case EVENT_SPELL_HOLY_SMITE: - me->CastSpell(me->GetVictim(), HOLY_SMITE_KARJA, false); - _events.ScheduleEvent(EVENT_SPELL_HOLY_SMITE, 2500); - break; - } - - DoMeleeAttackIfReady(); - } - }; - - CreatureAI* GetAI(Creature* creature) const override - { - return new anchorite_karjaAI(creature); - } -}; - -class exarch_orelis : public CreatureScript -{ -public: - exarch_orelis() : CreatureScript("exarch_orelis") { } - - CreatureAI* GetAI(Creature* creature) const override - { - return new exarch_orelisAI(creature); - } - - struct exarch_orelisAI : public ScriptedAI - { - exarch_orelisAI(Creature* creature) : ScriptedAI(creature) { } - - EventMap _events; - - void DoAction(int32 param) override - { - if (param == EVENT_ORELIS_WALK) - { - me->GetMotionMaster()->MovePath(ORELIS_PATH_ID, false); - me->RemoveNpcFlag(UNIT_NPC_FLAG_GOSSIP); - } - else if (param == RESET_DEATHBLOW_EVENT) - { - me->ClearInCombat(); - me->AttackStop(); - me->GetMotionMaster()->MoveTargetedHome(); - me->DespawnOrUnsummon(15000); - } - } - - void JustSummoned(Creature*) override - { - me->SetHomePosition(me->GetPosition()); - } - - void AttackStart(Unit* who) override - { - ScriptedAI::AttackStart(who); - } - - void MovementInform(uint32 type, uint32 point) override - { - if (type != POINT_MOTION_TYPE) - if (point == 11) - me->SetHomePosition(me->GetPosition()); - } - - void JustEngagedWith(Unit* /*who*/) override - { - _events.ScheduleEvent(EVENT_SPELL_DEMORALIZING_SHOUT, 1000); - _events.ScheduleEvent(EVENT_SPELL_HEROIC_STRIKE, urand(2500, 4000)); - _events.ScheduleEvent(EVENT_SPELL_REND, urand(1500, 6000)); - } - - void UpdateAI(uint32 diff) override - { - _events.Update(diff); - - if (!UpdateVictim()) - return; - - if (me->HasUnitState(UNIT_STATE_CASTING)) - return; - - switch (_events.ExecuteEvent()) - { - case EVENT_SPELL_DEMORALIZING_SHOUT: - if (me->FindNearestCreature(me->GetVictim()->GetEntry(), 10.0f, true)) - { - me->CastSpell(me->GetVictim(), DEMORALIZING_SHOUT, false); - _events.ScheduleEvent(EVENT_SPELL_DEMORALIZING_SHOUT, urand(10000, 12000)); - } - else - _events.ScheduleEvent(EVENT_SPELL_DEMORALIZING_SHOUT, 1000); - break; - case EVENT_SPELL_HEROIC_STRIKE: - me->CastSpell(me->GetVictim(), HEROIC_STRIKE, false); - _events.ScheduleEvent(EVENT_SPELL_HEROIC_STRIKE, urand(3000, 4000)); - break; - case EVENT_SPELL_REND: - me->CastSpell(me->GetVictim(), REND, false); - _events.ScheduleEvent(EVENT_SPELL_REND, urand(5000, 8000)); - break; - } - - DoMeleeAttackIfReady(); - } - }; -}; - -class socrethar : public CreatureScript -{ -public: - socrethar() : CreatureScript("socrethar") { } - - struct socretharAI : public ScriptedAI - { - socretharAI(Creature* creature) : ScriptedAI(creature), - adyen(nullptr), orelis(nullptr), karja(nullptr), kaylaan(nullptr), ishanah(nullptr) { } - - EventMap _actionEvents, combatEvents; - bool DeathblowToTheLegionRunning = false; - Creature* adyen, *orelis, *karja, *kaylaan, *ishanah; - - bool GetCreature(uint32 CreatureID) - { - switch (CreatureID) - { - case ADYEN_THE_LIGHTBRINGER: - adyen = me->FindNearestCreature(ADYEN_THE_LIGHTBRINGER, 100.0f, true); - if (adyen) - return true; - break; - case EXARCH_ORELIS: - orelis = me->FindNearestCreature(EXARCH_ORELIS, 100.0f, true); - if (orelis) - return true; - break; - case ANCHORITE_KARJA: - karja = me->FindNearestCreature(ANCHORITE_KARJA, 100.0f, true); - if (karja) - return true; - break; - case KAYLAAN_THE_LOST: - kaylaan = me->FindNearestCreature(KAYLAAN_THE_LOST, 100.0f, true); - if (kaylaan) - return true; - break; - case ISHANAH_HIGH_PRIESTESS: - ishanah = me->FindNearestCreature(ISHANAH_HIGH_PRIESTESS, 100.0f, true); - if (!ishanah) - { - // Ishanah may be dead; in this case we also need a reference to the creature for the respawn - ishanah = me->FindNearestCreature(ISHANAH_HIGH_PRIESTESS, 100.0f, false); - if (ishanah) - return true; - } - else - return true; - break; - } - return false; // When he doesn't find anyone - } - - void Reset() override - { - me->SetReactState(REACT_PASSIVE); - me->SetFaction(FACTION_DEMON); - } - - void DoAction(int32 param) override - { - switch (param) - { - case EVENT_ADYEN_SAY_1: - DeathblowToTheLegionRunning = true; - _actionEvents.ScheduleEvent(EVENT_ADYEN_SAY_1, 1000); - break; - case EVENT_ADYEN_SAY_3: - _actionEvents.ScheduleEvent(EVENT_ADYEN_SAY_3, 2000); - break; - case EVENT_KAYLAAN_SAY_1: - _actionEvents.ScheduleEvent(EVENT_KAYLAAN_SAY_1, 4000); - break; - case EVENT_END_ALDOR_FIGHT: - _actionEvents.ScheduleEvent(EVENT_END_ALDOR_FIGHT, 1); - break; - case EVENT_ISHANAH_SAY_1: - _actionEvents.ScheduleEvent(EVENT_ISHANAH_SAY_1, 2000); - break; - case RESET_DEATHBLOW_EVENT: - DeathblowToTheLegionRunning = false; - Reset(); - break; - } - } - - void JustDied(Unit* /*killer*/) override - { - DoCast(me, SOCRETHAR_QUEST_CREDIT); - - if (GetCreature(ISHANAH_HIGH_PRIESTESS)) - { - ishanah->SetNpcFlag(UNIT_NPC_FLAG_GOSSIP | UNIT_NPC_FLAG_QUESTGIVER); - ishanah->DespawnOrUnsummon(60000); - } - - if (GetCreature(ADYEN_THE_LIGHTBRINGER)) - adyen->GetAI()->DoAction(RESET_DEATHBLOW_EVENT); - - if (GetCreature(EXARCH_ORELIS)) - orelis->GetAI()->DoAction(RESET_DEATHBLOW_EVENT); - - if (GetCreature(ANCHORITE_KARJA)) - karja->GetAI()->DoAction(RESET_DEATHBLOW_EVENT); - } - - void JustEngagedWith(Unit* /*who*/) override - { - combatEvents.ScheduleEvent(EVENT_SPELL_ANTI_MAGIC_SHIELD, 20000); - combatEvents.ScheduleEvent(EVENT_SPELL_BACKLASH, 4000); - combatEvents.ScheduleEvent(EVENT_SPELL_CLEAVE, 2000); - combatEvents.ScheduleEvent(EVENT_SPELL_FIREBALL_BARRAGE, 9000); - combatEvents.ScheduleEvent(EVENT_SPELL_SHADOW_BOLT_VOLLEY, 5000); - combatEvents.ScheduleEvent(EVENT_SPELL_NETHER_PROTECTION, 1); - } - - void DamageTaken(Unit* /*attacker*/, uint32& /*damage*/, DamageEffectType /*damagetype*/, SpellSchoolMask /*damageSchoolMask*/) override - { - me->SetReactState(REACT_AGGRESSIVE); - } - - void UpdateAI(uint32 diff) override - { - if (DeathblowToTheLegionRunning) - { - _actionEvents.Update(diff); - - switch (_actionEvents.ExecuteEvent()) - { - case EVENT_ADYEN_SAY_1: - if (GetCreature(ADYEN_THE_LIGHTBRINGER)) - adyen->AI()->Talk(0); - _actionEvents.ScheduleEvent(EVENT_SOCRETHAR_SAY_1, 11000); - break; - case EVENT_SOCRETHAR_SAY_1: - Talk(0); - _actionEvents.ScheduleEvent(EVENT_ADYEN_SAY_2, 7000); - break; - case EVENT_ADYEN_SAY_2: - if (GetCreature(ADYEN_THE_LIGHTBRINGER)) - adyen->AI()->Talk(1); - _actionEvents.ScheduleEvent(EVENT_SOCRETHAR_SAY_2, 11000); - break; - case EVENT_SOCRETHAR_SAY_2: - Talk(1); - if (Creature* summonKaylaan = me->SummonCreature(KAYLAAN_THE_LOST, KaylaanSpawnPosition, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 240000)) - summonKaylaan->GetMotionMaster()->MovePath(KAYLAAN_PATH_ID1, false); - break; - case EVENT_ADYEN_SAY_3: - if (GetCreature(ADYEN_THE_LIGHTBRINGER)) - adyen->AI()->Talk(2); - if (GetCreature(KAYLAAN_THE_LOST)) - kaylaan->SetStandState(UNIT_STAND_STATE_STAND); - _actionEvents.ScheduleEvent(EVENT_KAYLAAN_WALK_TO_ADYEN, 3500); - break; - case EVENT_KAYLAAN_WALK_TO_ADYEN: - if (GetCreature(KAYLAAN_THE_LOST)) - kaylaan->GetMotionMaster()->MovePath(KAYLAAN_PATH_ID2, false); - break; - case EVENT_KAYLAAN_SAY_1: - if (GetCreature(KAYLAAN_THE_LOST)) - { - kaylaan->AI()->Talk(0); - kaylaan->SetHomePosition(kaylaan->GetPosition()); - } - _actionEvents.ScheduleEvent(EVENT_KAYLAAN_SAY_2, 9000); - break; - case EVENT_KAYLAAN_SAY_2: - if (GetCreature(KAYLAAN_THE_LOST)) - kaylaan->AI()->Talk(1); - _actionEvents.ScheduleEvent(EVENT_KAYLAAN_SAY_3, 8000); - break; - case EVENT_KAYLAAN_SAY_3: - if (GetCreature(KAYLAAN_THE_LOST)) - kaylaan->AI()->Talk(2); - _actionEvents.ScheduleEvent(EVENT_ADYEN_SAY_4, 8000); - break; - case EVENT_ADYEN_SAY_4: - if (GetCreature(ADYEN_THE_LIGHTBRINGER)) - adyen->AI()->Talk(3); - _actionEvents.ScheduleEvent(EVENT_KAYLAAN_SAY_4, 11000); - break; - case EVENT_KAYLAAN_SAY_4: - if (GetCreature(KAYLAAN_THE_LOST)) - kaylaan->AI()->Talk(3); - _actionEvents.ScheduleEvent(EVENT_SPELL_POWER_OF_THE_LEGION, 5000); - break; - case EVENT_SPELL_POWER_OF_THE_LEGION: - if (GetCreature(KAYLAAN_THE_LOST)) - me->CastSpell(kaylaan, POWER_OF_THE_LEGION, false); - Talk(2); - _actionEvents.ScheduleEvent(EVENT_FIGHT_ALDOR, 3000); - break; - case EVENT_FIGHT_ALDOR: - if (GetCreature(KAYLAAN_THE_LOST)) - { - kaylaan->SetFaction(FACTION_DEMON); - if (GetCreature(ADYEN_THE_LIGHTBRINGER)) - kaylaan->AI()->AttackStart(adyen); - } - break; - case EVENT_END_ALDOR_FIGHT: - if (GetCreature(KAYLAAN_THE_LOST)) - { - kaylaan->SetFaction(FACTION_DEMON); - kaylaan->GetMotionMaster()->MoveTargetedHome(); - kaylaan->CombatStop(); - kaylaan->ClearInCombat(); - } - - if (GetCreature(ADYEN_THE_LIGHTBRINGER)) - { - adyen->GetMotionMaster()->MoveTargetedHome(); - adyen->CombatStop(); - adyen->ClearInCombat(); - } - - if (GetCreature(EXARCH_ORELIS)) - { - orelis->GetMotionMaster()->MoveTargetedHome(); - orelis->CombatStop(); - orelis->ClearInCombat(); - } - - if (GetCreature(ANCHORITE_KARJA)) - { - karja->GetMotionMaster()->MoveTargetedHome(); - karja->CombatStop(); - karja->ClearInCombat(); - } - _actionEvents.ScheduleEvent(EVENT_SOCRETHAR_SAY_4, 2000); - break; - case EVENT_SOCRETHAR_SAY_4: - Talk(3); - _actionEvents.ScheduleEvent(EVENT_KAYLAAN_SAY_5, 8000); - break; - case EVENT_KAYLAAN_SAY_5: - if (GetCreature(KAYLAAN_THE_LOST)) - kaylaan->AI()->Talk(4); - if (Creature* summonIshanah = me->SummonCreature(ISHANAH_HIGH_PRIESTESS, IshanahSpawnPosition, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 180000)) - { - summonIshanah->GetMotionMaster()->MovePath(ISHANAH_PATH_ID, false); - summonIshanah->RemoveNpcFlag(UNIT_NPC_FLAG_GOSSIP | UNIT_NPC_FLAG_QUESTGIVER); - } - break; - case EVENT_ISHANAH_SAY_1: - if (GetCreature(ISHANAH_HIGH_PRIESTESS)) - ishanah->AI()->Talk(0); - if (GetCreature(KAYLAAN_THE_LOST)) - { - kaylaan->RemoveAurasDueToSpell(POWER_OF_THE_LEGION); - kaylaan->SetStandState(UNIT_STAND_STATE_KNEEL); - } - _actionEvents.ScheduleEvent(EVENT_ISHANAH_SAY_2, 6000); - break; - case EVENT_ISHANAH_SAY_2: - if (GetCreature(ISHANAH_HIGH_PRIESTESS)) - ishanah->AI()->Talk(1); - _actionEvents.ScheduleEvent(EVENT_SOCRETHAR_SAY_5, 8000); - break; - case EVENT_SOCRETHAR_SAY_5: - Talk(4); - _actionEvents.ScheduleEvent(EVENT_KILL_ISHANAH, 4000); - break; - case EVENT_KILL_ISHANAH: - if (GetCreature(ISHANAH_HIGH_PRIESTESS)) - me->CastSpell(ishanah, WRATH_OF_SOCRETHAR); - _actionEvents.ScheduleEvent(EVENT_ISHANAH_DIES, 1500); - break; - case EVENT_ISHANAH_DIES: - if (GetCreature(ISHANAH_HIGH_PRIESTESS)) - me->Kill(me, ishanah); - _actionEvents.ScheduleEvent(EVENT_KAYLAAN_SAY_6, 4000); - break; - case EVENT_KAYLAAN_SAY_6: - if (GetCreature(KAYLAAN_THE_LOST)) - { - kaylaan->AI()->Talk(6); - kaylaan->SetStandState(UNIT_STAND_STATE_STAND); - kaylaan->GetMotionMaster()->MovePath(207942, false); - } - _actionEvents.ScheduleEvent(EVENT_KAYLAAN_SAY_7, 9000); - break; - case EVENT_KAYLAAN_SAY_7: - if (GetCreature(KAYLAAN_THE_LOST)) - { - kaylaan->AI()->Talk(7); - kaylaan->CastSpell(kaylaan, DIVINE_SHIELD); - } - _actionEvents.ScheduleEvent(EVENT_KAYLAAN_RESSURECTION, 1000); - break; - case EVENT_KAYLAAN_RESSURECTION: - if (GetCreature(KAYLAAN_THE_LOST) && GetCreature(ISHANAH_HIGH_PRIESTESS)) - kaylaan->CastSpell(ishanah, REDEMPTION); - _actionEvents.ScheduleEvent(EVENT_ISHANAH_IS_BACK_AGAIN, 11000); - break; - case EVENT_ISHANAH_IS_BACK_AGAIN: - if (GetCreature(ISHANAH_HIGH_PRIESTESS)) - { - ishanah->Respawn(); - ishanah->setActive(true); // ensure that Ishanah disappears, even when no player is near - ishanah->DespawnOrUnsummon(600000); // ensure that Ishanah disappears after 10 minutes - ishanah->RemoveNpcFlag(UNIT_NPC_FLAG_GOSSIP | UNIT_NPC_FLAG_QUESTGIVER); - } - _actionEvents.ScheduleEvent(EVENT_SOCRETHAR_SAY_6, 3000); - break; - case EVENT_SOCRETHAR_SAY_6: - Talk(5); - _actionEvents.ScheduleEvent(EVENT_KILL_KAYLAAN, 4000); - break; - case EVENT_KILL_KAYLAAN: - if (GetCreature(KAYLAAN_THE_LOST)) - me->CastSpell(kaylaan, WRATH_OF_SOCRETHAR); - _actionEvents.ScheduleEvent(EVENT_KAYLAAN_DIES, 1500); - break; - case EVENT_KAYLAAN_DIES: - if (GetCreature(KAYLAAN_THE_LOST)) - me->Kill(me, kaylaan); - _actionEvents.ScheduleEvent(EVENT_FINAL_FIGHT, 3000); - break; - case EVENT_FINAL_FIGHT: - // Prepare Socrethar for encounter - me->SetFaction(FACTION_DEMON); - me->RemoveUnitFlag(UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_DISABLE_MOVE); - me->SetReactState(REACT_AGGRESSIVE); - - // Engage combat with Socrethar - if (GetCreature(ADYEN_THE_LIGHTBRINGER)) - adyen->AI()->JustEngagedWith(me); - if (GetCreature(EXARCH_ORELIS)) - orelis->AI()->JustEngagedWith(me); - if (GetCreature(ANCHORITE_KARJA)) - karja->AI()->JustEngagedWith(me); - if (GetCreature(ISHANAH_HIGH_PRIESTESS)) - ishanah->AI()->JustEngagedWith(me); - break; - } - } - - if (!UpdateVictim()) - return; - - if (me->HasUnitState(UNIT_STATE_CASTING)) - return; - - combatEvents.Update(diff); - - switch (combatEvents.ExecuteEvent()) - { - case EVENT_SPELL_NETHER_PROTECTION: - if (!me->HasAura(NETHER_PROTECTION)) - me->CastSpell(me, NETHER_PROTECTION, false); - break; - case EVENT_SPELL_ANTI_MAGIC_SHIELD: - me->CastSpell(me, ANTI_MAGIC_SHIELD, false); - combatEvents.ScheduleEvent(EVENT_SPELL_ANTI_MAGIC_SHIELD, 20000); - break; - case EVENT_SPELL_BACKLASH: - DoCastVictim(BACKLASH); - combatEvents.ScheduleEvent(EVENT_SPELL_BACKLASH, 7000); - break; - case EVENT_SPELL_CLEAVE: - me->CastSpell(me->GetVictim(), CLEAVE, false); - combatEvents.ScheduleEvent(EVENT_SPELL_CLEAVE, 3000); - break; - case EVENT_SPELL_FIREBALL_BARRAGE: - me->CastSpell(me->GetVictim(), FIREBALL_BARRAGE, false); - combatEvents.ScheduleEvent(EVENT_SPELL_FIREBALL_BARRAGE, 15000); - break; - case EVENT_SPELL_SHADOW_BOLT_VOLLEY: - me->CastSpell(me->GetVictim(), SHADOW_BOLT_VOLLEY, false); - combatEvents.ScheduleEvent(EVENT_SPELL_SHADOW_BOLT_VOLLEY, 10000); - break; - } - - DoMeleeAttackIfReady(); - } - }; - - CreatureAI* GetAI(Creature* creature) const override - { - return new socretharAI(creature); - } -}; - -class kaylaan_the_lost : public CreatureScript -{ -public: - kaylaan_the_lost() : CreatureScript("kaylaan_the_lost") { } - - struct kaylaan_the_lostAI : public ScriptedAI - { - kaylaan_the_lostAI(Creature* creature) : ScriptedAI(creature) { } - - EventMap _events; - bool first_waypath_done = false; - bool second_waypath_done = false; - bool adyen_dead = false, karja_dead = false, orelis_dead = false; - - void JustEngagedWith(Unit* /*who*/) override - { - _events.ScheduleEvent(EVENT_SPELL_BURNING_LIGHT, 2000); - _events.ScheduleEvent(EVENT_SPELL_CONSECRATION, 3000); - } - - void ResetDeathblowEvent(bool event_over /* If true then reset the event*/) - { - me->RemoveAurasDueToSpell(POWER_OF_THE_LEGION); - me->GetMotionMaster()->MoveTargetedHome(); - - // Get socrethar AI so we can reset the event - if (event_over) - { - if (Unit* socrethar = me->FindNearestCreature(SOCRETHAR, 100.0f, true)) - socrethar->GetAI()->DoAction(RESET_DEATHBLOW_EVENT); - - karja_dead = false; - orelis_dead = false; - adyen_dead = false; - - me->DespawnOrUnsummon(5000); // Despawn in 5 seconds to reset event - } - } - - void KilledUnit(Unit* victim) override - { - switch (victim->GetEntry()) - { - case ADYEN_THE_LIGHTBRINGER: - adyen_dead = true; - break; - case ANCHORITE_KARJA: - karja_dead = true; - break; - case EXARCH_ORELIS: - orelis_dead = true; - break; - } - - if (adyen_dead && karja_dead && orelis_dead) - ResetDeathblowEvent(true); - } - - void MovementInform(uint32 type, uint32 point) override - { - if (type != POINT_MOTION_TYPE) - { - if (point == 4) - { - // First waypath complete - me->SetStandState(UNIT_STAND_STATE_KNEEL); - if (Creature* socrethar = me->FindNearestCreature(SOCRETHAR, 30.0f, true)) - socrethar->AI()->DoAction(EVENT_ADYEN_SAY_3); - first_waypath_done = true; - } - else if (point == 0) - { - if (first_waypath_done) - { - if (!second_waypath_done) - { - // Second waypath complete - me->SetHomePosition(me->GetPosition()); - if (Creature* adyen = me->FindNearestCreature(ADYEN_THE_LIGHTBRINGER, 30.0f, true)) - me->SetOrientation(adyen->GetPositionX()); - if (Creature* socrethar = me->FindNearestCreature(SOCRETHAR, 30.0f, true)) - { - socrethar->AI()->DoAction(EVENT_KAYLAAN_SAY_1); - second_waypath_done = true; - } - } - } - } - } - } - - void UpdateAI(uint32 diff) override - { - if (!UpdateVictim()) - return; - - if (me->HasUnitState(UNIT_STATE_CASTING)) - return; - - _events.Update(diff); - - if (me->GetHealthPct() <= 30) - if (Creature* socrethar = me->FindNearestCreature(SOCRETHAR, 200.0f, true)) - socrethar->AI()->DoAction(EVENT_END_ALDOR_FIGHT); - - switch (_events.ExecuteEvent()) - { - case EVENT_SPELL_BURNING_LIGHT: - me->CastSpell(me->GetVictim(), BURNING_LIGHT, false); - _events.ScheduleEvent(EVENT_SPELL_BURNING_LIGHT, 4000); - break; - case EVENT_SPELL_CONSECRATION: - me->CastSpell(me->GetVictim(), CONSECRATION, false); - _events.ScheduleEvent(EVENT_SPELL_CONSECRATION, 14000); - break; - } - - DoMeleeAttackIfReady(); - } - }; - - CreatureAI* GetAI(Creature* creature) const override - { - return new kaylaan_the_lostAI(creature); - } -}; - // Ours enum saeed { @@ -2001,11 +984,4 @@ void AddSC_netherstorm() new npc_bessy(); new npc_maxx_a_million_escort(); - // Deathblow to the legion - new deathblow_to_the_legion_trigger(); - new adyen_the_lightbringer(); - new anchorite_karja(); - new exarch_orelis(); - new kaylaan_the_lost(); - new socrethar(); } diff --git a/src/server/scripts/Outland/zone_shattrath_city.cpp b/src/server/scripts/Outland/zone_shattrath_city.cpp index 35b7234c4..477d6b999 100644 --- a/src/server/scripts/Outland/zone_shattrath_city.cpp +++ b/src/server/scripts/Outland/zone_shattrath_city.cpp @@ -28,7 +28,6 @@ npc_salsalabim npc_shattrathflaskvendors npc_zephyr npc_kservant -npc_ishanah EndContentData */ #include "Player.h" @@ -421,121 +420,6 @@ public: }; }; -/*###### -# npc_ishanah -######*/ - -enum Ishanah -{ - // ISHANAH SPELL EVENTS - EVENT_SPELL_ISHANAH_HOLY_SMITE = 3, - EVENT_SPELL_POWER_WORD_SHIELD = 4, - EVENT_ISHANAH_SAY_1 = 18, // Make kaylaan bow - SOCRETHAR = 20132, - KAYLAAN_THE_LOST = 20794, - - // ISHANAH SPELLS - HOLY_SMITE_ISHANAH = 15238, - POWER_WORLD_SHIELD = 22187 -}; - -#define ISANAH_GOSSIP_1 "Who are the Sha'tar?" -#define ISANAH_GOSSIP_2 "Isn't Shattrath a draenei city? Why do you allow others here?" - -class npc_ishanah : public CreatureScript -{ -public: - npc_ishanah() : CreatureScript("npc_ishanah") { } - - bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) override - { - ClearGossipMenuFor(player); - if (action == GOSSIP_ACTION_INFO_DEF + 1) - SendGossipMenuFor(player, 9458, creature->GetGUID()); - else if (action == GOSSIP_ACTION_INFO_DEF + 2) - SendGossipMenuFor(player, 9459, creature->GetGUID()); - - return true; - } - - bool OnGossipHello(Player* player, Creature* creature) override - { - if (creature->IsQuestGiver()) - player->PrepareQuestMenu(creature->GetGUID()); - - AddGossipItemFor(player, GOSSIP_ICON_CHAT, ISANAH_GOSSIP_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); - AddGossipItemFor(player, GOSSIP_ICON_CHAT, ISANAH_GOSSIP_2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); - - SendGossipMenuFor(player, player->GetGossipTextId(creature), creature->GetGUID()); - - return true; - } - - struct ishanahAI : public ScriptedAI - { - ishanahAI(Creature* creature) : ScriptedAI(creature) { } - - EventMap _events; - - void JustEngagedWith(Unit* who) override - { - AttackStart(who); - _events.ScheduleEvent(EVENT_SPELL_ISHANAH_HOLY_SMITE, 2000); - _events.ScheduleEvent(EVENT_SPELL_POWER_WORD_SHIELD, 1000); - } - - void MovementInform(uint32 type, uint32 point) override - { - if (type != POINT_MOTION_TYPE) - { - if (point == 2) - { - if (Creature* kaylaan = me->FindNearestCreature(KAYLAAN_THE_LOST, 30.0f, true)) - { - kaylaan->AI()->Talk(5); - kaylaan->SetOrientation(me->GetPositionX()); - if (Creature* socrethar = me->FindNearestCreature(SOCRETHAR, 30.0f, true)) - { - socrethar->AI()->DoAction(EVENT_ISHANAH_SAY_1); - socrethar->SetOrientation(me->GetPositionX()); - } - } - } - } - } - - void UpdateAI(uint32 diff) override - { - if (!me->GetVictim()) - return; - - if (me->HasUnitState(UNIT_STATE_CASTING)) - return; - - _events.Update(diff); - - switch (_events.ExecuteEvent()) - { - case EVENT_SPELL_ISHANAH_HOLY_SMITE: - me->CastSpell(me->GetVictim(), HOLY_SMITE_ISHANAH, false); - _events.ScheduleEvent(EVENT_SPELL_ISHANAH_HOLY_SMITE, 2500); - break; - case EVENT_SPELL_POWER_WORD_SHIELD: - me->CastSpell(me, POWER_WORLD_SHIELD, false); - _events.ScheduleEvent(EVENT_SPELL_POWER_WORD_SHIELD, 30000); - break; - } - - DoMeleeAttackIfReady(); - } - }; - - CreatureAI* GetAI(Creature* creature) const override - { - return new ishanahAI(creature); - } -}; - void AddSC_shattrath_city() { new npc_raliq_the_drunk(); @@ -543,5 +427,4 @@ void AddSC_shattrath_city() new npc_shattrathflaskvendors(); new npc_zephyr(); new npc_kservant(); - new npc_ishanah(); }