ai_agents

This table contains spells that creatures use instead of advanced scripting.

Structure

Field Type Default Comment
entry int(10)    
instance_mode tinyint(1) 4  
type tinyint(1) 0  
event tinyint(1) 0  
chance tinyint(3) 100  
maxcount tinyint(3) 0  
spell int(10) 0  
spelltype tinyint(1) 0  
targettype_overwrite tinyint(3) -1  
cooldown_overwrite mediumint(10) -1  
floatMisc1 float(0) 0  
Misc2 mediumint(10) 0  

entry

The entry ID of the NPC.

instance_mode

0 = Normal dungeon, Normal old raid, Normal 10 man raid
1 = Heroic dungeon, Normal 25man Raid 
2 = Heroic 10man Raid 
3 = Heroic 25man raid 
4 = All modes (0 - 3)

type

1 = Melee
2 = Ranged
3 = Flee
4 = Spell
5 = Call For Help

event

0 = Enter Combat
1 = Leave Combat
2 = Damage Taken
3 = Target Cast Spell
4 = Target Parried
5 = Target Dodged
6 = Target Blocked
7 = Target Critically Hit
8 = Target Died
9 = Target Died (!)
10 = Unit Parried
11 = Unit Dodged
12 = Unit Blocked
13 = Unit Critical Hit
14 = Unit Died
15 = Assisting Target Died (Pet)
16 = Follow Owner

chance

The chance in percent the spell has to be cast.

maxcount

0 = infinite count

value > 0 = counts the spell is cast

spell

ID of the spell that will be cast

spelltype

 1 = Root
 2 = Heal
 3 = Stun
 4 = Fear
 5 = Silence
 6 = Curse
 7 = AoE Damage
 8 = Damage
 9 = Summon
10 = Buff Spell
11 = Debuff Spell

targettype_overwrite

0 = Null
1 = Random Target
2 = Target Location
3 = Creature Location
4 = Self
5 = Owner (Pets / Slave cast on their owner)

cooldown_overwrite

Value in milliseconds (1 sec = 1000)

floatMisc1

If (type = FLEE [3]) then this should be the Health Percent it flees at. Default: 0.2f.

If (type = CALLFORHELP [5]) then this should be the Health Percent it calls for health at. Default: 0.2f

Misc2

If (type = FLEE [3]) then this should be the time it flees for, in milliseconds. Default: 10000ms (10 seconds).