diff --git a/sql/updates/WIP/uldum intro docu.txt b/sql/updates/WIP/uldum intro docu.txt new file mode 100644 index 00000000000..8afa579b007 --- /dev/null +++ b/sql/updates/WIP/uldum intro docu.txt @@ -0,0 +1,133 @@ + +18:40:26.831 -- spellclick 86750 (Player Prep) +18:40:26.880 -- 86751 (Summon Adarrah) +18:40:26.881 -- 86752 (Summon Caravan) +18:40:26.881 -- 86753 (Summon Lady Humps) +18:40:26.881 -- 86754 (Summon Pack Mule) +18:40:26.882 -- 86755 (Summon Budd's Camel) +18:40:26.882 -- 86756 (Summon Samir's Camel) +18:40:26.882 -- 86757 (Summon Mack's Camel) +18:40:26.882 -- 86758 (Summon Adarrah's Camel) +18:40:26.883 -- 86782 (Summon Cloned Image) +18:40:26.883 -- 86942 (Summon Beam Target Bunny) +18:40:26.884 -- 86748 (Initialize Uldum Intro) + +18:40:26.884 -- 86784 (Mirror Image Aura) --> on 46554 (Cloned Image) +18:40:26.947 -- 45205 (Copy Offhand Weapon) --> on 46554 (Cloned Image) +18:40:26.947 -- 45205 (Copy Offhand Weapon) --> on 46554 (Cloned Image) + +18:40:27.997 -- 86792 (Summon Camera Bunny) --> player set in phase 298 +18:40:29.250 -- 46598 (Ride Vehicle Hardcoded) --> on Entry: 46557 (Uldum Camera Bunny 04) +18:40:29.251 -- 86843 (Ping All Actors 00) + +18:41:12.947 -- 82316 (Ride Vehicle - Seat 2 - From Generic Reverse Cast) + + +------------------ cloned image +18:40:26.883 --> summon +18:40:26.905 --> 86783 (Reverse Cast Mirror Image) +18:40:27.996 --> 95747 (Player Summon Camera) +18:40:27.997 --> 86815 (Ping Camera 00) +18:40:29.246 --> 86815 (Ping Camera 00) +18:40:29.381 --> emote state 0 +18:40:30.563 --> face to unit Entry: 46533 (Adarrah) +18:40:40.313 --> face to FaceDirection: 3.944444 +18:40:40.313 --> emote 6 (OneShotQuestion) +18:40:46.363 --> move to -8922.09 Y: -2270.6 Z: 9.002124 +18:40:49.996 --> face to FaceDirection: 3.246312 +18:40:54.879 --> move to -8929.25 Y: -2269.74 Z: 9.002124 +18:40:56.080 --> case 43671 (Ride Vehicle) on Entry: 46596 (Uldum Caravan Harness) +18:40:59.714 --> 86815 (Ping Camera 00) +18:41:13.529 --> despawn + +---------------- adarrah 86751 +18:40:29.380 -- ping all actors hit adarrah +18:40:29.763 -- move to -8926.036 Y: -2263.385 Z: 9.001721 +18:40:30.613 -- no no silly +18:40:34.230 -- no one rides the lady +18:40:37.896 -- move to X: -8936.73 Y: -2274.35 Z: 9.002953 +18:40:39.897 -- 43671 (Ride Vehicle) on Entry: 46546 (Adarrah's Camel) + +-------------- camera bunny 46557 +18:40:29.249 -- 86822 (Invisible Beam) on Entry: 46554 (Cloned Image) +18:40:29.249 -- 82721 (Reverse Cast Ride Vehicle (HC) on Demon Creator) + +---- harness 46596 +18:40:26.896 -- summon +18:40:26.907 -- 73447 (Chains of Bondage) on 46544 (Turgore) +18:40:29.380 -- ping hit +18:40:46.363 -- move to -8935.14 Y: -2234.49 Z: 9.002217 +18:41:05.813 -- move to -8939.94 Y: -2211.02 Z: 9.001956 + +---- macks camel +18:40:29.380 -- ping hit 86843 (Ping All Actors 00) +18:40:42.730 -- move to -8919.02 Y: -2248.4 Z: 9.001721 +18:40:54.879 -- move to -8925.41 Y: -2224.72 Z: 9.001721 + +-- samirs camel +18:40:29.380 -- ping hit +18:40:42.730 -- -8923.14 Y: -2255.77 Z: 9.001721 +18:40:57.280 -- -8927.98 Y: -2228.35 Z: 9.001721 + +-- pack mule (46537) +18:40:29.380 -- ping +18:40:42.730 -- -8922.56 Y: -2250.76 Z: 9.001721 +18:40:52.463 -- -8927.56 Y: -2229.44 Z: 9.001721 + +-- lady humps +18:40:29.380 -- ping +18:40:42.730 -- -8931.92 Y: -2234.18 Z: 9.001721 +18:40:53.516 -- -8938.87 Y: -2204.73 Z: 9.001956 + +-- Adarrahs camel (46546) +18:40:29.380 -- ping +18:40:39.898 -- -8931.88 Y: -2249.08 Z: 9.001721 +18:40:48.730 -- -8936.35 Y: -2218.25 Z: 9.001956 + +-- budd (46539) +18:40:29.380 -- ping +18:40:59.714 -- talk 0 + +-- budd's camel (46538) +18:40:29.380 -- ping +18:40:51.246 -- -8933.07 Y: -2249.24 Z: 9.001721 +18:41:05.813 -- -8937.89 Y: -2211.88 Z: 9.001956 + +-- camera bunny (46557) +18:40:27.997 -- 86815 (Ping Camera 00) // no target + +18:40:29.247 -- 86815 (Ping Camera 00) + +18:40:29.249 -- 86822 (Invisible Beam) +18:40:29.249 -- 82721 (Reverse Cast Ride Vehicle (HC) on Demon Creator) +18:40:29.251 -- 86848 (Master Ping All Actors) +-- 18:40:29.380 -- 86843 (Ping All Actors 00) +18:40:40.313 -- move path: +(MovementMonsterSpline) (MovementSpline) [0] Points: X: -8922.04 Y: -2274.03 Z: 14.4508 +(MovementMonsterSpline) (MovementSpline) [1] Points: X: -8915.17 Y: -2282.37 Z: 21.0023 +(MoveTime: 6556) + +18:40:47.179 -- move path +(MovementMonsterSpline) (MovementSpline) [0] Points: X: -8921.55 Y: -2291.59 Z: 18.5897 +(MovementMonsterSpline) (MovementSpline) [1] Points: X: -8928.08 Y: -2291.1 Z: 16.9801 +(MovementMonsterSpline) (MovementSpline) [2] Points: X: -8932.17 Y: -2279.79 Z: 14.2697 +(MovementMonsterSpline) (MovementSpline) [3] Points: X: -8933.72 Y: -2263.06 Z: 12.12 +(MoveTime: 15828) +path 1 - time: 6787 +path 2 - time: 19273 + +18:40:59.714 -- ping camera again? +18:41:03.34 -- 86944 (Ping Beam Target) on Entry: 46661 (Beam Target Bunny) + +(18:41:03.347 -- beam target bunny casts 86943 (Ping Camera 01)) +(18:41:03.347 -- beam target bunny moves up to +(MovementMonsterSpline) (MovementSpline) [0] Points: X: -8951.25 Y: -2174.06 Z: 17.2353 +(MovementMonsterSpline) (MovementSpline) [1] Points: X: -8943.43 Y: -2161.06 Z: 54.8142 + +18:41:03.347 -- 86822 (Invisible Beam) +18:41:03.347 -- move path +(MovementMonsterSpline) (MovementSpline) [0] Points: X: -8928.93 Y: -2256.39 Z: 14.834 +(MovementMonsterSpline) (MovementSpline) [1] Points: X: -8929.32 Y: -2252.51 Z: 22.9079 + +21:38:23.194 --> ping hit +21:38:23.631 -- channel update 0 \ No newline at end of file diff --git a/sql/updates/WIP/uldum.sql b/sql/updates/WIP/uldum.sql new file mode 100644 index 00000000000..50166ea26b2 --- /dev/null +++ b/sql/updates/WIP/uldum.sql @@ -0,0 +1,406 @@ + +DELETE FROM `creature_template_movement` WHERE `CreatureId` IN (46557, 46661); +INSERT INTO `creature_template_movement` (`CreatureId`, `Ground`, `Swim`, `Flight`, `Rooted`) VALUES +(46557, 0, 0, 1, 0), +(46661, 0, 0, 1, 0); + +SET @CGUID := 259631; +DELETE FROM `creature` WHERE `guid` BETWEEN @CGUID+0 AND @CGUID+45; +INSERT INTO `creature` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnMask`, `PhaseId`, `PhaseGroup`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, `dynamicflags`, `VerifiedBuild`) VALUES +(@CGUID+0, 46521, 1, 440, 980, 1, 169, 0, 0, 0, -8919.38, -2294.04, 9.048013, 1.797689, 120, 0, 0, 0, 0, 0, 0, 0, 0, 15595), -- Samir's Camel +(@CGUID+1, 46532, 1, 440, 980, 1, 169, 0, 0, 0, -8939.34, -2274.2, 8.972433, 1.570796, 120, 0, 0, 0, 0, 0, 0, 0, 0, 15595), -- Adarrah's Camel +(@CGUID+2, 46524, 1, 440, 980, 1, 169, 0, 0, 0, -8917.41, -2282.13, 8.967353, 1.919862, 120, 0, 0, 0, 0, 0, 0, 0, 0, 15595), -- Mack's Camel +(@CGUID+3, 46519, 1, 440, 980, 1, 169, 0, 0, 0, -8938.73, -2287.42, 9.057663, 1.413717, 120, 0, 0, 0, 0, 0, 0, 0, 0, 15595), -- Budd's Camel +(@CGUID+4, 46517, 1, 440, 980, 1, 169, 0, 0, 0, -8929.95, -2265.47, 8.960593, 1.396263, 120, 0, 0, 0, 0, 0, 0, 0, 0, 15595), -- Lady Humps +(@CGUID+5, 44833, 1, 440, 980, 1, 169, 0, 0, 0, -8920.7, -2261.42, 8.960933, 5.846853, 120, 0, 0, 0, 0, 0, 0, 0, 0, 15595), -- Adarrah +(@CGUID+6, 46516, 1, 440, 980, 1, 169, 0, 0, 0, -8929.7, -2285.64, 8.995103, 1.58825, 120, 0, 0, 0, 0, 0, 0, 0, 0, 15595); -- Uldum Caravan Harness + +UPDATE `creature_template` SET `VehicleId`= 1196 WHERE `entry`= 46521; -- Samir's Camel +UPDATE `creature_template` SET `VehicleId`= 1197 WHERE `entry`= 46524; -- Mack's Camel +UPDATE `creature_template` SET `VehicleId`= 1195 WHERE `entry`= 46519; -- Budd's Camel +UPDATE `creature_template` SET `VehicleId`= 1199 WHERE `entry`= 46516; -- Uldum Caravan Harness +UPDATE `creature_template` SET `npcflag`= 16777216 WHERE `entry`= 46517; -- Lady Humps + +DELETE FROM `npc_spellclick_spells` WHERE `npc_entry` IN (46521, 46524, 46519, 46516, 46517); +INSERT INTO `npc_spellclick_spells` (`npc_entry`, `spell_id`, `cast_flags`, `user_type`) VALUES +(46521, 46598, 1, 1), +(46524, 46598, 1, 1), +(46519, 46598, 1, 1), +(46516, 46598, 1, 1), +(46517, 86750, 3, 1); + +DELETE FROM `vehicle_template_accessory` WHERE `entry` IN (46516, 46519, 46521, 46524); +INSERT INTO `vehicle_template_accessory` (`entry`, `accessory_entry`, `seat_id`, `minion`, `description`, `summontype`, `summontimer`) VALUES +-- Uldum Caravan Harness +(46516, 46529, 4, 1, 'Uldum Caravan Harness - Kurzel', 8, 0), -- Uldum Caravan Harness - Kurzel +(46516, 46514, 3, 1, 'Uldum Caravan Harness - Domesticated Kodo', 8, 0), -- Uldum Caravan Harness - Domesticated Kodo +(46516, 46528, 2, 1, 'Uldum Caravan Harness - Tanzar', 8, 0), -- Uldum Caravan Harness - Tanzar +(46516, 46525, 0, 1, 'Uldum Caravan Harness - Turgore', 8, 0), -- Uldum Caravan Harness - Turgore +(46516, 46530, 5, 1, 'Uldum Caravan Harness - Harkor', 8, 0), -- Uldum Caravan Harness - Harkor +-- Budd's Camel +(46519, 46520, 0, 1, 'Budd\'s Camel - Budd', 8, 0), -- Budd's Camel - Budd +-- Samir's Camel +(46521, 46522, 0, 1, 'Samir\'s Camel - Samir', 8, 0), -- Samir's Camel - Samir +-- Mack's Camel +(46524, 46523, 0, 1, 'Mack\'s Camel - Mack', 8, 0); -- Mack's Camel - Mack + +DELETE FROM `creature_template_addon` WHERE `entry` IN (46516, 46519, 46521, 46524, 46529, 46514, 46528, 46525, 46530, 46520, 46522, 46523, 46517, 44833, 46532); +INSERT INTO `creature_template_addon` (`entry`, `bytes1`, `bytes2`, `emote`, `auras`) VALUES +(46517, 0, 1, 0, '80797 85549'), +-- (46519, 0, 1, 0, '80797'), +-- (46521, 0, 1, 0, '80797'), +-- (46524, 0, 1, 0, '80797'), +(46529, 0, 1, 0, '80797'), +(46514, 0, 1, 0, '80797'), +(46528, 0, 1, 0, '80797'), +(46525, 0, 1, 0, '80797'), +(46530, 0, 1, 0, '80797'), +(46520, 0, 1, 0, '80797'), +(46522, 0, 1, 0, '80797'), +(46523, 0, 1, 0, '80797'), +(44833, 0, 1, 0, '80797'), +-- (46516, 0, 1, 0, '80797'), +(46532, 0, 1, 0, '80797'); + +DELETE FROM `spell_area` WHERE `spell` IN (86749, 89270) AND `area`= 980; +INSERT INTO `spell_area` (`spell`,`area`,`quest_start`,`quest_end`,`aura_spell`,`racemask`,`gender`,`autocast`,`quest_start_status`,`quest_end_status`) VALUES +(86749, 980, 27003, 27003, 0, 0, 2, 1, 1 | 8, 41), +(89270, 980, 27003, 27003, 0, 0, 2, 1, 8, 41); + +DELETE FROM `conditions` WHERE `SourceEntry`= 86750 AND `SourceGroup`= 46517 AND `SourceTypeOrReferenceId`= 18; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ScriptName`, `Comment`) VALUES +(18, 46517, 86750, 0, 0, 9, 0, 27003, 0, 0, 0, 0, '', 'Required quest active for spellclick'); + +DELETE FROM `npc_spellclick_spells` WHERE `npc_entry` IN (46596, 46538, 46540, 46543, 46557); +INSERT INTO `npc_spellclick_spells` (`npc_entry`, `spell_id`, `cast_flags`, `user_type`) VALUES +(46596, 46598, 1, 1), +(46538, 46598, 1, 1), +(46540, 46598, 1, 1), +(46543, 46598, 1, 1); + +DELETE FROM `vehicle_template_accessory` WHERE `entry` IN (46543, 46540, 46538, 46596); +INSERT INTO `vehicle_template_accessory` (`entry`, `accessory_entry`, `seat_id`, `minion`, `description`, `summontype`, `summontimer`) VALUES +-- Mack's Camel +(46543, 46542, 0, 1, 'Mack\'s Camel - Mack', 8, 0), -- Mack's Camel - Mack +-- Samir's Camel +(46540, 46541, 0, 1, 'Samir\'s Camel - Samir', 8, 0), -- Samir's Camel - Samir + -- Budd's Camel +(46538, 46539, 0, 1, 'Budd\'s Camel - Budd', 8, 0), -- Budd's Camel - Budd + -- Uldum Caravan Harness +(46596, 46545, 5, 1, 'Uldum Caravan Harness - Harkor', 8, 0), -- Uldum Caravan Harness - Harkor +(46596, 46534, 4, 1, 'Uldum Caravan Harness - Domesticated Kodo', 8, 0), -- Uldum Caravan Harness - Domesticated Kodo +(46596, 46548, 3, 1, 'Uldum Caravan Harness - Kurzel', 8, 0), -- Uldum Caravan Harness - Kurzel +(46596, 46547, 2, 1, 'Uldum Caravan Harness - Tanzar', 8, 0), -- Uldum Caravan Harness - Tanzar +(46596, 46544, 0, 1, 'Uldum Caravan Harness - Turgore', 8, 0); -- Uldum Caravan Harness - Turgore + +UPDATE `creature_template` SET `VehicleId`= 1202 WHERE `entry`= 46543; +UPDATE `creature_template` SET `VehicleId`= 1201 WHERE `entry`= 46540; +UPDATE `creature_template` SET `VehicleId`= 1200 WHERE `entry`= 46538; +UPDATE `creature_template` SET `VehicleId`= 1198 WHERE `entry`= 46596; +UPDATE `creature_template` SET `VehicleId`= 1205 WHERE `entry`= 46546; +UPDATE `creature_template` SET `VehicleId`= 1203 WHERE `entry`= 46557; + + +UPDATE `spell_target_position` SET `Orientation`= 5.899213 WHERE `ID`= 86751; +UPDATE `spell_target_position` SET `Orientation`= 1.570796 WHERE `ID`= 86752; +UPDATE `spell_target_position` SET `Orientation`= 1.37881 WHERE `ID`= 86753; +UPDATE `spell_target_position` SET `Orientation`= 1.64061 WHERE `ID`= 86754; +UPDATE `spell_target_position` SET `Orientation`= 1.413717 WHERE `ID`= 86755; +UPDATE `spell_target_position` SET `Orientation`= 1.815142 WHERE `ID`= 86756; +UPDATE `spell_target_position` SET `Orientation`= 1.902409 WHERE `ID`= 86757; +UPDATE `spell_target_position` SET `Orientation`= 1.570796 WHERE `ID`= 86758; + +DELETE FROM `creature_text` WHERE `CreatureID` IN (46533, 46539, 46680, 46720, 46777); +INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `BroadcastTextId`, `comment`) VALUES +(46533, 0, 0, 'No, no, silly $r...', 12, 0, 100, 11, 0, 0, 46688, 'Adarrah to Player'), +(46533, 1, 0, 'No one rides the Lady!', 12, 0, 100, 274, 0, 0, 46689, 'Adarrah to Player'), +(46539, 0, 0, 'Ahoy!', 12, 0, 100, 70, 0, 21174, 46715, 'Budd to Cloned Image'), +(46680, 0, 0, 'Attack!', 14, 0, 100, 53, 0, 18260, 46761, 'Sultan Oogah to Skarf'), +(46720, 0, 0, 'How many coconuts can we get for the ugly one?', 12, 0, 100, 396, 0, 18259, 46774, 'Pygmy Ambusher to Uldum Camera Bunny 04'), +(46777, 0, 0, 'THREE? He woulda paid five, easy... Dummy!', 12, 0, 100, 0, 0, 18259, 46839, 'Pygmy Ambusher to Pygmy Ambusher'); + +DELETE FROM `spell_script_names` WHERE `ScriptName` IN +('spell_gen_reverse_cast_ride_vehicle', +'spell_gen_revserse_cast_mirror_image', +'spell_gen_mirror_image_aura', +'spell_uldum_player_summon_camera', +'spell_uldum_master_ping_all_actors'); + +DELETE FROM `spell_script_names` WHERE `spell_id` IN (41055, 45206) AND `ScriptName`= 'spell_gen_clone_weapon'; + +INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES +(82721, 'spell_gen_reverse_cast_ride_vehicle'), +(86783, 'spell_gen_revserse_cast_mirror_image'), +(86784, 'spell_gen_mirror_image_aura'), +(41055, 'spell_gen_clone_weapon'), +(45206, 'spell_gen_clone_weapon'), +(95747, 'spell_uldum_player_summon_camera'), +(95747, 'spell_uldum_master_ping_all_actors'); + +DELETE FROM `conditions` WHERE `SourceEntry` IN (86784, 86815, 73448, 73449, 86944, 86943) AND `SourceTypeOrReferenceId`= 13; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ScriptName`, `Comment`) VALUES +(13, 7, 86784, 0, 0, 31, 0, 3, 46554, 0, 0, 0, '', 'Mirror Image Aura - Target Cloned Image'), +(13, 1, 86815, 0, 0, 31, 0, 3, 46557, 0, 0, 0, '', 'Ping Camera 00 - Target Uldum Camera Bunny 04'), +(13, 1, 73448, 0, 0, 31, 0, 3, 46596, 0, 0, 0, '', 'Chains of Bondage - Target Uldum Caravan Harness'), +(13, 1, 73449, 0, 0, 31, 0, 3, 46596, 0, 0, 0, '', 'Chains of Bondage - Target Uldum Caravan Harness'), +(13, 1, 86944, 0, 0, 31, 0, 3, 46661, 0, 0, 0, '', 'Ping Beam Target - Target Beam Target Bunny'), +(13, 1, 86943, 0, 0, 31, 0, 3, 46557, 0, 0, 0, '', 'Ping Camera 01 - Target Uldum Camera Dummy 04'); + +DELETE FROM `script_spline_chain_waypoints` WHERE `entry` IN (46557, 46661); +INSERT INTO `script_spline_chain_waypoints` (`entry`, `chainId`, `splineId`, `wpId`, `x`, `y`, `z`) VALUES +(46557, 1, 0, 0, -8919, -2272.5, 12.87063), +(46557, 1, 0, 1, -8922.04, -2274.03, 14.4508), +(46557, 1, 0, 2, -8915.17, -2282.37, 21.0023), +(46557, 1, 1, 0, -8915.17, -2282.37, 21.0023), +(46557, 1, 1, 1, -8921.55, -2291.59, 18.5897), +(46557, 1, 1, 2, -8928.08, -2291.1, 16.9801), +(46557, 1, 1, 3, -8932.17, -2279.79, 14.2697), +(46557, 1, 1, 4, -8933.72, -2263.06, 12.12), +(46557, 2, 0, 0, -8933.72, -2263.06, 12.12), +(46557, 2, 0, 1, -8928.93, -2256.39, 14.834), +(46557, 2, 0, 2, -8929.32, -2252.51, 22.9079), +(46661, 1, 0, 0, -8954, -2188, 10.96293), +(46661, 1, 0, 1, -8951.25, -2174.06, 17.2353), +(46661, 1, 0, 2, -8943.43, -2161.06, 54.8142); + + + +DELETE FROM `script_spline_chain_meta` WHERE `entry` IN (46557, 46661); +INSERT INTo `script_spline_chain_meta` (`entry`, `chainId`, `splineId`, `expectedDuration`, `msUntilNext`) VALUES +(46557, 1, 0, 6556, 500), +(46557, 1, 1, 15828, 0), +(46557, 2, 0, 7047, 0), +(46661, 1, 0, 7008, 0); + +-- Tempfix for invisibility auras breaking vehicle entering +-- Creature Budd's Camel 46519 SAI +SET @ENTRY := 46519; +UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`= @ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +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`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(@ENTRY, 0, 0, 0, 60, 0, 100, 1, 100, 100, 0, 0, 11, 80797, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, "Every 0 and 0 ms (for the first time, timer between 100 and 100 ms) - Self: Cast spell Generic Quest Invisibility 5 (80797) on Self // "); + +-- Creature Samir's Camel 46521 SAI +SET @ENTRY := 46521; +UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`= @ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +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`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(@ENTRY, 0, 0, 0, 60, 0, 100, 1, 100, 100, 0, 0, 11, 80797, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, "Every 0 and 0 ms (for the first time, timer between 100 and 100 ms) - Self: Cast spell Generic Quest Invisibility 5 (80797) on Self // "); + +-- Creature Mack's Camel 46524 SAI +SET @ENTRY := 46524; +UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`= @ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +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`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(@ENTRY, 0, 0, 0, 60, 0, 100, 1, 100, 100, 0, 0, 11, 80797, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, "Every 0 and 0 ms (for the first time, timer between 100 and 100 ms) - Self: Cast spell Generic Quest Invisibility 5 (80797) on Self // "); + +-- Creature Lady Humps 46517 SAI +SET @ENTRY := 46517; +UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`= @ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +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`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(@ENTRY, 0, 0, 1, 73, 0, 100, 0, 0, 0, 0, 0, 134, 86751, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, "On spellclick - Invoker: Cast spell Summon Adarrah (86751) to Action invoker // "), +(@ENTRY, 0, 1, 2, 61, 0, 100, 0, 0, 0, 0, 0, 134, 86752, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, " Linked - Invoker: Cast spell Summon Caravan (86752) to Action invoker // "), +(@ENTRY, 0, 2, 3, 61, 0, 100, 0, 0, 0, 0, 0, 134, 86753, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, " Linked - Invoker: Cast spell Summon Lady Humps (86753) to Action invoker // "), +(@ENTRY, 0, 3, 4, 61, 0, 100, 0, 0, 0, 0, 0, 134, 86754, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, " Linked - Invoker: Cast spell Summon Pack Mule (86754) to Action invoker // "), +(@ENTRY, 0, 4, 5, 61, 0, 100, 0, 0, 0, 0, 0, 134, 86755, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, " Linked - Invoker: Cast spell Summon Budd's Camel (86755) to Action invoker // "), +(@ENTRY, 0, 5, 6, 61, 0, 100, 0, 0, 0, 0, 0, 134, 86756, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, " Linked - Invoker: Cast spell Summon Samir's Camel (86756) to Action invoker // "), +(@ENTRY, 0, 6, 7, 61, 0, 100, 0, 0, 0, 0, 0, 134, 86757, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, " Linked - Invoker: Cast spell Summon Mack's Camel (86757) to Action invoker // "), +(@ENTRY, 0, 7, 8, 61, 0, 100, 0, 0, 0, 0, 0, 134, 86758, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, " Linked - Invoker: Cast spell Summon Adarrah's Camel (86758) to Action invoker // "), +(@ENTRY, 0, 8, 9, 61, 0, 100, 0, 0, 0, 0, 0, 134, 86782, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, " Linked - Invoker: Cast spell Summon Cloned Image (86782) to Action invoker // "), +(@ENTRY, 0, 9, 10, 61, 0, 100, 0, 0, 0, 0, 0, 134, 86942, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, " Linked - Invoker: Cast spell Summon Beam Target Bunny (86942) to Action invoker // "), +(@ENTRY, 0, 10, 0, 61, 0, 100, 0, 0, 0, 0, 0, 134, 86748, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, " Linked - Invoker: Cast spell Initialize Uldum Intro (86748) to Action invoker // "); + +-- ----------------------- INTRO EVENT + +-- Creature Adarrah 46533 SAI +SET @ENTRY := 46533; +UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`= @ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +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`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(@ENTRY, 0, 0, 1, 37, 0, 100, 0, 0, 0, 0, 0, 44, 169, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, "On AI initialize - Self: Set phase id to 169 // "), +(@ENTRY, 0, 1, 0, 61, 0, 100, 0, 0, 0, 0, 0, 44, 298, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, " Linked - Self: Set phase id to 298 // "), +(@ENTRY, 0, 2, 0, 8, 0, 100, 0, 86843, 0, 0, 0, 80, 4653300, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, "On spell Ping All Actors 00 (86843) hit - Start timed action list id #4653300 // "); + +-- TimedActionList 4653300 SAI +SET @ENTRY := 4653300; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=9; +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`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(@ENTRY, 9, 0, 0, 0, 0, 100, 1, 400, 400, 0, 0, 69, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, -8926.04, -2263.39, 9.00172, 0, "When in combat and timer at the begining between 400 and 400 ms (and later repeats every 0 and 0 ms) - Self: Move to position (-8926.04, -2263.39, 9.00172, 0) (point id 0) // "), +(@ENTRY, 9, 1, 0, 0, 0, 100, 1, 900, 900, 0, 0, 1, 0, 0, 0, 0, 0, 0, 23, 0, 0, 0, 0, 0, 0, 0, "When in combat and timer at the begining between 900 and 900 ms (and later repeats every 0 and 0 ms) - Owner/Summoner: Talk 0 // "), +(@ENTRY, 9, 2, 0, 0, 0, 100, 1, 3600, 3600, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, "When in combat and timer at the begining between 3600 and 3600 ms (and later repeats every 0 and 0 ms) - Self: Talk 1 // "), +(@ENTRY, 9, 3, 0, 0, 0, 100, 1, 3600, 3600, 0, 0, 69, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, -8936.73, -2274.35, 9.00295, 0, "When in combat and timer at the begining between 3600 and 3600 ms (and later repeats every 0 and 0 ms) - Self: Move to position (-8936.73, -2274.35, 9.00295, 0) (point id 0) // "), +(@ENTRY, 9, 4, 0, 0, 0, 100, 1, 2000, 2000, 0, 0, 11, 43671, 0, 0, 0, 0, 0, 19, 46546, 10, 0, 0, 0, 0, 0, "When in combat and timer at the begining between 2000 and 2000 ms (and later repeats every 0 and 0 ms) - Self: Cast spell Ride Vehicle (43671) on Closest alive creature Adarrah's Camel (46546) in 10 yards // "); + +-- Creature Uldum Camera Bunny 04 46557 +UPDATE `creature_template` SET `AIName`="", `ScriptName`= 'npc_uldum_camera_bunny_04' WHERE `entry`= 46557; + +-- Creature Beam Target Bunny 46661 SAI +SET @ENTRY := 46661; +UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`= @ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +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`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(@ENTRY, 0, 0, 1, 37, 0, 100, 0, 0, 0, 0, 0, 44, 169, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, "On AI initialize - Self: Set phase id to 169 // "), +(@ENTRY, 0, 1, 0, 61, 0, 100, 0, 0, 0, 0, 0, 44, 289, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, " Linked - Self: Set phase id to 289 // "); + +-- Creature Mack's Camel 46543 SAI +SET @ENTRY := 46543; +UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`= @ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +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`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(@ENTRY, 0, 0, 1, 37, 0, 100, 0, 0, 0, 0, 0, 59, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "On AI initialize - Self: Set walk // "), +(@ENTRY, 0, 1, 2, 61, 0, 100, 0, 0, 0, 0, 0, 44, 169, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, " Linked - Self: Set phase id to 169 // "), +(@ENTRY, 0, 2, 0, 61, 0, 100, 0, 0, 0, 0, 0, 44, 298, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, " Linked - Self: Set phase id to 298 // "), +(@ENTRY, 0, 3, 0, 8, 0, 100, 0, 86843, 0, 0, 0, 80, 4654300, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, "On spell Ping All Actors 00 (86843) hit - Start timed action list id #4654300 // "); + +-- TimedActionList 4654300 SAI +SET @ENTRY := 4654300; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=9; +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`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(@ENTRY, 9, 0, 0, 0, 0, 100, 1, 13400, 13400, 0, 0, 69, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, -8919.02, -2248.4, 9.001721, 0, "When in combat and timer at the begining between 13400 and 13400 ms (and later repeats every 0 and 0 ms) - Self: Move to position (-8919.02, -2248.4, 9.001721, 0) (point id 0) // "), +(@ENTRY, 9, 1, 0, 0, 0, 100, 1, 12000, 12000, 0, 0, 69, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, -8925.41, -2224.72, 9.001721, 0, "When in combat and timer at the begining between 12000 and 12000 ms (and later repeats every 0 and 0 ms) - Self: Move to position (-8925.41, -2224.72, 9.001721, 0) (point id 0) // "); + +-- Creature Samir's Camel 46540 SAI +SET @ENTRY := 46540; +UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`= @ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +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`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(@ENTRY, 0, 0, 1, 37, 0, 100, 0, 0, 0, 0, 0, 59, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "On AI initialize - Self: Set walk // "), +(@ENTRY, 0, 1, 2, 61, 0, 100, 0, 0, 0, 0, 0, 44, 169, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, " Linked - Self: Set phase id to 169 // "), +(@ENTRY, 0, 2, 0, 61, 0, 100, 0, 0, 0, 0, 0, 44, 298, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, " Linked - Self: Set phase id to 298 // "), +(@ENTRY, 0, 3, 0, 8, 0, 100, 0, 86843, 0, 0, 0, 80, 4654000, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, "On spell Ping All Actors 00 (86843) hit - Start timed action list id #4654000 // "); + +-- TimedActionList 4654000 SAI +SET @ENTRY := 4654000; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=9; +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`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(@ENTRY, 9, 0, 0, 0, 0, 100, 1, 13400, 13400, 0, 0, 69, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, -8923.14, -2255.77, 9.001721, 0, "When in combat and timer at the begining between 13400 and 13400 ms (and later repeats every 0 and 0 ms) - Self: Move to position (-8923.14, -2255.77, 9.001721, 0) (point id 0) // "), +(@ENTRY, 9, 1, 0, 0, 0, 100, 1, 14500, 14500, 0, 0, 69, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, -8927.98, -2228.35, 9.001721, 0, "When in combat and timer at the begining between 14500 and 14500 ms (and later repeats every 0 and 0 ms) - Self: Move to position (-8927.98, -2228.35, 9.001721, 0) (point id 0) // "); + +-- Creature Budd's Camel 46538 SAI +SET @ENTRY := 46538; +UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`= @ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +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`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(@ENTRY, 0, 0, 1, 37, 0, 100, 0, 0, 0, 0, 0, 59, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "On AI initialize - Self: Set walk // "), +(@ENTRY, 0, 1, 2, 61, 0, 100, 0, 0, 0, 0, 0, 44, 169, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, " Linked - Self: Set phase id to 169 // "), +(@ENTRY, 0, 2, 0, 61, 0, 100, 0, 0, 0, 0, 0, 44, 298, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, " Linked - Self: Set phase id to 298 // "), +(@ENTRY, 0, 3, 0, 8, 0, 100, 0, 86843, 0, 0, 0, 80, 4653800, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, "On spell Ping All Actors 00 (86843) hit - Start timed action list id #4653800 // "); + +-- TimedActionList 4653800 SAI +SET @ENTRY := 4653800; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=9; +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`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(@ENTRY, 9, 0, 0, 0, 0, 100, 1, 21000, 21000, 0, 0, 69, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, -8933.07, -2249.24, 9.001721, 0, "When in combat and timer at the begining between 21000 and 21000 ms (and later repeats every 0 and 0 ms) - Self: Move to position (-8933.07, -2249.24, 9.001721, 0) (point id 0) // "), +(@ENTRY, 9, 1, 0, 0, 0, 100, 0, 14500, 14500, 0, 0, 69, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, -8937.89, -2211.88, 9.001956, 0, "When in combat and timer at the begining between 14500 and 14500 ms (and later repeats every 0 and 0 ms) - Self: Move to position (-8937.89, -2211.88, 9.001956, 0) (point id 0) // "); + +-- Creature Adarrah's Camel 46546 SAI +SET @ENTRY := 46546; +UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`= @ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +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`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(@ENTRY, 0, 0, 1, 37, 0, 100, 0, 0, 0, 0, 0, 59, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "On AI initialize - Self: Set walk // "), +(@ENTRY, 0, 1, 2, 61, 0, 100, 0, 0, 0, 0, 0, 44, 169, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, " Linked - Self: Set phase id to 169 // "), +(@ENTRY, 0, 2, 0, 61, 0, 100, 0, 0, 0, 0, 0, 44, 298, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, " Linked - Self: Set phase id to 298 // "), +(@ENTRY, 0, 3, 0, 8, 0, 100, 0, 86843, 0, 0, 0, 80, 4654600, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, "On spell Ping All Actors 00 (86843) hit - Start timed action list id #4654600 // "); + +-- TimedActionList 4654600 SAI +SET @ENTRY := 4654600; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=9; +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`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(@ENTRY, 9, 0, 0, 0, 0, 100, 1, 10500, 10500, 0, 0, 69, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, -8931.88, -2249.08, 9.00172, 0, "When in combat and timer at the begining between 10500 and 10500 ms (and later repeats every 0 and 0 ms) - Self: Move to position (-8931.88, -2249.08, 9.00172, 0) (point id 0) // "), +(@ENTRY, 9, 1, 0, 0, 0, 100, 0, 9000, 9000, 0, 0, 69, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, -8936.35, -2218.25, 9.00196, 0, "When in combat and timer at the begining between 9000 and 9000 ms (and later repeats every 0 and 0 ms) - Self: Move to position (-8936.35, -2218.25, 9.00196, 0) (point id 0) // "); + +-- Creature Lady Humps 46536 SAI +SET @ENTRY := 46536; +UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`= @ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +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`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(@ENTRY, 0, 0, 1, 37, 0, 100, 0, 0, 0, 0, 0, 59, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "On AI initialize - Self: Set walk // "), +(@ENTRY, 0, 1, 2, 61, 0, 100, 0, 0, 0, 0, 0, 44, 169, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, " Linked - Self: Set phase id to 169 // "), +(@ENTRY, 0, 2, 0, 61, 0, 100, 0, 0, 0, 0, 0, 44, 298, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, " Linked - Self: Set phase id to 298 // "), +(@ENTRY, 0, 3, 0, 8, 0, 100, 0, 86843, 0, 0, 0, 80, 4653600, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, "On spell Ping All Actors 00 (86843) hit - Start timed action list id #4653600 // "); + +-- TimedActionList 4653600 SAI +SET @ENTRY := 4653600; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=9; +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`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(@ENTRY, 9, 0, 0, 0, 0, 100, 1, 13400, 13400, 0, 0, 69, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, -8931.92, -2234.18, 9.001721, 0, "When in combat and timer at the begining between 13400 and 13400 ms (and later repeats every 0 and 0 ms) - Self: Move to position (-8931.92, -2234.18, 9.001721, 0) (point id 0) // "), +(@ENTRY, 9, 1, 0, 0, 0, 100, 1, 11000, 11000, 0, 0, 69, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, -8938.87, -2204.73, 9.001956, 0, "When in combat and timer at the begining between 11000 and 11000 ms (and later repeats every 0 and 0 ms) - Self: Move to position (-8938.87, -2204.73, 9.001956, 0) (point id 0) // "); + +-- Creature Cloned Image 46554 SAI +SET @ENTRY := 46554; +UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`= @ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +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`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(@ENTRY, 0, 0, 1, 37, 0, 100, 0, 0, 0, 0, 0, 59, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, "On AI initialize - Self: Set walk // "), +(@ENTRY, 0, 1, 2, 61, 0, 100, 0, 0, 0, 0, 0, 44, 169, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, " Linked - Self: Set phase id to 169 // "), +(@ENTRY, 0, 2, 0, 61, 0, 100, 0, 0, 0, 0, 0, 44, 298, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, " Linked - Self: Set phase id to 298 // "), +(@ENTRY, 0, 3, 4, 25, 0, 100, 0, 0, 0, 0, 0, 11, 86783, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, "On reset (e.g. after reaching home) - Self: Cast spell Reverse Cast Mirror Image (86783) on Self // "), +(@ENTRY, 0, 4, 0, 61, 0, 100, 0, 0, 0, 0, 0, 80, 4655400, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, " Linked - Start timed action list id #4655400 // "); + +-- TimedActionList 4655400 SAI +SET @ENTRY := 4655400; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=9; +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`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(@ENTRY, 9, 0, 0, 0, 0, 100, 1, 1000, 1000, 0, 0, 11, 95747, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, "When in combat and timer at the begining between 1000 and 1000 ms (and later repeats every 0 and 0 ms) - Self: Cast spell Player Summon Camera (95747) on Self // "), +(@ENTRY, 9, 1, 0, 0, 0, 100, 1, 0, 0, 0, 0, 11, 86815, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, "When in combat and timer at the begining between 0 and 0 ms (and later repeats every 0 and 0 ms) - Self: Cast spell Ping Camera 00 (86815) on Self // "), +(@ENTRY, 9, 2, 0, 0, 0, 100, 1, 1300, 1300, 0, 0, 11, 86815, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, "When in combat and timer at the begining between 1300 and 1300 ms (and later repeats every 0 and 0 ms) - Self: Cast spell Ping Camera 00 (86815) on Self // "), +(@ENTRY, 9, 3, 0, 0, 0, 100, 1, 140, 140, 0, 0, 17, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, "When in combat and timer at the begining between 140 and 140 ms (and later repeats every 0 and 0 ms) - Self: Set emote state (UNIT_NPC_EMOTESTATE) to ONESHOT_NONE (0) // "), +(@ENTRY, 9, 4, 0, 0, 0, 100, 1, 1200, 1200, 0, 0, 66, 0, 0, 0, 0, 0, 0, 11, 46533, 15, 0, 0, 0, 0, 0, "When in combat and timer at the begining between 1200 and 1200 ms (and later repeats every 0 and 0 ms) - Self: Look at Creature Adarrah (46533) in 15 yd // "), +(@ENTRY, 9, 5, 0, 0, 0, 100, 1, 9800, 9800, 0, 0, 66, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 3.94444, "When in combat and timer at the begining between 9800 and 9800 ms (and later repeats every 0 and 0 ms) - Self: Look at (0, 0, 0, 3.94444) // "), +(@ENTRY, 9, 6, 0, 0, 0, 100, 1, 0, 0, 0, 0, 5, 6, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, "When in combat and timer at the begining between 0 and 0 ms (and later repeats every 0 and 0 ms) - Self: Play emote ONESHOT_QUESTION (6) // "), +(@ENTRY, 9, 7, 0, 0, 0, 100, 1, 6000, 6000, 0, 0, 69, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, -8922.09, -2270.6, 9.00212, 0, "When in combat and timer at the begining between 6000 and 6000 ms (and later repeats every 0 and 0 ms) - Self: Move to position (-8922.09, -2270.6, 9.00212, 0) (point id 0) // "), +(@ENTRY, 9, 8, 0, 0, 0, 100, 1, 3600, 3600, 0, 0, 66, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 3.24631, "When in combat and timer at the begining between 3600 and 3600 ms (and later repeats every 0 and 0 ms) - Self: Look at (0, 0, 0, 3.24631) // "), +(@ENTRY, 9, 9, 0, 0, 0, 100, 1, 4900, 4900, 0, 0, 59, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, "When in combat and timer at the begining between 4900 and 4900 ms (and later repeats every 0 and 0 ms) - Self: Set run // "), +(@ENTRY, 9, 10, 0, 0, 0, 100, 1, 0, 0, 0, 0, 69, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, -8929.25, -2269.74, 9.00212, 0, "When in combat and timer at the begining between 0 and 0 ms (and later repeats every 0 and 0 ms) - Self: Move to position (-8929.25, -2269.74, 9.00212, 0) (point id 0) // "), +(@ENTRY, 9, 11, 0, 0, 0, 100, 0, 1200, 1200, 0, 0, 11, 43671, 0, 0, 0, 0, 0, 11, 46596, 20, 0, 0, 0, 0, 0, "When in combat and timer at the begining between 1200 and 1200 ms (and later repeats every 0 and 0 ms) - Self: Cast spell Ride Vehicle (43671) on Creature Uldum Caravan Harness (46596) in 20 yd // "), +(@ENTRY, 9, 12, 0, 0, 0, 100, 1, 3700, 3700, 0, 0, 11, 86815, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, "When in combat and timer at the begining between 3700 and 3700 ms (and later repeats every 0 and 0 ms) - Self: Cast spell Ping Camera 00 (86815) on Self // "); + +-- Creature Pack Mule 46537 SAI +SET @ENTRY := 46537; +UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`= @ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +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`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(@ENTRY, 0, 0, 1, 37, 0, 100, 0, 0, 0, 0, 0, 59, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "On AI initialize - Self: Set walk // "), +(@ENTRY, 0, 1, 2, 61, 0, 100, 0, 0, 0, 0, 0, 44, 169, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, " Linked - Self: Set phase id to 169 // "), +(@ENTRY, 0, 2, 0, 61, 0, 100, 0, 0, 0, 0, 0, 44, 298, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, " Linked - Self: Set phase id to 298 // "), +(@ENTRY, 0, 3, 0, 8, 0, 100, 0, 86843, 0, 0, 0, 80, 4653700, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, "On spell Ping All Actors 00 (86843) hit - Start timed action list id #4653700 // "); + +-- TimedActionList 4653700 SAI +SET @ENTRY := 4653700; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=9; +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`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(@ENTRY, 9, 0, 0, 0, 0, 100, 1, 13500, 13500, 0, 0, 69, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, -8922.56, -2250.76, 9.001721, 0, "When in combat and timer at the begining between 13500 and 13500 ms (and later repeats every 0 and 0 ms) - Self: Move to position (-8922.56, -2250.76, 9.001721, 0) (point id 0) // "), +(@ENTRY, 9, 1, 0, 0, 0, 100, 1, 10000, 10000, 0, 0, 69, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, -8927.56, -2229.44, 9.001721, 0, "When in combat and timer at the begining between 14500 and 14500 ms (and later repeats every 0 and 0 ms) - Self: Move to position (-8927.56, -2229.44, 9.001721, 0) (point id 0) // "); + +-- Creature Uldum Caravan Harness 46596 SAI +SET @ENTRY := 46596; +UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`= @ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +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`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(@ENTRY, 0, 0, 1, 37, 0, 100, 0, 0, 0, 0, 0, 59, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, "On AI initialize - Self: Set walk // "), +(@ENTRY, 0, 1, 2, 61, 0, 100, 0, 0, 0, 0, 0, 44, 169, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, " Linked - Self: Set phase id to 169 // "), +(@ENTRY, 0, 2, 0, 61, 0, 100, 0, 0, 0, 0, 0, 44, 298, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, " Linked - Self: Set phase id to 298 // "), +(@ENTRY, 0, 3, 0, 8, 0, 100, 0, 86843, 0, 0, 0, 80, 4659600, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, "On spell Ping All Actors 00 (86843) hit - Start timed action list id #4659600 // "), +(@ENTRY, 0, 4, 0, 27, 0, 100, 0, 0, 0, 0, 0, 11, 73447, 2, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, "On passenger boarded (vehicle) - Self: Cast spell Chains of Bondage (73447) on Action invoker // "); + +-- TimedActionList 4659600 SAI +SET @ENTRY := 4659600; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=9; +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`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(@ENTRY, 9, 0, 0, 0, 0, 100, 1, 17000, 17000, 0, 0, 69, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, -8935.14, -2234.49, 9.00222, 0, "When in combat and timer at the begining between 17000 and 17000 ms (and later repeats every 0 and 0 ms) - Self: Move to position (-8935.14, -2234.49, 9.00222, 0) (point id 0) // "), +(@ENTRY, 9, 1, 0, 0, 0, 100, 0, 19500, 19500, 0, 0, 69, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, -8939.94, -2211.02, 9.00196, 0, "When in combat and timer at the begining between 19500 and 19500 ms (and later repeats every 0 and 0 ms) - Self: Move to position (-8939.94, -2211.02, 9.00196, 0) (point id 0) // "); + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=22 AND `SourceEntry`=46596 AND SourceId = 0; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(22, 5, 46596, 0, 0, 31, 0, 3, 46544, 0, 0, "", "If Invoker is TYPEID_UNIT, entry is 46544 and guid is 0"); + +-- Creature Budd 46539 SAI +SET @ENTRY := 46539; +UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`= @ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +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`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(@ENTRY, 0, 0, 0, 8, 0, 100, 0, 86843, 0, 0, 0, 67, 0, 30400, 30400, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, "On spell Ping All Actors 00 (86843) hit - Trigger timed event #0 in 30400 - 30400 ms // "), +(@ENTRY, 0, 1, 0, 59, 0, 100, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, "On timed event 0 triggered - Self: Talk 0 // "); + diff --git a/src/server/scripts/Kalimdor/kalimdor_script_loader.cpp b/src/server/scripts/Kalimdor/kalimdor_script_loader.cpp index f564a56d83d..7b19122067b 100644 --- a/src/server/scripts/Kalimdor/kalimdor_script_loader.cpp +++ b/src/server/scripts/Kalimdor/kalimdor_script_loader.cpp @@ -136,6 +136,7 @@ void AddSC_the_barrens(); void AddSC_thunder_bluff(); void AddSC_ungoro_crater(); void AddSC_winterspring(); +void AddSC_uldum(); // The name of this function should match: // void Add${NameOfDirectory}Scripts() @@ -261,4 +262,5 @@ void AddKalimdorScripts() AddSC_thunder_bluff(); AddSC_ungoro_crater(); AddSC_winterspring(); + AddSC_uldum(); } diff --git a/src/server/scripts/Kalimdor/zone_uldum.cpp b/src/server/scripts/Kalimdor/zone_uldum.cpp new file mode 100644 index 00000000000..a600aaef7fd --- /dev/null +++ b/src/server/scripts/Kalimdor/zone_uldum.cpp @@ -0,0 +1,217 @@ +/* + * Copyright (C) 2008-2019 TrinityCore + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ + +#include "ScriptMgr.h" +#include "ScriptedCreature.h" +#include "SpellAuraEffects.h" +#include "GameObjectData.h" +#include "GameObject.h" +#include "MoveSpline.h" +#include "MoveSplineInit.h" +#include "PassiveAI.h" +#include "PhasingHandler.h" +#include "Spell.h" +#include "Vehicle.h" + +enum UldumIntro +{ + SPELL_SUMMON_CAMERA_BUNNY = 86792, + SPELL_PING_ALL_ACTORS_00 = 86843 +}; + +class spell_uldum_master_ping_all_actors : public SpellScript +{ + PrepareSpellScript(spell_uldum_master_ping_all_actors); + + bool Validate(SpellInfo const* /*spellInfo*/) override + { + return ValidateSpellInfo({ SPELL_PING_ALL_ACTORS_00 }); + } + + void HandleScript(SpellEffIndex /*effIndex*/) + { + GetHitUnit()->CastSpell(GetHitUnit(), SPELL_PING_ALL_ACTORS_00, true); + } + + void Register() override + { + OnEffectHitTarget += SpellEffectFn(spell_uldum_master_ping_all_actors::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT); + } +}; + +class spell_uldum_player_summon_camera : public SpellScript +{ + PrepareSpellScript(spell_uldum_player_summon_camera); + + bool Validate(SpellInfo const* /*spellInfo*/) override + { + return ValidateSpellInfo({ SPELL_SUMMON_CAMERA_BUNNY }); + } + + void HandleScript(SpellEffIndex /*effIndex*/) + { + GetHitUnit()->CastSpell(GetHitUnit(), SPELL_SUMMON_CAMERA_BUNNY, true); + } + + void Register() override + { + OnEffectHitTarget += SpellEffectFn(spell_uldum_player_summon_camera::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT); + } +}; + +enum UldumCameraBunny +{ + PHASE_DEFAULT = 169, + PHASE_ENTRANCE_TO_ULDUM = 298, + + SPELL_PING_CAMERA_00 = 86815, + SPELL_PING_CAMERA_01 = 86943, + SPELL_PING_BEAM_TARGET = 86944, + SPELL_INVISIBLE_BEAM = 86822, + SPELL_MASTER_PING_ALL_ACTORS = 86848, + SPELL_REVERSE_CAST_RIDE_VEHICLE = 82721, + + EVENT_MOVE_PATH_1 = 1, + EVENT_PING_BEAM_TARGET = 2, + + POINT_NONE = 0, + + SPLINE_CHAIN_ID_CAMERA_PATH_1 = 1, + SPLINE_CHAIN_ID_CAMERA_PATH_2 = 2, + SPLINE_CHAIN_ID_BEAM_TARGET_PATH_1 = 1 +}; + +Position const UldumCameraBunny04Path1[] = +{ + { -8922.04f, -2274.03f, 14.4508f }, + { -8915.17f, -2282.37f, 21.0023f } +}; + +Position const UldumCameraBunny04Path2[] = +{ + {-8921.55f, -2291.59f, 18.5897f }, + { -8928.08f, -2291.1f, 16.9801f }, + { -8932.17f, -2279.79f, 14.2697f }, + { -8933.72f, -2263.06f, 12.12f } +}; + + +Position const UldumCameraBunny04Path3[] = +{ + { -8951.25f, -2174.06f, 17.2353f }, + { -8943.43f, -2161.06f, 54.8142f } +}; + + +struct npc_uldum_camera_bunny_04 : public ScriptedAI +{ + npc_uldum_camera_bunny_04(Creature* creature) : ScriptedAI(creature) + { + Initialize(); + } + + void Initialize() + { + _pingCount = 0; + } + + void InitializeAI() override + { + PhasingHandler::AddPhase(me, PHASE_DEFAULT, false); + PhasingHandler::AddPhase(me, PHASE_ENTRANCE_TO_ULDUM, false); + } + + void SpellHit(Unit* caster, SpellInfo const* spell) override + { + if (!caster) + return; + + switch (spell->Id) + { + case SPELL_PING_CAMERA_00: + printf("ping SPELL_PING_CAMERA_00 landed \n"); + if (_pingCount == 1) + { + DoCast(caster, SPELL_INVISIBLE_BEAM); + DoCastSelf(SPELL_REVERSE_CAST_RIDE_VEHICLE, true); + DoCastSelf(SPELL_MASTER_PING_ALL_ACTORS, true); + _events.ScheduleEvent(EVENT_MOVE_PATH_1, 11s); + } + else if (_pingCount == 2) + { + printf("EVENT_PING_BEAM_TARGET scheduled \n"); + _events.ScheduleEvent(EVENT_PING_BEAM_TARGET, 3s + 600ms); + } + + _pingCount++; + break; + case SPELL_PING_CAMERA_01: + { + + me->GetMotionMaster()->MoveAlongSplineChain(POINT_NONE, SPLINE_CHAIN_ID_CAMERA_PATH_2, true); + DoCast(caster, SPELL_INVISIBLE_BEAM, true); + break; + } + default: + break; + } + } + + void SpellHitTarget(Unit* target, SpellInfo const* spell) override + { + if (spell->Id == SPELL_PING_BEAM_TARGET) + { + printf("ping camera beam hit \n"); + target->CastSpell(target, SPELL_PING_CAMERA_01); + target->GetMotionMaster()->MoveAlongSplineChain(POINT_NONE, SPLINE_CHAIN_ID_BEAM_TARGET_PATH_1, true); + } + } + + void UpdateAI(uint32 diff) override + { + _events.Update(diff); + + while (uint32 eventId = _events.ExecuteEvent()) + { + switch (eventId) + { + case EVENT_MOVE_PATH_1: + me->GetMotionMaster()->MoveAlongSplineChain(POINT_NONE, SPLINE_CHAIN_ID_CAMERA_PATH_1, true); + break; + case EVENT_PING_BEAM_TARGET: + printf("EVENT_PING_BEAM_TARGET triggered \n"); + me->CastStop(); + me->ReleaseFocus(nullptr, false); + DoCastSelf(SPELL_PING_BEAM_TARGET, true); + break; + default: + break; + } + } + } + +private: + uint8 _pingCount; + EventMap _events; +}; + +void AddSC_uldum() +{ + RegisterCreatureAI(npc_uldum_camera_bunny_04); + RegisterSpellScript(spell_uldum_master_ping_all_actors); + RegisterSpellScript(spell_uldum_player_summon_camera); +} diff --git a/src/server/scripts/Spells/spell_generic.cpp b/src/server/scripts/Spells/spell_generic.cpp index 25cb637c389..852b99813ab 100644 --- a/src/server/scripts/Spells/spell_generic.cpp +++ b/src/server/scripts/Spells/spell_generic.cpp @@ -4887,6 +4887,56 @@ class spell_gen_throw_torch : public SpellScriptLoader } }; +class spell_gen_revserse_cast_mirror_image : public SpellScript +{ + PrepareSpellScript(spell_gen_revserse_cast_mirror_image); + + void HandleScript(SpellEffIndex effIndex) + { + if (Unit* caster = GetCaster()) + GetHitUnit()->CastSpell(caster, GetSpellInfo()->Effects[effIndex].BasePoints, true); + } + + void Register() override + { + OnEffectHitTarget += SpellEffectFn(spell_gen_revserse_cast_mirror_image::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT); + } +}; + +class spell_gen_mirror_image_aura : public SpellScript +{ + PrepareSpellScript(spell_gen_mirror_image_aura); + + void HandleScript(SpellEffIndex effIndex) + { + if (Unit* caster = GetCaster()) + GetHitUnit()->CastSpell(caster, GetSpellInfo()->Effects[effIndex].BasePoints, true); + } + + void Register() override + { + OnEffectHitTarget += SpellEffectFn(spell_gen_mirror_image_aura::HandleScript, EFFECT_1, SPELL_EFFECT_SCRIPT_EFFECT); + OnEffectHitTarget += SpellEffectFn(spell_gen_mirror_image_aura::HandleScript, EFFECT_2, SPELL_EFFECT_SCRIPT_EFFECT); + } +}; + + +class spell_gen_reverse_cast_ride_vehicle : public SpellScript +{ + PrepareSpellScript(spell_gen_reverse_cast_ride_vehicle); + + void HandleScript(SpellEffIndex effIndex) + { + if (Unit* caster = GetCaster()) + GetHitUnit()->CastSpell(caster, GetSpellInfo()->Effects[effIndex].BasePoints, true); + } + + void Register() override + { + OnEffectHitTarget += SpellEffectFn(spell_gen_reverse_cast_ride_vehicle::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT); + } +}; + void AddSC_generic_spell_scripts() { new spell_gen_absorb0_hitlimit1(); @@ -4997,4 +5047,8 @@ void AddSC_generic_spell_scripts() new spell_gen_vengeance(); new spell_gen_gilneas_prison_periodic_dummy(); new spell_gen_throw_torch(); + RegisterSpellScript(spell_gen_revserse_cast_mirror_image); + RegisterSpellScript(spell_gen_mirror_image_aura); + RegisterSpellScript(spell_gen_reverse_cast_ride_vehicle); + }