Jump to content

WIKI Activity

Showing articles posted in for the last 365 days.

This stream auto-updates     

  1. Earlier
  2. Mephisto_VI

    Installing Visual Studio 2015 (Community)

    Thanks for the guide. Currently removing the 2017 edition so I can install the 2015 edition and follow it properly. Do note, if you do not have a subscription with Microsoft, the older versions are not available to download from them. I just ran into that and had to find a copy elsewhere.
  3. antz

    Installing Visual Studio 2015 (Community)

    @reno - Yes you do
  4. reno

    Installing Visual Studio 2015 (Community)

    For using the easymangos tool, you also need the command line c++ tools installed, or am I way out of touch now?
  5. kins

    Installing Visual Studio 2015 (Community)

    How does this change with the 2017 version? I loaded it up but i cannot find a WIN32 project.
  6. antz

    Updating your cloned Server / Database files

    Either run Easybuild / cmake again (Windows) or cmake / make (Linux)
  7. antz

    creature_ai_scripts

     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 MaNGOSZero 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
  8. antz

    creature_ai_scripts

     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 MaNGOSOne 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
  9. antz

    creature_ai_scripts

     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 MaNGOSTwo 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
  10. antz

    creature_ai_scripts

     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
  11. antz

    warden_checks

     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 'warden_checks' table for MaNGOSOne Table Notes This table uses the 'MyISAM' DB Engine The Field definitions follow: Field Name Field Type Nullable Key Default Value Attributes Notes id smallint(5) unsigned NO PRI NULL 'auto_increment'   type tinyint(3) unsigned YES NULL     data varchar(48) YES {Blank String}     str varchar(20) YES {Blank String}     address int(10) unsigned YES NULL     length tinyint(3) unsigned YES NULL     result varchar(24) YES {Blank String}     comment varchar(50) YES {Blank String}     Description of the fields id smallint(5) unsigned type tinyint(3) unsigned data varchar(48) str varchar(20) address int(10) unsigned length tinyint(3) unsigned result varchar(24) comment varchar(50) auto-generated by the getMaNGOS.eu MAGNET dbdocs module
  12. antz

    warden_build_specific

     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 'warden_build_specific' table for MaNGOSOne Table Notes This table uses the 'MyISAM' DB Engine The Field definitions follow: Field Name Field Type Nullable Key Default Value Attributes Notes id smallint(5) unsigned NO PRI NULL     build smallint(5) unsigned NO PRI NULL     data varchar(48) NO {Blank String}     str varchar(20) NO {Blank String}     address int(10) unsigned NO '0'     length tinyint(3) unsigned NO '0'     result varchar(24) NO {Blank String}     Description of the fields id smallint(5) unsigned Notes: Check ID from warden_checks build smallint(5) unsigned Notes: Client build data varchar(48) str varchar(20) address int(10) unsigned length tinyint(3) unsigned result varchar(24) auto-generated by the getMaNGOS.eu MAGNET dbdocs module
  13. antz

    transports

     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 'transports' table for MaNGOSOne This table contains all type 15 transports (Boats and Zeppelins). All other transport types have their frame time read from TransportAnimation.dbc. Table Notes This table uses the 'MyISAM' DB Engine The Field definitions follow: Field Name Field Type Nullable Key Default Value Attributes Notes entry mediumint(8) unsigned NO PRI '0'   This references the Gameobject Template table's unique ID. name text YES NULL   A name describing the transport. period mediumint(8) unsigned NO '0'   This is the amount of time that it take for the transport to make one full pass. Description of the fields entry mediumint(8) unsigned This references the Gameobject Template table's unique ID [See gameobject_template.entry] of the game object of type 15 (boats and Zeppelins) for which the entry is valid. name text A name describing the transport. This is not used in-game, but only here to ease locking up data. period mediumint(8) unsigned This is the amount of time that it take for the transport to make one full pass through all the frames in the TaxiNodes [See TaxiNodes.dbc]. When a client change occurs, usually this field must be updated. This values is set in milliseconds. auto-generated by the getMaNGOS.eu MAGNET dbdocs module
  14. antz

    spell_threat

     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 'spell_threat' table for MaNGOSOne This table holds threat values on all spells that should either give or take away threat. Table Notes This table uses the 'MyISAM' DB Engine The Field definitions follow: Field Name Field Type Nullable Key Default Value Attributes Notes entry mediumint(8) unsigned NO PRI NULL   The spell identifier. Threat smallint(6) NO NULL   The value of threat to add or remove from the characters threat. multiplier float NO '1'   Any value here will modify the spells threat with the factor given here. ap_bonus float NO '0'   Any value here will modify the spells attack power with the factor given here. Description of the fields entry mediumint(8) unsigned The spell identifier. The value has to match with a spell identifier defined [See Spell.dbc] Note: Any spell referenced is required to be rank 1 in the spell chain, and has to have threat values set in the original spell definition. Threat smallint(6) The value of threat to add to the characters threat, or to remove from a characters threat. Negative values reduce threat, positive values increase threat. multiplier float Any value here will modify the spells threat with the factor given here. ap_bonus float Any value here will modify the spells attack power with the factor given here. auto-generated by the getMaNGOS.eu MAGNET dbdocs module
  15. antz

    spell_template

     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 'spell_template' table for MaNGOSOne 'MaNGOS server side spells' 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 '0'     proc_flags int(11) unsigned NO '0'     proc_chance int(11) unsigned NO '0'     duration_index int(11) unsigned NO '0'     effect0 int(11) unsigned NO '0'     effect0_implicit_target_a int(11) unsigned NO '0'     effect0_radius_idx int(11) unsigned NO '0'     effect0_apply_aura_name int(11) unsigned NO '0'     effect0_misc_value int(11) unsigned NO '0'     effect0_misc_value_b int(11) unsigned NO '0'     effect0_trigger_spell int(11) unsigned NO '0'     comments varchar(255) NO {Blank String}     Description of the fields id int(11) unsigned proc_flags int(11) unsigned proc_chance int(11) unsigned duration_index int(11) unsigned effect0 int(11) unsigned effect0_implicit_target_a int(11) unsigned effect0_radius_idx int(11) unsigned effect0_apply_aura_name int(11) unsigned effect0_misc_value int(11) unsigned effect0_misc_value_b int(11) unsigned effect0_trigger_spell int(11) unsigned comments varchar(255) auto-generated by the getMaNGOS.eu MAGNET dbdocs module
  16. antz

    spell_target_position

     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 'spell_target_position' table for MaNGOSOne This table holds coordinate information on where the player should be teleported to when a spell with effect SPELL_EFFECT_TELEPORT_UNITS. Table Notes This table uses the 'MyISAM' DB Engine The Field definitions follow: Field Name Field Type Nullable Key Default Value Attributes Notes id mediumint(8) unsigned NO PRI '0'   The spell identifier. The value has to match with a defined spell identifier. target_map smallint(5) unsigned NO '0'   The target map's identifier. target_position_x float NO '0'   The X position on the target map. target_position_y float NO '0'   The Y position on the target map. target_position_z float NO '0'   The Z position on the target map. target_orientation float NO '0'   The orientation for the character on the target map. Description of the fields id mediumint(8) unsigned The spell identifier. The value has to match with a defined spell identifier [See Spell.dbc]. target_map smallint(5) unsigned The target map's identifier. The value has to match with a defined map identifier [See Map.dbc]. target_position_x float The X position on the target map. target_position_y float The Y position on the target map. target_position_z float The Z position on the target map. target_orientation float The orientation for the character on the target map. This is measured in radians, 0 is north on the mini-map and pi is south on the mini-map etc. auto-generated by the getMaNGOS.eu MAGNET dbdocs module
  17. antz

    spell_script_target

     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 'spell_script_target' table for MaNGOSOne Used to control SpellEffect with ImpliciteTargetA-B == 7|8|38|40|46|52. These spell effects require a specific target in either alive or dead state (for creatures). Table Notes This table uses the 'MyISAM' DB Engine The Field definitions follow: Field Name Field Type Nullable Key Default Value Attributes Notes entry mediumint(8) unsigned NO PRI NULL   Spell ID [See Spell.dbc]. type tinyint(3) unsigned NO PRI '0'   Type of the target entry. targetEntry mediumint(8) unsigned NO PRI '0'   Creature ID or Gameobject ID. inverseEffectMask mediumint(8) unsigned NO '0'   Inverse effect mask. Description of the fields entry mediumint(8) unsigned Spell ID [See Spell.dbc] of the spell requiring external implicit target definition. The target type of a spelleffect has to be one of the following (look for the values at enum Targets in SharedDefines.h): TARGET_SCRIPT, TARGET_SCRIPT_COORDINATES, TARGET_FOCUS_OR_SCRIPTED_GAMEOBJECT, TARGET_AREAEFFECT_INSTANT, TARGET_AREAEFFECT_CUSTOM, TARGET_AREAEFFECT_GO_AROUND_SOURCE, TARGET_AREAEFFECT_GO_AROUND_DEST, TARGET_NARROW_FRONTAL_CONE type tinyint(3) unsigned Type of the target entry. Name Value SPELL_TARGET_TYPE_GAMEOBJECT 0 SPELL_TARGET_TYPE_CREATURE 1 SPELL_TARGET_TYPE_DEAD 2 targetEntry mediumint(8) unsigned Creature ID (creature_template.entry) or Gameobject ID (gameobject_template.entry) dependently on the type. inverseEffectMask mediumint(8) unsigned The bitmask (bits 0, 1, 2 corresponding to values 1, 2, 4) of the spell effect numbers that do not use this mechanic. auto-generated by the getMaNGOS.eu MAGNET dbdocs module
  18. antz

    spell_proc_item_enchant

     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 'spell_proc_item_enchant' table for MaNGOSOne This table holds information for proc chances of spells which enchant weapons. This also includes shaman weapon enchants. Table Notes This table uses the 'MyISAM' DB Engine The Field definitions follow: Field Name Field Type Nullable Key Default Value Attributes Notes entry mediumint(8) unsigned NO PRI NULL   Spell ID [See Spell.dbc]. ppmRate float NO '0'   Proc frequency limit, per minute. Description of the fields entry mediumint(8) unsigned Spell ID [See Spell.dbc]. Should be the first rank spell if in the rank chain. ppmRate float The value (times per minute) limits the enchant proc frequency. auto-generated by the getMaNGOS.eu MAGNET dbdocs module
  19. antz

    spell_proc_event

     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 'spell_proc_event' table for MaNGOSOne This table holds information on what events (or procs) certain spells are activated. All spells in this table must have apply a SPELL_AURA_PROC_TRIGGER_SPELL (42) aura. Any nonzero entries in this table will overwrite the existing proc settings in the spell's DBC entry. Table Notes This table uses the 'MyISAM' DB Engine The Field definitions follow: Field Name Field Type Nullable Key Default Value Attributes Notes entry mediumint(8) unsigned NO PRI '0'   Spell ID [See Spell.dbc]. SchoolMask tinyint(4) unsigned NO '0'   Spell school mask. SpellFamilyName smallint(5) unsigned NO '0'   Spell family name. SpellFamilyMask0 bigint(40) unsigned NO '0'   Spell family mask for effect 0. SpellFamilyMask1 bigint(40) unsigned NO '0'   Spell family mask for effect 1. SpellFamilyMask2 bigint(40) unsigned NO '0'   Spell family mask for effect 2. procFlags int(10) unsigned NO '0'   Flags defining conditions for aura to proc. procEx int(10) unsigned NO '0'   Flags refining proc condition. ppmRate float NO '0'   Proc frequency limit. CustomChance float NO '0'   Chance of proc. Cooldown int(10) unsigned NO '0'   Cooldown (in msec). Description of the fields entry mediumint(8) unsigned Spell ID [See Spell.dbc] of the aura that may proc during another spellcast or under other conditions defined in this table. SchoolMask tinyint(4) unsigned Spell school mask. Spell School is defined in in the second field of Spell.dbc entry. This value is the bitmask [See enum SpellSchoolMask in SharedDefines.h], where different schools may be combined. Name Value SPELL_SCHOOL_MASK_NORMAL 1 SPELL_SCHOOL_MASK_HOLY 2 SPELL_SCHOOL_MASK_FIRE 4 SPELL_SCHOOL_MASK_NATURE 8 SPELL_SCHOOL_MASK_FROST 16 SPELL_SCHOOL_MASK_SHADOW 32 SPELL_SCHOOL_MASK_ARCANE 64 Note: Multiple school masks can be combined to have spell trigger on more than one spell school. SpellFamilyName smallint(5) unsigned Spell family name classifies the spell as intended mostly for specific character class, see enum SpellFamily in DBCEnums.h. The field is defined for each spell in Spell.dbc, see SpellFamilyName field of struct SpellEntry in DBCStructure.h. Name Value SPELLFAMILY_GENERIC 0 SPELLFAMILY_ENVIRONMENT 1 SPELLFAMILY_MAGE 3 SPELLFAMILY_WARRIOR 4 SPELLFAMILY_WARLOCK 5 SPELLFAMILY_PRIEST 6 SPELLFAMILY_DRUID 7 SPELLFAMILY_ROGUE 8 SPELLFAMILY_HUNTER 9 SPELLFAMILY_PALADIN 10 SPELLFAMILY_SHAMAN 11 SPELLFAMILY_POTION 13 SpellFamilyMask0 bigint(40) unsigned Spell family mask for EFFECT_0. The SpellFamilyMask is a 64-bit value defined for each spell in Spell.dbc [See SpellFamilyFlags field of struct SpellEntry in DBCStructure.h]. It classifies the spell into a group within each SpellFamilyName, presenting a simple way to recognizing spells, for example, one spell of different ranks. The 64-bit values are defined in the sources as UI64LIT() type. SpellFamilyMask1 bigint(40) unsigned Spell family mask for EFFECT_1. The SpellFamilyMask is a 64-bit value defined for each spell in Spell.dbc [See SpellFamilyFlags field of struct SpellEntry in DBCStructure.h]. It classifies the spell into a group within each SpellFamilyName, presenting a simple way to recognizing spells, for example, one spell of different ranks. The 64-bit values are defined in the sources as UI64LIT() type. SpellFamilyMask2 bigint(40) unsigned Spell family mask for EFFECT_2. The SpellFamilyMask is a 64-bit value defined for each spell in Spell.dbc [See SpellFamilyFlags field of struct SpellEntry in DBCStructure.h]. It classifies the spell into a group within each SpellFamilyName, presenting a simple way to recognizing spells, for example, one spell of different ranks. The 64-bit values are defined in the sources as UI64LIT() type. procFlags int(10) unsigned Bitmask defining conditions for aura to proc. Values may be combined by adding. If equals to 0, the value form Spell.dbc is used. Name Value (hex) Meaning PROC_FLAG_KILLED 0x00000001 00 Killed by aggressor PROC_FLAG_KILL 0x00000002 01 Kill target (in most cases need XP/Honor reward, see Unit::IsTriggeredAtSpellProcEvent for additinoal check) PROC_FLAG_SUCCESSFUL_MELEE_HIT 0x00000004 02 Successful melee auto attack PROC_FLAG_TAKEN_MELEE_HIT 0x00000008 03 Taken damage from melee auto attack hit PROC_FLAG_SUCCESSFUL_MELEE_SPELL_HIT 0x00000010 04 Successful attack by Spell that use melee weapon PROC_FLAG_TAKEN_MELEE_SPELL_HIT 0x00000020 05 Taken damage by Spell that use melee weapon PROC_FLAG_SUCCESSFUL_RANGED_HIT 0x00000040 06 Successful Ranged auto attack PROC_FLAG_TAKEN_RANGED_HIT 0x00000080 07 Taken damage from ranged auto attack PROC_FLAG_SUCCESSFUL_RANGED_SPELL_HIT 0x00000100 08 Successful Ranged attack by Spell that use ranged weapon PROC_FLAG_TAKEN_RANGED_SPELL_HIT 0x00000200 09 Taken damage by Spell that use ranged weapon PROC_FLAG_SUCCESSFUL_POSITIVE_AOE_HIT 0x00000400 10 Successful AoE (not 100% sure unused) PROC_FLAG_TAKEN_POSITIVE_AOE 0x00000800 11 Taken AoE (not 100% sure unused) PROC_FLAG_SUCCESSFUL_AOE_SPELL_HIT 0x00001000 12 Successful AoE damage spell hit (not 100% sure unused) PROC_FLAG_TAKEN_AOE_SPELL_HIT 0x00002000 13 Taken AoE damage spell hit (not 100% sure unused) PROC_FLAG_SUCCESSFUL_POSITIVE_SPELL 0x00004000 14 Successful cast positive spell (by default only on healing) PROC_FLAG_TAKEN_POSITIVE_SPELL 0x00008000 15 Taken positive spell hit (by default only on healing) PROC_FLAG_SUCCESSFUL_NEGATIVE_SPELL_HIT 0x00010000 16 Successful negative spell cast (by default only on damage) PROC_FLAG_TAKEN_NEGATIVE_SPELL_HIT 0x00020000 17 Taken negative spell (by default only on damage) PROC_FLAG_ON_DO_PERIODIC 0x00040000 18 Successful do periodic (damage / healing, determined by PROC_EX_PERIODIC_POSITIVE or negative if no procEx) PROC_FLAG_ON_TAKE_PERIODIC 0x00080000 19 Taken spell periodic (damage / healing, determined by PROC_EX_PERIODIC_POSITIVE or negative if no procEx) PROC_FLAG_TAKEN_ANY_DAMAGE 0x00100000 20 Taken any damage PROC_FLAG_ON_TRAP_ACTIVATION 0x00200000 21 On trap activation PROC_FLAG_TAKEN_OFFHAND_HIT 0x00400000 22 Taken off-hand melee attacks (not used) PROC_FLAG_SUCCESSFUL_OFFHAND_HIT 0x00800000 23 Successful off-hand melee attacks procEx int(10) unsigned Flags refining proc condition, optional. Name Value (hex) PROC_EX_NONE 0x0000000 PROC_EX_NORMAL_HIT 0x0000001 PROC_EX_CRITICAL_HIT 0x0000002 PROC_EX_MISS 0x0000004 PROC_EX_RESIST 0x0000008 PROC_EX_DODGE 0x0000010 PROC_EX_PARRY 0x0000020 PROC_EX_BLOCK 0x0000040 PROC_EX_EVADE 0x0000080 PROC_EX_IMMUNE 0x0000100 PROC_EX_DEFLECT 0x0000200 PROC_EX_ABSORB 0x0000400 PROC_EX_REFLECT 0x0000800 PROC_EX_INTERRUPT 0x0001000 PROC_EX_EX_TRIGGER_ALWAYS 0x0010000 PROC_EX_EX_ONE_TIME_TRIGGER 0x0020000 PROC_EX_PERIODIC_POSITIVE 0x0040000 ppmRate float The value limits the proc frequency. For melee (ranged?) damage spells it is the proc rate per minute. The actual proc may happen less frequently but not more frequently than defined here. If zero, falls back to flat chance from Spell.dbc. CustomChance float Chance of proc. If equals to 0, the standard value from Spell.dbc is used, else overrides it. Mostly used for spell debugging when it is convenient to set the chance to 100%. Cooldown int(10) unsigned A hidden cooldown used for some spell proc events, applied to _triggered_spell_. auto-generated by the getMaNGOS.eu MAGNET dbdocs module
  20. antz

    spell_linked

     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 'spell_linked' table for MaNGOSOne This table provides data for spell linking system, telling it what spells trigger what, and under what conditions. Table Notes This table uses the 'MyISAM' DB Engine The Field definitions follow: Field Name Field Type Nullable Key Default Value Attributes Notes entry int(10) unsigned NO PRI NULL   Spell ID [See Spell.dbc]. linked_entry int(10) unsigned NO PRI NULL   Spell ID [See Spell.dbc]. type int(10) unsigned NO PRI '0'   Link type. effect_mask int(10) unsigned NO '0'   Effect mask. comment varchar(255) NO {Blank String}   Textual comment. Description of the fields entry int(10) unsigned Spell ID [See Spell.dbc] of the triggering spell. linked_entry int(10) unsigned Spell ID [See Spell.dbc] of the triggered spell. type int(10) unsigned Type of spell link, see enum SpellLinkedType in SpellMgr.h. Type name Value Meaning SPELL_LINKED_TYPE_NONE 0 Ignored SPELL_LINKED_TYPE_BOOST 1   SPELL_LINKED_TYPE_PRECAST 2 Triggered before spellcast SPELL_LINKED_TYPE_TRIGGERED 3 Cast on cast, i.e. triggering SPELL_LINKED_TYPE_PROC 4 Cast on aura proc SPELL_LINKED_TYPE_REMOVEONCAST 5 Remove aura on cast SPELL_LINKED_TYPE_REMOVEONREMOVE 6 Remove aura on remove another aura SPELL_LINKED_TYPE_CASTONREMOVE 7 Cast on remove another aura effect_mask int(10) unsigned The link may be limited to any or all spelleffects. The mask values are 1, 2, 4 for EFFECT_0, EFFECT_1, EFFECT_2 respectively. The values may be combined by adding. comment varchar(255) Textual comment, ignored by the core. auto-generated by the getMaNGOS.eu MAGNET dbdocs module
  21. antz

    spell_pet_auras

     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 'spell_pet_auras' table for MaNGOSOne This table holds information for additional auras due to the pet. This mechanic implements character talents modifying the pet properties. If the character has aura/knows spell, then the pet get additional aura. Table Notes This table uses the 'MyISAM' DB Engine The Field definitions follow: Field Name Field Type Nullable Key Default Value Attributes Notes spell mediumint(8) unsigned NO PRI NULL   Spell ID [See Spell.dbc]. pet mediumint(8) unsigned NO PRI '0'   Creature ID [See creature_template.entry]. aura mediumint(8) unsigned NO NULL   Spell ID [See Spell.dbc]. Description of the fields spell mediumint(8) unsigned Spell ID [See Spell.dbc] of the triggering spell. One of its spelleffects should be either EFFECT_DUMMY or applying the aura AURA_DUMMY. pet mediumint(8) unsigned Pet creature ID, see creature_template.enrty. aura mediumint(8) unsigned Spell ID [See Spell.dbc] of the aura spell to be applied on the pet. auto-generated by the getMaNGOS.eu MAGNET dbdocs module
  22. antz

    spell_learn_spell

     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 'spell_learn_spell' table for MaNGOSOne This table holds information on spells that should be learned at the same time a player learns another spell. For example the few spells that are automatically learned when a player first learns a new profession. All fields in this table use spell IDs from Spell.dbc NOTE: Spells with spell effects SPELL_EFFECT_LEARN_SPELL should NOT be included in this table. Table Notes This table uses the 'MyISAM' DB Engine The Field definitions follow: Field Name Field Type Nullable Key Default Value Attributes Notes entry smallint(5) unsigned NO PRI '0'   Spell ID [See Spell.dbc]. SpellID smallint(5) unsigned NO PRI '0'   Spell ID [See Spell.dbc]. Active tinyint(3) unsigned NO '1'   Active flag. Description of the fields entry smallint(5) unsigned Spell ID [See Spell.dbc] of the triggering spell. SpellID smallint(5) unsigned Spell ID [See Spell.dbc] of the additional spell to learn. Active tinyint(3) unsigned The active flag. If set, the spell is enabled as active, i.e. allowed to be casted. Value Description 0 Will not appear in the spell book. 1 Will appear in the spell book. auto-generated by the getMaNGOS.eu MAGNET dbdocs module
  23. antz

    spell_elixir

     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 'spell_elixir' table for MaNGOSOne This table holds elixir information to be used to properly stack the elixirs. Table Notes This table uses the 'MyISAM' DB Engine The Field definitions follow: Field Name Field Type Nullable Key Default Value Attributes Notes entry int(11) unsigned NO PRI '0'   Spell ID [See Spell.dbc]. mask tinyint(1) unsigned NO '0'   Defines what type of potion/food spell this is. Description of the fields entry int(11) unsigned Spell ID [See Spell.dbc]. mask tinyint(1) unsigned Defines what type of potion/food spell this is. The following table lists the available values. Value Type 0 None 3 Flask 16 Food granting well fed buffs auto-generated by the getMaNGOS.eu MAGNET dbdocs module
  24. antz

    spell_chain

     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 'spell_chain' table for MaNGOSOne This table defines spell chains. A spell chain is a series of spells which all share the same name and all do the same thing; however, each has a different rank and as the rank increases, so does the spell damage/heal/etc values. This table also controls what spells are replaced by their more powerful later ranks; however, that is also decided by other factors as well (if mana costs for both spells are the same, etc). All fields in this table except rank are spell IDs from Spell.dbc. Table Notes This table uses the 'MyISAM' DB Engine The Field definitions follow: Field Name Field Type Nullable Key Default Value Attributes Notes spell_id mediumint(9) NO PRI '0'   Spell ID. prev_spell mediumint(9) NO '0'   Previous rank of the spell. first_spell mediumint(9) NO '0'   Lowest rank spell. rank tinyint(4) NO '0'   Rank. req_spell mediumint(9) NO '0'   Required spell ID. Description of the fields spell_id mediumint(9) Spell ID. prev_spell mediumint(9) Spell ID for the previous rank of the spell. first_spell mediumint(9) Spell ID for the lowest rank spell of the chain. rank tinyint(4) Spell rank, numbered from 1. req_spell mediumint(9) ID of the side spell to be known to allow the whole spell chain. This is for talent-enabled spells. auto-generated by the getMaNGOS.eu MAGNET dbdocs module
  25. antz

    spell_bonus_data

     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 'spell_bonus_data' table for MaNGOSOne Table used for storing custom damage/healing bonus coefficients. Table Notes This table uses the 'MyISAM' DB Engine The Field definitions follow: Field Name Field Type Nullable Key Default Value Attributes Notes entry smallint(5) unsigned NO PRI NULL   Spell ID [See Spell.dbc]. direct_bonus float NO '0'   Direct damage bonus. dot_bonus float NO '0'   DoT tick bonus coefficient. ap_bonus float NO '0'   Any value here will modify the spells attack power with the factor given here. ap_dot_bonus float NO '0'   DoT bonus for physical damage. comments varchar(255) YES {Blank String}   Textual comment. Description of the fields entry smallint(5) unsigned Spell ID [See Spell.dbc] of the spells which bonus are to be modified. direct_bonus float Direct damage spell bonus coefficient. dot_bonus float DoT tick bonus coefficient. ap_bonus float Any value here will modify the spells attack power with the factor given here. Used for the spells with physical damage, like most warrior/rogue ones. ap_dot_bonus float DoT bonus coefficient for the spells with physical damage type. comments varchar(255) Textual comment, ignored by the core. auto-generated by the getMaNGOS.eu MAGNET dbdocs module
  26. antz

    spell_area

     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 'spell_area' table for MaNGOSOne This table holds information on what spells are applied to npcs/players in some areas. Table Notes This table uses the 'MyISAM' DB Engine The Field definitions follow: Field Name Field Type Nullable Key Default Value Attributes Notes spell mediumint(8) unsigned NO PRI '0'   Spell ID [See Spell.dbc]. area mediumint(8) unsigned NO PRI '0'   Area ID [See AreaTable.dbc]. quest_start mediumint(8) unsigned NO PRI '0'   Quest ID [See quest_template.entry]. quest_start_active tinyint(1) unsigned NO PRI '0'   Flag for quest_start. quest_end mediumint(8) unsigned NO '0'   Quest ID [See quest_template.entry]. condition_id mediumint(8) unsigned NO '0'   Condition ID [See conditions.condition_entry]. aura_spell mediumint(8) NO PRI '0'   Spell ID [See Spell.dbc]. racemask mediumint(8) unsigned NO PRI '0'   Race mask value. gender tinyint(1) unsigned NO PRI '2'   The gender of characters to which the spell is applied. autocast tinyint(1) unsigned NO '0'   Autocast flag. Description of the fields spell mediumint(8) unsigned Spell ID, see Spell.dbc. The spell is either casted on the character or is allowed the character to cast. area mediumint(8) unsigned Area ID, see AreaTable.dbc. If equals to 0, is not limited to any zone. quest_start mediumint(8) unsigned Quest ID [See quest_template.entry] that should be either active or rewarded. quest_start_active tinyint(1) unsigned If set, this flag allows the quest mentioned in the quest_start field to be rewarded, not only be active. quest_end mediumint(8) unsigned Quest ID [See quest_template.entry] of the quest that should not be rewarded. condition_id mediumint(8) unsigned Condition ID [See conditions.condition_entry] of teh condition which should be fulfilled. aura_spell mediumint(8) Spell ID [See Spell.dbc] of the aura spell which the character should already have applied (if positive) or do not have (if negative). racemask mediumint(8) unsigned Race mask value. The entries may be combined by simple adding. Race Mask Value (hex) Mask Value (dec) Human 0x1 1 Orc 0x2 2 Dwarf 0x4 4 Night Elf 0x8 8 Undead 0x10 16 Tauren 0x20 32 Gnome 0x40 64 Troll 0x80 128 Goblin 0x100 256 gender tinyint(1) unsigned The gender of characters to which the spell is applied. The following table list available values. Gender of the creature Value Gender 0 Male 1 Female 2 Both autocast tinyint(1) unsigned If set, this flag requires the spell to be catsed on the character just entered the area. In other case, the spell is enabled for the character to be casted. auto-generated by the getMaNGOS.eu MAGNET dbdocs module
  1. Load more activity

Contact Us

To contact us click here
You can also email us at [email protected]

Privacy Policy | Terms & Conditions

Repositories

The Link to the master list
of MaNGOS repositories:
Copyright © getMaNGOS. All rights Reserved.

This website is in no way associated with or endorsed by Blizzard Entertainment®
×