The documentation on SAI is pretty sparse, but that looked like a “cast this spell until oom” concept.
Is that implemented in C++ somewhere?
ok, for the following input:
id, name, ai,run%, buff,debuff, dps, oom, melee, hot, heal
3757, Xavian Hellcaller, Caster, 15, 0, 0, 9053, 39273, 0, 0, 6925
3771, Bleakheart Hellcaller, Caster, 15, 11939, 0, 12746, 0, 8599, 0, 0
4675, Hatefury Hellcaller, Caster, 15, 0, 0, 0, 39273, 8599, 0, 0
4799, Fallenroot Hellcaller, Caster, 15, 0, 8129, 9613, 0, 0, 0, 0
6202, Legashi Hellcaller, Caster, 15, 0, 0, 20823, 11990, 0, 0, 0
7111, Jadefire Hellcaller, Caster, 15, 0, 0, 20823, 11990, 13578, 0, 0
11457, Wildspawn Hellcaller, Caster, 15, 0, 0, 15228, 20754, 0, 0, 0
17342, Axxarien Hellcaller, Caster, 15, 0, 0, 11990, 0, 0, 0, 0
20902, Sargeron Hellcaller, Caster, 15, 0, 36831, 36832, 36829, 0, 0, 0
My program retrieves a predefined template from a “Caster.scr” file and produces the following sql:
-----------------------------------------
#3757 Xavian Hellcaller: Caster AI
DELETE FROM smart_scripts
WHERE entryorguid
IN (3757, 375700);
UPDATE creature_template
SET AIName
=‘SmartAI’ WHERE entry
=3757);
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
(3757,0,0,0,4,0,100,0,0,0,0,0,21,0,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Caster AI - On Aggro - Prevent Combat Movement’);
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
(3757,0,1,0,61,0,100,0,0,0,0,0,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Caster AI - On Aggro - Set Phase 1’);
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
(3757,0,2,0,9,1,100,0,0,40,2400,3800,11,9053,0,0,0,0,0,2,0,0,0,0,0,0,0,‘Caster AI - Phase 1 - Cast Dps (spell 9053)’);
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
(3757,0,3,5,3,1,100,0,0,15,0,0,21,1,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Caster AI -In Phase 1 - Start Combat Movement’);
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
(3757,0,4,0,61,1,100,0,0,0,0,0,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Caster AI - Mana at 15% (Phase 1) - Set Phase 2’);
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
(3757,0,5,0,9,1,100,0,35,80,0,0,21,1,0,0,0,0,0,0,0,0,0,0,0,0,0,‘Caster AI - At 35 Yards (Phase 1) - Start Combat Movement’);
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
(3757,0,6,0,9,1,100,0,5,15,0,0,21,0,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Caster AI - at 15 Yards (Phase 1) - Prevent Combat Movement’);
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
(3757,0,7,0,9,1,100,0,0,5,0,0,21,1,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Caster AI - Below 5 Yards (Phase 1) - Start Combat Movement’);
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
(3757,0,8,0,3,2,100,0,0,30,100,100,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Caster AI - Mana is above 30% (Phase 2) - Set Phase 1’);
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
(3757,0,9,0,0,2,100,0,0,0,0,0,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Caster AI - Set Phase 1 when Mana is above 30% (Phase 2)’);
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
(3757,0,10,0,0,0,100,0,8000,14000,18000,25000,11,39273,3,0,0,0,0,2,0,0,0,0,0,0,0,‘Caster AI - In Combat - Cast freebie (Spell 39273)’);
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
(3757,0,11,0,0,0,100,1,0,25,0,0,11,6925,0,0,0,0,0,0,0,0,0,0,0,0,0,‘Caster AI - At 25% HP - Cast Heal (Spell 6925)’);
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
(3757,0,12,0,2,0,100,1,0,15,0,0,21,1,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Caster AI - At 15% HP - Start Combat Movement’);
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
(3757,0,13,0,2,0,100,1,0,15,0,0,25,1,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Caster AI - At 15% HP - Flee’);
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
(3757,0,14,0,7,0,100,0,0,0,0,0,22,0,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Caster AI - On Evade - Set Phase to 0’);
#3771 Bleakheart Hellcaller: Caster AI
DELETE FROM smart_scripts
WHERE entryorguid
IN (3771, 377100);
UPDATE creature_template
SET AIName
=‘SmartAI’ WHERE entry
=3771);
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
(3771,0,0,0,4,0,100,0,0,0,0,0,21,0,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Caster AI - On Aggro - Prevent Combat Movement’);
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
(3771,0,1,2,4,0,100,0,0,0,0,0,11,11939,32,0,0,0,0,1,0,0,0,0,0,0,0,‘Caster AI - On Aggro - Cast Self Buff (spell 11939)’);
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
(3771,0,2,0,61,0,100,0,0,0,0,0,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Caster AI - On Aggro - Set Phase 1’);
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
(3771,0,3,0,9,1,100,0,0,40,2400,3800,11,12746,0,0,0,0,0,2,0,0,0,0,0,0,0,‘Caster AI - Phase 1 - Cast Dps (spell 12746)’);
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
(3771,0,4,5,3,1,100,0,0,15,0,0,21,1,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Caster AI -In Phase 1 - Start Combat Movement’);
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
(3771,0,5,0,61,1,100,0,0,0,0,0,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Caster AI - Mana at 15% (Phase 1) - Set Phase 2’);
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
(3771,0,6,0,9,1,100,0,35,80,0,0,21,1,0,0,0,0,0,0,0,0,0,0,0,0,0,‘Caster AI - At 35 Yards (Phase 1) - Start Combat Movement’);
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
(3771,0,7,0,9,1,100,0,5,15,0,0,21,0,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Caster AI - at 15 Yards (Phase 1) - Prevent Combat Movement’);
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
(3771,0,8,0,9,1,100,0,0,5,0,0,11,8599,32,0,0,0,0,1,0,0,0,0,0,0,0,‘Caster AI - Below 5 Yards (Phase 1) - Cast Armor (Spell 8599)’);
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
(3771,0,9,0,9,1,100,0,0,5,0,0,21,1,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Caster AI - Below 5 Yards (Phase 1) - Start Combat Movement’);
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
(3771,0,10,0,3,2,100,0,0,30,100,100,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Caster AI - Mana is above 30% (Phase 2) - Set Phase 1’);
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
(3771,0,11,0,0,2,100,0,0,0,0,0,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Caster AI - Set Phase 1 when Mana is above 30% (Phase 2)’);
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
(3771,0,12,0,2,0,100,1,0,15,0,0,21,1,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Caster AI - At 15% HP - Start Combat Movement’);
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
(3771,0,13,0,2,0,100,1,0,15,0,0,25,1,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Caster AI - At 15% HP - Flee’);
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
(3771,0,14,0,7,0,100,0,0,0,0,0,22,0,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Caster AI - On Evade - Set Phase to 0’);
#4675 Hatefury Hellcaller: Caster AI
DELETE FROM smart_scripts
WHERE entryorguid
IN (4675, 467500);
UPDATE creature_template
SET AIName
=‘SmartAI’ WHERE entry
=4675);
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
(4675,0,0,0,4,0,100,0,0,0,0,0,21,0,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Caster AI - On Aggro - Prevent Combat Movement’);
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
(4675,0,1,0,61,0,100,0,0,0,0,0,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Caster AI - On Aggro - Set Phase 1’);
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
(4675,0,2,5,3,1,100,0,0,15,0,0,21,1,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Caster AI -In Phase 1 - Start Combat Movement’);
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
(4675,0,3,0,61,1,100,0,0,0,0,0,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Caster AI - Mana at 15% (Phase 1) - Set Phase 2’);
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
(4675,0,4,0,9,1,100,0,35,80,0,0,21,1,0,0,0,0,0,0,0,0,0,0,0,0,0,‘Caster AI - At 35 Yards (Phase 1) - Start Combat Movement’);
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
(4675,0,5,0,9,1,100,0,5,15,0,0,21,0,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Caster AI - at 15 Yards (Phase 1) - Prevent Combat Movement’);
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
(4675,0,6,0,9,1,100,0,0,5,0,0,11,8599,32,0,0,0,0,1,0,0,0,0,0,0,0,‘Caster AI - Below 5 Yards (Phase 1) - Cast Armor (Spell 8599)’);
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
(4675,0,7,0,9,1,100,0,0,5,0,0,21,1,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Caster AI - Below 5 Yards (Phase 1) - Start Combat Movement’);
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
(4675,0,8,0,3,2,100,0,0,30,100,100,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Caster AI - Mana is above 30% (Phase 2) - Set Phase 1’);
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
(4675,0,9,0,0,2,100,0,0,0,0,0,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Caster AI - Set Phase 1 when Mana is above 30% (Phase 2)’);
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
(4675,0,10,0,0,0,100,0,8000,14000,18000,25000,11,39273,3,0,0,0,0,2,0,0,0,0,0,0,0,‘Caster AI - In Combat - Cast freebie (Spell 39273)’);
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
(4675,0,11,0,2,0,100,1,0,15,0,0,21,1,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Caster AI - At 15% HP - Start Combat Movement’);
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
(4675,0,12,0,2,0,100,1,0,15,0,0,25,1,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Caster AI - At 15% HP - Flee’);
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
(4675,0,13,0,7,0,100,0,0,0,0,0,22,0,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Caster AI - On Evade - Set Phase to 0’);
#4799 Fallenroot Hellcaller: Caster AI
DELETE FROM smart_scripts
WHERE entryorguid
IN (4799, 479900);
UPDATE creature_template
SET AIName
=‘SmartAI’ WHERE entry
=4799);
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
(4799,0,0,0,4,0,100,0,0,0,0,0,21,0,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Caster AI - On Aggro - Prevent Combat Movement’);
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
(4799,0,1,2,4,0,100,0,0,0,0,0,11,8129,32,0,0,0,0,2,0,0,0,0,0,0,0,‘Caster AI - On Aggro - Cast Target Debuff (spell 8129)’);
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
(4799,0,2,0,61,0,100,0,0,0,0,0,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Caster AI - On Aggro - Set Phase 1’);
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
(4799,0,3,0,9,1,100,0,0,40,2400,3800,11,9613,0,0,0,0,0,2,0,0,0,0,0,0,0,‘Caster AI - Phase 1 - Cast Dps (spell 9613)’);
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
(4799,0,4,5,3,1,100,0,0,15,0,0,21,1,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Caster AI -In Phase 1 - Start Combat Movement’);
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
(4799,0,5,0,61,1,100,0,0,0,0,0,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Caster AI - Mana at 15% (Phase 1) - Set Phase 2’);
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
(4799,0,6,0,9,1,100,0,35,80,0,0,21,1,0,0,0,0,0,0,0,0,0,0,0,0,0,‘Caster AI - At 35 Yards (Phase 1) - Start Combat Movement’);
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
(4799,0,7,0,9,1,100,0,5,15,0,0,21,0,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Caster AI - at 15 Yards (Phase 1) - Prevent Combat Movement’);
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
(4799,0,8,0,9,1,100,0,0,5,0,0,21,1,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Caster AI - Below 5 Yards (Phase 1) - Start Combat Movement’);
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
(4799,0,9,0,3,2,100,0,0,30,100,100,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Caster AI - Mana is above 30% (Phase 2) - Set Phase 1’);
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
(4799,0,10,0,0,2,100,0,0,0,0,0,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Caster AI - Set Phase 1 when Mana is above 30% (Phase 2)’);
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
(4799,0,11,0,2,0,100,1,0,15,0,0,21,1,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Caster AI - At 15% HP - Start Combat Movement’);
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
(4799,0,12,0,2,0,100,1,0,15,0,0,25,1,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Caster AI - At 15% HP - Flee’);
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
(4799,0,13,0,7,0,100,0,0,0,0,0,22,0,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Caster AI - On Evade - Set Phase to 0’);
#6202 Legashi Hellcaller: Caster AI
DELETE FROM smart_scripts
WHERE entryorguid
IN (6202, 620200);
UPDATE creature_template
SET AIName
=‘SmartAI’ WHERE entry
=6202);
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
(6202,0,0,0,4,0,100,0,0,0,0,0,21,0,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Caster AI - On Aggro - Prevent Combat Movement’);
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
(6202,0,1,0,61,0,100,0,0,0,0,0,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Caster AI - On Aggro - Set Phase 1’);
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
(6202,0,2,0,9,1,100,0,0,40,2400,3800,11,20823,0,0,0,0,0,2,0,0,0,0,0,0,0,‘Caster AI - Phase 1 - Cast Dps (spell 20823)’);
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
(6202,0,3,5,3,1,100,0,0,15,0,0,21,1,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Caster AI -In Phase 1 - Start Combat Movement’);
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
(6202,0,4,0,61,1,100,0,0,0,0,0,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Caster AI - Mana at 15% (Phase 1) - Set Phase 2’);
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
(6202,0,5,0,9,1,100,0,35,80,0,0,21,1,0,0,0,0,0,0,0,0,0,0,0,0,0,‘Caster AI - At 35 Yards (Phase 1) - Start Combat Movement’);
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
(6202,0,6,0,9,1,100,0,5,15,0,0,21,0,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Caster AI - at 15 Yards (Phase 1) - Prevent Combat Movement’);
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
(6202,0,7,0,9,1,100,0,0,5,0,0,21,1,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Caster AI - Below 5 Yards (Phase 1) - Start Combat Movement’);
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
(6202,0,8,0,3,2,100,0,0,30,100,100,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Caster AI - Mana is above 30% (Phase 2) - Set Phase 1’);
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
(6202,0,9,0,0,2,100,0,0,0,0,0,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Caster AI - Set Phase 1 when Mana is above 30% (Phase 2)’);
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
(6202,0,10,0,0,0,100,0,8000,14000,18000,25000,11,11990,3,0,0,0,0,2,0,0,0,0,0,0,0,‘Caster AI - In Combat - Cast freebie (Spell 11990)’);
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
(6202,0,11,0,2,0,100,1,0,15,0,0,21,1,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Caster AI - At 15% HP - Start Combat Movement’);
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
(6202,0,12,0,2,0,100,1,0,15,0,0,25,1,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Caster AI - At 15% HP - Flee’);
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
(6202,0,13,0,7,0,100,0,0,0,0,0,22,0,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Caster AI - On Evade - Set Phase to 0’);
#7111 Jadefire Hellcaller: Caster AI
DELETE FROM smart_scripts
WHERE entryorguid
IN (7111, 711100);
UPDATE creature_template
SET AIName
=‘SmartAI’ WHERE entry
=7111);
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
(7111,0,0,0,4,0,100,0,0,0,0,0,21,0,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Caster AI - On Aggro - Prevent Combat Movement’);
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
(7111,0,1,0,61,0,100,0,0,0,0,0,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Caster AI - On Aggro - Set Phase 1’);
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
(7111,0,2,0,9,1,100,0,0,40,2400,3800,11,20823,0,0,0,0,0,2,0,0,0,0,0,0,0,‘Caster AI - Phase 1 - Cast Dps (spell 20823)’);
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
(7111,0,3,5,3,1,100,0,0,15,0,0,21,1,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Caster AI -In Phase 1 - Start Combat Movement’);
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
(7111,0,4,0,61,1,100,0,0,0,0,0,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Caster AI - Mana at 15% (Phase 1) - Set Phase 2’);
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
(7111,0,5,0,9,1,100,0,35,80,0,0,21,1,0,0,0,0,0,0,0,0,0,0,0,0,0,‘Caster AI - At 35 Yards (Phase 1) - Start Combat Movement’);
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
(7111,0,6,0,9,1,100,0,5,15,0,0,21,0,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Caster AI - at 15 Yards (Phase 1) - Prevent Combat Movement’);
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
(7111,0,7,0,9,1,100,0,0,5,0,0,11,13578,32,0,0,0,0,1,0,0,0,0,0,0,0,‘Caster AI - Below 5 Yards (Phase 1) - Cast Armor (Spell 13578)’);
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
(7111,0,8,0,9,1,100,0,0,5,0,0,21,1,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Caster AI - Below 5 Yards (Phase 1) - Start Combat Movement’);
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
(7111,0,9,0,3,2,100,0,0,30,100,100,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Caster AI - Mana is above 30% (Phase 2) - Set Phase 1’);
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
(7111,0,10,0,0,2,100,0,0,0,0,0,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Caster AI - Set Phase 1 when Mana is above 30% (Phase 2)’);
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
(7111,0,11,0,0,0,100,0,8000,14000,18000,25000,11,11990,3,0,0,0,0,2,0,0,0,0,0,0,0,‘Caster AI - In Combat - Cast freebie (Spell 11990)’);
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
(7111,0,12,0,2,0,100,1,0,15,0,0,21,1,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Caster AI - At 15% HP - Start Combat Movement’);
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
(7111,0,13,0,2,0,100,1,0,15,0,0,25,1,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Caster AI - At 15% HP - Flee’);
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
(7111,0,14,0,7,0,100,0,0,0,0,0,22,0,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Caster AI - On Evade - Set Phase to 0’);
#11457 Wildspawn Hellcaller: Caster AI
DELETE FROM smart_scripts
WHERE entryorguid
IN (11457, 1145700);
UPDATE creature_template
SET AIName
=‘SmartAI’ WHERE entry
=11457);
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
(11457,0,0,0,4,0,100,0,0,0,0,0,21,0,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Caster AI - On Aggro - Prevent Combat Movement’);
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
(11457,0,1,0,61,0,100,0,0,0,0,0,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Caster AI - On Aggro - Set Phase 1’);
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
(11457,0,2,0,9,1,100,0,0,40,2400,3800,11,15228,0,0,0,0,0,2,0,0,0,0,0,0,0,‘Caster AI - Phase 1 - Cast Dps (spell 15228)’);
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
(11457,0,3,5,3,1,100,0,0,15,0,0,21,1,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Caster AI -In Phase 1 - Start Combat Movement’);
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
(11457,0,4,0,61,1,100,0,0,0,0,0,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Caster AI - Mana at 15% (Phase 1) - Set Phase 2’);
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
(11457,0,5,0,9,1,100,0,35,80,0,0,21,1,0,0,0,0,0,0,0,0,0,0,0,0,0,‘Caster AI - At 35 Yards (Phase 1) - Start Combat Movement’);
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
(11457,0,6,0,9,1,100,0,5,15,0,0,21,0,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Caster AI - at 15 Yards (Phase 1) - Prevent Combat Movement’);
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
(11457,0,7,0,9,1,100,0,0,5,0,0,21,1,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Caster AI - Below 5 Yards (Phase 1) - Start Combat Movement’);
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
(11457,0,8,0,3,2,100,0,0,30,100,100,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Caster AI - Mana is above 30% (Phase 2) - Set Phase 1’);
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
(11457,0,9,0,0,2,100,0,0,0,0,0,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Caster AI - Set Phase 1 when Mana is above 30% (Phase 2)’);
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
(11457,0,10,0,0,0,100,0,8000,14000,18000,25000,11,20754,3,0,0,0,0,2,0,0,0,0,0,0,0,‘Caster AI - In Combat - Cast freebie (Spell 20754)’);
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
(11457,0,11,0,2,0,100,1,0,15,0,0,21,1,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Caster AI - At 15% HP - Start Combat Movement’);
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
(11457,0,12,0,2,0,100,1,0,15,0,0,25,1,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Caster AI - At 15% HP - Flee’);
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
(11457,0,13,0,7,0,100,0,0,0,0,0,22,0,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Caster AI - On Evade - Set Phase to 0’);
#17342 Axxarien Hellcaller: Caster AI
DELETE FROM smart_scripts
WHERE entryorguid
IN (17342, 1734200);
UPDATE creature_template
SET AIName
=‘SmartAI’ WHERE entry
=17342);
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
(17342,0,0,0,4,0,100,0,0,0,0,0,21,0,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Caster AI - On Aggro - Prevent Combat Movement’);
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
(17342,0,1,0,61,0,100,0,0,0,0,0,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Caster AI - On Aggro - Set Phase 1’);
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
(17342,0,2,0,9,1,100,0,0,40,2400,3800,11,11990,0,0,0,0,0,2,0,0,0,0,0,0,0,‘Caster AI - Phase 1 - Cast Dps (spell 11990)’);
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
(17342,0,3,5,3,1,100,0,0,15,0,0,21,1,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Caster AI -In Phase 1 - Start Combat Movement’);
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
(17342,0,4,0,61,1,100,0,0,0,0,0,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Caster AI - Mana at 15% (Phase 1) - Set Phase 2’);
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
(17342,0,5,0,9,1,100,0,35,80,0,0,21,1,0,0,0,0,0,0,0,0,0,0,0,0,0,‘Caster AI - At 35 Yards (Phase 1) - Start Combat Movement’);
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
(17342,0,6,0,9,1,100,0,5,15,0,0,21,0,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Caster AI - at 15 Yards (Phase 1) - Prevent Combat Movement’);
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
(17342,0,7,0,9,1,100,0,0,5,0,0,21,1,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Caster AI - Below 5 Yards (Phase 1) - Start Combat Movement’);
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
(17342,0,8,0,3,2,100,0,0,30,100,100,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Caster AI - Mana is above 30% (Phase 2) - Set Phase 1’);
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
(17342,0,9,0,0,2,100,0,0,0,0,0,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Caster AI - Set Phase 1 when Mana is above 30% (Phase 2)’);
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
(17342,0,10,0,2,0,100,1,0,15,0,0,21,1,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Caster AI - At 15% HP - Start Combat Movement’);
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
(17342,0,11,0,2,0,100,1,0,15,0,0,25,1,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Caster AI - At 15% HP - Flee’);
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
(17342,0,12,0,7,0,100,0,0,0,0,0,22,0,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Caster AI - On Evade - Set Phase to 0’);
#20902 Sargeron Hellcaller: Caster AI
DELETE FROM smart_scripts
WHERE entryorguid
IN (20902, 2090200);
UPDATE creature_template
SET AIName
=‘SmartAI’ WHERE entry
=20902);
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
(20902,0,0,0,4,0,100,0,0,0,0,0,21,0,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Caster AI - On Aggro - Prevent Combat Movement’);
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
(20902,0,1,2,4,0,100,0,0,0,0,0,11,36831,32,0,0,0,0,2,0,0,0,0,0,0,0,‘Caster AI - On Aggro - Cast Target Debuff (spell 36831)’);
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
(20902,0,2,0,61,0,100,0,0,0,0,0,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Caster AI - On Aggro - Set Phase 1’);
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
(20902,0,3,0,9,1,100,0,0,40,2400,3800,11,36832,0,0,0,0,0,2,0,0,0,0,0,0,0,‘Caster AI - Phase 1 - Cast Dps (spell 36832)’);
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
(20902,0,4,5,3,1,100,0,0,15,0,0,21,1,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Caster AI -In Phase 1 - Start Combat Movement’);
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
(20902,0,5,0,61,1,100,0,0,0,0,0,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Caster AI - Mana at 15% (Phase 1) - Set Phase 2’);
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
(20902,0,6,0,9,1,100,0,35,80,0,0,21,1,0,0,0,0,0,0,0,0,0,0,0,0,0,‘Caster AI - At 35 Yards (Phase 1) - Start Combat Movement’);
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
(20902,0,7,0,9,1,100,0,5,15,0,0,21,0,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Caster AI - at 15 Yards (Phase 1) - Prevent Combat Movement’);
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
(20902,0,8,0,9,1,100,0,0,5,0,0,21,1,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Caster AI - Below 5 Yards (Phase 1) - Start Combat Movement’);
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
(20902,0,9,0,3,2,100,0,0,30,100,100,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Caster AI - Mana is above 30% (Phase 2) - Set Phase 1’);
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
(20902,0,10,0,0,2,100,0,0,0,0,0,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Caster AI - Set Phase 1 when Mana is above 30% (Phase 2)’);
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
(20902,0,11,0,0,0,100,0,8000,14000,18000,25000,11,36829,3,0,0,0,0,2,0,0,0,0,0,0,0,‘Caster AI - In Combat - Cast freebie (Spell 36829)’);
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
(20902,0,12,0,2,0,100,1,0,15,0,0,21,1,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Caster AI - At 15% HP - Start Combat Movement’);
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
(20902,0,13,0,2,0,100,1,0,15,0,0,25,1,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Caster AI - At 15% HP - Flee’);
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
(20902,0,14,0,7,0,100,0,0,0,0,0,22,0,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Caster AI - On Evade - Set Phase to 0’);
I’m going to test this today. If anyone has any suggestions on improvement the AI script, it would be trivial for me to update the template and regenerate the smart_script sql.
In particular, I would like to know if there is any additional cleanup I need to do beyond deleting pre-existing rows and updating the creature_template record to reference “SmartAI”.
In addition, if there is a way to distinguish whether a debuff is for casters only (i.e. a mana burn), that would also be helpful.