Jump to content
  • We are looking for staff for the Wiki area!
    If interested please
    click here and select "Documentation Team"

  • creature_ai_scripts


    antz
     NOTE:  This page is auto-generated from the MAGNET DBDocs module,
                 Any changes made directly to this page will be lost when it is regenerated.

    Description of the 'creature_ai_scripts' table for MaNGOSThree

    This table specifies the actions that a creature script will do. A basic eventAI script works with and requires only two pieces of information: What to do and When to do it.

    Table Notes

    This table uses the 'MyISAM' DB Engine

    The Field definitions follow:

    Field Name Field Type Nullable Key Default Value Attributes Notes
    id int(11) unsigned NO PRI NULL 'auto_increment' The unique identifier for the AI script entry.
    creature_id int(11) unsigned NO '0'   This references the Unique ID in the Creature Template table.
    event_type tinyint(5) unsigned NO '0'   Event Type ID
    event_inverse_phase_mask int(11) NO '0'   Mask for the event.
    event_chance int(3) unsigned NO '100'   The percentage chance for this event to happen.
    event_flags int(3) unsigned NO '0'   Event flags allow you to modify how events are executed.
    event_param1 int(11) NO '0'   Parameter Value 1 for the eventtype [See creature_ai_scripts.event_type].
    event_param2 int(11) NO '0'   Parameter Value 2 for the eventtype [See creature_ai_scripts.event_type].
    event_param3 int(11) NO '0'   Parameter Value 3 for the eventtype [See creature_ai_scripts.event_type].
    event_param4 int(11) NO '0'   Parameter Value 4 for the eventtype [See creature_ai_scripts.event_type].
    action1_type tinyint(5) unsigned NO '0'   The first actiontype.
    action1_param1 int(11) NO '0'   Parameter 1 of the action1_type [See creature_ai_scripts.action1_type]
    action1_param2 int(11) NO '0'   Parameter 2 of the action1_type [See creature_ai_scripts.action1_type]
    action1_param3 int(11) NO '0'   Parameter 3 of the action1_type [See creature_ai_scripts.action1_type]
    action2_type tinyint(5) unsigned NO '0'   The Second actiontype [See creature_ai_scripts.action2_type]
    action2_param1 int(11) NO '0'   Parameter 1 of action2_type [See creature_ai_scripts.action2_type]
    action2_param2 int(11) NO '0'   Parameter 2 of action2_type [See creature_ai_scripts.action2_type]
    action2_param3 int(11) NO '0'   Parameter 3 of action2_type [See creature_ai_scripts.action2_type]
    action3_type tinyint(5) unsigned NO '0'   The Third actiontype [See creature_ai_scripts.action3_type]
    action3_param1 int(11) NO '0'   Parameter 1 of action3_type [See creature_ai_scripts.action3_type]
    action3_param2 int(11) NO '0'   Parameter 2 of action3_type [See creature_ai_scripts.action3_type]
    action3_param3 int(11) NO '0'   Parameter 3 of action3_type [See creature_ai_scripts.action3_type]
    comment varchar(255) NO {Blank String}   Documents what an event script is supposed to do.

    Description of the fields

    id int(11) unsigned

    The unique identifier for the AI script entry. To ease development, it has been defined that the identifier always equals the creature_template.entry * 100 [See creature_template.entry].

    creature_id int(11) unsigned

    This references the Unique ID in the Creature Template table [See creature_template.id] for which the entry is valid.

    event_type tinyint(5) unsigned

    Event Type ID, from one of the Events below:

    Value Type Parameters Description Notes
    0 EVENT_T_TIMER_IN_COMBAT InitialMin, InitialMax, RepeatMin, RepeatMax Expires at first between (Param1) and (Param2) and then will repeat between every (Param3) and (Param4) EXPIRES ONLY IN COMBAT.
    1 EVENT_T_TIMER_OOC InitialMin, InitialMax, RepeatMin, RepeatMax Expires at first between (Param1) and (Param2) and then will repeat between every (Param3) and (Param4) EXPIRES ONLY OUT OF COMBAT BUT NOT DURING EVADE.
    2 EVENT_T_HP HPMax%, HPMin%, RepeatMin, RepeatMax Expires when the NPC's HP% is between (Param1) and (Param2). Will repeat between every (Param3) and (Param4) If Event Conditions Are Still Met.
    3 EVENT_T_MANA ManaMax%,ManaMin% RepeatMin, RepeatMax Expires when the NPC's Mana% is between (Param1) and (Param2). Will repeat between every (Param3) and (Param4) If Event Conditions Are Still Met.
    4 EVENT_T_AGGRO NONE   Expires ONLY upon the NPC's INITIAL Aggro at the Start of Combat (Does NOT Repeat) and Only Resets on Spawn or Evade.  
    5 EVENT_T_KILL RepeatMin, RepeatMax Expires upon Killing a Player. Will Repeat Check between (Param1) and (Param2). This Event Will Not Trigger Again Until Repeat Timer Expires
    6 EVENT_T_DEATH NONE   Expires on the NPC's Death. (This Triggers At The Moment The NPC Dies)  
    7 EVENT_T_EVADE NONE   Expires at the moment the Creature EnterEvadeMode() and Exits Combat.  
    8 EVENT_T_SPELLHIT SpellID, School, RepeatMin, RepeatMax Expires upon Spell Hit of the NPC. When (param1) is set, it is the specific Spell ID used as the trigger. With (param2) specified, the expiration is limited to specific spell schools (-1 for all) and Spell ID value is ignored. Will repeat Event Conditions Check between every (Param3) and (Param4). Only A Spell ID or Spell School may be Specified but NOT both.
    9 EVENT_T_RANGE MinDist, MaxDist, RepeatMin, RepeatMax Expires when the Highest Threat Target Distance is Greater than (Param1) and Less than (Param2). Will repeat between every (Param3) and (Param4) if Event Conditions Are Still Met.
    10 EVENT_T_OOC_LOS NoHostile, MaxRange, RepeatMin, RepeatMax Expires when a unit moves within distance (MaxAllowedRange) of the NPC. If (Param1) is 0 it will expire only when unit is hostile, If (Param1) is 1 it will expire only when unit is friendly. This depends generally on faction relations. Will repeat every (Param3) and (Param4). Does NOT expire when the NPC is in combat.
    11 EVENT_T_SPAWNED Condition, CondValue1 Expires on initial spawn and respawn of the NPC (Useful for setting Ranged Movement/Summoning Pets/Applying Buffs).  
    12 EVENT_T_TARGET_HP HPMax%, HPMin%, RepeatMin, RepeatMax Expires when current target's HP% is between (Param1) and (Param2). Will repeat every (Param3) and (Param4) If Event Conditions Are Still Met.
    13 EVENT_T_TARGET_CASTING RepeatMin, RepeatMax Expires when the current target is casting a spell. Will repeat every (Param1) and (Param2) If Event Conditions Are Still Met.
    14 EVENT_T_FRIENDLY_HP HPDeficit, Radius, RepeatMin, RepeatMax Expires when a friendly unit in (Radius) has at least (Param1) HP points missing. Will repeat every (Param3) and (Param4) If Event Conditions Are Still Met.
    15 EVENT_T_FRIENDLY_IS_CC DispelType, Radius, RepeatMin, RepeatMax Expires when a friendly unit is crowd controlled within the given Radius (Param2). Will repeat every (Param3) and (Param4).  
    16 EVENT_T_FRIENDLY_MISSING_BUFF SpellId, Radius, RepeatMin, RepeatMax Expires when a friendly unit is missing aura(s) given by a spell (Param1) within Radius (Param2). Will repeat every (Param3) and (Param4) If Event Conditions Are Still Met.  
    17 EVENT_T_SUMMONED_UNIT CreatureId, RepeatMin, RepeatMax Expires after creature with entry = (Param1) is spawned (Param1 = 0 means all spawns). Will repeat every (Param2) and (Param3).
    18 EVENT_T_TARGET_MANA ManaMax%, ManaMin%, RepeatMin, RepeatMax Expires when current target's Mana% is between (Param1) and (Param2). Will repeat every (Param3) and (Param4) If Event Conditions Are Still Met.
    19 EVENT_T_QUEST_ACCEPT QuestID      
    20 EVENT_T_QUEST_COMPLETE      
    21 EVENT_T_REACHED_HOME NONE Expires when a creature reaches it's home (spawn) location after evade. This is commonly used for NPC's who Stealth once reaching their Spawn Location
    22 EVENT_T_RECEIVE_EMOTE EmoteId, Condition, CondValue1, CondValue2 Expires when a creature receives an emote with emote text id ("enum TextEmotes" from SharedDefines.h in Mangos Source) in (Param1). Conditions can be defined (Param2) with optional values (Param3,Param4), see (enum ConditionType) in ObjectMgr.h (Mangos Source).
    23 EVENT_T_AURA Param1 = SpellID, Param2 = Number of time stacked, Param3/4 Repeat Min/Max Expires when a creature has spell (Param1) auras applied in a stack greater or equal to value provided in (Param2). Will repeat every (Param3) and (Param4) If Event Conditions Are Still Met.
    24 EVENT_T_TARGET_AURA Param1 = SpellID, Param2 = Number of time stacked, Param3/4 Repeat Min/Max Expires when a target unit has spell (Param1) auras applied in a stack greater or equal to value provided in (Param2). Will repeat every (Param3) and (Param4) If Event Conditions Are Still Met.
    25 EVENT_T_SUMMONED_JUST_DIED CreatureId, RepeatMin, RepeatMax Expires after creature with entry = (Param1) is die (Param1 = 0 means all spawns). Will repeat every (Param2) and (Param3).
    26 EVENT_T_SUMMONED_JUST_DESPAWN CreatureId, RepeatMin, RepeatMax Expires before creature with entry = (Param1) is despawn (Param1 = 0 means all spawns). Will repeat every (Param2) and (Param3).
    27 EVENT_T_MISSING_AURA Param1 = SpellID, Param2 = Number of time stacked expected, Param3/4 Repeat Min/Max Expires when a creature not has spell (Param1) auras applied in a stack greater or equal to value provided in (Param2). Will repeat every (Param3) and (Param4).
    28 EVENT_T_TARGET_MISSING_AURA Param1 = SpellID, Param2 = Number of time stacked expected, Param3/4 Repeat Min/Max Expires when a target unit not has spell (Param1) auras applied in a stack greater or equal to value provided in (Param2). Will repeat every (Param3) and (Param4).
    29 EVENT_T_TIMER_GENERIC InitialMin, InitialMax, RepeatMin, RepeatMax Expires at first between (Param1) and (Param2) and then will repeat between every (Param3) and (Param4).  
    30 EVENT_T_RECEIVE_AI_EVENT AIEventType, Sender-Entry, unused, unused Expires when the creature receives an AIEvent of type (Param1), sent by creature (Param2 != 0). If (Param2 = 0) then sent by any  


    Now that all of the supported events have been listed and described, we shall now move on to the actions that can be performed. Each event can take up to three actions.

    The actions will all be performed when the event is triggered and they will be performed in the order that they have been defined.

    This means that, for a certain event,

    action 1 will be performed first, followed by action 2, then lastly by action 3. Just like event definitions,

    Each action can use up to three different parameters but not all actions will use all three parameters.
    If a parameter isn't mentioned for an action, then that action does not need that parameter.

    event_inverse_phase_mask int(11)

    This field allows to restrict the event occurences to certain EventAI phases. The EventAI script phases are changed with actions 22 and 23, see below. This mask contains 1 in the bits corresponding to the phases for which you DO NOT wish the event occuring.
    The default value 0 means that the event may happen in any script phase. The value 1 will disable the event for the phase 0 while keeping it enabled for all other phases. The value 5 will disable the event for phases 0 and 2, and so on.

    event_chance int(3) unsigned

    The percentage chance for this event to happen. Values have to be between 1 and 100.

    event_flags int(3) unsigned

    Event flags allow you to modify how events are executed.

    Value Type Description
    1 EFLAG_REPEATABLE Event repeats (Does not repeat if this flag is not set)
    2 EFLAG_RESERVED_1 Unused
    4 EFLAG_RESERVED_2 Unused
    8 EFLAG_RESERVED_3 Unused
    16 EFLAG_RESERVED_4 Unused
    32 EFLAG_RANDOM_ACTION At event occur execute one random action from event actions instead all actions.
    64 EFLAG_RESERVED_6 Unused
    128 EFLAG_DEBUG_ONLY Event only occurs in debug builds

    event_param1 int(11)

    Parameter Value 1 for the eventtype [See creature_ai_scripts.event_type].

    event_param2 int(11)

    Parameter Value 2 for the eventtype [See creature_ai_scripts.event_type].

    event_param3 int(11)

    Parameter Value 3 for the eventtype [See creature_ai_scripts.event_type].

    event_param4 int(11)

    Parameter Value 4 for the eventtype [See creature_ai_scripts.event_type].

    action1_type tinyint(5) unsigned

    The first actiontype


    Before we start to list and explain the different actions that can be taken, we must first look at how the eventAI targeting system works. Due to technical reasons in how targetting is handled, the eventAI script cannot target anything or anyone that is not in its threat list or is not the scripted creature itself. It also can't currently target anyone specific in its threat list except by their position in the threat list. However, even then it can only target specifically the current victim, the second unit in its threat list, and the last unit in its threat list. It can also target units in its threat list at random and has two options for that: anyone in its threat list at random, or anyone in its threat list excluding the unit with the most threat. Aside from all of those external targets, the script can always target itself. More information on the target types can be found in the reference tables at the end of this guide.

    One last note before we start looking at individual actions is about the texts. The eventAI script has support for localized text entries. Therefore, you can define what the mob will say in more than one language all in another table and the script will show the corresponding localized text to the corresponding client (english text to enUS/enGB clients, german text to deDE clients, etc). All of the localized text entries will have a unique text ID assigned to them and it is that text ID that will be used by any actions that require textual input.

    Action Type Enum Name Description Parameters
    0 ACTION_T_NONE Does nothing!  
    1 ACTION_T_SAY Displays the -TextId as defined. In case -TextId2 and optionally -TextId3, the output will be randomized. Type text are defined in the eventai_texts table (say, yell, whisper, etc) along with other options for the text. All values are required to be negative. Parameter 1: The entry of the text that the NPC should use from eventai_texts table. Optionally a entry from other tables can be used (such as custom_texts are required to be negative and exist in a *_texts-table. The type text to be displayed are defined in the texts-table itself (Say, Yell, Whisper, Emote Text, Boss Whisper, Boss Emote)Other options are also to be defined in the texts-table, such as a sound to be heard with the text and the language used in output (common, dwarvish, etc).In case this entry has a localized version of the text, the localized text will be displayed in client that support this locale.

    Parameter 2: Optional. TextId can be defined in addition. The same apply to this as explained above, however eventAI will randomize between the two.

    Parameter 3: Optional, if Parameter 2 exist. In this case, eventAI will randomize between three.
    2 ACTION_T_YELL UNUSED  
    3 ACTION_T_TEXTEMOTE UNUSED  
    4 ACTION_T_SOUND When activated, the creature will play the specified sound. Parameter 1: The sound ID to be played. Sound IDs are contained in the DBC files.
    5 ACTION_T_EMOTE When activated, the creature will perform a visual emote. Unlike a text emote, a visual emote is one where the creature will actually move or perform a gesture. Parameter 1: The emote ID that the creature should perform. Emote IDs are also contained in the DBC but they can be found in the mangos source as well.
    6 ACTION_T_RANDOM_SAY UNUSED  
    7 ACTION_T_RANDOM_YELL UNUSED  
    8 ACTION_T_RANDOM_TEXTEMOTE UNUSED  
    9 ACTION_T_RANDOM_SOUND Similar to the ACTION_T_SOUND action, when this action is activated, it will choose at random a sound to play. This action needs all three parameters to be filled and it will pick a random entry from the three. Note: (1) Parameter 1: The sound ID to be played as choice one.

    Parameter 2: The sound ID to be played as choice two.

    Parameter 3: The sound ID to be played as choice three.
    10 ACTION_T_RANDOM_EMOTE Similar to the ACTION_T_EMOTE action, when this action is activated, it will choose at random an emote ID to emote visually. This action needs all three parameters to be filled and it will pick a random entry from the three. Note: (1) Parameter 1: The emote ID that the creature should perform as choice one.

    Parameter 2: The emote ID that the creature should perform as choice two.

    Parameter 3: The emote ID that the creature should perform as choice three.
    11 ACTION_T_CAST When activated, the creature will cast a spell specified by a spell ID on a target specified by the target type. Parameter 1: The spell ID to use for the cast. The value used in this field needs to be a valid spell ID.

    Parameter 2: The target type defining who the creature should cast on. The value in this field needs to be a valid target type as specified in the reference tables below.

    Parameter 3: See spell flags. If it is 1, then the spell cast will interrupt any spells that are already in the progress of being casted; otherwise if the creature is already casting a spell and this field is 0, then this action will be skipped.
    12 ACTION_T_SUMMON When activated, the creature will summon another creature at the same spot as itself that will attack the specified target. Parameter 1: The creature template ID to be summoned. The value here needs to be a valid creature template ID.

    Parameter 2: The target type defining who the summoned creature will attack. The value in this field needs to be a valid target type as specified in the reference tables below. Note: Using target type 0 will cause the summoned creature to not attack anyone.

    Parameter 3: The duration until the summoned creature should be unsummoned. The value in this field is in milliseconds or 0. If zero, then the creature will not be unsummoned until it leaves combat, but only works with t_type !=0.
    13 ACTION_T_THREAT_SINGLE_PCT When activated, this action will modify the threat of a target in the creatureâ?Ts threat list by the specified percent. Parameter 1: Threat percent that should be modified. The value in this field can range from -100 to +100. If it is negative, threat will be taken away and if positive, threat will be added.

    Parameter 2: The target type defining on whom the threat change should occur. The value in this field needs to be a valid target type as specified in the reference tables below.
    14 ACTION_T_THREAT_ALL_PCT When activated, this action will modify the threat for everyone in the creatureâ?Ts threat list by the specified percent. Parameter 1: The percent that should be used in modifying everyoneâ?Ts threat in the creatureâ?Ts threat list. The value here can range from -100 to +100. Note: Using -100 will cause the creature to reset everyoneâ?Ts threat to 0 so that everyone has the same amount of threat. It does NOT make any changes as to who is in the threat list.
    15 ACTION_T_QUEST_EVENT When activated, this action will satisfy the external completion requirement for the quest for the specified target defined by the target type. This action can only be used with player targets so it must be ensured that the target type will point to a player. Parameter 1: The quest template ID. The value here must be a valid quest template ID. Furthermore, the quest should have SpecialFlags | 2 as it would need to be completed by an external event which is the activation of this action.

    Parameter 2: The target type defining whom the quest should be completed for. The value in this field needs to be a valid target type as specified in the reference tables below.
    16 ACTION_T_CASTCREATUREGO When activated, this action will call CastedCreatureOrGO() function for the player. It can be used to give quest credit for casting a spell on the creature. Parameter 1: The quest template ID. The value here must be a valid quest template ID.

    Parameter 2: The spell ID to use to simulate the cast. The value used in this field needs to be a valid spell ID.

    Parameter 3: The target type defining whom the quest credit should be given to. The value in this field needs to be a valid target type as specified in the reference tables below.
    17 ACTION_T_SET_UNIT_FIELD When activated, this action can change the targetâ?Ts unit field values. More information on the field value indeces can be found at character data data. Parameter 1: The index of the field number to be changed. Use character data data for a list of indeces and what they control. Note that a creature shares the same indeces with a player except for the PLAYER_* ones.

    Parameter 2: The new value to be put in the field.

    Parameter 3: The target type defining for whom the unit field should be changed. The value in this field needs to be a valid target type as specified in the reference tables below.
    18 ACTION_T_SET_UNIT_FLAG When activated, this action changes the targetâ?Ts flags by adding (turning on) more flags. For example, this action can make the creature unattackable/unselectable if the right flags are used. Parameter 1: The flag(s) to be set. Multiple flags can be set by using bitwise-OR on them (adding them together).

    Parameter 2: The target type defining for whom the flags should be changed. The value in this field needs to be a valid target type as specified in the reference tables below.
    19 ACTION_T_REMOVE_UNIT_FLAG When activated, this action changes the targetâ?Ts flags by removing (turning off) flags. For example, this action can make the creature normal after it was unattackable/unselectable if the right flags are used. Parameter 1: The flag(s) to be removed. Multiple flags can be set by using bitwise-OR on them (adding them together).

    Parameter 2: The target type defining for whom the flags should be changed. The value in this field needs to be a valid target type as specified in the reference tables below.
    20 ACTION_T_AUTO_ATTACK This action controls whether or not the creature should stop or start the auto melee attack. Parameter 1: If zero, then the creature will stop its melee attacks. If non-zero, then the creature will either continue its melee attacks (the action would then have no effect) or it will start its melee attacks on the target with the top threat if its melee attacks were previously stopped.
    21 ACTION_T_COMBAT_MOVEMENT This action controls whether or not the creature will always move towards its target. Parameter 1: If zero, then the creature will stop moving towards its victim (if its victim gets out of melee range) and will be stationary. If non-zero, then the creature will either continue to follow its victim (the action would have no effect) or it will start to follow the target with the top threat if its movement was disabled before.
    22 ACTION_T_SET_PHASE When activated, this action sets the creatureâ?Ts event to the specified value. Parameter 1: The new phase to set the creature in. This number must be an integer between 0 and 31 inclusive.
    23 ACTION_T_INC_PHASE When activated, this action will increase (or decrease) the current creatureâ?Ts phase. Parameter 1: The number of phases to increase or decrease. Use negative values to decrease the current phase. After increasing or decreasing the phase by this action, the current phase must not be lower than 0 or exceed 31.
    24 ACTION_T_EVADE When activated, the creature will immediately exit out of combat, clear its threat list, and move back to its spawn point. Basically, this action will reset the whole encounter.  
    25 ACTION_T_FLEE When activated, the creature will try to flee from combat. Currently this is done by it casting a fear-like spell on itself called "Run Away".  
    26 ACTION_T_QUEST_EVENT_ALL This action does the same thing as the ACTION_T_QUEST_EVENT does but it does it for all players in the creatureâ?Ts threat list. Note that if a player is not in its threat list for whatever reason, he/she wonâ?Tt get the quest completed. Parameter 1: The quest ID to finish for everyone.
    27 ACTION_T_CASTCREATUREGO_ALL This action does the same thing as the ACTION_T_CASTCREATUREGO does but it does it for all players in the creatureâ?Ts threat list. Note that if a player is not in its threat list for whatever reason, he/she wonâ?Tt receive the cast emulation. Parameter 1: The quest template ID.

    Parameter 2: The spell ID used to simulate the cast.
    28 ACTION_T_REMOVEAURASFROMSPELL This action will remove all auras from a specific spell from the target. Parameter 1: The target type defining for whom the unit field should be changed. The value in this field needs to be a valid target type as specified in the reference tables below.

    Parameter 2: The spell ID whose auras will be removed.
    29 ACTION_T_RANGED_MOVEMENT This action changes the movement type generator to ranged type using the specified values for angle and distance. Note that specifying zero angle and distance will make it just melee instead. Parameter 1: The distance the mob should keep between it and its target.

    Parameter 2: The angle the mob should use.
    30 ACTION_T_RANDOM_PHASE Randomly sets the phase to one from the three parameter choices. Note: (1) Parameter 1: A possible random phase choice.

    Parameter 2: A possible random phase choice.

    Parameter 3: A possible random phase choice.
    31 ACTION_T_RANDOM_PHASE_RANGE Randomly sets the phase between a range of phases controlled by the parameters. Parameter 1: The minimum of the phase range.

    Parameter 2: The maximum of the phase range. The number here must be greater than the one in parameter 1.
    32 ACTION_T_SUMMON Summons a creature using the data specified in the separate summons table. Parameter 1: The creature template ID to be summoned. The value here needs to be a valid creature template ID.

    Parameter 2: The target type defining who the summoned creature will attack. The value in this field needs to be a valid target type as specified in the reference tables below. Note: Using target type 0 will cause the summoned creature to not attack anyone.

    Parameter 3: The summon ID from the eventai_summons table controlling the position (and spawntime) where the summoned mob should be spawned at.
    33 ACTION_T_KILLED_MONSTER When activated, this action will call KilledMonster() function for the player. It can be used to give creature credit for killing a creature (note that it can be ANY creature including certain quest specific triggers). In general if the quest is set to be accompished on different creatures (e.g. "Credit" templates). Parameter 1: The creature template ID. The value here must be a valid creature template ID.

    Parameter 2: The target type defining whom the quest kill count should be given to. The value in this field needs to be a valid target type as specified in the reference tables below.
    34 ACTION_T_SET_INST_DATA Sets data for the instance. Note that this will only work when the creature is inside an instantiable zone that has a valid script (ScriptedInstance) assigned. Parameter 1: The field to change in the instance script. Again, this field needs to be a valid field that has been already defined in the instanceâ?Ts script.

    Parameter 2: The value to put at that field index. The number here must be a valid 32 bit number.
    35 ACTION_T_SET_INST_DATA64 Sets GUID (64 bits) data for the instance based on the target. Note that this will only work when the creature is inside an instantiable zone that has a valid script (ScriptedInstance) assigned. Parameter 1: The field to change in the instance script. Again, this field needs to be a valid field that has been already defined in the instanceâ?Ts script.

    Parameter 2: The target type to use to get the GUID that will be stored at the field index. The value in this field needs to be a valid target type as specified in the reference tables below.
    36 ACTION_T_UPDATE_TEMPLATE This function temporarily changes creature entry to new entry, display is changed, loot is changed, but AI is not changed. At respawn creature will be reverted to original entry. Parameter 1: The creature template ID. The value here must be a valid creature template ID.

    Parameter 2: Use model_id from team: Alliance(0) or Horde (1).
    37 ACTION_T_DIE Kills the creature  
    38 ACTION_T_ZONE_COMBAT_PULSE Places all players within the instance into combat with the creature. Only works in combat and only works inside of instances.  
    39 ACTION_T_CALL_FOR_HELP Call any friendly creatures (if its not in combat/etc) in radius attack creature target. Parameter 1: Radius from creature.
    40 ACTION_T_SET_SHEATH Let set sheath state for creature (0-no weapon show (not used mostly by creatures), 1-melee weapon show, 2-ranged weapon show) Parameter 1: Sheath state of the creature.
    41 ACTION_T_FORCE_DESPAWN Despawns the creature. Parameter 1: Despawn delay.

    action1_param1 int(11)

    Parameter 1 of the action1_type [See creature_ai_scripts.action1_type]

    action1_param2 int(11)

    Parameter 2 of the action1_type [See creature_ai_scripts.action1_type]

    action1_param3 int(11)

    Parameter 3 of the action1_type [See creature_ai_scripts.action1_type]

    action2_type tinyint(5) unsigned

    The Second actiontype [See creature_ai_scripts.action2_type]

    Possible target types

    Value Type Description
    0 TARGET_T_SELF self cast
    1 TARGET_T_HOSTILE Our current target (ie: top aggro)
    2 TARGET_T_HOSTILE_SECOND_AGGRO Second highest aggro, usually offtank (generaly used for cleaves and some special attacks)
    3 TARGET_T_HOSTILE_LAST_AGGRO Bottom aggro target (these are healers usually)
    4 TARGET_T_HOSTILE_RANDOM Just any random target on our threat list
    5 TARGET_T_HOSTILE_RANDOM_NOT_TOP Any random target except top aggro
    6 TARGET_T_ACTION_INVOKER Unit who caused this Event to occur (only works for EVENT_T_AGGRO, EVENT_T_KILL, EVENT_T_DEATH, EVENT_T_SPELLHIT, EVENT_T_OOC_LOS, EVENT_T_FRIENDLY_HP, EVENT_T_FRIENDLY_IS_CC, EVENT_T_FRIENDLY_MISSING_BUFF, EVENT_T_RECEIVE_EMOTE, EVENT_T_RECEIVE_AI_EVENT)
    7 TARGET_T_ACTION_INVOKER_OWNER Unit owning the one responsible for Event to occur, for example, the hunter which pet triggered the event (only works for EVENT_T_AGGRO, EVENT_T_KILL, EVENT_T_DEATH, EVENT_T_SPELLHIT, EVENT_T_OOC_LOS, EVENT_T_FRIENDLY_HP, EVENT_T_FRIENDLY_IS_CC, EVENT_T_FRIENDLY_MISSING_BUFF, EVENT_T_RECEIVE_EMOTE, EVENT_T_RECEIVE_AI_EVENT)
    8 TARGET_T_HOSTILE_RANDOM_PLAYER Just any random player on our threat list
    9 TARGET_T_HOSTILE_RANDOM_NOT_TOP_PLAYER Any random player from threat list except top aggro (ie except main tank)
    10 TARGET_T_EVENT_SENDER Unit who sent an AIEvent that was received with EVENT_T_RECEIVE_AI_EVENT

    action2_param1 int(11)

    Parameter 1 of action2_type [See creature_ai_scripts.action2_type]

    action2_param2 int(11)

    Parameter 2 of action2_type [See creature_ai_scripts.action2_type]

    action2_param3 int(11)

    Parameter 3 of action2_type [See creature_ai_scripts.action2_type]

    action3_type tinyint(5) unsigned

    The Third actiontype [See creature_ai_scripts.action3_type]

    action3_param1 int(11)

    Parameter 1 of action3_type [See creature_ai_scripts.action3_type]

    action3_param2 int(11)

    Parameter 2 of action3_type [See creature_ai_scripts.action3_type]

    action3_param3 int(11)

    Parameter 3 of action3_type [See creature_ai_scripts.action3_type]

    comment varchar(255)

    Documents what an event script is supposed to do. It has been defined that comments should use the form: 'Creature/GameObject name - Cast Spellname'.


    auto-generated by the getMaNGOS.eu MAGNET dbdocs module

    Edited by Antz


    User Feedback

    Recommended Comments

    There are no comments to display.



    Create an account or sign in to comment

    You need to be a member in order to leave a comment

    Create an account

    Sign up for a new account in our community. It's easy!

    Register a new account

    Sign in

    Already have an account? Sign in here.

    Sign In Now

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use