Quest Name = 'A Growing Problem' | '成长的麻烦'
Quest ID = 13988
-- Adjust Creature States
UPDATE `world`.`creature_template` SET `AIName` = 'SmartAI' WHERE `entry` IN (34615,34623);
UPDATE `world`.`creature_template` SET `unit_flags` = 768 WHERE `entry` = 34615;
UPDATE `world`.`creature_template_difficulty` SET `ContentTuningID` = 3, `VerifiedBuild` = 44730 WHERE `Entry` = 34626 AND `DifficultyID` = 0;
INSERT INTO `world`.`creature_template_addon` (`entry`, `AnimTier`) VALUES (34615, 3);
INSERT INTO `world`.`creature_template_addon` (`entry`, `auras`) VALUES (34623, '22650');
UPDATE `world`.`creature_template_difficulty` SET `ContentTuningID` = 3, `StaticFlags1` = 536870912, `VerifiedBuild` = 44730 WHERE `Entry` = 34615 AND `DifficultyID` = 0;
-- Adjust Quest Objetives
UPDATE `world`.`quest_objectives` SET `Flags2` = 0 WHERE `ID` = 264778;
-- Add Creature Text
INSERT INTO `world`.`creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `SoundPlayType`, `BroadcastTextId`, `TextRange`, `comment`) VALUES
(34615, 0, 0, 'Tonga\'s eagle calls out, then circles toward the peak.', 16, 0, 100, 0, 0, 5496, 0, 34863, 0, 'Tonga\'s Eyes'),
(34623, 0, 0, 'Well done, friend! From here we can survey the land.', 12, 0, 100, 0, 0, 0, 0, 34864, 0, 'Tonga\'s Spirit'),
(34623, 1, 0, 'Merciful Earthmother, look at the scope of the devastation! We\'re lucky the entirety of the Barrens isn\'t crumbling into the sea.', 12, 0, 100, 1, 0, 0, 0, 34865, 0, 'Tonga\'s Spirit'),
(34623, 2, 0, 'But what\'s this? Something else is happening to the land south of the fissure.', 12, 0, 100, 6, 0, 0, 0, 34866, 0, 'Tonga\'s Spirit'),
(34623, 3, 0, 'Indeed, the flora is growing unchecked, devouring the land. Similar to our findings from the oases.', 12, 0, 100, 1, 0, 0, 0, 34867, 0, 'Tonga\'s Spirit'),
(34623, 4, 0, 'We must do everything in our power to stop the same from happening here. We\'ll have to step up our investigations of the oases and stop this phenomenon at the source. We\'ll talk again at Crossroads!', 12, 0, 100, 1, 0, 0, 0, 34868, 0, 'Tonga\'s Spirit');
-- Add Conditions
INSERT INTO `world`.`conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `ConditionStringValue1`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
(30, 0, 5472, 0, 0, 47, 0, 13988, 8, 0, '', 0, 0, 0, '', 'On Quest State - Area Trigger(Client Triggered) Available');
-- Add SAI
INSERT INTO `world`.`areatrigger_scripts` (`entry`, `ScriptName`) VALUES (5472, 'SmartTrigger');
INSERT INTO `world`.`smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `Difficulties`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param_string`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `action_param7`, `action_param_string`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_param_string`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(5472, 2, 0, 1, '', 46, 0, 100, 1, 5472, 0, 0, 0, 0, '', 86, 65773, 2, 19, 34615, 15, 0, 0, NULL, 1, 0, 0, 0, 0, NULL, 0, 0, 0, 0, 'Area Trigger - On Trigger - Cross Cast \'Thunderhead Summit Quest Credit\''),
(5472, 2, 1, 2, '', 61, 0, 100, 1, 0, 0, 0, 0, 0, '', 41, 0, 1, 0, 0, 0, 0, 0, NULL, 19, 34615, 25, 0, 0, NULL, 0, 0, 0, 0, 'Area Trigger - Link - Despawn \'Tonga\'s Eyes\''),
(5472, 2, 2, 3, '', 61, 0, 100, 1, 0, 0, 0, 0, 0, '', 12, 34615, 8, 0, 0, 0, 0, 0, NULL, 7, 1, 1, 0, 0, NULL, 0, 0, 0, 0, 'Area Trigger - Link - Summon \'Tonga\'s Eyes\''),
(5472, 2, 3, 0, '', 61, 0, 100, 1, 0, 0, 0, 0, 0, '', 45, 1, 1, 0, 0, 0, 0, 0, NULL, 19, 34615, 25, 0, 0, NULL, 0, 0, 0, 0, 'Area Trigger - Link - Set Data 1 1 To \'Tonga\'s Eyes\''),
(34615, 0, 0, 1, '', 38, 0, 100, 0, 1, 1, 0, 0, 0, '', 53, 1, 34615, 0, 0, 0, 0, 0, NULL, 1, 0, 0, 0, 0, NULL, 0, 0, 0, 0, 'Tonga\'s Eyes - On Data Set 1 1 - Start WP'),
(34615, 0, 1, 2, '', 61, 0, 100, 0, 0, 0, 0, 0, 0, '', 1, 0, 0, 0, 0, 0, 0, 0, NULL, 1, 0, 0, 0, 0, NULL, 0, 0, 0, 0, 'Tonga\'s Eyes - Link - Say Group 0'),
(34615, 0, 2, 0, '', 61, 0, 100, 0, 0, 0, 0, 0, 0, '', 33, 34631, 0, 0, 0, 0, 0, 0, NULL, 7, 0, 0, 0, 0, NULL, 0, 0, 0, 0, 'Tonga\'s Eyes - Link - Cast \'Thunderhead Summit Quest Credit\''),
(34615, 0, 3, 0, '', 40, 0, 100, 0, 10, 34615, 0, 0, 0, '', 80, 3461500, 2, 0, 0, 0, 0, 0, NULL, 1, 0, 0, 0, 0, NULL, 0, 0, 0, 0, 'Tonga\'s Eyes - On Reached WP - Run Timed Actionlist'),
(3461500, 9, 0, 0, '', 0, 0, 100, 0, 0, 0, 0, 0, 0, '', 59, 0, 0, 0, 0, 0, 0, 0, NULL, 1, 0, 0, 0, 0, NULL, 0, 0, 0, 0, 'Tonga\'s Eyes - Timed Actionlist - Set Run Off'),
(3461500, 9, 1, 0, '', 0, 0, 100, 0, 0, 0, 0, 0, 0, '', 69, 2, 0, 0, 0, 0, 0, 0, NULL, 8, 0, 0, 0, 0, NULL, -1481.44, -3292.72, 212.71, 2.9923, 'Tonga\'s Eyes - Timed Actionlist - Move To Position'),
(3461500, 9, 2, 0, '', 0, 0, 100, 0, 3000, 3000, 0, 0, 0, '', 11, 65763, 0, 0, 0, 0, 0, 0, NULL, 1, 0, 0, 0, 0, NULL, 0, 0, 0, 0, 'Tonga\'s Eyes - Timed Actionlist - Cast \'Summon Tonga\'s Spirit\''),
(3461500, 9, 3, 0, '', 0, 0, 100, 0, 0, 0, 0, 0, 0, '', 41, 0, 0, 0, 0, 0, 0, 0, NULL, 1, 0, 0, 0, 0, NULL, 0, 0, 0, 0, 'Tonga\'s Eyes - Timed Actionlist - Despawn Self'),
(34623, 0, 0, 0, '', 54, 0, 100, 0, 0, 0, 0, 0, 0, '', 80, 3462300, 0, 0, 0, 0, 0, 0, NULL, 1, 0, 0, 0, 0, NULL, 0, 0, 0, 0, 'Tonga\'s Spirit - On Just Summoned - Run Timed ActionList'),
(34623, 0, 1, 0, '', 40, 0, 100, 0, 2, 34623, 0, 0, 0, '', 80, 3462301, 0, 0, 0, 0, 0, 0, NULL, 1, 0, 0, 0, 0, NULL, 0, 0, 0, 0, 'Tonga\'s Eyes - On Reached WP - Run Timed ActionList'),
(34623, 0, 2, 0, '', 40, 0, 100, 0, 2, 3462300, 0, 0, 0, '', 80, 3462302, 0, 0, 0, 0, 0, 0, NULL, 1, 0, 0, 0, 0, NULL, 0, 0, 0, 0, 'Tonga\'s Eyes - On Reached WP - Run Timed ActionList'),
(34623, 0, 3, 0, '', 34, 0, 100, 0, 8, 1, 0, 0, 0, '', 80, 3462303, 0, 0, 0, 0, 0, 0, NULL, 1, 0, 0, 0, 0, NULL, 0, 0, 0, 0, 'Tonga\'s Eyes - On Movement Inform - Run Timed ActionList'),
(3462300, 9, 0, 0, '', 0, 0, 100, 0, 1000, 1000, 0, 0, 0, '', 1, 0, 0, 0, 0, 0, 0, 0, NULL, 1, 0, 0, 0, 0, NULL, 0, 0, 0, 0, 'Tonga\'s Spirit - Timed ActionList - Say Group 0'),
(3462300, 9, 1, 0, '', 0, 0, 100, 0, 0, 0, 0, 0, 0, '', 59, 0, 0, 0, 0, 0, 0, 0, NULL, 1, 0, 0, 0, 0, NULL, 0, 0, 0, 0, 'Tonga\'s Spirit - Timed ActionList - Set Run Off'),
(3462300, 9, 2, 0, '', 0, 0, 100, 0, 2000, 2000, 0, 0, 0, '', 53, 0, 34623, 0, 0, 0, 0, 0, NULL, 1, 0, 0, 0, 0, NULL, 0, 0, 0, 0, 'Tonga\'s Spirit - Timed ActionList - Start WP'),
(3462301, 9, 0, 0, '', 0, 0, 100, 0, 1000, 1000, 0, 0, 0, '', 5, 397, 0, 0, 0, 0, 0, 0, NULL, 1, 0, 0, 0, 0, NULL, 0, 0, 0, 0, 'Tonga\'s Spirit - Timed ActionList - Play Emote'),
(3462301, 9, 1, 0, '', 0, 0, 100, 0, 2000, 2000, 0, 0, 0, '', 1, 1, 0, 0, 0, 0, 0, 0, NULL, 1, 0, 0, 0, 0, NULL, 0, 0, 0, 0, 'Tonga\'s Spirit - Timed ActionList - Say Group 1'),
(3462301, 9, 2, 0, '', 0, 0, 100, 0, 0, 0, 0, 0, 0, '', 11, 36354, 2, 0, 0, 0, 0, 0, NULL, 1, 0, 0, 0, 0, NULL, 0, 0, 0, 0, 'Tonga\'s Spirit - Timed ActionList - Cast \'Kael Explodes\''),
(3462301, 9, 3, 0, '', 0, 0, 100, 0, 5000, 5000, 0, 0, 0, '', 1, 2, 0, 0, 0, 0, 0, 0, NULL, 1, 0, 0, 0, 0, NULL, 0, 0, 0, 0, 'Tonga\'s Spirit - Timed ActionList - Say Group 2'),
(3462301, 9, 4, 0, '', 0, 0, 100, 0, 2000, 2000, 0, 0, 0, '', 53, 0, 3462300, 0, 0, 0, 0, 0, NULL, 1, 0, 0, 0, 0, NULL, 0, 0, 0, 0, 'Tonga\'s Spirit - Timed ActionList - Start WP'),
(3462302, 9, 0, 0, '', 0, 0, 100, 0, 1000, 1000, 0, 0, 0, '', 5, 25, 0, 0, 0, 0, 0, 0, NULL, 1, 0, 0, 0, 0, NULL, 0, 0, 0, 0, 'Tonga\'s Spirit - Timed ActionList - Play Emote'),
(3462302, 9, 1, 0, '', 0, 0, 100, 0, 2000, 2000, 0, 0, 0, '', 1, 3, 0, 0, 0, 0, 0, 0, NULL, 1, 0, 0, 0, 0, NULL, 0, 0, 0, 0, 'Tonga\'s Spirit - Timed ActionList - Say Group 3'),
(3462302, 9, 2, 0, '', 0, 0, 100, 0, 1000, 1000, 0, 0, 0, '', 11, 45849, 2, 0, 0, 0, 0, 0, NULL, 1, 0, 0, 0, 0, NULL, 0, 0, 0, 0, 'Tonga\'s Spirit - Timed ActionList- Cast ‘Camera Shake - Tremor’'),
(3462302, 9, 3, 0, '', 0, 0, 100, 0, 0, 0, 0, 0, 0, '', 59, 0, 0, 0, 0, 0, 0, 0, NULL, 1, 0, 0, 0, 0, NULL, 0, 0, 0, 0, 'Tonga\'s Spirit - Timed ActionList - Set Run Off'),
(3462302, 9, 4, 0, '', 0, 0, 100, 0, 2000, 2000, 0, 0, 0, '', 69, 1, 0, 0, 0, 1, 0, 0, NULL, 8, 0, 0, 0, 0, NULL, -1488.06, -3301.78, 211.06, 0, 'Tonga\'s Spirit - Timed ActionList - Move to Position'),
(3462303, 9, 0, 0, '', 0, 0, 100, 0, 0, 0, 0, 0, 0, '', 66, 0, 0, 0, 0, 0, 0, 0, NULL, 21, 15, 0, 0, 0, NULL, 0, 0, 0, 0, 'Tonga\'s Spirit - Timed ActionList - Set Orientation'),
(3462303, 9, 1, 0, '', 0, 0, 100, 0, 1000, 1000, 0, 0, 0, '', 1, 4, 0, 0, 0, 0, 0, 0, NULL, 1, 0, 0, 0, 0, NULL, 0, 0, 0, 0, 'Tonga\'s Spirit - Timed ActionList - Say Group 4'),
(3462303, 9, 2, 0, '', 0, 0, 100, 0, 7000, 7000, 0, 0, 0, '', 11, 7077, 0, 0, 0, 0, 0, 0, NULL, 1, 0, 0, 0, 0, NULL, 0, 0, 0, 0, 'Tonga\'s Spirit - Timed ActionList - Cast \'Simple Teleport\''),
(3462303, 9, 3, 0, '', 0, 0, 100, 0, 500, 500, 0, 0, 0, '', 41, 1200, 0, 0, 0, 0, 0, 0, NULL, 1, 0, 0, 0, 0, NULL, 0, 0, 0, 0, 'Tonga\'s Spirit - Timed ActionList - Despawn Self');
-- Add WP
INSERT INTO `world`.`waypoint_path` (`PathId`, `MoveType`, `Flags`, `Velocity`, `Comment`) VALUES
(34615, 1, 0, NULL, 'Tonga\'s Eyes'),(34623, 0, 0, NULL, 'Tonga\'s Spirit'),(3462300, 0, 0, NULL, 'Tonga\'s Spirit');
INSERT INTO `world`.`waypoint_path_node` (`PathId`, `NodeId`, `PositionX`, `PositionY`, `PositionZ`, `Orientation`, `Delay`) VALUES
(34615, 1, -1463.44, -3294.26, 218.787, NULL, 0),
(34615, 2, -1476.19, -3286.32, 220.342, NULL, 0),
(34615, 3, -1488.73, -3288.67, 221.259, NULL, 0),
(34615, 4, -1496.47, -3301.69, 223.12, NULL, 0),
(34615, 5, -1489.94, -3318.09, 224.342, NULL, 0),
(34615, 6, -1476.19, -3320.48, 224.981, NULL, 0),
(34615, 7, -1470, -3314.23, 224.87, NULL, 0),
(34615, 8, -1468.14, -3299.92, 224.12, NULL, 0),
(34615, 9, -1474.82, -3295.41, 221.925, NULL, 0),
(34615, 10, -1482.17, -3294.14, 219.62, NULL, 0),
(34623, 1, -1481.89, -3314.8, 211.408, NULL, 0),
(34623, 2, -1491.25, -3324.26, 212.34, NULL, 0),
(3462300, 1, -1496.04, -3306.72, 210.769, NULL, 0),
(3462300, 2, -1503.26, -3281.44, 207.771, NULL, 0);