TrinityCore/TrinityCore — Issue #5556: [Quest/Fix] Leader of the Deranged
Author: Trista
Created: 2012-03-04 15:55:54+00:00
State: open

```sql
-- Leader of the Deranged ID: 11240 - adds npc and SAI for it
SET @NPC := 180000;
SET @ID := 24048;
SET @Dynamite := 7978;
-- Add spawn
DELETE FROM `creature` WHERE `id`=@ID;
INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `MovementType`) VALUES
(@NPC, @ID, 571, 1, 3, 1742.082764, -3339.336426, 79.993713, 2.515936, 120, 60, 0, 1);
-- Add simple SAI for Squeeg Idolhunter
UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`=@ID;
DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@ID;
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
(@ID,0,1,0,0,0,100,0,2000,6000,12000,15000,11,@Dynamite,0,0,0,0,0,2,0,0,0,0,0,0,0,'Combat - Throw Dynamite');