160 lines
12 KiB
SQL
160 lines
12 KiB
SQL
DROP PROCEDURE IF EXISTS add_migration;
|
|
delimiter ??
|
|
CREATE PROCEDURE `add_migration`()
|
|
BEGIN
|
|
DECLARE v INT DEFAULT 1;
|
|
SET v = (SELECT COUNT(*) FROM `migrations` WHERE `id`='20240106134606');
|
|
IF v=0 THEN
|
|
INSERT INTO `migrations` VALUES ('20240106134606');
|
|
-- Add your query below.
|
|
|
|
|
|
-- Start script for quest The Defias Brotherhood.
|
|
DELETE FROM `quest_start_scripts` WHERE `id`=155;
|
|
INSERT INTO `quest_start_scripts` (`id`, `delay`, `priority`, `command`, `datalong`, `datalong2`, `datalong3`, `datalong4`, `target_param1`, `target_param2`, `target_type`, `data_flags`, `dataint`, `dataint2`, `dataint3`, `dataint4`, `x`, `y`, `z`, `o`, `condition_id`, `comments`) VALUES
|
|
(155, 0, 0, 61, 155, 600, 0, 0, 0, 0, 0, 8, 0, 15502, 1019, 15501, 0, 0, 0, 0, 0, 'The Defias Brotherhood: Start Scripted Map Event'),
|
|
(155, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 'The Defias Brotherhood: The Defias Traitor - Say Text'),
|
|
(155, 0, 2, 4, 147, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'The Defias Brotherhood: The Defias Traitor - Remove Questgiver Flag'),
|
|
(155, 0, 3, 25, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'The Defias Brotherhood: The Defias Traitor - Set Run'),
|
|
(155, 0, 4, 60, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'The Defias Brotherhood: The Defias Traitor - Start Waypoints');
|
|
UPDATE `quest_template` SET `StartScript`=155 WHERE `entry`=155;
|
|
|
|
-- Fail script for quest The Defias Brotherhood.
|
|
DELETE FROM `generic_scripts` WHERE `id`=15501;
|
|
INSERT INTO `generic_scripts` (`id`, `delay`, `priority`, `command`, `datalong`, `datalong2`, `datalong3`, `datalong4`, `target_param1`, `target_param2`, `target_type`, `data_flags`, `dataint`, `dataint2`, `dataint3`, `dataint4`, `x`, `y`, `z`, `o`, `condition_id`, `comments`) VALUES
|
|
(15501, 0, 0, 70, 155, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'The Defias Brotherhood Failed: Player - Fail Quest'),
|
|
(15501, 1, 0, 71, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'The Defias Brotherhood Failed: The Defias Traitor - Respawn');
|
|
|
|
-- Success script for quest The Defias Brotherhood.
|
|
DELETE FROM `generic_scripts` WHERE `id`=15502;
|
|
INSERT INTO `generic_scripts` (`id`, `delay`, `priority`, `command`, `datalong`, `datalong2`, `datalong3`, `datalong4`, `target_param1`, `target_param2`, `target_type`, `data_flags`, `dataint`, `dataint2`, `dataint3`, `dataint4`, `x`, `y`, `z`, `o`, `condition_id`, `comments`) VALUES
|
|
(15502, 0, 0, 7, 155, 80, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'The Defias Brotherhood Success: Player - Complete Quest The Defias Brotherhood');
|
|
|
|
-- Waypoints for The Defias Traitor.
|
|
DELETE FROM `script_waypoint` WHERE `entry`=467;
|
|
INSERT INTO `creature_movement_template` (`entry`, `point`, `position_x`, `position_y`, `position_z`, `orientation`, `waittime`, `wander_distance`, `script_id`) VALUES
|
|
(467, 1, -10508.365234, 1068.004639, 55.211067, 2.12930000, 0, 0.000000, 0),
|
|
(467, 2, -10511.665039, 1070.056641, 55.000290, 100.000000, 0, 0.000000, 0),
|
|
(467, 3, -10528.883789, 1080.062378, 51.316719, 100.000000, 0, 0.000000, 0),
|
|
(467, 4, -10537.890625, 1083.893066, 49.087326, 100.000000, 0, 0.000000, 0),
|
|
(467, 5, -10556.833008, 1085.474976, 44.932392, 100.000000, 0, 0.000000, 0),
|
|
(467, 6, -10566.367188, 1083.725708, 42.061424, 100.000000, 0, 0.000000, 0),
|
|
(467, 7, -10595.578125, 1078.085693, 37.326855, 100.000000, 0, 0.000000, 0),
|
|
(467, 8, -10614.046875, 1070.617065, 36.250000, 100.000000, 0, 0.000000, 0),
|
|
(467, 9, -10632.202148, 1062.191284, 33.783394, 100.000000, 0, 0.000000, 0),
|
|
(467, 10, -10646.985352, 1049.307129, 33.469727, 100.000000, 0, 0.000000, 0),
|
|
(467, 11, -10659.892578, 1033.606079, 33.001930, 100.000000, 0, 0.000000, 0),
|
|
(467, 12, -10668.109375, 1030.417236, 32.642113, 100.000000, 0, 0.000000, 0),
|
|
(467, 13, -10688.779297, 1033.078491, 32.778629, 100.000000, 0, 0.000000, 0),
|
|
(467, 14, -10708.905273, 1033.406860, 33.340015, 100.000000, 0, 0.000000, 0),
|
|
(467, 15, -10719.487305, 1032.011841, 33.372372, 100.000000, 0, 0.000000, 0),
|
|
(467, 16, -10738.052734, 1025.092407, 33.498344, 100.000000, 0, 0.000000, 0),
|
|
(467, 17, -10746.997070, 1020.282715, 33.475327, 100.000000, 0, 0.000000, 0),
|
|
(467, 18, -10756.583008, 1017.325073, 32.644794, 100.000000, 0, 0.000000, 0),
|
|
(467, 19, -10766.623047, 1016.437439, 32.250309, 100.000000, 0, 0.000000, 0),
|
|
(467, 20, -10786.786133, 1017.289368, 32.784870, 100.000000, 0, 0.000000, 0),
|
|
(467, 21, -10796.921875, 1017.794189, 32.309326, 100.000000, 0, 0.000000, 0),
|
|
(467, 22, -10806.905273, 1016.952515, 32.450035, 100.000000, 0, 0.000000, 0),
|
|
(467, 23, -10816.677734, 1013.862793, 32.737080, 100.000000, 0, 0.000000, 0),
|
|
(467, 24, -10825.985352, 1010.479675, 32.922165, 100.000000, 0, 0.000000, 0),
|
|
(467, 25, -10835.723633, 1007.843689, 32.667873, 100.000000, 0, 0.000000, 0),
|
|
(467, 26, -10845.781250, 1006.920349, 32.554630, 100.000000, 0, 0.000000, 0),
|
|
(467, 27, -10855.850586, 1005.957703, 31.794849, 100.000000, 0, 0.000000, 0),
|
|
(467, 28, -10876.137695, 1004.763306, 32.509239, 100.000000, 0, 0.000000, 0),
|
|
(467, 29, -10895.647461, 1000.409363, 34.958488, 100.000000, 0, 0.000000, 0),
|
|
(467, 30, -10905.284180, 997.541565, 36.199196, 100.000000, 0, 0.000000, 0),
|
|
(467, 31, -10915.010742, 994.852295, 35.684765, 100.000000, 0, 0.000000, 0),
|
|
(467, 32, -10928.579102, 1008.821533, 36.434170, 100.000000, 0, 0.000000, 0),
|
|
(467, 33, -10934.929688, 1016.778931, 36.772240, 100.000000, 0, 0.000000, 0),
|
|
(467, 34, -10937.479492, 1026.311523, 36.677589, 100.000000, 0, 0.000000, 0),
|
|
(467, 35, -10936.495117, 1036.719360, 36.528023, 100.000000, 0, 0.000000, 0),
|
|
(467, 36, -10934.624023, 1046.323364, 36.217793, 100.000000, 0, 0.000000, 0),
|
|
(467, 37, -10934.037109, 1056.399170, 36.091614, 100.000000, 0, 0.000000, 0),
|
|
(467, 38, -10936.418945, 1066.224609, 36.348686, 100.000000, 0, 0.000000, 0),
|
|
(467, 39, -10939.788086, 1075.804688, 36.498444, 100.000000, 0, 0.000000, 0),
|
|
(467, 40, -10944.862305, 1084.990234, 36.621349, 100.000000, 0, 0.000000, 0),
|
|
(467, 41, -10951.633789, 1091.827393, 36.849304, 100.000000, 0, 0.000000, 0),
|
|
(467, 42, -10957.307617, 1099.960815, 36.828396, 100.000000, 0, 0.000000, 0),
|
|
(467, 43, -10958.173828, 1109.963257, 36.708630, 100.000000, 0, 0.000000, 0),
|
|
(467, 44, -10955.863281, 1119.640503, 36.822605, 100.000000, 0, 0.000000, 0),
|
|
(467, 45, -10951.651367, 1128.800415, 37.088837, 100.000000, 0, 0.000000, 0),
|
|
(467, 46, -10946.530273, 1137.514038, 37.387074, 100.000000, 0, 0.000000, 0),
|
|
(467, 47, -10937.208984, 1155.371826, 37.687366, 100.000000, 0, 0.000000, 0),
|
|
(467, 48, -10932.764648, 1164.468628, 37.739960, 100.000000, 0, 0.000000, 0),
|
|
(467, 49, -10924.265625, 1182.871582, 37.153881, 100.000000, 0, 0.000000, 0),
|
|
(467, 50, -10915.636719, 1201.651489, 36.595894, 100.000000, 0, 0.000000, 0),
|
|
(467, 51, -10911.511719, 1210.341309, 35.858269, 100.000000, 0, 0.000000, 0),
|
|
(467, 52, -10903.272461, 1228.768555, 34.254444, 100.000000, 0, 0.000000, 0),
|
|
(467, 53, -10896.151367, 1247.739746, 33.529724, 100.000000, 0, 0.000000, 0),
|
|
(467, 54, -10893.463867, 1257.455200, 33.429520, 100.000000, 0, 0.000000, 0),
|
|
(467, 55, -10891.158203, 1277.552856, 33.470081, 100.000000, 0, 0.000000, 0),
|
|
(467, 56, -10890.843750, 1287.644409, 33.730328, 100.000000, 0, 0.000000, 0),
|
|
(467, 57, -10891.253906, 1297.683228, 34.580219, 100.000000, 0, 0.000000, 0),
|
|
(467, 58, -10892.418945, 1307.667725, 35.571800, 100.000000, 0, 0.000000, 0),
|
|
(467, 59, -10894.049805, 1317.594238, 36.676090, 100.000000, 0, 0.000000, 0),
|
|
(467, 60, -10896.221680, 1327.406006, 37.801311, 100.000000, 0, 0.000000, 0),
|
|
(467, 61, -10898.851563, 1337.183594, 38.586575, 100.000000, 0, 0.000000, 0),
|
|
(467, 62, -10901.658203, 1346.910522, 38.862293, 100.000000, 0, 0.000000, 0),
|
|
(467, 63, -10903.759766, 1356.811035, 39.530334, 100.000000, 0, 0.000000, 0),
|
|
(467, 64, -10908.491211, 1376.412720, 41.690590, 100.000000, 0, 0.000000, 0),
|
|
(467, 65, -10910.840820, 1386.203491, 42.500473, 100.000000, 0, 0.000000, 0),
|
|
(467, 66, -10912.922852, 1396.386353, 43.061867, 100.000000, 0, 0.000000, 0),
|
|
(467, 67, -10914.730469, 1406.258179, 43.019428, 100.000000, 0, 0.000000, 0),
|
|
(467, 68, -10917.774414, 1419.297485, 42.878891, 100.000000, 1000, 0.000000, 46768),
|
|
(467, 69, -10921.615234, 1420.600098, 42.980225, 100.000000, 0, 0.000000, 0),
|
|
(467, 70, -10933.411133, 1423.385010, 43.059723, 100.000000, 0, 0.000000, 0),
|
|
(467, 71, -10937.416016, 1424.085938, 43.133114, 100.000000, 0, 0.000000, 0),
|
|
(467, 72, -10945.477539, 1424.508545, 43.417740, 100.000000, 0, 0.000000, 0),
|
|
(467, 73, -10953.411133, 1423.184326, 43.273365, 100.000000, 0, 0.000000, 0),
|
|
(467, 74, -10961.046875, 1420.687256, 43.105751, 100.000000, 0, 0.000000, 0),
|
|
(467, 75, -10967.974609, 1416.510620, 43.146919, 100.000000, 0, 0.000000, 0),
|
|
(467, 76, -10975.002930, 1412.850464, 42.935589, 100.000000, 0, 0.000000, 0),
|
|
(467, 77, -10983.043945, 1411.775757, 42.978119, 100.000000, 0, 0.000000, 0),
|
|
(467, 78, -10990.964844, 1412.366943, 43.052387, 100.000000, 0, 0.000000, 0),
|
|
(467, 79, -10994.790039, 1413.662354, 43.118515, 100.000000, 0, 0.000000, 0),
|
|
(467, 80, -11001.338867, 1418.407837, 43.146561, 100.000000, 0, 0.000000, 0),
|
|
(467, 81, -11010.550781, 1427.787109, 43.045330, 100.000000, 0, 0.000000, 0),
|
|
(467, 82, -11015.583984, 1434.150391, 43.040802, 100.000000, 0, 0.000000, 0),
|
|
(467, 83, -11020.680664, 1445.102295, 43.111294, 100.000000, 0, 0.000000, 0),
|
|
(467, 84, -11022.956055, 1452.878540, 43.046276, 100.000000, 0, 0.000000, 0),
|
|
(467, 85, -11024.007813, 1456.798218, 42.992771, 100.000000, 0, 0.000000, 0),
|
|
(467, 86, -11024.490234, 1464.887573, 42.941597, 100.000000, 0, 0.000000, 0),
|
|
(467, 87, -11024.727539, 1481.115967, 43.014957, 100.000000, 0, 0.000000, 0),
|
|
(467, 88, -11024.600000, 1490.230000, 43.255800, 100.000000, 0, 0.000000, 0),
|
|
(467, 89, -11030.700000, 1499.550000, 43.262800, 100.000000, 0, 0.000000, 0),
|
|
(467, 90, -11044.400000, 1509.710000, 43.228800, 100.000000, 0, 0.000000, 0),
|
|
(467, 91, -11053.200000, 1516.280000, 43.181600, 100.000000, 0, 0.000000, 0),
|
|
(467, 92, -11058.400000, 1522.540000, 43.256700, 100.000000, 0, 0.000000, 0),
|
|
(467, 93, -11061.200000, 1525.300000, 43.306600, 100.000000, 0, 0.000000, 0),
|
|
(467, 94, -11069.900000, 1527.500000, 43.314300, 100.000000, 10000, 0.000000, 46794),
|
|
(467, 95, -11069.900000, 1527.500000, 43.314300, 100.000000, 0, 0.000000, 0);
|
|
|
|
-- Waypoint scripts for The Defias Traitor.
|
|
DELETE FROM `creature_movement_scripts` WHERE `id`=46768;
|
|
INSERT INTO `creature_movement_scripts` (`id`, `delay`, `priority`, `command`, `datalong`, `datalong2`, `datalong3`, `datalong4`, `target_param1`, `target_param2`, `target_type`, `data_flags`, `dataint`, `dataint2`, `dataint3`, `dataint4`, `x`, `y`, `z`, `o`, `condition_id`, `comments`) VALUES
|
|
(46768, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 'The Defias Traitor - Say Text'),
|
|
(46768, 0, 0, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'The Defias Traitor - Set Walk');
|
|
DELETE FROM `creature_movement_scripts` WHERE `id`=46794;
|
|
INSERT INTO `creature_movement_scripts` (`id`, `delay`, `priority`, `command`, `datalong`, `datalong2`, `datalong3`, `datalong4`, `target_param1`, `target_param2`, `target_type`, `data_flags`, `dataint`, `dataint2`, `dataint3`, `dataint4`, `x`, `y`, `z`, `o`, `condition_id`, `comments`) VALUES
|
|
(46794, 0, 0, 20, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'The Defias Traitor - Move Idle'),
|
|
(46794, 1, 0, 0, 0, 0, 0, 0, 155, 0, 21, 0, 11, 0, 0, 0, 0, 0, 0, 0, 0, 'The Defias Traitor - Say Text'),
|
|
(46794, 1, 1, 62, 155, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'The Defias Traitor - End Scripted Map Event'),
|
|
(46794, 5, 0, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'The Defias Traitor - Despawn Creature');
|
|
|
|
-- Events list for The Defias Traitor
|
|
DELETE FROM `creature_ai_events` WHERE `creature_id`=467;
|
|
INSERT INTO `creature_ai_events` (`id`, `creature_id`, `condition_id`, `event_type`, `event_inverse_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action1_script`, `action2_script`, `action3_script`, `comment`) VALUES
|
|
(46701, 467, 0, 4, 0, 100, 0, 0, 0, 0, 0, 46701, 0, 0, 'The Defias Traitor - Say Text on Aggro');
|
|
DELETE FROM `creature_ai_scripts` WHERE `id`=46701;
|
|
INSERT INTO `creature_ai_scripts` (`id`, `delay`, `priority`, `command`, `datalong`, `datalong2`, `datalong3`, `datalong4`, `target_param1`, `target_param2`, `target_type`, `data_flags`, `dataint`, `dataint2`, `dataint3`, `dataint4`, `x`, `y`, `z`, `o`, `condition_id`, `comments`) VALUES
|
|
(46701, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 485, 487, 489, 0, 0, 0, 0, 0, 0, 'The Defias Traitor - Say Text');
|
|
UPDATE `creature_template` SET `ai_name`='EventAI', `script_name`='' WHERE `entry`=467;
|
|
|
|
|
|
-- End of migration.
|
|
END IF;
|
|
END??
|
|
delimiter ;
|
|
CALL add_migration();
|
|
DROP PROCEDURE IF EXISTS add_migration;
|