40 lines
3.2 KiB
SQL
40 lines
3.2 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`='20200524100626');
|
|
IF v=0 THEN
|
|
INSERT INTO `migrations` VALUES ('20200524100626');
|
|
-- Add your query below.
|
|
|
|
|
|
-- Removing unused event_ai.
|
|
UPDATE `creature_template` SET `ai_name` = '' WHERE `entry` = 5042;
|
|
|
|
-- Removing unused script actions.
|
|
DELETE FROM `creature_ai_scripts` WHERE `id` IN (504201);
|
|
|
|
-- Events list for Nurse Lillian
|
|
DELETE FROM `creature_ai_events` WHERE `creature_id`=5042;
|
|
|
|
-- update script id's in pathing
|
|
UPDATE `creature_movement_template` SET `script_id` = 504201 WHERE `entry` = 5042 AND `point` IN (1,6,10,13);
|
|
|
|
-- slight update to timing, emotes and script id for nurse lilian
|
|
DELETE FROM `creature_movement_scripts` WHERE `id`=5042;
|
|
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 (504201, 2, 39, 504201, 504202, 0, 0, 0, 0, 0, 0, 50, 50, 0, 0, 0, 0, 0, 0, 0, 'Nurse Lilian Pathing - Start Script');
|
|
INSERT INTO `event_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 (504201, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1679, 1680, 1681, 1682, 0, 0, 0, 0, 0, 'Nurse Lilian - Talk');
|
|
INSERT INTO `event_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 (504202, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1683, 1684, 1685, 0, 0, 0, 0, 0, 0, 'Nurse Lilian - Talk');
|
|
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 (504201, 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Nurse Lilian Pathing - Speech Emote');
|
|
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 (504201, 1, 28, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Nurse Lilian Pathing - Crouch');
|
|
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 (504201, 10, 28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Nurse Lilian Pathing - Stand');
|
|
|
|
|
|
-- End of migration.
|
|
END IF;
|
|
END??
|
|
delimiter ;
|
|
CALL add_migration();
|
|
DROP PROCEDURE IF EXISTS add_migration;
|