Код:
-- Quests: 25909, 25989 / Capture the Crab
UPDATE `creature_template` SET `AIName`='SmartAI', `ScriptName`='', `npcflag`=`npcflag`|16777216 WHERE `entry`=41520;
DELETE FROM `npc_spellclick_spells` WHERE `npc_entry`=41520;
INSERT INTO `npc_spellclick_spells` (`npc_entry`, `spell_id`, `cast_flags`, `user_type`) VALUES
(41520, 77684, 1, 0); -- Deepseeker Crab - Loot Deepseeker Crab
DELETE FROM `conditions` WHERE `SourceGroup`=41520 AND `SourceTypeOrReferenceId`=18;
INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
(18, 41520, 77684, 0, 0, 9, 0, 25909, 0, 0, 0, 0, 0, '', 'Required quest active for spellclick'),
(18, 41520, 77684, 0, 1, 9, 0, 25989, 0, 0, 0, 0, 0, '', 'Required quest active for spellclick');
DELETE FROM `conditions` WHERE `SourceEntry`=77682 AND `SourceTypeOrReferenceId` IN (13, 17);
INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
(17, 0, 77682, 0, 0, 31, 1, 3, 41520, 0, 0, 0, 0, '', 'Hurl Net can hit Deepseeker Crab');
DELETE FROM `disables` WHERE `entry`=77682 AND `sourceType`=0;
DELETE FROM `smart_scripts` WHERE `entryorguid`=41520 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
(41520, 0, 0, 0, 11, 0, 100, 0, 0, 0, 0, 0, 83, 16777216, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Deepseeker Crab - On Respawn - Remove Spellclick Flag'),
(41520, 0, 1, 0, 9, 0, 100, 0, 0, 5, 5000, 8000, 11, 79175, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Deepseeker Crab - IC - Cast Slap & Chop'),
(41520, 0, 2, 3, 8, 0, 100, 0, 77682, 0, 0, 0, 67, 1, 15000, 15000, 0, 0, 100, 1, 0, 0, 0, 0, 0, 0, 0, 'Deepseeker Crab - On Spellhit - Run Script'),
(41520, 0, 3, 4, 61, 0, 100, 0, 0, 0, 0, 0, 82, 16777216, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Deepseeker Crab - On Spellhit - Set Spellclick Flag'),
(41520, 0, 4, 5, 61, 0, 100, 0, 0, 0, 0, 0, 2, 35, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Deepseeker Crab - On Spellhit - Set Faction Frendly'),
(41520, 0, 5, 0, 61, 0, 100, 0, 0, 0, 0, 0, 46, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Deepseeker Crab - On Spellhit - Stop Attack'),
(41520, 0, 6, 7, 73, 0, 100, 0, 0, 0, 0, 0, 83, 16777216, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Deepseeker Crab - On Spellclick - Remove Spellclick Flag'),
(41520, 0, 7, 0, 61, 0, 100, 0, 0, 0, 0, 0, 41, 2000, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Deepseeker Crab - On Spellclick - Despawn'),
(41520, 0, 8, 9, 59, 0, 100, 0, 1, 0, 0, 0, 83, 16777216, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Deepseeker Crab - On Script - Remove Spellclick Flag'),
(41520, 0, 9, 10, 61, 0, 100, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Deepseeker Crab - On Script - Reset Faction'),
(41520, 0, 10, 0, 61, 0, 100, 0, 0, 0, 0, 0, 24, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Deepseeker Crab - On Script - Evade');