Код:
-- Quest: 50770 / Effective Antivenom
SET @1NVIS0 := '252936 246309 80671'; -- Apply Quest Invis Zone 2
SET @1NVIS1 := '80694'; -- Apply Quest Invis Zone 1
SET @DETECT0 := 80672; -- Detect: Quest Invis Zone 2
SET @DETECT1 := 80695; -- Detect: Quest Invis Zone 1
SET @PH4SE0 := 68480; -- Phase - Quest Zone-Specific 05
SET @PH4SE1 := 68481; -- Phase - Quest Zone-Specific 06
SET @ID0 := 0; -- misc = 2048 (2048), miscB = 180
SET @ID1 := 0; -- misc = 4096 (4096), miscB = 181
UPDATE `creature_template_addon` SET `auras`=@1NVIS0 WHERE `entry`=134532;
DELETE FROM `creature_addon` WHERE `guid` IN (SELECT `guid` FROM `creature` WHERE `id`=134532 AND `map`=1642 AND `areaId`=9133);
UPDATE `creature` SET `PhaseId`=@ID0, `PhaseGroup`=0 WHERE `id`=134532 AND `map`=1642 AND `areaId`=9133;
UPDATE `creature_template_addon` SET `auras`=@1NVIS1 WHERE `entry`=134533;
DELETE FROM `creature_addon` WHERE `guid` IN (SELECT `guid` FROM `creature` WHERE `id`=134533 AND `map`=1642 AND `areaId`=9133);
UPDATE `creature` SET `PhaseId`=@ID1, `PhaseGroup`=0 WHERE `id`=134533 AND `map`=1642 AND `areaId`=9133;
DELETE FROM `spell_area` WHERE `spell` IN (@DETECT0, @DETECT1, @PH4SE0, @PH4SE1) AND `area`=9133;
INSERT INTO `spell_area` (`spell`, `area`, `quest_start`, `quest_end`, `aura_spell`, `racemask`, `gender`, `flags`, `quest_start_status`, `quest_end_status`) VALUES
(@DETECT0, 9133, 0, 50770, 0, 0, 2, 3, 64, 9), -- Zul'Ahjin
(@DETECT1, 9133, 50770, 0, 0, 0, 2, 3, 66, 11); -- Zul'Ahjin
DELETE FROM `phase_area` WHERE `AreaId`=9133;
-- INSERT INTO `phase_area` (`AreaId`, `PhaseId`, `Comment`) VALUES
-- (9133, 169, 'Zul\'Ahjin - Default Phase'),
-- (9133, @ID0, 'Zul\'Ahjin - Phase 2048'),
-- (9133, @ID1, 'Zul\'Ahjin - Phase 4096');
DELETE FROM `conditions` WHERE `SourceEntry`=9133 AND `SourceTypeOrReferenceId`=26;
-- INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
-- (26, @ID0, 9133, 0, 0, 47, 0, 50770, 66, 0, 1, 0, 0, '', 'If quest 50770 not rewarded not completed'),
-- (26, @ID1, 9133, 0, 0, 47, 0, 50770, 66, 0, 0, 0, 0, '', 'If quest 50770 rewarded completed');
UPDATE `creature_template` SET `AIName`='SmartAI', `ScriptName`='' WHERE `entry`=134532;
DELETE FROM `conditions` WHERE `SourceEntry`=134532 AND `SourceTypeOrReferenceId`=22;
DELETE FROM `smart_scripts` WHERE `entryorguid`=134532 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
(134532, 0, 0, 1, 8, 0, 100, 0, 265510, 0, 8000, 8000, 1, 0, 8000, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Serrik - On Spellhit - Say Text'),
(134532, 0, 1, 2, 61, 0, 100, 0, 0, 0, 0, 0, 28, 252936, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Serrik - On Spellhit - Remove Poisoned'),
(134532, 0, 2, 0, 61, 0, 100, 0, 0, 0, 0, 0, 28, 246309, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Serrik - On Spellhit - Remove Injured'),
(134532, 0, 3, 4, 52, 0, 100, 0, 0, 134532, 0, 0, 33, 134532, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Serrik - On Text Over - Killcredit'),
(134532, 0, 4, 0, 61, 0, 100, 0, 0, 0, 0, 0, 67, 1, 1000, 1000, 0, 0, 100, 1, 0, 0, 0, 0, 0, 0, 0, 'Serrik - On Text Over - Run Script'),
(134532, 0, 5, 6, 59, 0, 100, 0, 1, 0, 0, 0, 11, 246309, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Serrik - On Script - Cast Injured'),
(134532, 0, 6, 0, 61, 0, 100, 0, 0, 0, 0, 0, 11, 252936, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Serrik - On Script - Cast Poisoned');