mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 13:37:05 +00:00
[9128] Updated doc/EventAI.txt version.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
parent
6311b73413
commit
5febd55024
2 changed files with 150 additions and 135 deletions
283
doc/EventAI.txt
283
doc/EventAI.txt
|
|
@ -1,47 +1,48 @@
|
|||
=============================================
|
||||
EventAI documentation: (updated May 19, 2009)
|
||||
=============================================
|
||||
======================================================
|
||||
EventAI Documentation: (Last Updated: January 8, 2010)
|
||||
======================================================
|
||||
|
||||
EventAI allows users to create new creature scripts entierly within the database.
|
||||
EventAI allows users to create new creature scripts entirely within the database.
|
||||
|
||||
For the AI to be used, you must first make sure to set AIname for each creature that should use this AI.
|
||||
UPDATE creature_template SET AIName = 'EventAI' WHERE entry IN (...);
|
||||
|
||||
|
||||
=========================================
|
||||
Basic structure of EventAI
|
||||
Basic Structure of EventAI
|
||||
=========================================
|
||||
|
||||
EventAI follows a basic if (Event) then do (Action) format.
|
||||
EventAI follows a basic IF (Event) then DO (Action) format.
|
||||
Below is the list of current fields of the creature_ai_scripts table.
|
||||
|
||||
(Field_Name) (Description)
|
||||
id This value is merely an incrementing counter of the current Event number. Required for sql queries.
|
||||
creature_id Creature id which should trigger this event.
|
||||
Field_Name Description
|
||||
-------------------------------------------
|
||||
id This value is merely an incrementing counter of the current Event number. Required for sql queries.
|
||||
creature_id Creature ID which should trigger this event (This is from Creature_Template Table).
|
||||
|
||||
event_type The type of event (see "Event types" below)
|
||||
event_inverse_phase_mask Mask with phases this event should NOT trigger in*
|
||||
event_chance Percentage chance of triggering the event (1 - 100)
|
||||
event_flags Event flags (repeatable, ... (see below))
|
||||
event_param1 Variables for the event (depends on event_type)
|
||||
event_param2
|
||||
event_param3
|
||||
event_param4
|
||||
event_type The type of event (see "Event types" below)
|
||||
event_inverse_phase_mask Mask with phases this event should NOT trigger in*
|
||||
event_chance Percentage chance of triggering the event (1 - 100)
|
||||
event_flags Event flags (repeatable, ... (see below))
|
||||
event_param1 Variables for the event (depends on event_type)
|
||||
event_param2 Variables for the event (depends on event_type)
|
||||
event_param3 Variables for the event (depends on event_type)
|
||||
event_param4 Variables for the event (depends on event_type)
|
||||
|
||||
action1_type An action to take when the event occurs (see "Action types" below)
|
||||
action1_param1 Variables used by Action1 (depends on action_type)
|
||||
action1_param2
|
||||
action1_param3
|
||||
action1_type Action #1 to take when the Event occurs (see "Action types" below)
|
||||
action1_param1 Variables used by Action1 (depends on action_type)
|
||||
action1_param2 Variables used by Action1 (depends on action_type)
|
||||
action1_param3 Variables used by Action1 (depends on action_type)
|
||||
|
||||
action2_type
|
||||
action2_param1
|
||||
action2_param2
|
||||
action2_param3
|
||||
action2_type Action #2 to take when the Event occurs (see "Action types" below)
|
||||
action2_param1 Variables used by Action1 (depends on action_type)
|
||||
action2_param2 Variables used by Action1 (depends on action_type)
|
||||
action2_param3 Variables used by Action1 (depends on action_type)
|
||||
|
||||
action3_type
|
||||
action3_param1
|
||||
action3_param2
|
||||
action3_param3
|
||||
action3_type Action #3 to take when the Event occurs (see "Action types" below)
|
||||
action3_param1 Variables used by Action1 (depends on action_type)
|
||||
action3_param2 Variables used by Action1 (depends on action_type)
|
||||
action3_param3 Variables used by Action1 (depends on action_type)
|
||||
|
||||
All params are signed 32-bit values (+/- 2147483647). Time values are always in milliseconds.
|
||||
In case of a percentage value, use value/100 (ie. param = 500 then that means 500%, -50 = -50%)
|
||||
|
|
@ -50,7 +51,7 @@ In case of a percentage value, use value/100 (ie. param = 500 then that means 50
|
|||
|
||||
|
||||
=========================================
|
||||
Event types
|
||||
Event Types
|
||||
=========================================
|
||||
|
||||
A list of event types EventAI is able to handle.
|
||||
|
|
@ -60,17 +61,17 @@ Events will not repeat until the creature exits combat or unless EFLAG_REPEATABL
|
|||
Some events such as EVENT_T_AGGRO, EVENT_T_DEATH, EVENT_T_SPAWNED, and EVENT_T_EVADE cannot repeat.
|
||||
|
||||
# Internal name Param usage Description
|
||||
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
0 EVENT_T_TIMER InitialMin, InitialMax, RepeatMin, RepeatMax Expires at first between (Param1) and (Param2) and then between every (Param3) and (Param4), but only in combat.
|
||||
1 EVENT_T_TIMER_OOC InitialMin, InitialMax, RepeatMin, RepeatMax Expires at first between (Param1) and (Param2) and then between every (Param3) and (Param4), but only out of combat.
|
||||
2 EVENT_T_HP HPMax%, HPMin%, RepeatMin, RepeatMax Expires when HP is between (Param1) and (Param2). Will repeat every (Param3) and (Param4).
|
||||
3 EVENT_T_MANA ManaMax%,ManaMin% RepeatMin, RepeatMax Expires once Mana% is between (Param1) and (Param2). Will repeat every (Param3) and (Param4).
|
||||
4 EVENT_T_AGGRO NONE Expires upon initial aggro (does not repeat).
|
||||
5 EVENT_T_KILL RepeatMin, RepeatMax Expires upon killing a player. Will repeat between (Param1) and (Param2).
|
||||
6 EVENT_T_DEATH NONE Expires upon creature death.
|
||||
7 EVENT_T_EVADE NONE Expires upon creature EnterEvadeMode().
|
||||
8 EVENT_T_SPELLHIT SpellID, Schoolmask, RepeatMin, RepeatMax Expires upon a spell hit. When (param1) is set, it will be used as a trigger. With (param2) specified, the expiration is limited to specific spell schools (-1 for all). Will repeat every (Param3) and (Param4).
|
||||
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 every (Param3) and (Param4).
|
||||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
0 EVENT_T_TIMER 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.
|
||||
2 EVENT_T_HP HPMax%, HPMin%, RepeatMin, RepeatMax Expires when the Creature's HP is between (Param1) and (Param2). Will repeat between every (Param3) and (Param4).
|
||||
3 EVENT_T_MANA ManaMax%,ManaMin% RepeatMin, RepeatMax Expires once the Creature's Mana% is between (Param1) and (Param2). Will repeat between every (Param3) and (Param4).
|
||||
4 EVENT_T_AGGRO NONE Expires ONLY upon the Creature's INITIAL Aggro at the Start of Combat (Does NOT Repeat).
|
||||
5 EVENT_T_KILL RepeatMin, RepeatMax Expires upon Killing a Player. Will repeat between (Param1) and (Param2).
|
||||
6 EVENT_T_DEATH NONE Expires upon the Creature's Death. (This Triggers At The Moment The Creature Dies)
|
||||
7 EVENT_T_EVADE NONE Expires at the moment the Creature EnterEvadeMode().
|
||||
8 EVENT_T_SPELLHIT SpellID, Schoolmask, RepeatMin, RepeatMax Expires upon a Spell Hit on the Creature. 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). Will repeat 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).
|
||||
10 EVENT_T_OOC_LOS Hostile-or-Not, MaxAllowedRange, RepeatMin, RepeatMax Expires when a unit moves within distance (MaxAllowedRange) of a creature. If (Param1) is zero it will expire only when unit is hostile, friendly otherwise (Param1 = 1), depends generally on faction. Will repeat every (Param3) and (Param4). Does not expire when the creature is in combat.
|
||||
11 EVENT_T_SPAWNED NONE Expires on initial spawn and on creature respawn (useful for setting ranged movement type).
|
||||
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).
|
||||
|
|
@ -79,8 +80,8 @@ Some events such as EVENT_T_AGGRO, EVENT_T_DEATH, EVENT_T_SPAWNED, and EVENT_T_E
|
|||
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_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).
|
||||
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
|
||||
21 EVENT_T_REACHED_HOME NONE Expires when a creature reach it's home(spawn) location after evade.
|
||||
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).
|
||||
21 EVENT_T_REACHED_HOME NONE Expires when a creature reaches it's home (spawn) location after evade.
|
||||
22 EVENT_T_RECEIVE_EMOTE EmoteId, Condition, CondValue1, CondValue2 Expires when a creature receives an emote with emote text id (enum TextEmotes) in (Param1). Conditions can be defined (Param2) with optional values (Param3,Param4), see enum ConditionType.
|
||||
23 EVENT_T_BUFFED SpellID, AmmountInStack, RepeatMin, RepeatMax 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).
|
||||
24 EVENT_T_TARGET_BUFFED SpellID, AmmountInStack, RepeatMin, RepeatMax 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).
|
||||
|
|
@ -92,52 +93,53 @@ Action Types
|
|||
|
||||
A list of action types that EventAI can handle.
|
||||
Each event type has its own specific interpretation of it's params, like every event type.
|
||||
For all ACTION_T_RANDOM, When a Particular Param is selected for the Event... The SAME Param # is selected for all 3 actions.
|
||||
|
||||
# Internal name Param usage Description
|
||||
# Internal name Param usage Description
|
||||
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
0 ACTION_T_NONE No Action Does nothing.
|
||||
1 ACTION_T_TEXT -TextId1, -TextId2, -TextId3 Simply displays the specified -TextId. When -TextId2 and -TextId3 are specified, the selection will be randomized. Text types are defined, along with other options for the text, in a table below. All values needs to be negative.
|
||||
2 ACTION_T_SET_FACTION FactionId Changes faction for a creature. When param1 is zero, creature will revert to it's default faction.
|
||||
3 ACTION_T_MORPH_TO_ENTRY_OR_MODEL CreatureEntry, ModelId Set either model from creature_template.entry (Param1) OR explicit modelId (Param2). If (Param1) AND (Param2) are both 0, demorph and revert to the default model.
|
||||
4 ACTION_T_SOUND SoundId Plays a sound
|
||||
5 ACTION_T_EMOTE EmoteId Does an emote
|
||||
6 ACTION_T_RANDOM_SAY UNUSED
|
||||
7 ACTION_T_RANDOM_YELL UNUSED
|
||||
8 ACTION_T_RANDOM_TEXTEMOTE UNUSED
|
||||
9 ACTION_T_RANDOM_SOUND SoundId1, SoundId2, SoundId3 Plays a random sound *
|
||||
10 ACTION_T_RANDOM_EMOTE EmoteId1, EmoteId2, EmoteId3 Emotes a random emote
|
||||
11 ACTION_T_CAST SpellId, Target, CastFlags Casts spell (Param1) on a target (Param2) using cast flags (specified below).
|
||||
12 ACTION_T_SUMMON CreatureID, Target, Duration Summons a creature (Param1) for (Param3) duration and orders it to attach (Param2) target. Spawns on top of current creature.
|
||||
13 ACTION_T_THREAT_SINGLE_PCT Threat%, Target Modifies a threat by (Param1) percent on a target (Param2).
|
||||
14 ACTION_T_THREAT_ALL_PCT Threat% Modifies a threat by (Param1) on all targets in the threat list (using -100% here will result in full aggro dump).
|
||||
15 ACTION_T_QUEST_EVENT QuestID, Target Calls AreaExploredOrEventHappens with (Param1) for a target in (Param2).
|
||||
16 ACTION_T_QUEST_CASTCREATUREGO CreatureID, SpellId, Target Sends CastCreatureOrGo for a creature specified by CreatureId (Param1) with provided spell id (Param2) for a target in (Param3).
|
||||
17 ACTION_T_SET_UNIT_FIELD Field_Number, Value, Target Sets a unit field (Param1) to provided value (Param2) on a target in (Param3).
|
||||
18 ACTION_T_SET_UNIT_FLAG Flags, Target Sets flag (flags can be used together to modify multiple flags at once) on a target (Param2).
|
||||
19 ACTION_T_REMOVE_UNIT_FLAG Flags, Target Removes flag on a target (Param2).
|
||||
20 ACTION_T_AUTO_ATTACK AllowAutoAttack Stop melee attack when (Param1) is zero, otherwise continue attacking / allow melee attack.
|
||||
21 ACTION_T_COMBAT_MOVEMENT AllowCombatMovement Stop combat based movement when (Param1) is zero, otherwise continue/allow combat based movement (targeted movement generator).
|
||||
22 ACTION_T_SET_PHASE Phase Sets the current phase to (Param1).
|
||||
23 ACTION_T_INC_PHASE Value Increments the phase by (Param1). May be negative to decrement, but should not be zero.
|
||||
24 ACTION_T_EVADE No Params Forces the creature to evade, wiping all threat and dropping combat.
|
||||
25 ACTION_T_FLEE_FOR_ASSIST No Params Causes the creature to flee for assistence (often at low health).
|
||||
26 ACTION_T_QUEST_EVENT_ALL QuestId Calls GroupEventHappens with (Param1). Only used if it's _expected_ event should call quest completion for all players in a current party.
|
||||
27 ACTION_T_CASTCREATUREGO_ALL QuestId, SpellId Calls CastedCreatureOrGo for all players on the threat list with quest id specified in (Param1) and spell id in (Param2).
|
||||
28 ACTION_T_REMOVEAURASFROMSPELL Target, Spellid Removes all auras on a target (Param1) caused by a spell (Param2).
|
||||
29 ACTION_T_RANGED_MOVEMENT Distance, Angle Changes the movement generator to a ranged type. (note: default melee type can still be set by using 0 as angle and 0 as distance).
|
||||
30 ACTION_T_RANDOM_PHASE PhaseId1, PhaseId2, PhaseId3 Sets a phase to a specified id(s)*
|
||||
31 ACTION_T_RANDOM_PHASE_RANGE PhaseMin, PhaseMax Sets a phase to a random id (Phase = PhaseMin + rnd % PhaseMin-PhaseMax). PhaseMax must be greater than PhaseMin.
|
||||
32 ACTION_T_SUMMON CreatureID, Target, SummonID Summons a creature (Param1) to attack target (Param2) at location specified by EventAI_Summons (Param3).
|
||||
33 ACTION_T_KILLED_MONSTER CreatureID, Target Calls KilledMonster (Param1) for a target (Param2).
|
||||
34 ACTION_T_SET_INST_DATA Field, Data Calls ScriptedInstance::SetData with field (Param1) and data (Param2).
|
||||
35 ACTION_T_SET_INST_DATA64 Field, Target Calls ScriptedInstance::SetData64 with field (Param1) and target's GUID (Param2).
|
||||
36 ACTION_T_UPDATE_TEMPLATE TemplateId, Team Changes a creature's template to (Param1) with team = Alliance or Horde when (Param2) is either false or true respectively.
|
||||
37 ACTION_T_DIE No Params Kills the creature
|
||||
38 ACTION_T_ZONE_COMBAT_PULSE No Params Puts all players within an instance into combat with the creature. Only works when a creature is already in combat. Doesn't work outside instances.
|
||||
39 ACTION_T_CALL_FOR_HELP Radius Call any friendly out-of-combat creatures in a radius (Param1) to attack current creature's target.
|
||||
40 ACTION_T_SET_SHEATH Sheath Sets sheath state for a creature (0 = no weapon, 1 = melee weapon, 2 = ranged weapon).
|
||||
41 ACTION_T_FORCE_DESPAWN Delay Despawns the creature, if delay = 0 immediate otherwise after delay (in ms).
|
||||
42 ACTION_T_SET_INVINCIBILITY_HP_LEVEL hp_level, is_percent Set min. health level for creature that can be set at damage as flat value or percent from max health
|
||||
0 ACTION_T_NONE No Action Does nothing.
|
||||
1 ACTION_T_TEXT -TextId1, -TextId2, -TextId3 Simply displays the specified -TextId. When -TextId2 and -TextId3 are specified, the selection will be randomized. Text types are defined, along with other options for the text, in a table below. All values needs to be negative.
|
||||
2 ACTION_T_SET_FACTION FactionId Changes faction for a creature. When param1 is zero, creature will revert to it's default faction.
|
||||
3 ACTION_T_MORPH_TO_ENTRY_OR_MODEL CreatureEntry, ModelId Set either model from creature_template.entry (Param1) OR explicit modelId (Param2). If (Param1) AND (Param2) are both 0, demorph and revert to the default model.
|
||||
4 ACTION_T_SOUND SoundId Plays a sound
|
||||
5 ACTION_T_EMOTE EmoteId Does an emote
|
||||
6 ACTION_T_RANDOM_SAY UNUSED UNUSED
|
||||
7 ACTION_T_RANDOM_YELL UNUSED UNUSED
|
||||
8 ACTION_T_RANDOM_TEXTEMOTE UNUSED UNUSED
|
||||
9 ACTION_T_RANDOM_SOUND SoundId1, SoundId2, SoundId3 Plays a random sound *
|
||||
10 ACTION_T_RANDOM_EMOTE EmoteId1, EmoteId2, EmoteId3 Emotes a random emote *
|
||||
11 ACTION_T_CAST SpellId, Target, CastFlags Casts spell (Param1) on a target (Param2) using cast flags (specified below).
|
||||
12 ACTION_T_SUMMON CreatureID, Target, Duration Summons a creature (Param1) for (Param3) duration and orders it to attach (Param2) target. Spawns on top of current creature.
|
||||
13 ACTION_T_THREAT_SINGLE_PCT Threat%, Target Modifies a threat by (Param1) percent on a target (Param2).
|
||||
14 ACTION_T_THREAT_ALL_PCT Threat% Modifies a threat by (Param1) on all targets in the threat list (using -100% here will result in full aggro dump).
|
||||
15 ACTION_T_QUEST_EVENT QuestID, Target Calls AreaExploredOrEventHappens with (Param1) for a target in (Param2).
|
||||
16 ACTION_T_QUEST_CASTCREATUREGO CreatureID, SpellId, Target Sends CastCreatureOrGo for a creature specified by CreatureId (Param1) with provided spell id (Param2) for a target in (Param3).
|
||||
17 ACTION_T_SET_UNIT_FIELD Field_Number, Value, Target Sets a unit field (Param1) to provided value (Param2) on a target in (Param3).
|
||||
18 ACTION_T_SET_UNIT_FLAG Flags, Target Sets flag (flags can be used together to modify multiple flags at once) on a target (Param2).
|
||||
19 ACTION_T_REMOVE_UNIT_FLAG Flags, Target Removes flag on a target (Param2).
|
||||
20 ACTION_T_AUTO_ATTACK AllowAutoAttack Stop melee attack when (Param1) is zero, otherwise continue attacking / allow melee attack.
|
||||
21 ACTION_T_COMBAT_MOVEMENT AllowCombatMovement Stop combat based movement when (Param1) is zero, otherwise continue/allow combat based movement (targeted movement generator).
|
||||
22 ACTION_T_SET_PHASE Phase Sets the current phase to (Param1).
|
||||
23 ACTION_T_INC_PHASE Value Increments the phase by (Param1). May be negative to decrement, but should not be zero.
|
||||
24 ACTION_T_EVADE No Params Forces the creature to evade, wiping all threat and dropping combat.
|
||||
25 ACTION_T_FLEE_FOR_ASSIST No Params Causes the creature to flee for assistence (often at low health).
|
||||
26 ACTION_T_QUEST_EVENT_ALL QuestId Calls GroupEventHappens with (Param1). Only used if it's _expected_ event should call quest completion for all players in a current party.
|
||||
27 ACTION_T_CASTCREATUREGO_ALL QuestId, SpellId Calls CastedCreatureOrGo for all players on the threat list with quest id specified in (Param1) and spell id in (Param2).
|
||||
28 ACTION_T_REMOVEAURASFROMSPELL Target, Spellid Removes all auras on a target (Param1) caused by a spell (Param2).
|
||||
29 ACTION_T_RANGED_MOVEMENT Distance, Angle Changes the movement generator to a ranged type. (note: default melee type can still be set by using 0 as angle and 0 as distance).
|
||||
30 ACTION_T_RANDOM_PHASE PhaseId1, PhaseId2, PhaseId3 Sets a phase to a specified id(s)*
|
||||
31 ACTION_T_RANDOM_PHASE_RANGE PhaseMin, PhaseMax Sets a phase to a random id (Phase = PhaseMin + rnd % PhaseMin-PhaseMax). PhaseMax must be greater than PhaseMin.
|
||||
32 ACTION_T_SUMMON CreatureID, Target, SummonID Summons a creature (Param1) to attack target (Param2) at location specified by EventAI_Summons (Param3).
|
||||
33 ACTION_T_KILLED_MONSTER CreatureID, Target Calls KilledMonster (Param1) for a target (Param2).
|
||||
34 ACTION_T_SET_INST_DATA Field, Data Calls ScriptedInstance::SetData with field (Param1) and data (Param2).
|
||||
35 ACTION_T_SET_INST_DATA64 Field, Target Calls ScriptedInstance::SetData64 with field (Param1) and target's GUID (Param2).
|
||||
36 ACTION_T_UPDATE_TEMPLATE TemplateId, Team Changes a creature's template to (Param1) with team = Alliance or Horde when (Param2) is either false or true respectively.
|
||||
37 ACTION_T_DIE No Params Kills the creature
|
||||
38 ACTION_T_ZONE_COMBAT_PULSE No Params Puts all players within an instance into combat with the creature. Only works when a creature is already in combat. Doesn't work outside instances.
|
||||
39 ACTION_T_CALL_FOR_HELP Radius Call any friendly out-of-combat creatures in a radius (Param1) to attack current creature's target.
|
||||
40 ACTION_T_SET_SHEATH Sheath Sets sheath state for a creature (0 = no weapon, 1 = melee weapon, 2 = ranged weapon).
|
||||
41 ACTION_T_FORCE_DESPAWN Delay Despawns the creature, if delay = 0 immediate otherwise will despawn after delay time set in Param1 (in ms).
|
||||
42 ACTION_T_SET_INVINCIBILITY_HP_LEVEL HP_Level, HP_Percent Set min. health level for creature that can be set at damage as flat value or percent from max health
|
||||
|
||||
* = Use -1 where the param is expected to do nothing. Random constant is generated for each event, so if you have a random yell and a random sound, they will be linked up with each other (ie. param2 with param2).
|
||||
|
||||
|
|
@ -233,15 +235,16 @@ Parameter 4: RepeatMax - Maximum Time used to calculate Random Repeat Expire
|
|||
BOTH - Expires upon Spell hit. If (param1) is set will only expire on that spell OR If (param2) is set it will only expire on spells of that school. Will repeat every (Param3) and (Param4).
|
||||
This Event is commonly used for NPC's who can do special things when you cast a spell (Or specific spell) on them.
|
||||
|
||||
(name, school, schoolmask)
|
||||
SPELL_SCHOOL_NORMAL = 0, ==> 1
|
||||
SPELL_SCHOOL_HOLY = 1, ==> 2
|
||||
SPELL_SCHOOL_FIRE = 2, ==> 4
|
||||
SPELL_SCHOOL_NATURE = 3, ==> 8
|
||||
SPELL_SCHOOL_FROST = 4, ==> 16
|
||||
SPELL_SCHOOL_SHADOW = 5, ==> 32
|
||||
SPELL_SCHOOL_ARCANE = 6, ==> 64
|
||||
Use These Values For Schoolmask (Param2) or Any Combinations Of These Schoolmasks for Multiple Schools.
|
||||
(Name ==> School ==> School Bitmask Values)
|
||||
-------------------------------------------
|
||||
SPELL_SCHOOL_NORMAL = 0 ==> 1
|
||||
SPELL_SCHOOL_HOLY = 1 ==> 2
|
||||
SPELL_SCHOOL_FIRE = 2 ==> 4
|
||||
SPELL_SCHOOL_NATURE = 3 ==> 8
|
||||
SPELL_SCHOOL_FROST = 4 ==> 16
|
||||
SPELL_SCHOOL_SHADOW = 5 ==> 32
|
||||
SPELL_SCHOOL_ARCANE = 6 ==> 64
|
||||
Use These Bitmask Values For Schoolmask (Param2) or Any Combinations Of These Schoolmasks for Multiple Schools.
|
||||
|
||||
------------------
|
||||
9 = EVENT_T_RANGE:
|
||||
|
|
@ -382,9 +385,9 @@ CONDITION_ACTIVE_EVENT (12) event_id 0, note this is id from dbc, also def
|
|||
Action Types
|
||||
=========================================
|
||||
|
||||
-----------------
|
||||
------------------
|
||||
1 = ACTION_T_TEXT:
|
||||
-----------------
|
||||
------------------
|
||||
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).
|
||||
Entry 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).
|
||||
|
|
@ -511,7 +514,7 @@ This is commonly used for Quests where only ONE player will gain credit for the
|
|||
16 = ACTION_T_CASTCREATUREGO:
|
||||
-----------------------------
|
||||
Parameter 1: CreatureID - The Creature Template ID to be Summoned. The value here needs to be a valid Creature Template ID.
|
||||
Parameter 2: SpellId - The Spell ID to use to simulate the cast. The value used in this field needs to be a valid Spell ID.
|
||||
Parameter 2: SpellID - The Spell ID to use to simulate the cast. The value used in this field needs to be a valid Spell ID.
|
||||
Parameter 3: Target - 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.
|
||||
|
||||
This action will call CastedCreatureOrGO() function for the player. It can be used to give quest credit for casting a spell on the creature.
|
||||
|
|
@ -548,7 +551,7 @@ When activated, this action changes the target's flags by removing (turning off)
|
|||
Parameter 1: AllowAutoAttack - 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.
|
||||
|
||||
This action controls whether or not the creature should stop or start the auto melee attack.
|
||||
NOTE: The ACID Dev Team has conformed to using either 0 or 1 for the Param values (0 = Stop Melee, 1 = Start Melee).
|
||||
NOTE: Developers have recommended using either 0 or 1 for the Param values (0 = Stop Melee, 1 = Start Melee).
|
||||
This is commonly used in combination with EVENT_T_RANGE and ACTION_T_COMBAT_MOVEMENT for Ranged Combat for Mages and Spell Casters.
|
||||
|
||||
------------------------------
|
||||
|
|
@ -558,7 +561,7 @@ Parameter 1: If zero, then the creature will stop moving towards its victim (if
|
|||
Parameter 2: If non-zero, then stop melee combat state (if param1=0) or start melee combat state (if param1!=0) and creature in combat with selected target.
|
||||
|
||||
This action controls whether or not the creature will always move towards its target.
|
||||
NOTE: The ACID Dev Team has conformed to using either 0 or 1 for the Param values. (0 = Stop Movement, 1 = Start Movement)
|
||||
NOTE: Developers have recommended using either 0 or 1 for the Param values. (0 = Stop Movement, 1 = Start Movement)
|
||||
This is commonly used with EVENT_T_RANGE and ACTION_T_AUTO_ATTACK for NPC's who engage in Ranged Comabt (Either Spells or Ranged Attacks)
|
||||
Parameter 2 specialy used for ranged combat proper client side visual show ranged weapon in proper state.
|
||||
|
||||
|
|
@ -588,10 +591,9 @@ When activated, the creature will immediately exit out of combat, clear its thre
|
|||
NOTE: All Param Values Are 0 for this Action.
|
||||
|
||||
-------------------
|
||||
25 = ACTION_T_FLEE:
|
||||
25 = ACTION_T_FLEE_FOR_ASSIST:
|
||||
-------------------
|
||||
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".
|
||||
A Better Flee system is in Development.
|
||||
When activated, the creature will flee from combat for assistance from nearby NPC's if possible.
|
||||
NOTE: All Param Values Are 0 for this Action.
|
||||
|
||||
------------------------------
|
||||
|
|
@ -683,6 +685,16 @@ Parameter 2: Data - The value to put at that field index.
|
|||
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.
|
||||
This is commonly used to link an EventAI script with a existing Script Library C++ Script. You make make things happen like opening doors on specific events that happen.
|
||||
|
||||
Field Values:
|
||||
These are located in there SD2 Instance File (Example: blackrock_depths.h) And Are Clearly Defined For Specific Events Scripted In The Instance.
|
||||
|
||||
Data Values:
|
||||
NOT_STARTED = 0
|
||||
IN_PROGRESS = 1
|
||||
FAIL = 2
|
||||
DONE = 3
|
||||
SPECIAL = 4
|
||||
|
||||
------------------------------
|
||||
35 = ACTION_T_SET_INST_DATA64:
|
||||
------------------------------
|
||||
|
|
@ -723,28 +735,28 @@ Mostly used when call to help more wide that normal aggro radius or auto-used ca
|
|||
-------------------------
|
||||
40 ACTION_T_SET_SHEATH:
|
||||
-------------------------
|
||||
Parameter 1: Sheath state
|
||||
0 SHEATH_STATE_UNARMED not prepared weapon show (not used mostly by creatures)
|
||||
1 SHEATH_STATE_MELEE melee weapon prepared show
|
||||
2 SHEATH_STATE_RANGED ranged weapon prepared show
|
||||
Parameter 1: Set Sheath State
|
||||
0 = SHEATH_STATE_UNARMED Set No Weapon Displayed (Not Usually Used By Creatures)
|
||||
1 = SHEATH_STATE_MELEE Set Melee Weapon Displayed
|
||||
2 = SHEATH_STATE_RANGED Set Ranged Weapon Displayed
|
||||
|
||||
Let set sheath state for creature.
|
||||
Set Sheath State For NPC.
|
||||
Note: SHEATH_STATE_RANGED case work in combat state only if combat not start as melee commands.
|
||||
This possible setup by set ar event AI start (single used EVENT_T_TIMER_OOC set ACTION_T_COMBAT_MOVEMENT 0 for creature that prefered ranged attack)
|
||||
This possible setup by set at event AI start (single used EVENT_T_TIMER_OOC or set ACTION_T_COMBAT_MOVEMENT 0 for creature that prefered ranged attack)
|
||||
|
||||
-------------------------
|
||||
41 ACTION_T_FORCE_DESPAWN
|
||||
-------------------------
|
||||
Despawns the creature (in or out of combat)
|
||||
No parameters
|
||||
----------------------------
|
||||
41 ACTION_T_FORCE_DESPAWN:
|
||||
----------------------------
|
||||
Despawns The NPC with optional delay time (Works In or Out of Combat)
|
||||
Parameter 1: Delay - Sets delay time until Despawn occurs after triggering the action. Time is in (ms).
|
||||
|
||||
-------------------------
|
||||
42 ACTION_T_SET_INVINCIBILITY_HP_LEVEL
|
||||
-------------------------
|
||||
Parameter 1: min. health level for creature that can be set at damage, 0 used as absent min. health value for apply damage.
|
||||
Parameter 2: format of paramater 1 value
|
||||
0 paramater 1 used as flat value
|
||||
1 paramater 1 used as percent (0..100) from creature max health
|
||||
-----------------------------------------
|
||||
42 ACTION_T_SET_INVINCIBILITY_HP_LEVEL:
|
||||
-----------------------------------------
|
||||
Parameter 1: Minimum Health Level That NPC Can Reach (NPC Will Not Go Below This Value).
|
||||
Parameter 2: Sets Format of Paramater 1 Value
|
||||
0 = Sets Paramater 1 as an exact HP value
|
||||
1 = Sets Paramater 1 as a HP Percent (0..100) of the creature's max health
|
||||
|
||||
=========================================
|
||||
Target Types
|
||||
|
|
@ -752,14 +764,15 @@ Target Types
|
|||
Below is the list of current Target types that EventAI can handle.
|
||||
Target types are used by certain actions and may effect actions differently
|
||||
|
||||
(# Internal Name Discription)
|
||||
0 TARGET_T_SELF Self cast
|
||||
1 TARGET_T_HOSTILE Our current target (ie: highest aggro)
|
||||
2 TARGET_T_HOSTILE_SECOND_AGGRO Second highest aggro (generaly used for cleaves and some special attacks)
|
||||
3 TARGET_T_HOSTILE_LAST_AGGRO Dead last on aggro (no idea what this could be used for)
|
||||
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 threat
|
||||
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)
|
||||
# Internal Name Description
|
||||
---------------------------------------------------
|
||||
0 TARGET_T_SELF Self Cast
|
||||
1 TARGET_T_HOSTILE Current Target (ie: Highest Aggro)
|
||||
2 TARGET_T_HOSTILE_SECOND_AGGRO Second Highest Aggro (Generaly used for Cleaves and some special attacks)
|
||||
3 TARGET_T_HOSTILE_LAST_AGGRO Dead Last on Aggro (no idea what this could be used for)
|
||||
4 TARGET_T_HOSTILE_RANDOM Random Target on The Threat List
|
||||
5 TARGET_T_HOSTILE_RANDOM_NOT_TOP Any Random Target Except Top Threat
|
||||
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)
|
||||
|
||||
=========================================
|
||||
Cast Flags
|
||||
|
|
@ -769,7 +782,8 @@ Cast flags are handled bitwise. Bit 0 is Interrupt Previous, bit 1 is triggered,
|
|||
So for example the number "3" (11 in Binary, selecting first 2 options) would mean that this cast has both CAST_INTURRUPT_PREVIOUS and CAST_TRIGGERED.
|
||||
Another example: the number "5" (101 in Binary, selecting first and third options) would mean that this cast has CAST_INTURRUPT_PREVIOUS and CAST_FORCE_CAST.
|
||||
|
||||
(bit# Decimal Internal Name Discription)
|
||||
# Decimal Internal Name Description
|
||||
--------------------------------------------------------------
|
||||
0 1 CAST_INTURRUPT_PREVIOUS Interrupts any previous spell casting (basicaly makes sure that this spell goes off)
|
||||
1 2 CAST_TRIGGERED Forces the spell to be instant cast and require no mana/reagents.
|
||||
2 4 CAST_FORCE_CAST Forces spell to cast even if the target is possibly out of range or the creature is possibly out of mana
|
||||
|
|
@ -785,7 +799,8 @@ Event Flags
|
|||
=========================================
|
||||
Below is the list of current Event Flags that EventAI can handle. Event flags are handled bitwise.
|
||||
|
||||
(bit# Decimal Internal Name Discription)
|
||||
# Decimal Internal Name Description
|
||||
------------------------------------------------------------
|
||||
0 1 EFLAG_REPEATABLE Event repeats (Does not repeat if this flag is not set)
|
||||
1 2 EFLAG_DIFFICULTY_0 Event occurs in instance difficulty 0 (will not occur if not set)
|
||||
2 4 EFLAG_DIFFICULTY_1 Event occurs in instance difficulty 1 (will not occur if not set)
|
||||
|
|
@ -818,7 +833,7 @@ content_loc7 This is the actual text presented in the Localization #7 C
|
|||
content_loc8 This is the actual text presented in the Localization #8 Clients (Russian)
|
||||
|
||||
sound This value is the Sound ID that corresponds to the actual text used.
|
||||
type Variables used to define type of text (Say/Yell/Textemote/Whisper).
|
||||
type Variables used to define type of text (Say/Yell/TextEmote/Whisper).
|
||||
language This value is the Language that the text is native in.
|
||||
emote Value from enum Emote. Only source of text will play this emote (not target, if target are defined in DoScriptText)
|
||||
comment This is a comment regarding the text entry
|
||||
|
|
@ -828,7 +843,7 @@ Note: Fields `content_loc1` to `content_loc8` are NULL values by default and are
|
|||
=========================================
|
||||
Text Types (type)
|
||||
=========================================
|
||||
Below is the list of current Text types that texts tables can handle. These were previously seperate Actions in ACID.
|
||||
Below is the list of current Text types that texts tables can handle. These were previously seperate Actions before.
|
||||
|
||||
# Internal Name Description
|
||||
-----------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "9127"
|
||||
#define REVISION_NR "9128"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue