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

  • conditions


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

    Description of the 'conditions' table for MaNGOSZero

    With this table and the new conditions it is possible to create tree like and very complicated combined conditions (like HasAura && (HasItem || HasQuest))

    Used in:

    DBScript
    gossip_menu
    gossip_menu_option
    npc_spellclick_spells
    spell_area
    areatrigger_teleport

    Table Notes

    This table uses the 'MyISAM' DB Engine

    The Field definitions follow:

    Field Name Field Type Nullable Key Default Value Attributes Notes
    condition_entry mediumint(8) unsigned NO PRI NULL 'auto_increment' Identifier
    type tinyint(3) NO MUL '0'   Type of the condition.
    value1 mediumint(8) unsigned NO '0'   Data field One for the condition.
    value2 mediumint(8) unsigned NO '0'   Data field Two for the condition.
    comments varchar(200) YES {Blank String}   Detailed description of available condition types
    The meaning of the values

    Description of the fields

    condition_entry mediumint(8) unsigned

    Identifier

    type tinyint(3)

    Type of the condition:

    ID Type Description
    -3 CONDITION_NOT Used to evaluate if another condition is NOT true. See Note 1
    -2 CONDITION_OR Used to evaluate if condition OR condition is true. See Note 1
    -1 CONDITION_AND Used to evaluate if condition AND condition is true. See Note 1
    0 CONDITION_NONE This condition is not used at all. Always returns true.
    1 CONDITION_AURA Checks target currently has the specified aura on him/her.
    2 CONDITION_ITEM Checks if the player has the required amount (value2) of items in his/hers inventory.
    3 CONDITION_ITEM_EQUIPPED Checks if the player has the specified item equipped.
    4 CONDITION_AREAID Checks if the player is within the specified area/zone.
    5 CONDITION_REPUTATION_RANK_MIN Checks if the player has the minimum required reputation rank with a specific faction.
    6 CONDITION_TEAM Checks what team the target is a member of (Alliance or Horde).
    7 CONDITION_SKILL Checks if the player has the required minimum skill value of the specified skill.
    8 CONDITION_QUESTREWARDED Checks if the player has complete the specified quest.
    9 CONDITION_QUESTTAKEN Checks if the player has taken the quest (as in has it in his/hers quest log.) and not completed it yet.
    10 CONDITION_AD_COMMISSION_AURA TODO
    11 CONDITION_NO_AURA Checks if the target DOES NOT currently have the specified aura on him/her.
    12 CONDITION_ACTIVE_GAME_EVENT Checks if a game event is currently active.
    13 CONDITION_AREA_FLAG Checks if area_flag is present in current area (if area_flag set != 0) AND if not_have_flag is not present in current area (if not_have_flag != 0)
    14 CONDITION_RACE_CLASS Checks if the target is a certain race AND/OR class.
    15 CONDITION_LEVEL Checks the targets level.
    16 CONDITION_NOITEM Checks if the player DOES NOT have the required amount (value2) of items in his/hers inventory.
    17 CONDITION_SPELL Checks if the target has or hasn't (value2) the specified spell.
    18 CONDITION_INSTANCE_SCRIPT SD3 based condition
    19 CONDITION_QUESTAVAILABLE Checks if the specified quest is available (can start it) for the player.
    20 CONDITION_ACHIEVEMENT Has or has no special achievement.
    21 CONDITION_ACHIEVEMENT_REALM Realm wide achievement (like 20 above but realm wide).
    22 CONDITION_QUEST_NONE Checks if the player has NOT taken the quest AND has NOT been rewarded for the quest.
    23 CONDITION_ITEM_WITH_BANK Checks if the player has the required amount (value2) of items in his/hers inventory OR bank.
    24 CONDITION_NOITEM_WITH_BANK Checks if the player DOES NOT have count (value2) of items in his/hers inventory OR bank.
    25 CONDITION_NOT_ACTIVE_GAME_EVENT Checks if a game event is currently NOT active.
    26 CONDITION_ACTIVE_HOLIDAY Checks if a holiday is active
    27 CONDITION_NOT_ACTIVE_HOLIDAY Checks if a holiday is not active
    28 CONDITION_LEARNABLE_ABILITY Checks if the player can learn ability - using minimum skill value from [See SkillLineAbility.dbc] If the player has spell or has item (when defined) the condition will evaluate to false.
    29 CONDITION_SKILL_BELOW TODO
    30 CONDITION_REPUTATION_RANK_MAX Checks if the player has a higher reputation rank than specified a faction.
    31 CONDITION_COMPLETED_ENCOUNTER Checks if an encounter has been completed.
    32 CONDITION_SOURCE_AURA Checks if the source of the condition (like looted npc) has an aura.
    33 CONDITION_LAST_WAYPOINT Checks the waypoint-state of the source of the condition.
    34 CONDITION_XP_USER Checks if a player has turned XP earning on/off
    35 CONDITION_GENDER Checks the gender of a player.
    36 CONDITION_DEAD_OR_AWAY TODO
    37 CONDITION_CREATURE_IN_RANGE TODO
    38 CONDITION_PVP_SCRIPT TODO
    39 CONDITION_SPAWN_COUNT Returns if specified count of creature entry exists on map.
    36 CONDITION_DEAD_OR_AWAY Checks if a player, a player's group, all players in an instance, or a creature is dead or left the map.


    Note 1:
    Meta-Condition types CONDITION_AND (-1) and CONDITION_OR (-2) which are used as: value1 (as condition_entry) AND / OR value2 (as condition_entry). With these meta-conditions it is possible to create tree like and very complicated combined conditions (like HasAura && (HasItem || HasQuest))

    value1 mediumint(8) unsigned

    Data field One for the condition.

    value2 mediumint(8) unsigned

    Data field Two for the condition.

    comments varchar(200)

    Detailed description of available condition types
    The meaning of the values in value1 / value2 depend of the type of the condition

    Value CONDITION_TYPE Name Value1 Value2 Notes & Return value
    -3 CONDITION_NOT condition_entry   Must have higher condition_entry than value1
    Returns NOT condition (of value1)
    -2 CONDITION_OR condition_entry condition_entry Must have higher condition_entry than value1 OR value2
    Returns condition (of value1) OR condition (of value2)
    -1 CONDITION_AND condition_entry condition_entry Must have higher condition_entry than value1 OR value2
    Returns condition (of value1) AND condition (of value2)
    0 CONDITION_NONE     No condition, is always met
    True
    1 CONDITION_AURA The spell ID from where the aura came from. The effect index of the spell that applied the aura (0, 1, or 2) Returns if a player has an aura
    2 CONDITION_ITEM Item ID Count Returns if a player has Count items in his inventory
    3 CONDITION_ITEM_EQUIPPED Item ID   Returns if a player has an item equipped
    4 CONDITION_AREAID Area ID 0, 1 (0: in (sub)area, 1: not in (sub)area) Returns if (or if not depending on value2) a player is in an area/zone
    5 CONDITION_REPUTATION_RANK_MIN Faction ID Minimum rank Returns if a player has at least (>=) minimum rank at the given faction. See Ranks below.
    6 CONDITION_TEAM Player team (469 - Alliance, 67 - Horde)   Returns if a player has the team of value1
    7 CONDITION_SKILL Skill ID [See SkillLine.dbc] Skill value needed Returns if a player has Skill ID of value
    8 CONDITION_QUESTREWARDED Quest ID   Returns if a player already got a quest rewarded
    9 CONDITION_QUESTTAKEN Quest ID 0,1 or 2 0 - Returns true if quest is taken, no matter if completed or not
    1 - Returns true if quest is taken but not completed
    2 - Returns true if quest is taken and completed
    10 CONDITION_AD_COMMISSION_AURA     Returns if a Player has any Argent Dawn Commission Aura Active (17670,23930,24198,29112,29113)
    11 CONDITION_NO_AURA spellid EffectIndex Returns if a player has not an aura
    12 CONDITION_ACTIVE_EVENT event   Returns if a event is active
    13 CONDITION_AREA_FLAG area_flag not_have_flag Returns if area_flag is present in current area (if area_flag set != 0) AND if not_have_flag is not present in current area (if not_have_flag != 0)
    14 CONDITION_RACE_CLASS race_mask class_mask Returns if a player is of race (if race_mask set != 0) AND if a player is of class (if class_mask != 0) See Races & Classes below.
    15 CONDITION_LEVEL level 0,1 or 2 0: equal to
    1: equal or higher than
    2: equal or less than
    Returns if a player is of/ has a higher/ has a lower level
    16 CONDITION_NOITEM itemid count Returns if a player has not count items in Inventory
    17 CONDITION_SPELL spellid 0,1 0: has spell
    1: does not have spell
    Returns if a player has (not) learned a spell.
    18 CONDITION_INSTANCE_SCRIPT instance_condition_id   see InstanceData.h enum InstanceConditionIDs
    To 'communicate' with the instance script, there are a few instance_condition_id predefined, which can be used for hard-mode loot (0: normal, 1: Hard, 2: Harder mode), review the Instance conditions table below.
    Returns the result of the current instance's instance-script function CheckConditionCriteriaMeet (which must be implemented for such an instance)
    19 CONDITION_QUESTAVAILABLE questid   Returns if a player could start a quest (ie. if all requirements for accepting like pre-quests are met)
    20 CONDITION_ACHIEVEMENT achievementid 0,1 0: has achievement
    1: has no achievement
    Returns if a player has (not) earned an achievement
    21 CONDITION_ACHIEVEMENT_REALM achievementid 0,1 0: has achievement
    1: has no achievement
    Returns if an achivement was (not) already earned by any player on the realm
    22 CONDITION_QUEST_NONE questid   Returns if a player has a quest neither taken nor ever rewarded
    23 CONDITION_ITEM_WITH_BANK item_id count Returns if a player has at least count of items (including inventory stored in the bank)
    24 CONDITION_NOITEM_WITH_BANK item_id count Returns if a player has less than count of items (including inventory stored in the bank)
    25 CONDITION_NOT_ACTIVE_GAME_EVENT event_id   Returns if a game event is not active.
    26 CONDITION_ACTIVE_HOLIDAY holiday_id   Returns if a holiday is active.
    27 CONDITION_NOT_ACTIVE_HOLIDAY holiday_id   Returns if a holiday is not active.
    28 CONDITION_LEARNABLE_ABILITY spell_id 0 or item_id Returns player can learn ability using min skill value from (See SkillLineAbility.dbc).
    Item_id can be defined in addition, to check if player has one (1) item in inventory or bank.
    When player has spell or has item (when defined), condition return false.
    29 CONDITION_SKILL_BELOW skill_id skill_value Returns if player has skill skill_id and skill less than (and not equal) skill_value (for skill_value > 1)
    If skill_value == 1, then true if player does not have skill skill_id
    30 CONDITION_REPUTATION_RANK_MAX faction_id max_rank refer to the Ranks table below.
    Returns if a player has at most (<=) max_rank with a faction
    31 CONDITION_COMPLETED_ENCOUNTER encounter_id (See DungeonEncounter.dbc#id) encounter_id2 (See DungeonEncounter.dbc#id) Returns if encounter_id is complete (if encounter_id2 provided it will return if encounter_id is completed OR if encounter_id2 is completed)
    32 CONDITION_SOURCE_AURA spell_id effindex Returns true if the source of the condition check has aura of spell_id, effIndex
    33 CONDITION_LAST_WAYPOINT waypointId 0,1 or 2 0 = exact
    1: wp <= waypointId
    2: wp > waypointId
    Returns if the source of the condition is on/ has reached/ has passed a waypoint
    34 CONDITION_XP_USER 0, 1   0: XP off, 1: XP on
    Returns if a player has his XP earning turned off/on
    35 CONDITION_GENDER 0,1 or 2   0 = male, 1 = female, 2 = none (See enum Gender)
    Returns if a player is male or female (none cannot happen)
    36 CONDITION_DEAD_OR_AWAY 0,1,2 or 3 optional_range 0=player dead, 1=player is dead (with group dead), 2=player in instance are dead, 3=creature is dead
    Returns if a player / a player's group / all players in an instance / or a creature is dead or left the map.
    If the optional_range is provided the condition will also fail if the player[s] are out of range
    37 CONDITION_CREATURE_IN_RANGE creatureEntry range Returns if the creature of the given entry is found in the given range
    38 CONDITION_PVP_SCRIPT area_id of the outdoor PvP script opvp_condition_id (defined in the actual script) Returns the result of the outdoor PvP script function IsConditionFulfilled (which must be implemented for the required scripts)
    39 CONDITION_SPAWN_COUNT creature_template.entry Minimum amount of specified creature to exist on map for condition to return true Condition returns true if there are more than or equal amounts of creature on map.
    Note: The creature specified in value1 must have ExtraFlags CREATURE_EXTRA_FLAG_COUNT_SPAWNS set!


    Ranks

    Name Value
    REP_HATED 0
    REP_HOSTILE 1
    REP_UNFRIENDLY 2
    REP_NEUTRAL 3
    REP_FRIENDLY 4
    REP_HONORED 5
    REP_REVERED 6
    REP_EXALTED 7


    Races

    Race Mask Value (hex) Mask Value (dec)
    Human 0x1 1
    Orc 0x2 2
    Dwarf 0x4 4
    Night Elf 0x8 8
    Undead 0x10 16
    Tauren 0x20 32
    Gnome 0x40 64
    Troll 0x80 128
    Goblin 0x100 256
    Blood Elf 0x200 512
    Dranei 0x400 1024


    Classes

    Class Value (hex) Value (dec)
    CLASS_WARRIOR 0x1 1
    CLASS_PALADIN 0x2 2
    CLASS_HUNTER 0x4 4
    CLASS_ROGUE 0x8 8
    CLASS_PRIEST 0x10 16
    CLASS_DEATHKNIGHT 0x20 32
    CLASS_SHAMAN 0x40 64
    CLASS_MAGE 0x80 128
    CLASS_WARLOCK 0x100 256
    CLASS_DRUID 0x400 1024


    Instance Conditions

    Condition Name Value Notes
    INSTANCE_CONDITION_ID_NORMAL_MODE 0  
    INSTANCE_CONDITION_ID_HARD_MODE 1  
    INSTANCE_CONDITION_ID_HARD_MODE_2 2  
    INSTANCE_CONDITION_ID_HARD_MODE_3 3  
    INSTANCE_CONDITION_ID_HARD_MODE_4 4  
    INSTANCE_CONDITION_ID_TEAM_HORDE 67 To check for which team the instance is doing scripts
    INSTANCE_CONDITION_ID_TEAM_ALLIANCE 469 To check for which team the instance is doing scripts


    auto-generated by the getMaNGOS.eu MAGNET dbdocs module

    Edited by Antz


    User Feedback

    Recommended Comments

    There are no comments to display.



    Create an account or sign in to comment

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

    Create an account

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

    Register a new account

    Sign in

    Already have an account? Sign in here.

    Sign In Now

×
×
  • Create New...

Important Information

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