Conditional Template

FlexBar Conditionals
Condtional | Description
affectingcombat<target> | target = unit code ("player","target","party1"-"party4","pet") -- true if unit is aggroed or otherwise affecting combat.
altdown<> | no target -- true if the altkey is down
comboptseq<target> | target = 0-5 -- true if player's combo points are equal to target
comboptsgt<target> | target = 0-5 -- true if player's combo points are greater than target
comboptslt<target> | target = 0-5 -- true if player's combo points are less than target
controldown<> | no target -- true if control key is down
custom<target> | target = any string or number. True if there is a non-false value at FBCustom[target] (used in scripts for custom conditions)
enoughmana<target> | target = ID (1-120) -- true if the action at that ID has enough mana
faded<target> | target = button (1-120) -- true if the button named is faded
hasaggro<> | no target -- true if the player has aggro
hasaura<target> | target = Aura Name (eg - "Stealth","Battle Stance") -- True if the specified aura is up. Use for stealth, forms, stances, pally auras
hasbuff<target> | target = Buff Name (eg - "Blessing of Might") -- True if the player has the specified buff
hasdebuff<target> | target = Debuff Name (eg - "Tetanus") -- True if the player has the specified debuff.
hasdebufftype<target> | target = Debuff Type (eg - "Poison") -- True if the player has that type of debuff
hasitem<target> | target = Item Name (eg - "Elixir of Minor Defense") -- True if the player has that item in their inventory
healthabove10<target> | For all HealthAbove, HealthBelow and HealthFull
healthabove20<target> | Target = unit code ("player","target","party1"-"party4","pet")
healthabove30<target> | True if the specified unit's health is above/below the trailing
healthabove40<target> | number, or full.
healthabove50<target> |
healthabove60<target> |
healthabove70<target> |
healthabove80<target> |
healthabove90<target> |
healthbelow10<target> |
healthbelow100<target> |
healthbelow20<target> |
healthbelow30<target> |
healthbelow40<target> |
healthbelow50<target> |
healthbelow60<target> |
healthbelow70<target> |
healthbelow80<target> |
healthbelow90<target> |
healthfull<target> |
hidden<target> | Target = Button number (1-120) OR Frame name ("MainMenuBar") -- Returns true if the specified button or frame is hidden
incombat<> | no target - True if Player is meleeing.
incooldown<target> | Target = ID (1-120) -- True if ability at that ID is in cooldown
ingroup<target> | Target = Group number (1-120) -- True if cursor is inside specified group
inrange<target> | Target = ID (1-120) -- True if ability at that ID is in range
isadvanced<target> | Target = Button (1-120) -- True if button is set to advanced
isdisabled<target> | Target = Button (1-120) -- True if button is set to disabled
isrunning<target> | Target = Timer name -- True if a timer of that name is running
mainhandchargeseq<target> | Target = # -- True if number of charges on main hand enchant (poison?) is equal to target
mainhandchargesgt<target> | Target = # -- True if number of charges on main hand enchant (poison?) is greater than target
mainhandchargeslt<target> | Target = # -- True if number of charges on main hand enchant (poison?) is less than target
mainhandenchant<> | no target -- True if player has an enchantment (itembuff, poison) on main hand weapon
manaabove10<target> | For all ManaAbove/ManaBelow/ManaFull conditions
manaabove20<target> | Target = Unit Code ("player","target","party1"-"party4","pet")
manaabove30<target> | True if specified unit's mana is above/below the amount
manaabove40<target> |
manaabove50<target> |
manaabove60<target> |
manaabove70<target> |
manaabove80<target> |
manaabove90<target> |
manabelow10<target> |
manabelow100<target> |
manabelow20<target> |
manabelow30<target> |
manabelow40<target> |
manabelow50<target> |
manabelow60<target> |
manabelow70<target> |
manabelow80<target> |
manabelow90<target> |
manafull<target> |
offhandchargeseq<target> | Target = # -- True if number of charges on off hand enchant (poison?) is equal to target
offhandchargesgt<target> | Target = # -- True if number of charges on off hand enchant (poison?) is greater than target
offhandchargeslt<target> | Target = # -- True if number of charges on off hand enchant (poison?) is less than target
offhandenchant<> | no target -- True if the off hand weapon has an itembuff/poison
remapped<target> | Target = Button Number (1-120) -- True if button is remapped
scaled<target> | Target = Button Number (1-120) -- True if button is scaled
shaded<target> | Target = Button Number (1-120) -- True if button is shaded
shiftdown<> | no target - True if ShiftKey is down
unitbuff<[unitcode target]> | UnitCode = "party1"-"party4","pet","target", Target = Buff Name. -- True if specified unit has specified buff: EG unitbuff<["party1" "Blessing of Might"]>
unitdebuff<[unitcode target]> | UnitCode = "party1"-"party4","pet","target", Target =Debuff Name. -- True if specified unit has specified debuff: EG unitdebuff<["party1" "Tetanus"]>
unitdebufftype<[unitcode target]> | UnitCode = "party1"-"party4","pet","target", Target = Debuff Type. -- True if specified unit has specified debufftype: EG unitdebufftype<["party1" "Disease"]>
unitcreaturetype<[unitcode target]> | UnitCode = "party1"-"party4","pet","target", Target = Creature Type. -- True if specified unit is specified creature tyep: EG unitdecreaturetype<["target" "humanoid"]>
unitclass<[unitcode target]> | UnitCode = "party1"-"party4","pet","target", Target = Creature Type. -- True if specified unit is specified creature type: EG unitcreaturetype<["target" "humanoid"]>
partydebufftype<[target]> | < p > True if anyone in the party has the specified debufftype: EG partydebufftype<"poison">
unitexists<target> | Target = Unit Code ("player","target","party1"-"party4","pet") -- True if the specified unit exists
unitisalive<target> | Target = Unit Code ("player","target","party1"-"party4","pet") -- True if the specified unit is alive
unitiscorpse<target> | Target = Unit Code ("player","target","party1"-"party4","pet") -- True if the specified unit is dead
unitisfriendly<target> | Target = Unit Code ("player","target","party1"-"party4","pet") -- True if the specified unit is friendly
unitishostile<target> | Target = Unit Code ("player","target","party1"-"party4","pet") -- True if the specified unit is hostile
unitisneutral<target> | Target = Unit Code ("player","target","party1"-"party4","pet") -- True if the specified unit neutral
unitistapped<target> | Target = Unit Code ("player","target","party1"-"party4","pet") -- True if the specified unit is tapped by someone else (not available)
usable<target> | Target = ID (1-120) -- True if the action at that ID is usable. As of WoW patch 1300 this reflects a combination of - In the right stance and a precondition being met. So, if you are in battle stance and your opponent just dodged and you have overpower on id 1 then: usable<1> will be true. If you are not in battle stance, however, it will be false.
visible<target> | Target = Button number (1-120) OR Frame name ("MainMenuBar") -- Returns true if the specified button or frame is visible.
< /table >

Important Notes:

1. If you omit a target on conditions that need them, it will simply return false.
2. If you specify multiple targets on many conditions, it works as an or - IE: hidden<[1 2 3 4]> will return true if any of buttons 1,2,3 or 4 are hidden. Also, unitdebufftype<["target" "poison" "disease"]> will return true if the target is either diseased, or poisoned (or both). Also of note is applying not to these: not unitdebufftype<["target" "poison" "disease"]> will result in true if the target has NEITHER a poison nor a disease debuff on them.
3. All string values in conditions must be double quoted, while the entire condition is in single quotes: IE if='unitbuff<["party1" "Blessing of Might"]>'. Multiple values must be in brackets IE: if='hasbuff<["Blessing of Might" "Blessing of Wisdom"]>'