-- Phantasmal Water SAI
SET @ENTRY := 27653;
UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=@ENTRY;
DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY 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
(@ENTRY,0,0,1,54,0,100,1,0,0,0,0,21,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Phantasmal Water - On Just Summoned - Disable Combat Movement (No Repeat)"),
(@ENTRY,0,1,0,61,0,100,1,0,0,0,0,22,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Phantasmal Water - On Just Summoned - Set Event Phase 0 (No Repeat)"),
(@ENTRY,0,2,0,7,0,100,0,0,0,0,0,22,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Phantasmal Water - On Evade - Set Event Phase 0"),
(@ENTRY,0,3,0,9,1,100,0,0,5,0,0,21,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Phantasmal Water - Within 0-5 Range - Enable Combat Movement (Phase 1)"),
(@ENTRY,0,4,0,9,1,100,0,5,15,0,0,21,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Phantasmal Water - Within 5-15 Range - Disable Combat Movement (Phase 1)"),
(@ENTRY,0,5,0,9,1,100,0,30,80,0,0,21,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Phantasmal Water - Within 30-80 Range - Enable Combat Movement (Phase 1)"),
(@ENTRY,0,6,7,3,1,100,0,0,7,0,0,21,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Phantasmal Water - Between 0-7% Mana - Enable Combat Movement (Phase 1)"),
(@ENTRY,0,7,0,61,1,100,0,0,7,0,0,23,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Phantasmal Water - Between 0-7% Mana - Increment Phase (Phase 1)"),
(@ENTRY,0,8,0,3,2,100,0,15,100,100,100,23,0,1,0,0,0,0,1,0,0,0,0,0,0,0,"Phantasmal Water - Between 15-100% Mana - Decrement Phase (Phase 2)"),
(@ENTRY,0,9,10,4,0,100,3,0,0,0,0,11,37924,0,0,0,0,0,2,0,0,0,0,0,0,0,"Phantasmal Water - On Aggro - Cast 'Water Bolt Volley' (No Repeat) (Normal Dungeon)"),
(@ENTRY,0,10,0,61,0,100,3,0,0,0,0,23,1,0,0,0,0,0,2,0,0,0,0,0,0,0,"Phantasmal Water - On Aggro - Increment Phase (No Repeat) (Normal Dungeon)"),
(@ENTRY,0,11,12,4,0,100,5,0,0,0,0,11,59266,0,0,0,0,0,2,0,0,0,0,0,0,0,"Phantasmal Water - On Aggro - Cast 'Water Bolt Volley' (No Repeat) (Heroic Dungeon)"),
(@ENTRY,0,12,0,61,0,100,5,0,0,0,0,23,1,0,0,0,0,0,2,0,0,0,0,0,0,0,"Phantasmal Water - On Aggro - Increment Phase (No Repeat) (Heroic Dungeon)"),
(@ENTRY,0,13,0,9,1,100,2,0,35,3400,4800,11,37924,0,0,0,0,0,2,0,0,0,0,0,0,0,"Phantasmal Water - Within 0-35 Range - Cast 'Water Bolt Volley' (Phase 1) (Normal Dungeon)"),
(@ENTRY,0,14,0,9,1,100,4,0,35,3400,4800,11,59266,0,0,0,0,0,2,0,0,0,0,0,0,0,"Phantasmal Water - Within 0-35 Range - Cast 'Water Bolt Volley' (Phase 1) (Heroic Dungeon)");
master restart