Jump to content

WIKI Activity

Showing articles posted in for the last 365 days.

This stream auto-updates     

  1. Earlier
  2. Ariador

    Installing Mangos on Windows (using EasyBuild)

    For ServerTwo there is currently a problem with creating databases (step 22). The dbTwo\Tools directory appeared to contain outdated mysql.exe and mysqldump.exe. To proceed I had to replace these with actual files from my \MySQL\MySQL Server 8.0\bin
  3. antz

    creature_template

    @zeeb - Thanks for the feedback regarding the missing tables, they are there now
  4. antz

    creature_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 'creature_template' table for MaNGOSZero This table contains the description of creatures. Each spawned creature is an instance of a template present in this table, this means every creature MUST be defined 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 mediumint(8) unsigned NO PRI '0'   This is the Primary NPC Entry Number and is Also the Dungeon Normal Mode / Raid Name char(100) NO {Blank String}   The creature's name that will be displayed. SubName char(100) YES {Blank String}   An optional tag, which will be shown below the creature's name. MinLevel tinyint(3) unsigned NO '1'   The minimum level of the creature when it is spawned in-game. MaxLevel tinyint(3) unsigned NO '1'   The maximum level of the creature when it is spawned in-game. ModelId1 mediumint(8) unsigned NO '0'   A display model identifier for the creature_template. ModelId2 mediumint(8) unsigned NO '0'   An alternative display model identifier for the creature_template. ModelId3 mediumint(8) unsigned NO '0'     ModelId4 mediumint(8) unsigned NO '0'     FactionAlliance smallint(5) unsigned NO '0'   The Faction If The Creature Is On The Alliance Side [See FactionTemplate.dbc]. FactionHorde smallint(5) unsigned NO '0'   The Faction If The Creature Is On The Alliance Side [See FactionTemplate.dbc]. Scale float NO '1'   The scale/size of the creature. Normal => 1 (100%) Family tinyint(4) NO '0'   This Defines The Family That This Creature Belongs To. CreatureType tinyint(3) unsigned NO '0'   This Field Defines The Type Of Creature This NPC Is. InhabitType tinyint(3) unsigned NO '3'   This Field Controls Where The Creature Can Move Into, Chase And Attack. RegenerateStats tinyint(3) unsigned YES NULL   Controls if a creature template should regenerate it's Health/Mana. RacialLeader tinyint(3) unsigned NO '0'   Determines if a creature template is a racial leader. NpcFlags int(10) unsigned NO '0'   The flags of the creature. UnitFlags int(10) unsigned NO '0'   Allows the manual application of unit flags to creatures. DynamicFlags int(10) unsigned NO '0'   Dynamic flags are used to control the visual appearance of a creature template. ExtraFlags int(10) unsigned NO '0'   The extra flags allow to modify special behaviour for a creature_template. CreatureTypeFlags int(10) unsigned NO '0'   Type flags seem to control what actions a player can perform. SpeedWalk float NO '1'   Controls how fast the creature can move in walking mode. SpeedRun float NO '1.14286'   Controls how fast the creature can move in running mode. UnitClass tinyint(3) unsigned NO '0'   A creature's class. The following table describes the available classes. Rank tinyint(3) unsigned NO '0'   The border of a creature portrait. HealthMultiplier float NO '1'   Modifies the creature template's health by this factor. PowerMultiplier float NO '1'   The affects the creature's power. DamageMultiplier float NO '1'   This affects the amount of damage a creature can do. DamageVariance float NO '1'   This is used in damage calculations. ArmorMultiplier float NO '1'   Modify the creature template's armor by this factor. ExperienceMultiplier float NO '1'   This affects the amount of experience the creature will earn. MinLevelHealth int(10) unsigned NO '0'   The minimum health of the creature. MaxLevelHealth int(10) unsigned NO '0'   The maximum health of the creature. MinLevelMana int(10) unsigned NO '0'   The miminum mana of the creature if the creature has variable mana. MaxLevelMana int(10) unsigned NO '0'   The maximum mana of the creature. MinMeleeDmg float NO '0'   Minimum damage the creature deals in melee combat. MaxMeleeDmg float NO '0'   Maximum damage the creature deals in melee combat. MinRangedDmg float NO '0'   Minimum damage the creature deals in ranged combat. MaxRangedDmg float NO '0'   Maximum damage the creature deals in ranged combat. Armor mediumint(8) unsigned NO '0'   The total armor of the creature. MeleeAttackPower int(10) unsigned NO '0'   The attack power for the creature's melee attacks. RangedAttackPower smallint(5) unsigned NO '0'   The attack power for the creature's ranged attacks. MeleeBaseAttackTime int(10) unsigned NO '2000'   A creature's melee attack time in milliseconds. RangedBaseAttackTime int(10) unsigned NO '2000'   The delay between ranged attacks, in milliseconds. DamageSchool tinyint(4) NO '0'   A damage school for melee combat. MinLootGold mediumint(8) unsigned NO '0'   Minimum money the creature drops when killed, in copper. MaxLootGold mediumint(8) unsigned NO '0'   The money dropped by the creature in copper. LootId mediumint(8) unsigned NO '0'   This adds loot to the creature. PickpocketLootId mediumint(8) unsigned NO '0'   This adds pickpocket loot to the creature. SkinningLootId mediumint(8) unsigned NO '0'   This adds skinning loot to the creature. KillCredit1 int(11) unsigned NO '0'   If killing a creature should credit towards a different creature_template. KillCredit2 int(11) unsigned NO '0'   If killing a creature should credit towards a different creature_template. MechanicImmuneMask int(10) unsigned NO '0'   This mask can be used to make creatures immune to spell mechanics. SchoolImmuneMask int(10) unsigned NO '0'     ResistanceHoly smallint(5) NO '0'   The Holy resistance of the creature. ResistanceFire smallint(5) NO '0'   The Fire resistance of the creature. ResistanceNature smallint(5) NO '0'   The Nature resistance of the creature. ResistanceFrost smallint(5) NO '0'   The Frost resistance of the creature. ResistanceShadow smallint(5) NO '0'   The Shadow resistance of the creature. ResistanceArcane smallint(5) NO '0'   The Arcane resistance of the creature. PetSpellDataId mediumint(8) unsigned NO '0'   ID that displays what spells the pet has in the client. MovementType tinyint(3) unsigned NO '0'   The movement type defines what a creature spawn will behave like after spawning. TrainerType tinyint(4) NO '0'   This details what kind of trainer the creature is. TrainerSpell mediumint(8) unsigned NO '0'   This will restrict access to a profession trainer. TrainerClass tinyint(3) unsigned NO '0'   The value of this field will restrict access to class and/or pet trainers TrainerRace tinyint(3) unsigned NO '0'   This field allows to restrict a riding trainer to a specific race. TrainerTemplateId mediumint(8) unsigned NO '0'   This field adds a training spells to a creature template. VendorTemplateId mediumint(8) unsigned NO '0'   This field adds a vendor items to a creature template. GossipMenuId mediumint(8) unsigned NO '0'   This field is used for adding gossip to the creature. EquipmentTemplateId mediumint(8) unsigned NO '0'   The field adds equipment to a creature. Civilian tinyint(3) unsigned NO '0'   Marks a creature template as a civilian. AIName char(64) YES {Blank String}   This string determines which built-in AI script will be used. Description of the fields Entry mediumint(8) unsigned This is the Primary NPC Entry Number and is Also the Dungeon Normal Mode / Raid 10-Man Normal Mode Entry. Name char(100) The creature's name that will be displayed. SubName char(100) An optional tag, which will be shown below the creature's name. MinLevel tinyint(3) unsigned The minimum level of the creature when it is spawned in-game. MaxLevel tinyint(3) unsigned The maximum level of the creature when it is spawned in-game. Must be higher than minlevel! ModelId1 mediumint(8) unsigned A display model identifier for the creature_template. This references the unique ID in table "creature_model_info" [See creature_model_info] for which this entry is valid. ModelId2 mediumint(8) unsigned A display model identifier for the creature_template. This references the unique ID in table "creature_model_info" [See creature_model_info] for which this entry is valid. ModelId3 mediumint(8) unsigned A display model identifier for the creature_template. This references the unique ID in table "creature_model_info" [See creature_model_info] for which this entry is valid. ModelId4 mediumint(8) unsigned A display model identifier for the creature_template. This references the unique ID in table "creature_model_info" [See creature_model_info] for which this entry is valid. FactionAlliance smallint(5) unsigned The Faction If The Creature Is On The Alliance Side [See FactionTemplate.dbc].. Just Because More Than One Faction Has The Same Name, The Inter-Faction Relationships Can Be Different. Note: This Field Also Controls The Creature Family Assistance Mechanic. Only Creatures With The Same Faction Will Assist Each Other. FactionHorde smallint(5) unsigned The Faction If The Creature Is On The Horde Side [See FactionTemplate.dbc].. Just Because More Than One Faction Has The Same Name, The Inter-Faction Relationships Can Be Different. Note: This Field Also Controls The Creature Family Assistance Mechanic. Only Creatures With The Same Faction Will Assist Each Other. Scale float The scale/size of the creature. Normal => 1 (100%) Family tinyint(4) This Defines The Family That This Creature Belongs To. This Is Only Used If CreatureType Is 1 (Beast). ID Family 1 Wolf 2 Cat 3 Spider 4 Bear 5 Boar 6 Crocolisk 7 Carrion Bird 8 Crab 9 Gorilla 11 Raptor 12 Tallstrider 15 Felhunter 16 Voidwalker 17 Succubus 19 Doomguard 20 Scorpid 21 Turtle 23 Imp 24 Bat 25 Hyena 26 Owl 27 Wind Serpent 28 Remote Control Note: It has to be evaluated if creatures of type 3 (Demons) should have their family set, as there are creature families defined for these. Also, remote control family would probably be having a type of 9 since these are mechanical. CreatureType tinyint(3) unsigned This Field Defines The Type Of Creature This NPC Is. ID Family 0 None 1 Beast 2 Dragonkin 3 Demon 4 Elemental 5 Giant 6 Undead 7 Humanoid 8 Critter 9 Mechanical 10 Not Specified 11 Totem 12 Non-combat pet 13 Gas Cloud InhabitType tinyint(3) unsigned This Field Controls Where The Creature Can Move Into, Chase And Attack. The NPC Is Limited To ONLY This: ID Family 1 Ground Movement Only 2 Water Movement Only 3 Both Ground and Water Movement 4 Always Flying RegenerateStats tinyint(3) unsigned This flag is a bitmask field which controls if a creature template should regenerate it's Health and/or Power. i.e. To Regenerate both Health and Mana, you would set the template to 3 (1+2). ID Color Quality 0 Grey Poor 1 White Common 2 Green Uncommon 3 Blue Rare 4 Purple Epic 5 Orange Legendary 6 Red Artifact RacialLeader tinyint(3) unsigned Determines if a creature template is a racial leader. Racial leaders will grant increased honor points upon death. Value Description 0 Normal creature 1 Racial leader NpcFlags int(10) unsigned The flags of the creature. Note that most of these also require the "Gossip" [1] flag to work. So if you want a NPC that is a quest giver, a vendor and can repair you just add the specific flags together: 1 + 2 + 128 + 4096 = 4227. Pure Flags Decimal Binary (32 Bit) Remarks UNIT_NPC_FLAG_NONE 0 0000 0000 0000 0000 0000 0000 0000 0000   UNIT_NPC_FLAG_GOSSIP 1 0000 0000 0000 0000 0000 0000 0000 0001 (If NPC has more gossip options, add this flag to bring up a menu.) UNIT_NPC_FLAG_QUESTGIVER 2 0000 0000 0000 0000 0000 0000 0000 0010 (Any NPC giving or taking quests needs to have this flag.) UNIT_NPC_FLAG_UNKNOWN1 4 0000 0000 0000 0000 0000 0000 0000 0100   UNIT_NPC_FLAG_UNKOWN2 8 0000 0000 0000 0000 0000 0000 0000 1000   UNIT_NPC_FLAG_TRAINER 16 0000 0000 0000 0000 0000 0000 0001 0000 (Allows the NPC to have a trainer list to teach spells, all trainers must have this flag) UNIT_NPC_FLAG_TRAINER_CLASS 32 0000 0000 0000 0000 0000 0000 0010 0000   UNIT_NPC_FLAG_TRAINER_PROF 64 0000 0000 0000 0000 0000 0000 0100 0000   UNIT_NPC_FLAG_VENDOR 128 0000 0000 0000 0000 0000 0000 1000 0000 (Any NPC selling items needs to have this flag) UNIT_NPC_FLAG_VENDOR_AMMO 256 0000 0000 0000 0000 0000 0001 0000 0000   UNIT_NPC_FLAG_VENDOR_FOOD 512 0000 0000 0000 0000 0000 0010 0000 0000   UNIT_NPC_FLAG_VENDOR_POISON 1024 0000 0000 0000 0000 0000 0100 0000 0000   UNIT_NPC_FLAG_VENDOR_REAGENT 2048 0000 0000 0000 0000 0000 1000 0000 0000   UNIT_NPC_FLAG_ARMORER 4096 0000 0000 0000 0000 0001 0000 0000 0000 (NPC with this flag can repair items.) UNIT_NPC_FLAG_TAXIVENDOR 8192 0000 0000 0000 0000 0010 0000 0000 0000 (Any NPC serving as fly master has this.) UNIT_NPC_FLAG_SPIRITHEALER 16384 0000 0000 0000 0000 0100 0000 0000 0000 (Makes the NPC invisible to alive characters and has the resurrect function.) UNIT_NPC_FLAG_SPIRITGUIDE 32768 0000 0000 0000 0000 1000 0000 0000 0000   UNIT_NPC_FLAG_INNKEEPER 65536 0000 0000 0000 0001 0000 0000 0000 0000 (NPC with this flag can set hearthstone locations.) UNIT_NPC_FLAG_BANKER 131072 0000 0000 0000 0010 0000 0000 0000 0000 (NPC with this flag can show the bank) UNIT_NPC_FLAG_ARENACHARTER 262144 0000 0000 0000 0100 0000 0000 0000 0000 UNIT_NPC_FLAG_TABARDVENDOR 524288 0000 0000 0000 1000 0000 0000 0000 0000 (Allows the designing of guild tabards.) UNIT_NPC_FLAG_BATTLEFIELDPERSON 1048576 0000 0000 0001 0000 0000 0000 0000 0000 (NPC with this flag port players to battlegrounds. Like battlemasters, arena organzier etc.) UNIT_NPC_FLAG_AUCTIONEER 2097152 0000 0000 0010 0000 0000 0000 0000 0000 (Allows NPC to display auction list.) UNIT_NPC_FLAG_STABLE 4194304 0000 0000 0100 0000 0000 0000 0000 0000 (Has the option to stable pets for hunters.) UNIT_NPC_FLAG_GUILD_BANK 8388608 0000 0000 1000 0000 0000 0000 0000 0000   UNIT_NPC_FLAG_SPELLCLICK 16777216 0000 0001 0000 0000 0000 0000 0000 0000 (Needs data on npc_spellclick_spells table) Mailbox 67108864 0000 0100 0000 0000 0000 0000 0000 0000 (NPC will act like a mailbox, opens mailbox with right-click) Guard 268435456 0001 0000 0000 0000 0000 0000 0000 0000 (Cityguards, must be scripted) Flag Combinations Decimal Binary (32 Bit) TRAINER_CLASS + TRAINER + GOSSIP 49 0000 0000 0000 0000 0000 0000 0011 0001 VENDOR + QUESTGIVER + GOSSIP 131 0000 0000 0000 0000 0000 0000 1000 0011 VENDOR + TRAINER_CLASS + TRAINER + GOSSIP 177 0000 0000 0000 0000 0000 0000 1011 0001 TABARDVENDOR + ARENACHARTER (GUILDMASTER) 786433 0000 0000 0000 1100 0000 0000 0000 0000 UnitFlags int(10) unsigned Allows the manual application of unit flags to creatures. Again this is a bitmask field and to apply more than one flag, just add the different numbers. Some possible flags are: Bit Flag Name Comments 0 1 UNIT_FLAG_UNK_0 Movement checks disabled, likely paired with loss of client control packet. 1 2 UNIT_FLAG_NON_ATTACKABLE not attackable 2 4 UNIT_FLAG_CLIENT_CONTROL_LOST Generic unspecified loss of control initiated by server script, movement checks disabled, paired with loss of client control packet. 3 8 UNIT_FLAG_PLAYER_CONTROLLED players, pets, totems, guardians, companions, charms, any units associated with players 4 16 UNIT_FLAG_PET_RENAME   5 32 UNIT_FLAG_PET_ABANDON   6 64 UNIT_FLAG_UNK_6 Related to Movement? often paired with UNIT_FLAG_SWIMMING 7 128     8 256 UNIT_FLAG_IMMUNE_TO_PLAYER Target is immune to players 9 512 UNIT_FLAG_IMMUNE_TO_NPC makes you unable to attack everything. Almost identical to our "civilian"-term. Will ignore it's surroundings and not engage in combat unless "called upon" or engaged by another unit. 10 1024     11 2048     12 4096 UNIT_FLAG_PVP Allows item spells to be casted upon. changed in 3.0.3 13 8192 UNIT_FLAG_SILENCED silenced, 2.1.1 14 16384 UNIT_FLAG_PERSUADED persuaded, 2.0.8 15 32768 UNIT_FLAG_SWIMMING controls water swimming animation 16 65536 UNIT_FLAG_UNK_16 removes attackable icon, if on yourself, cannot assist self but can cast TARGET_SELF spells - added by SPELL_AURA_MOD_UNATTACKABLE 17 131072 UNIT_FLAG_PACIFIED pacified, 3.0.3 18 262144 UNIT_FLAG_STUNNED stunned, 2.1.1 Unit is a subject to stun, turn and strafe movement disabled 19 524288 UNIT_FLAG_IN_COMBAT   20 1048576 UNIT_FLAG_TAXI_FLIGHT Unit is on taxi, paired with a duplicate loss of client control packet (likely a legacy serverside hack). Disables any spellcasts not allowed in taxi flight client-side. 21 2097152     22 4194304 UNIT_FLAG_CONFUSED Unit is a subject to confused movement, movement checks disabled, paired with loss of client control packet. 23 8388608 UNIT_FLAG_FLEEING Unit is a subject to fleeing movement, movement checks disabled, paired with loss of client control packet. 24 16777216 UNIT_FLAG_POSSESSED Unit is under remote control by another unit, movement checks disabled, paired with loss of client control packet. New master is allowed to use melee attack and can't select this unit via mouse in the world (as if it was own character). 25 33554432 UNIT_FLAG_NOT_SELECTABLE Can't be selected by mouse 26 67108864 UNIT_FLAG_SKINNABLE   27 134217728 UNIT_FLAG_AURAS_VISIBLE magic detect 28 268435456 UNIT_FLAG_UNK_28   29 536870912 UNIT_FLAG_UNK_29   30 1073741824 UNIT_FLAG_SHEATHE   31 2147483648 UNIT_FLAG_UNK_31 set skinnable icon and also changes color of portrait)(no affect in 2.4.3) DynamicFlags int(10) unsigned Dynamic flags are used to control the visual appearance of a creature template. The following table provides a list of valid values. Multiple flags may be combined. Value Description Comments 0 None   1 Lootable   2 Track unit   4 Other tagger Makes creature name tag appear grey 8 Rooted   16 Specialinfo Show basic creature stats in tooltip 32 Dead Make creature appear dead without tag 64 Tapped by all threat list   ExtraFlags int(10) unsigned The extra flags allow to modify special behaviour for a creature_template. The following table contains a list of combinable flags. Value Type Description 0 NONE Default: do nothing. 1 INSTANCE_BIND Bounds killer's party to the instance 2 CIVILIAN Makes creature ignore aggro 4 NO_PARRY Prohibits from parrying 8 NO_PARRY_HASTEN Parries do not speed up its next attack 16 NO_BLOCK Prohibits from blocking 32 NO_CRUSH Prohibits from dealing crushing blows 64 NO_XP_AT_KILL Creature rewards no XP at kill 128 INVISIBLE Creature invisible for player, e.g triggers 256 NOT_TAUNTABLE Creature is immune to taunts 512 AGGRO_ZONE Sets itself in combat with zone on aggro 1024 GUARD Is zone guard and death will be announced 2048 NO_TALKTO_CREDIT Does not give quest credit (temporary) CreatureTypeFlags int(10) unsigned This Field Controls If a Mob Is Mineable or Herbable. If Any Of These Flags Are Used Then The Loot Given When It Is Herb Picked / Mined Will Be Stored In The "Skinning_Loot_Template" Table. Aside From These Two Flags, This Field Has No Special Meaning Server-Side. It will be send to the client in SMSG_CREATURE_QUERY_RESPONSE Flag Name Comments 1 CREATURE_TYPEFLAGS_TAMEABLE Makes the mob tameable (must also be a beast and have family set) 2 CREATURE_TYPEFLAGS_GHOST_VISIBLE Sets Creatures that can ALSO be seen when player is a ghost. Used in CanInteract function by client, can't be attacked 4 CREATURE_TYPEFLAGS_UNK3 Sets "BOSS" flag for tooltips 8 CREATURE_TYPEFLAGS_UNK4   16 CREATURE_TYPEFLAGS_UNK5 Controls something in client tooltip related to creature faction 32 CREATURE_TYPEFLAGS_UNK6 Something related to Sound 64 CREATURE_TYPEFLAGS_UNK7 Related to attackable / not attackable creatures with spells 128 CREATURE_TYPEFLAGS_INTERACT_DEAD has something to do with unit interaction / quest status requests 136 CREATURE_TYPEFLAGS_NON_PVP_PLAYER   256 CREATURE_TYPEFLAGS_HERBLOOT Makes Mob Corpse Herbable - Uses Skinning Loot Field 512 CREATURE_TYPEFLAGS_MININGLOOT Makes Mob Corpse Mineable - Uses Skinning Loot Field 1024 CREATURE_TYPEFLAGS_ANIMATION_UNK11 no idea, but it used by client 2048 CREATURE_TYPEFLAGS_ANIMATION_UNK12 related to possibility to cast spells while mounted 4096 CREATURE_TYPEFLAGS_CAN_ASSIST Can aid any player or group in combat. Typically seen for escorting NPC's 8192 CREATURE_TYPEFLAGS_UNK14 checked from calls in Lua_PetHasActionBar 16384 CREATURE_TYPEFLAGS_UNK15 Lua_UnitGUID, client does guid_low &= 0xFF000000 if this flag is set 32768 CREATURE_TYPEFLAGS_ENGINEERLOOT Makes Mob Corpse Engineer Lootable - Uses Skinning Loot Field SpeedWalk float Controls how fast the creature can move in walking mode. SpeedRun float Controls how fast the creature can move in running mode. UnitClass tinyint(3) unsigned A creature's class. The following table describes the available classes. Value Name Description 1 Warrior Has increased health and no mana 2 Paladin Has increased health and low mana 4 Rogue Has increased damage, but lower armor 8 Mage Has low health, but increased mana Note: Depending on the creature's class, you have to make sure that the mana values are set properly. E.g. a Warrior or Rogue will not have mana set. Rank tinyint(3) unsigned The rank of a creature determines which border the game client will draw around the creature tooltip in the user interface. The following table lists all valid values: Value Name Description 0 Normal Default type 1 Elite Increased health, damage, better loot 2 Rare elite Like Elite but with increased respawn time 3 World boss Highest rank, best loot, highest respawn time 4 Rare Increased respawn time, better loot HealthMultiplier float Setting this value to a value smaller or larger than 1 will modify the creature template's health by this factor. PowerMultiplier float Setting this value to a value smaller or larger than 1 will modify the creature template's power by this factor. DamageMultiplier float Setting this value to a value smaller or larger than 1 will modify the creature template's damage by this factor. DamageVariance float Damage Variance is a Co-Efficient used in Damage Calculations To Limit the Min/Max Damage Range. Default Value is 1 (Normal) ===> See DamageMultiplier for More Information ArmorMultiplier float Setting this value to a value smaller or larger than 1 will modify the creature template's armor by this factor. ExperienceMultiplier float Setting this value to a value smaller or larger than 1 will modify experience gained from the creature template by this factor. MinLevelHealth int(10) unsigned The minimum health of the creature if the creature has variable health. MaxLevelHealth int(10) unsigned The maximum health of the creature if the creature has a variable health. When added to world, the health value is chosen in proportion to the level chosen. MinLevelMana int(10) unsigned The miminum mana of the creature if the creature has variable mana. MaxLevelMana int(10) unsigned The maximum mana of the creature if the creature has variable mana. When added to world, the mana value is chosen in proportion to the level chosen. MinMeleeDmg float Minimum damage the creature deals in melee combat. This field is combined with the attackpower field to calculate the damage. MaxMeleeDmg float Maximum damage the creature deals in melee combat. This field is combined with the attackpower field to calculate the damage. MinRangedDmg float Minimum damage the creature deals in ranged combat. This field is combined with the ranged attackpower field to calculate the damage. MaxRangedDmg float Maximum damage the creature deals in ranged combat. This field is combined with the ranged attackpower field to calculate the damage. Armor mediumint(8) unsigned The armor value of the creature. It controls how much damage reduction the creature gets from physical attacks. MeleeAttackPower int(10) unsigned The attack power for the creature's melee attacks. This field along with MinMeleeDmg and MaxMeleeDmg dictate how much the creature will hit for. The formula for applying correct damages is as follows: UPDATE `creature_template` SET `MinMeleeDmg` = , `MaxMeleeDmg` = , `MeleeAttackPower` = ROUND((`MinMeleeDmg` + `MaxMeleeDmg`) / 4 * 7), `MinMeleeDmg` = ROUND(`MinMeleeDmg` - `MeleeAttackPower` / 7), `MaxMeleeDmg` = ROUND(`MaxMeleeDmg` - `MeleeAttackPower` / 7) WHERE `Entry` = ... In the query above, substitute with the minimum damage you want the creature to deal and with the maximum damage you want the creature to deal. Note: You might want to double check the calculated values after the query has run because a large difference between MinMeleeDmg and MaxMeleeDmg can cause MinMeleeDmg to become a negative value. RangedAttackPower smallint(5) unsigned The attack power for the creature's ranged attacks. MeleeBaseAttackTime int(10) unsigned A creature's melee attack time in milliseconds. RangedBaseAttackTime int(10) unsigned The delay between ranged attacks, in milliseconds. DamageSchool tinyint(4) A damage school for melee combat. The following table provides a list of valid values. Value Description 0 Normal damage 1 Holy damage 2 Fire damage 3 Nature damage 4 Frost damage 5 Shadow damage 6 Arcane damage MinLootGold mediumint(8) unsigned Minimum money the creature drops when killed, in copper. MaxLootGold mediumint(8) unsigned The money dropped by the creature in copper (1000 = 10s, 100000 = 1g, 111111 = 11g 11s 11c) LootId mediumint(8) unsigned The field adds loot to a creature template and references the "creature_loot_template" table unique ID for which the entry is valid. PickpocketLootId mediumint(8) unsigned The field adds pickpocketing loot to a creature template and references the "pickpocketing_loot_template" tables unique ID for which the entry is valid. SkinningLootId mediumint(8) unsigned The field adds skinning loot to a creature template and references the "skinning_loot_template" tables unique ID for which the entry is valid. KillCredit1 int(11) unsigned If killing a creature should credit towards a different creature_template, this should be set to the creature template's identifier. KillCredit2 int(11) unsigned If killing a creature should credit towards a different creature_template, this should be set to the creature template's identifier. MechanicImmuneMask int(10) unsigned This mask can be used to make creatures immune to spell mechanics. Multiple immunities can be combined. Value Type Value Type 0 NONE 32768 BANDAGE 1 CHARM 65536 POLYMORPH 2 CONFUSED 131072 BANISH 4 DISARM 262144 SHIELD 8 DISTRACT 524288 SHACKLE 16 FEAR 1048576 MOUNT 32 FUMBLE 2097152 PERSUADE 64 ROOT 4194304 TURN 128 PACIFY 8388608 HORROR 256 SILENCE 16777216 INVULNERABILITY 512 SLEEP 33554432 INTERRUPT 1024 SNARE 67108864 DAZE 2048 STUN 134217728 DISCOVERY 4096 FREEZE 268435456 IMMUNE_SHIELD 8192 KNOCKOUT 536870912 SAPPED 16384 BLEED     Note: In theory this should somehow relates to SpellMechanic.dbc and the immunities list there, but it does not match. SchoolImmuneMask int(10) unsigned This makes the NPC immune to specific spell schools. 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 To combine spell school immunities just add values. Immune to everything corresponds to the value 127. ResistanceHoly smallint(5) The Holy resistance of the creature. ResistanceFire smallint(5) The Fire resistance of the creature. ResistanceNature smallint(5) The Nature resistance of the creature. ResistanceFrost smallint(5) The Frost resistance of the creature. ResistanceShadow smallint(5) The Shadow resistance of the creature. ResistanceArcane smallint(5) The Arcane resistance of the creature. PetSpellDataId mediumint(8) unsigned ID that displays what spells the pet has in the client. MovementType tinyint(3) unsigned The movement type defines what a creature spawn will behave like after spawning. Value Behaviour 0 Idle on spawn point 1 Random movement within spawndist radius 2 Waypoint movement TrainerType tinyint(4) For creature templates set to be trainers, this details what kind of trainer the creature is. The following table provides a list of valid trainer types. ID Type Related Field Comments 0 TRAINER_TYPE_CLASS trainer_class Trains Class Spells 1 TRAINER_TYPE_MOUNTS trainer_race Trains Riding Skill 2 TRAINER_TYPE_TRADESKILLS trainer_spell Trains Professions 3 TRAINER_TYPE_PETS trainer_class Trains Pet Skills TrainerSpell mediumint(8) unsigned If set to a valid spell identifier from Spell.dbc [See Spell.dbc], this will restrict access to a profession trainer so that the player needs to already have access to the spell to access the trainer. TrainerClass tinyint(3) unsigned The value of this field will restrict access to class and/or pet trainers, if set to a value corresponding with the class identifiers from ChrClasses.dbc. Value Description 1 Warrior 2 Paladin 3 Hunter 4 Rogue 5 Priest 7 Shaman 8 Mage 9 Warlock 11 Druid Note: Pet trainers should always use the Hunter class identifier 3. TrainerRace tinyint(3) unsigned This field allows to restrict a riding trainer to a specific race. Players not from that race will require exalted reputation with the trainers race before being able to buy from him. Values in this field correspond with the content of ChrRaces.dbc [See ChrRaces.dbc]. TrainerTemplateId mediumint(8) unsigned This field adds a training spells to a creature template and references the "npc_trainer_template" tables unique ID for which the entry is valid. VendorTemplateId mediumint(8) unsigned This field adds a vendor items to a creature template and references the "npc_vendor_template" tables unique ID for which the entry is valid. GossipMenuId mediumint(8) unsigned This references the "gossip_menu" tables unique ID for which the entry is valid, if the creature_template should have a gossip dialogue. EquipmentTemplateId mediumint(8) unsigned The field adds equipment to a creature template and references the "creature_equip_template" tables unique ID for which the entry is valid. Civilian tinyint(3) unsigned Marking a creature template as civilian will prevent it from aggroing and may influence the honor points gained negatively. Value Description 0 No civilian 1 Civilian AIName char(64) This string determines which built-in AI script will be used for the creature template. By default and empty string will lead to the creature doing nothing. The following table lists all valid entries. Value Description NullAI Do nothing. Same as empty string. AggressorAI Creature attacks when entering aggro radius. ReactorAI Creature attacks only if aggroed by spell. GuardAI Creature is a zone guard. PetAI Creature is a pet. TotemAI Creature casts spell from spell1. EventAI Creature uses event based AI. auto-generated by the getMaNGOS.eu MAGNET dbdocs module
  5. zeeb

    creature_template

    Lacking UnitFlags, could really need a list of the basic ones. (No Movement, No Rotation etc)
  6. 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.
  7. antz

    Installing Visual Studio 2015 (Community)

    @reno - Yes you do
  8. 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?
  9. 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.
  10. antz

    Updating your cloned Server / Database files

    Either run Easybuild / cmake again (Windows) or cmake / make (Linux)
  11. 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
  12. 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
  13. 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
  14. 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
  15. 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
  16. 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
  17. 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
  18. 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
  19. 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
  20. 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
  21. 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
  22. 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
  23. 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
  24. 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
  25. 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
  26. 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
  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®
×