Код:
-- Quest: 29125 / Between the Trees
UPDATE `creature_template` SET `AIName`='SmartAI', `ScriptName`='' WHERE `entry` IN (52176, 52401, 52403);
UPDATE `creature_template_addon` SET `auras`='' WHERE `entry` IN (52176, 52401, 52403);
DELETE FROM `creature_addon` WHERE `guid` IN (SELECT `guid` FROM `creature` WHERE `id` IN (52176, 52401, 52403));
DELETE FROM `smart_scripts` WHERE `entryorguid` IN (52176, 52401, 52403) 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
(52176, 0, 0, 1, 10, 0, 100, 0, 1, 5, 5000, 5000, 33, 52176, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Spirit of Malorne - On Distance Player - Killcredit'),
(52176, 0, 1, 2, 61, 0, 100, 0, 0, 0, 0, 0, 11, 96498, 2, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Spirit of Malorne - On Distance Player - Cast Presence of Malorne'),
(52176, 0, 2, 0, 61, 0, 100, 0, 0, 0, 0, 0, 41, 4000, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Spirit of Malorne - On Distance Player - Despawn'),
(52176, 0, 3, 0, 11, 0, 100, 0, 0, 0, 0, 0, 11, 96507, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Spirit of Malorne - On Respawn - Cast Camouflage'),
(52401, 0, 0, 1, 10, 0, 100, 0, 1, 5, 5000, 5000, 33, 52176, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Spirit of Malorne - On Distance Player - Killcredit'),
(52401, 0, 1, 2, 61, 0, 100, 0, 0, 0, 0, 0, 11, 96498, 2, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Spirit of Malorne - On Distance Player - Cast Presence of Malorne'),
(52401, 0, 2, 0, 61, 0, 100, 0, 0, 0, 0, 0, 41, 4000, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Spirit of Malorne - On Distance Player - Despawn'),
(52401, 0, 3, 0, 11, 0, 100, 0, 0, 0, 0, 0, 11, 96507, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Spirit of Malorne - On Respawn - Cast Camouflage'),
(52403, 0, 0, 1, 10, 0, 100, 0, 1, 5, 5000, 5000, 33, 52176, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Spirit of Malorne - On Distance Player - Killcredit'),
(52403, 0, 1, 2, 61, 0, 100, 0, 0, 0, 0, 0, 11, 96498, 2, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Spirit of Malorne - On Distance Player - Cast Presence of Malorne'),
(52403, 0, 2, 0, 61, 0, 100, 0, 0, 0, 0, 0, 41, 4000, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Spirit of Malorne - On Distance Player - Despawn'),
(52403, 0, 3, 0, 11, 0, 100, 0, 0, 0, 0, 0, 11, 96507, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Spirit of Malorne - On Respawn - Cast Camouflage');
DELETE FROM `conditions` WHERE `SourceEntry` IN (52176, 52401, 52403) AND `SourceTypeOrReferenceId`=22;
INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
(22, 1, 52176, 0, 0, 32, 0, 16, 0, 0, 0, 0, 0, '', 'Execute SAI only if player'),
(22, 1, 52176, 0, 0, 9, 0, 29125, 0, 0, 0, 0, 0, '', 'Execute SAI if quest 29125 taken'),
(22, 1, 52401, 0, 0, 32, 0, 16, 0, 0, 0, 0, 0, '', 'Execute SAI only if player'),
(22, 1, 52401, 0, 0, 9, 0, 29125, 0, 0, 0, 0, 0, '', 'Execute SAI if quest 29125 taken'),
(22, 1, 52403, 0, 0, 32, 0, 16, 0, 0, 0, 0, 0, '', 'Execute SAI only if player'),
(22, 1, 52403, 0, 0, 9, 0, 29125, 0, 0, 0, 0, 0, '', 'Execute SAI if quest 29125 taken');