Files
moonwell-core-vanilla/sql/migrations/20211203064751_world.sql
T

112 lines
8.5 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`='20211203064751');
IF v=0 THEN
INSERT INTO `migrations` VALUES ('20211203064751');
-- Add your query below.
-- Improve completion script for quest Set Them Ablaze!
DELETE FROM `quest_end_scripts` WHERE `id`=3463;
INSERT INTO `quest_end_scripts` (`id`, `delay`, `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
(3463, 1, 31, 8479, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Set Them Ablaze!: Abort Script if Kalaran Windblade is Not Spawned'),
(3463, 2, 18, 0, 0, 0, 0, 8479, 5921, 8, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Set Them Ablaze!: Kalaran Windblade - Despawn'),
(3463, 3, 10, 8480, 180000, 0, 0, 0, 0, 0, 0, 3, 0, -1, 1, -6679.93, -1194.36, 240.297, 2.96706, 0, 'Set Them Ablaze!: Summon Kalaran the Deceiver'),
(3463, 4, 35, 0, 0, 0, 0, 8480, 30, 8, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Set Them Ablaze!: Kalaran the Deceiver - Turn to Player'),
(3463, 4, 0, 0, 0, 0, 0, 8480, 30, 8, 2, 4456, 0, 0, 0, 0, 0, 0, 0, 0, 'Set Them Ablaze!: Kalaran the Deceiver - Say Text'),
(3463, 10, 0, 0, 0, 0, 0, 8480, 30, 8, 2, 4458, 0, 0, 0, 0, 0, 0, 0, 0, 'Set Them Ablaze!: Kalaran the Deceiver - Say Text'),
(3463, 10, 0, 0, 0, 0, 0, 8480, 30, 8, 2, 4457, 0, 0, 0, 0, 0, 0, 0, 0, 'Set Them Ablaze!: Kalaran the Deceiver - Say Text'),
(3463, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4459, 0, 0, 0, 0, 0, 0, 0, 0, 'Set Them Ablaze!: Squire Maltrake - Say Text'),
(3463, 16, 35, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1.59286, 0, 'Set Them Ablaze!: Squire Maltrake - Set Orientation'),
(3463, 16, 1, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Set Them Ablaze!: Squire Maltrake - Emote OneShotQuestion'),
(3463, 20, 1, 35, 0, 0, 0, 8480, 30, 8, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Set Them Ablaze!: Kalaran the Deceiver - Emote OneShotAttackUnarmed'),
(3463, 20, 35, 1, 0, 0, 0, 8480, 30, 8, 2, 0, 0, 0, 0, 0, 0, 0, 4.73446, 0, 'Set Them Ablaze!: Kalaran the Deceiver - Set Orientation'),
(3463, 22, 1, 35, 0, 0, 0, 8480, 30, 8, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Set Them Ablaze!: Kalaran the Deceiver - Emote OneShotAttackUnarmed'),
(3463, 23, 1, 35, 0, 0, 0, 8480, 30, 8, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Set Them Ablaze!: Kalaran the Deceiver - Emote OneShotAttackUnarmed'),
(3463, 25, 0, 0, 0, 0, 0, 8480, 30, 8, 2, 4460, 0, 0, 0, 0, 0, 0, 0, 0, 'Set Them Ablaze!: Kalaran the Deceiver - Say Text'),
(3463, 31, 0, 0, 0, 0, 0, 8480, 30, 8, 2, 4461, 0, 0, 0, 0, 0, 0, 0, 0, 'Set Them Ablaze!: Kalaran the Deceiver - Say Text'),
(3463, 38, 0, 0, 0, 0, 0, 8480, 30, 8, 2, 4462, 0, 0, 0, 0, 0, 0, 0, 0, 'Set Them Ablaze!: Kalaran the Deceiver - Say Text'),
(3463, 38, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4468, 0, 0, 0, 0, 0, 0, 0, 0, 'Set Them Ablaze!: Squire Maltrake - Say Text'),
(3463, 44, 0, 0, 0, 0, 0, 8480, 30, 8, 2, 4464, 0, 0, 0, 0, 0, 0, 0, 0, 'Set Them Ablaze!: Kalaran the Deceiver - Say Text'),
(3463, 47, 0, 0, 0, 0, 0, 8480, 30, 8, 2, 4463, 0, 0, 0, 0, 0, 0, 0, 0, 'Set Them Ablaze!: Kalaran the Deceiver - Say Text'),
(3463, 54, 0, 0, 0, 0, 0, 8480, 30, 8, 2, 4465, 0, 0, 0, 0, 0, 0, 0, 0, 'Set Them Ablaze!: Kalaran the Deceiver - Say Text'),
(3463, 54, 20, 2, 0, 0, 1, 8480, 30, 8, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Set Them Ablaze!: Kalaran the Deceiver - Start Waypoints');
-- Add full waypoints for Kalaran the Deceiver.
DELETE FROM `creature_movement_template` WHERE `entry`=8480;
INSERT INTO `creature_movement_template` (`entry`, `point`, `position_x`, `position_y`, `position_z`, `orientation`, `waittime`, `wander_distance`, `script_id`) VALUES
(8480, 1, -6702.076172, -1193.132813, 241.639297, 100.000000, 0, 0.000000, 0),
(8480, 2, -6712.509277, -1194.795532, 240.402237, 100.000000, 0, 0.000000, 0),
(8480, 3, -6717.633301, -1195.880737, 240.402237, 100.000000, 0, 0.000000, 848003),
(8480, 4, -6727.917480, -1189.541870, 248.659119, 100.000000, 0, 0.000000, 0),
(8480, 5, -6748.543945, -1185.627197, 257.242401, 100.000000, 0, 0.000000, 0),
(8480, 6, -6763.739258, -1183.188599, 257.007019, 100.000000, 0, 0.000000, 0),
(8480, 7, -6795.436523, -1184.521729, 254.951462, 100.000000, 0, 0.000000, 0),
(8480, 8, -6810.873535, -1176.562256, 259.923798, 100.000000, 0, 0.000000, 0),
(8480, 9, -6830.657227, -1173.745361, 257.062622, 100.000000, 0, 0.000000, 0),
(8480, 10, -6852.261230, -1171.090210, 256.812622, 100.000000, 0, 0.000000, 0),
(8480, 11, -6871.750000, -1168.561157, 265.479279, 100.000000, 0, 0.000000, 0),
(8480, 12, -6897.971191, -1162.610107, 244.395950, 100.000000, 0, 0.000000, 0),
(8480, 13, -6929.880859, -1153.236084, 244.395950, 100.000000, 0, 0.000000, 0),
(8480, 14, -6956.189941, -1162.400879, 248.645935, 100.000000, 0, 0.000000, 0),
(8480, 15, -6982.535645, -1175.740479, 255.145905, 100.000000, 0, 0.000000, 0),
(8480, 16, -6995.211914, -1177.377563, 256.507019, 100.000000, 0, 0.000000, 0),
(8480, 17, -7022.279297, -1168.436401, 256.173706, 100.000000, 0, 0.000000, 0),
(8480, 18, -7038.990234, -1131.868774, 258.645966, 100.000000, 0, 0.000000, 0),
(8480, 19, -7027.755371, -1094.999146, 271.257111, 100.000000, 0, 0.000000, 0),
(8480, 20, -6992.300781, -1087.159058, 264.090393, 100.000000, 0, 0.000000, 0),
(8480, 21, -6969.786133, -1086.768066, 261.368073, 100.000000, 0, 0.000000, 0),
(8480, 22, -6955.896973, -1091.098389, 250.701477, 100.000000, 0, 0.000000, 0),
(8480, 23, -6932.255371, -1100.150024, 244.395950, 100.000000, 0, 0.000000, 0),
(8480, 24, -6919.900879, -1132.451904, 244.395950, 100.000000, 0, 0.000000, 0),
(8480, 25, -6925.129883, -1178.568604, 244.395950, 100.000000, 0, 0.000000, 0),
(8480, 26, -6949.725586, -1205.311401, 244.395950, 100.000000, 0, 0.000000, 0),
(8480, 27, -6992.822754, -1224.504517, 244.395950, 100.000000, 0, 0.000000, 0),
(8480, 28, -7035.797852, -1243.945801, 261.951447, 100.000000, 0, 0.000000, 0),
(8480, 29, -7077.611816, -1267.541016, 272.791473, 100.000000, 0, 0.000000, 0),
(8480, 30, -7124.322754, -1267.904785, 284.791931, 100.000000, 0, 0.000000, 0),
(8480, 31, -7132.829102, -1254.586548, 309.491943, 100.000000, 0, 0.000000, 0),
(8480, 32, -7156.217773, -1252.054077, 297.214233, 100.000000, 0, 0.000000, 0),
(8480, 33, -7182.281250, -1219.699219, 287.353149, 100.000000, 0, 0.000000, 0),
(8480, 34, -7198.193848, -1188.099243, 287.353149, 100.000000, 0, 0.000000, 0),
(8480, 35, -7186.269043, -1150.089478, 287.353149, 100.000000, 0, 0.000000, 0),
(8480, 36, -7157.382813, -1127.870483, 287.353149, 100.000000, 0, 0.000000, 0),
(8480, 37, -7131.131348, -1112.583740, 287.353149, 100.000000, 0, 0.000000, 0),
(8480, 38, -7090.545410, -1119.041626, 287.353149, 100.000000, 0, 0.000000, 0),
(8480, 39, -7059.041504, -1139.344360, 287.353149, 100.000000, 0, 0.000000, 0),
(8480, 40, -7032.430664, -1166.208984, 287.353149, 100.000000, 0, 0.000000, 0),
(8480, 41, -7013.184082, -1206.089478, 287.353149, 100.000000, 0, 0.000000, 0),
(8480, 42, -7044.377441, -1228.711426, 287.353149, 100.000000, 0, 0.000000, 0),
(8480, 43, -7058.724121, -1246.201050, 287.353149, 100.000000, 0, 0.000000, 0),
(8480, 44, -7084.784180, -1279.271973, 287.353149, 100.000000, 0, 0.000000, 0),
(8480, 45, -7111.300293, -1296.907837, 287.353149, 100.000000, 0, 0.000000, 0),
(8480, 46, -7139.254883, -1325.738770, 287.353149, 100.000000, 0, 0.000000, 0),
(8480, 47, -7186.178711, -1331.909302, 302.825500, 100.000000, 0, 0.000000, 0),
(8480, 48, -7217.199707, -1339.096558, 326.598358, 100.000000, 0, 0.000000, 0),
(8480, 49, -7236.217285, -1343.113770, 361.163208, 100.000000, 0, 0.000000, 4);
-- Add waypoint script for Kalaran the Deceiver.
DELETE FROM `creature_movement_scripts` WHERE `id`=848003;
INSERT INTO `creature_movement_scripts` (`id`, `delay`, `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
(848003, 0, 77, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Kalaran the Deceiver - Enable Flying');
-- Kalaran the Deceiver should not start waypoints immediately.
UPDATE `creature_template` SET `movement_type`=0 WHERE `entry`=8480;
-- Kalaran Windblade should have a 3 minute respawn time.
UPDATE `creature` SET `spawntimesecsmin`=180, `spawntimesecsmax`=180 WHERE `id`=8479;
-- This text should be yelled.
UPDATE `broadcast_text` SET `chat_type`=1 WHERE `entry`=4465;
-- End of migration.
END IF;
END??
delimiter ;
CALL add_migration();
DROP PROCEDURE IF EXISTS add_migration;