9. Conditions
9_0. PREAMBLE
Holy crap this is a long list. Like 140+ long. Very long.
Sections are laid out like this:
Raw Excerpt:
{code}{/code}
Usage and Explanation:
Example:
{code}{/code}
Chapter ID
Raw Excerpt: Contains raw code for the condition
Usage and Explanation: Explains the described.
Example: Shows example usage.
9_1. disspellable
Raw Excerpt:
Code:
ProbablyEngine.condition.register("dispellable", function(target, spell)
if LibDispellable:CanDispelWith(target, GetSpellID(GetSpellName(spell))) then
return true
end
return false
end)
Usage and Explanation:
Usage discouraged, as only EN clients can benefit and the checks are extremely limited. Checks against LibDispellable for inputs given.
Example:
Code:
{ "Purge", "target.dispellable", "target },
9_2. buff Condition
Raw Excerpt:
Code:
ProbablyEngine.condition.register("buff", function(target, spell)
local buff,_,_,caster = UnitBuff(target, spell)
if not not buff and (caster == 'player' or caster == 'pet') then
return true
end
return false
end)
Usage and Explanation:
Checks a buff by name or ID on a given target.
Example:
Code:
{ "Frostbolt", "target.buff(Arcane Intelligence)", "target" },
9_3. buff.any
Raw Excerpt:
Code:
ProbablyEngine.condition.register("buff.any", function(target, spell)
local buff,_,_,caster = UnitBuff(target, spell, "any")
if not not buff then
return true
end
return false
end)
Usage and Explanation:
Checks if the target has any buff.
Example:
Code:
{ "Frostbolt", "target.buff.any", "target" },
9_4. buff.count
Raw Excerpt:
Code:
ProbablyEngine.condition.register("buff.count", function(target, spell)
local buff,count,_,caster = UnitBuff(target, spell)
if not not buff and (caster == 'player' or caster == 'pet') then
return count
end
return 0
end)
Usage and Explanation:
Checks how many stacks of a buff the target has.
Example:
Code:
{ "Frostbolt", "target.buff.count(Rapid Fire, 2)", "target" },
9_5. debuff
Raw Excerpt:
Code:
ProbablyEngine.condition.register("debuff", function(target, spell)
local debuff,_,_,caster = UnitDebuff(target, spell)
if not not debuff and (caster == 'player' or caster == 'pet') then
return true
end
return false
end)
Usage and Explanation:
Checks if a target has a debuff of X name.
Example:
Code:
{ "Frostbolt", "target.debuff(Frozen)", "target" },
9_6. debuff.any
Raw Excerpt:
Code:
ProbablyEngine.condition.register("debuff.any", function(target, spell)
local debuff,_,_,caster = UnitDebuff(target, spell, "any")
if not not debuff then
return true
end
return false
end)
Usage and Explanation:
Checks if a target has ANY debuff.
Example:
Code:
{ "Frostbolt", "target.debuff.any", "target" },
9_7. debuff.count
Raw Excerpt:
Code:
ProbablyEngine.condition.register("debuff.count", function(target, spell)
local debuff,count,_,caster = UnitDebuff(target, spell)
if not not debuff and (caster == 'player' or caster == 'pet') then
return count
end
return 0
end)
Usage and Explanation:
Example:
Code:
{ "Frostbolt", "target.debuff(DebuffName,2)", "target" },
9_8. debuff.duration
Raw Excerpt:
Code:
ProbablyEngine.condition.register("debuff.duration", function(target, spell)
local debuff,_,expires,caster = UnitDebuff(target, spell)
if not not debuff and (caster == 'player' or caster == 'pet') then
return (expires - GetTime())
end
return 0
end)
Usage and Explanation:
Checks a debuff's duration against a comparator.
Example:
Code:
{ "Frostbolt", "target.debuff(Debuff).duration >= 5", "target" },
9_9. buff.duration
Raw Excerpt:
Code:
ProbablyEngine.condition.register("buff.duration", function(target, spell)
local buff,_,expires,caster = UnitBuff(target, spell)
if not not buff and (caster == 'player' or caster == 'pet') then
return (expires - GetTime())
end
return 0
end)
Usage and Explanation:
Example:
Code:
{ "Frostbolt", "target.debuff(Debuff).duration >= 5", "target" },
9_10. aura.crit
Raw Excerpt:
Code:
ProbablyEngine.condition.register("aura.crit", function(target, spell)
return smartQueryTracker(target, spell, 'crit')
end)
Usage and Explanation:
SECRET
Example:
9_11. aura.crits
Raw Excerpt:
Code:
ProbablyEngine.condition.register("aura.crits", function(target, spell)
return smartQueryTracker(target, spell, 'crits')
end)
Usage and Explanation:
SECRET
Example:
9_12. aura.avg
Raw Excerpt:
Code:
ProbablyEngine.condition.register("aura.avg", function(target, spell)
return smartQueryTracker(target, spell, 'avg')
end)
Usage and Explanation:
SECRET
Example:
9_13. aura.last
Raw Excerpt:
Code:
ProbablyEngine.condition.register("aura.last", function(target, spell)
return smartQueryTracker(target, spell, 'last')
end)
Usage and Explanation:
SECRET
Example:
9_14. aura.low
Raw Excerpt:
Code:
ProbablyEngine.condition.register("aura.low", function(target, spell)
return smartQueryTracker(target, spell, 'low')
end)
Usage and Explanation:
SECRET
Example:
9_15. aura.high
Raw Excerpt:
Code:
ProbablyEngine.condition.register("aura.high", function(target, spell)
return smartQueryTracker(target, spell, 'high')
end)
Usage and Explanation:
SECRET
Example:
9_16. aura.total
Raw Excerpt:
Code:
ProbablyEngine.condition.register("aura.total", function(target, spell)
return smartQueryTracker(target, spell, 'total')
end)
Usage and Explanation:
SECRET
Example:
9_17. aura.stacks
Raw Excerpt:
Code:
ProbablyEngine.condition.register("aura.stacks", function(target, spell)
return smartQueryTracker(target, spell, 'stacks')
end)
Usage and Explanation:
SECRET
Example:
9_18. aura.time
Raw Excerpt:
Code:
ProbablyEngine.condition.register("aura.time", function(target, spell)
return smartQueryTracker(target, spell, 'time')
end)
Usage and Explanation:
SECRET
Example:
9_19. aura.uptime
Raw Excerpt:
Code:
ProbablyEngine.condition.register("aura.uptime", function(target, spell)
return smartQueryTracker(target, spell, 'time') - GetTime()
end)
Usage and Explanation:
SECRET
Example:
9_20. stance
Raw Excerpt:
Code:
ProbablyEngine.condition.register("stance", function(target, spell)
return GetShapeshiftForm()
end)
Usage and Explanation:
Identical to: 9.21, 9.22
Any class
0 = humanoid form
Death Knight
1 = Blood Presence
2 = Frost Presence
3 = Unholy Presence
Druid
1 = Bear/Dire Bear Form
2 = Aquatic Form
3 = Cat Form
4 = Travel Form
5 = Moonkin Form (balance) / Flight Form (resto/feral/guardian)
6 = Flight Form (balance)
Paladin
1 = Seal of Truth
2 = Seal of Righteousness
3 = Seal of Insight - Seal of Justice if retribution
4 = Seal of Insight if retribution
Priest
1 = Chakra: Chastise or Shadowform
2 = Chakra: Sanctuary
3 = Chakra: Serenity
4 = Spirit of Redemption
Rogue
1 = Stealth
2 = Stealth
3 = Shadow Dance
Shaman
1 = Ghost Wolf
Warrior
1 = Battle Stance
2 = Defensive Stance
3 = Berserker Stance
Example:
Code:
{ "Mortal Strike", "player.stance = 3", "target" },
9_21. form
Raw Excerpt:
Code:
ProbablyEngine.condition.register("form", function(target, spell)
return GetShapeshiftForm()
end)
Usage and Explanation:
Identical to: 9.20, 9.22
Any class
0 = humanoid form
Death Knight
1 = Blood Presence
2 = Frost Presence
3 = Unholy Presence
Druid
1 = Bear/Dire Bear Form
2 = Aquatic Form
3 = Cat Form
4 = Travel Form
5 = Moonkin Form (balance) / Flight Form (resto/feral/guardian)
6 = Flight Form (balance)
Paladin
1 = Seal of Truth
2 = Seal of Righteousness
3 = Seal of Insight - Seal of Justice if retribution
4 = Seal of Insight if retribution
Priest
1 = Chakra: Chastise or Shadowform
2 = Chakra: Sanctuary
3 = Chakra: Serenity
4 = Spirit of Redemption
Rogue
1 = Stealth
2 = Stealth
3 = Shadow Dance
Shaman
1 = Ghost Wolf
Warrior
1 = Battle Stance
2 = Defensive Stance
3 = Berserker Stance
Example:
Code:
{ "Mangle", "player.form = 3", "target" },
9_22. seal
Raw Excerpt:
Code:
ProbablyEngine.condition.register("seal", function(target, spell)
return GetShapeshiftForm()
end)
Usage and Explanation:
Identical to: 9.20, 9.21
Any class
0 = humanoid form
Death Knight
1 = Blood Presence
2 = Frost Presence
3 = Unholy Presence
Druid
1 = Bear/Dire Bear Form
2 = Aquatic Form
3 = Cat Form
4 = Travel Form
5 = Moonkin Form (balance) / Flight Form (resto/feral/guardian)
6 = Flight Form (balance)
Paladin
1 = Seal of Truth
2 = Seal of Righteousness
3 = Seal of Insight - Seal of Justice if retribution
4 = Seal of Insight if retribution
Priest
1 = Chakra: Chastise or Shadowform
2 = Chakra: Sanctuary
3 = Chakra: Serenity
4 = Spirit of Redemption
Rogue
1 = Stealth
2 = Stealth
3 = Shadow Dance
Shaman
1 = Ghost Wolf
Warrior
1 = Battle Stance
2 = Defensive Stance
3 = Berserker Stance
Example:
Code:
{ "Judgement", "player.seal = 3", "target" },
9_23. focus
Raw Excerpt:
Code:
ProbablyEngine.condition.register("focus", function(target, spell)
return UnitPower(target, SPELL_POWER_FOCUS)
end)
Usage and Explanation:
Checks how much focus you have against a comparator.
Example:
Code:
{ "Arcane Shot", "player.focus >= 50", "target" },
9_24. holypower
Raw Excerpt:
Code:
ProbablyEngine.condition.register("holypower", function(target, spell)
return UnitPower(target, SPELL_POWER_HOLY_POWER)
end)
Usage and Explanation:
Checks how much holypower you have against a comparator.
Example:
Code:
{ "Flash of Light", "player.holypower = 2", "lowest" },
9_25. shadoworbs
Raw Excerpt:
Code:
ProbablyEngine.condition.register("shadoworbs", function(target, spell)
return UnitPower(target, SPELL_POWER_SHADOW_ORBS)
end)
Usage and Explanation:
Checks how many shadow orbs you have against a comparator.
Example:
Code:
{ "Devouring Plague", "player.shadoworbs = 5", "target" },
9_26. energy
Raw Excerpt:
Code:
ProbablyEngine.condition.register("energy", function(target, spell)
return UnitPower(target, SPELL_POWER_ENERGY)
end)
Usage and Explanation:
Checks how much energy you have against a comparator.
Example:
Code:
{ "Burst of Speed", "player.energy > 60" },
9_27. solar
Raw Excerpt:
Code:
ProbablyEngine.condition.register("solar", function(target, spell)
return GetEclipseDirection() == 'sun'
end)
Usage and Explanation:
Use in conjunction with 9_29 and a comparator.
Example:
Code:
{ "Sunfire", { "player.solar", "player.eclipse >= 20" }, "target" },
9_28. lunar
Raw Excerpt:
Code:
ProbablyEngine.condition.register("lunar", function(target, spell)
return GetEclipseDirection() == 'moon'
end)
Usage and Explanation:
Use in conjunction with 9_29 and a comparator.
Example:
Code:
{ "Moonfire", { "player.lunar", "player.eclipse >= 20" }, "target" },
9_29. eclipse
Raw Excerpt:
Code:
ProbablyEngine.condition.register("eclipse", function(target, spell)
return math.abs(UnitPower(target, SPELL_POWER_ECLIPSE))
end)
Usage and Explanation:
Use in conjuction with 9_27 and 9_28 and a comparator.
Example:
Code:
{ "Moonfire", { "player.lunar", "player.eclipse >= 20" }, "target" },
9_30. timetomax
Raw Excerpt:
Code:
ProbablyEngine.condition.register("timetomax", function(target, spell)
local max = UnitPowerMax(target)
local curr = UnitPower(target)
local regen = select(2, GetPowerRegen(target))
return (max - curr) * (1.0 / regen)
end)
Usage and Explanation:
Measures how long it will take your give power to reach maximum.
Example:
Code:
{ "Evocation", "player.timetomax <= 30" },
9_31. tomax
Raw Excerpt:
Code:
ProbablyEngine.condition.register("tomax", function(target, spell)
return ProbablyEngine.condition["timetomax"](toggle)
end)
Usage and Explanation:
Alias of 9_30
9_32. rage
Raw Excerpt:
Code:
ProbablyEngine.condition.register("rage", function(target, spell)
return UnitPower(target, SPELL_POWER_RAGE)
end)
Usage and Explanation:
Checks how much rage you have against a comparator.
Example:
Code:
{ "Mortal Strike", "player.rage <= 80", "target" },
9_33. chi
Raw Excerpt:
Code:
ProbablyEngine.condition.register("chi", function(target, spell)
return UnitPower(target, SPELL_POWER_CHI)
end)
Usage and Explanation:
Checks how much chi you have against a comparator.
Example:
Code:
{ "Uplift", "player.chi = 2" },
9_34. demonicfury
Raw Excerpt:
Code:
ProbablyEngine.condition.register("demonicfury", function(target, spell)
return UnitPower(target, SPELL_POWER_DEMONIC_FURY)
end)
Usage and Explanation:
Checks how much demonic fury you have against a comparator.
Example:
Code:
{ "Metamorphisis", "player.demonicfury >= 600" },
9_35. embers
Raw Excerpt:
Code:
ProbablyEngine.condition.register("embers", function(target, spell)
return UnitPower(target, SPELL_POWER_BURNING_EMBERS, true)
end)
Usage and Explanation:
Checks how many FULL embers you have against a comparator.
Example:
Code:
{ "Chaos Bolt", "player.embers >= 2" },
9_36. soulshards
Raw Excerpt:
Code:
ProbablyEngine.condition.register("soulshards", function(target, spell)
return UnitPower(target, SPELL_POWER_SOUL_SHARDS)
end)
Usage and Explanation:
Checks how many soul shards you have against a comparator.
Example:
Code:
{ "Haunt", "player.soulshards >= 2", "target" },
9_37. behind
Raw Excerpt:
Code:
ProbablyEngine.condition.register("behind", function(target, spell)
if FireHack then
return not UnitInfront(target, 'player')
end
return ProbablyEngine.module.player.behind
end)
Usage and Explanation:
Checks, via trial by error, if you are behind a target.
Example:
Code:
{ "Backstab", "player.behind", "target" },
9_38. infront
Raw Excerpt:
Code:
ProbablyEngine.condition.register("infront", function(target, spell)
if FireHack then
return UnitInfront(target, 'player')
end
return ProbablyEngine.module.player.infront
end)
Usage and Explanation:
Checks, via trial by error, if you are infront a target.
Example:
Code:
{ "Gouge", "player.infront", "target" },
9_39. disarmable
Raw Excerpt:
Code:
ProbablyEngine.condition.register("disarmable", function(target, spell)
return ProbablyEngine.module.disarm.check(target)
end)
Usage and Explanation:
Check if the target is disarmable.
Example:
Code:
{ "Disarm", "target.disarmable", "target" },
9_40. combopoints
Raw Excerpt:
Code:
ProbablyEngine.condition.register("combopoints", function()
return GetComboPoints('player', 'target')
end)
Usage and Explanation:
Checks how many combopoints you have against a comparator.
Example:
Code:
{ "Eviscerate", "player.combopoints = 5", "target" },
9_41. alive
Raw Excerpt:
Code:
ProbablyEngine.condition.register("alive", function(target, spell)
if UnitExists(target) and UnitHealth(target) > 0 then
return true
end
return false
end)
Usage and Explanation:
Checks if a target is alive.
Example:
Code:
{ "Flash of Light", "target.alive", "target" },
9_42. dead
Raw Excerpt:
Code:
ProbablyEngine.condition.register('dead', function (target)
return UnitIsDeadOrGhost(target)
end)
Usage and Explanation:
Checks if the target is dead.
Example:
Code:
{ "Revive", "target.dead", "target" },
9_43. swimming
Raw Excerpt:
Code:
ProbablyEngine.condition.register('swimming', function ()
return IsSwimming()
end)
Usage and Explanation:
Checks if you are swimming.
Example:
Code:
{"Water Walk", "player.swimming", "player" },
9_44. exists
Raw Excerpt:
Code:
ProbablyEngine.condition.register("exists", function(target)
return (UnitExists(target))
end)
Usage and Explanation:
Checks if something exists. Can be used in many ways.
Example:
Code:
target.exists, focus.exists, player.spell(spell).exists
9_45. modifier.shift
Raw Excerpt:
Code:
ProbablyEngine.condition.register("modifier.shift", function()
return IsShiftKeyDown() and GetCurrentKeyBoardFocus() == nil
end)
Usage and Explanation:
Checks if either shift button is pressed.
Example:
Code:
{ "Cyclone", "modifier.shift", "focus" },
9_46. modifier.control
Raw Excerpt:
Code:
ProbablyEngine.condition.register("modifier.control", function()
return IsControlKeyDown() and GetCurrentKeyBoardFocus() == nil
end)
Usage and Explanation:
Checks if either control button is pressed.
Example:
Code:
{ "Cyclone", "modifier.control", "focus" },
9_47. modifier.alt
Raw Excerpt:
Code:
ProbablyEngine.condition.register("modifier.alt", function()
return IsAltKeyDown() and GetCurrentKeyBoardFocus() == nil
end)
Usage and Explanation:
Checks if either alt button is pressed.
Example:
Code:
{ "Cyclone", "modifier.alt", "focus" },
9_48. modifier.lshift
Raw Excerpt:
Code:
ProbablyEngine.condition.register("modifier.lshift", function()
return IsLeftShiftKeyDown() and GetCurrentKeyBoardFocus() == nil
end)
Usage and Explanation:
Checks if left shift is pressed. Not recommended due to lack of support for macs.
Example:
Code:
{ "Cyclone", "modifier.lshift", "focus" },
9_49. modifier.lcontrol
Raw Excerpt:
Code:
ProbablyEngine.condition.register("modifier.lcontrol", function()
return IsLeftControlKeyDown() and GetCurrentKeyBoardFocus() == nil
end)
Usage and Explanation:
Checks if left control is pressed. Not recommended due to lack of support for macs.
Example:
Code:
{ "Cyclone", "modifier.lcontrol", "focus" },
9_50. modifier.lalt
Raw Excerpt:
Code:
ProbablyEngine.condition.register("modifier.lalt", function()
return IsLeftAltKeyDown() and GetCurrentKeyBoardFocus() == nil
end)
Usage and Explanation:
Checks if left alt is pressed. Not recommended due to lack of support for macs.
Example:
Code:
{ "Cyclone", "modifier.shift", "focus" },
9_51. modifier.rshift
Raw Excerpt:
Code:
ProbablyEngine.condition.register("modifier.rshift", function()
return IsRightShiftKeyDown() and GetCurrentKeyBoardFocus() == nil
end)
Usage and Explanation:
Checks if right shift is pressed. Not recommended due to lack of support for macs.
Example:
Code:
{ "Cyclone", "modifier.rshift", "focus" },
9_52. modifier.rcontrol
Raw Excerpt:
Code:
ProbablyEngine.condition.register("modifier.rcontrol", function()
return IsRightControlKeyDown() and GetCurrentKeyBoardFocus() == nil
end)
Usage and Explanation:
Checks if right control is pressed. Not recommended due to lack of support for macs.
Example:
Code:
{ "Cyclone", "modifier.rcontrol", "focus" },
9_53. modifier.ralt
Raw Excerpt:
Code:
ProbablyEngine.condition.register("modifier.ralt", function()
return IsRightAltKeyDown() and GetCurrentKeyBoardFocus() == nil
end)
Usage and Explanation:
Checks if right alt is pressed. Not recommended due to lack of support for macs.
Example:
Code:
{ "Cyclone", "modifier.ralt", "focus" },
9_54. modifier.player
Raw Excerpt:
Code:
ProbablyEngine.condition.register("modifier.player", function()
return UnitIsPlayer("target")
end)
Usage and Explanation:
Deprecated.
9_55. classification
Raw Excerpt:
Code:
ProbablyEngine.condition.register("classification", function (target, spell)
if not spell then return false end
local classification = UnitClassification(target)
if stringFind(spell, '[%s,]+') then
for classificationExpected in stringGmatch(spell, '%a+') do
if classification == stringLower(classificationExpected) then
return true
end
end
return false
else
return UnitClassification(target) == stringLower(spell)
end
end)
Usage and Explanation:
Checks what kind of mob target is.
Acceptable inputs are:
elite - Elite
minus - Minion of another NPC; e.g. does not give experience or reputation.
normal - Normal
rare - Rare
rareelite - Rare-Elite
worldboss - World Boss
Example:
Code:
{ "Heroism", "targetworldboss)" },
9_56. boss
Raw Excerpt:
Code:
ProbablyEngine.condition.register('boss', function (target, spell)
local classification = UnitClassification(target)
if spell == 'true' and (classification == 'rareelite' or classification == 'rare') then
return true
end
if classification == 'worldboss' or LibBoss.BossIDs[tonumber(UnitID(target))] then
return true
end
return false
end)
Usage and Explanation:
Simple check if target is a boss.
Example:
Code:
{ "Heroism", "target.boss" },
9_57. id
Raw Excerpt:
Code:
ProbablyEngine.condition.register("id", function(target, id)
local expectedID = tonumber(id)
if expectedID and UnitID(target) == expectedID then
return true
end
return false
end)
Usage and Explanation:
Hard check for unitID.
Example:
Code:
{ "Frostbolt", "target.id = 31144" },
9_58. toggle
Raw Excerpt:
Code:
ProbablyEngine.condition.register("toggle", function(toggle)
return ProbablyEngine.condition["modifier.toggle"](toggle)
end)
Usage and Explanation:
Alias for 9_59
9_59. modifier.toggle
Raw Excerpt:
Code:
ProbablyEngine.condition.register("modifier.toggle", function(toggle)
return ProbablyEngine.config.read('button_states', toggle, false)
end)
Usage and Explanation:
Checks button state. Not... Really used.
9_60. modifier.taunt
Raw Excerpt:
Code:
ProbablyEngine.condition.register("modifier.taunt", function()
if ProbablyEngine.condition["modifier.toggle"]('taunt') then
if UnitThreatSituation("player", "target") then
local status = UnitThreatSituation("player", "target")
return (status < 3)
end
return false
end
return false
end)
Usage and Explanation:
Uses if target dosent have max threat status 3 or greater against you.
Example:
Code:
{ "Taunt", "!target.threat", "target" },
9_61. threat
Raw Excerpt:
Code:
ProbablyEngine.condition.register("threat", function(target)
if UnitThreatSituation("player", target) then
local isTanking, status, scaledPercent, rawPercent, threatValue = UnitDetailedThreatSituation("player", target)
return scaledPercent
end
return 0
end)
Usage and Explanation:
Returns a percentage against a comparator.
Example:
Code:
{ "Taunt", "target.threat <= 80", "target" },
9_62. agro
Raw Excerpt:
Code:
ProbablyEngine.condition.register("agro", function(target)
if UnitThreatSituation(target) and UnitThreatSituation(target) >= 2 then
return true
end
return false
end)
Usage and Explanation:
Returns true if you start pulling aggro. We spelled it wrong, apparently.
Example:
Code:
{ "Fade", "target.agro" },
9_63. balance.sun
Raw Excerpt:
Code:
ProbablyEngine.condition.register("balance.sun", function()
local direction = GetEclipseDirection()
if direction == 'none' or direction == 'sun' then return true end
end)
Usage and Explanation:
It's like 9_27.
9_64. balance.moon
Raw Excerpt:
Code:
ProbablyEngine.condition.register("balance.moon", function()
local direction = GetEclipseDirection()
if direction == 'moon' then return true end
end)
Usage and Explanation:
It's like 9_28.
9_64. moving
Raw Excerpt:
Code:
ProbablyEngine.condition.register("moving", function(target)
local speed, _ = GetUnitSpeed(target)
return speed ~= 0
end)
Usage and Explanation:
Checks if the target is moving.
Example:
Code:
{ "Sprint", "player.moving },
9_65. lastmoved
Raw Excerpt:
Code:
local movingCache = { }
ProbablyEngine.condition.register("lastmoved", function(target)
if target == 'player' then
if not ProbablyEngine.module.player.moving then
return GetTime() - ProbablyEngine.module.player.movingTime
end
return false
else
if UnitExists(target) then
local guid = UnitGUID(target)
if movingCache[guid] then
local moving = (GetUnitSpeed(target) > 0)
if not movingCache[guid].moving and moving then
movingCache[guid].last = GetTime()
movingCache[guid].moving = true
return false
elseif moving then
return false
elseif not moving then
movingCache[guid].moving = false
return GetTime() - movingCache[guid].last
end
else
movingCache[guid] = { }
movingCache[guid].last = GetTime()
movingCache[guid].moving = (GetUnitSpeed(target) > 0)
return false
end
end
return false
end
end)
Usage and Explanation:
Checks the last time target moved against a comparator.
Example:
Code:
{ "Frostbolt", "player.lastmoved > 3", "target" },
9_66. movingfor
Raw Excerpt:
Code:
ProbablyEngine.condition.register("movingfor", function(target)
if target == 'player' then
if ProbablyEngine.module.player.moving then
return GetTime() - ProbablyEngine.module.player.movingTime
end
return false
else
if UnitExists(target) then
local guid = UnitGUID(target)
if movingCache[guid] then
local moving = (GetUnitSpeed(target) > 0)
if not movingCache[guid].moving then
movingCache[guid].last = GetTime()
movingCache[guid].moving = (GetUnitSpeed(target) > 0)
return false
elseif moving then
return GetTime() - movingCache[guid].last
elseif not moving then
movingCache[guid].moving = false
return false
end
else
movingCache[guid] = { }
movingCache[guid].last = GetTime()
movingCache[guid].moving = (GetUnitSpeed(target) > 0)
return false
end
end
return false
end
end)
Usage and Explanation:
Checks how long you have been moving against a comparator.
Example:
Code:
{ "Burst of Speed", "player.movingfor > 3", "target" },
9_67. ruinicpower
Raw Excerpt:
Code:
ProbablyEngine.condition.register("runicpower", function(target, spell)
return UnitPower(target, SPELL_POWER_RUNIC_POWER)
end)
Usage and Explanation:
Checks how much runicpower target has against a comparator.
Example:
Code:
{ "Anti-Magic Shell", "player.runicpower <= 60" },
9_68. runes.count
Raw Excerpt:
Code:
ProbablyEngine.condition.register("runes.count", function(target, rune)
local rune = string.lower(rune)
-- 12 b, 34 f, 56 u
runes_t[1], runes_t[2], runes_t[3], runes_t[4], runes_c[1], runes_c[2], runes_c[3], runes_c[4] = 0,0,0,0,0,0,0,0
for i=1, 6 do
local _, _, c = GetRuneCooldown(i)
local t = GetRuneType(i)
runes_t[t] = runes_t[t] + 1
if c then
runes_c[t] = runes_c[t] + 1
end
end
if rune == 'frost' then
return runes_c[3] + runes_c[4]
elseif rune == 'blood' then
return runes_c[1] + runes_c[4]
elseif rune == 'unholy' then
return runes_c[2] + runes_c[4]
elseif rune == 'death' then
return runes_c[4]
end
return 0
end)
Usage and Explanation:
Returns count of X rune.
Example:
Code:
{ "Death Strike", "runes.count(death,2)", "target" },
9_69. runes.frac
Raw Excerpt:
Code:
ProbablyEngine.condition.register("runes.frac", function(target, rune)
local rune = string.lower(rune)
-- 12 b, 34 f, 56 u
runes_t[1], runes_t[2], runes_t[3], runes_t[4], runes_c[1], runes_c[2], runes_c[3], runes_c[4] = 0,0,0,0,0,0,0,0
for i=1, 6 do
local r, d, c = GetRuneCooldown(i)
local frac = 1-(r/d)
local t = GetRuneType(i)
runes_t[t] = runes_t[t] + 1
if c then
runes_c[t] = runes_c[t] + frac
end
end
if rune == 'frost' then
return runes_c[3] + runes_c[4]
elseif rune == 'blood' then
return runes_c[1] + runes_c[4]
elseif rune == 'unholy' then
return runes_c[2] + runes_c[4]
elseif rune == 'death' then
return runes_c[4]
end
return 0
end)
Usage and Explanation:
I honestly have no clue what the hell this does. We've had it forever, and I've never seen it used.
9_70. runes.depleted
Raw Excerpt:
Code:
ProbablyEngine.condition.register("runes.depleted", function(target, spell)
local regeneration_threshold = 1
for i=1,6,2 do
local start, duration, runeReady = GetRuneCooldown(i)
local start2, duration2, runeReady2 = GetRuneCooldown(i+1)
if not runeReady and not runeReady2 and duration > 0 and duration2 > 0 and start > 0 and start2 > 0 then
if (start-GetTime()+duration)>=regeneration_threshold and (start2-GetTime()+duration2)>=regeneration_threshold then
return true
end
end
end
return false
end)
Usage and Explanation:
Checks how many... Nevermind, I don't know. Same as before, no body uses this and I don't have a clue what it does.
9_71. runes
Raw Excerpt:
Code:
ProbablyEngine.condition.register("runes", function(target, rune)
return ProbablyEngine.condition["runes.count"](target, rune)
end)
Usage and Explanation:
Alias for 9_68
Example:
Code:
{ "Death Strike", "runes.count(death,2)", "target" },
9_72. health
Raw Excerpt:
Code:
ProbablyEngine.condition.register("health", function(target)
if UnitExists(target) then
return math.floor((UnitHealth(target) / UnitHealthMax(target)) * 100)
end
return 0
end)
Usage and Explanation:
Checks a target's health against a comparator.
Example:
Code:
{ "Execute", "target.health <= 30", "target" },
9_73. health.actual
Raw Excerpt:
Code:
ProbablyEngine.condition.register("health.actual", function(target)
return UnitHealth(target)
end)
Usage and Explanation:
Returns the actual HP of the target against a comparator.
Example:
Code:
{ "Execute", "target.health <= 20000", "target" },
9_74. health.max
Raw Excerpt:
Code:
ProbablyEngine.condition.register("health.max", function(target)
return UnitHealthMax(target)
end)
Usage and Explanation:
Checks unit max health against a comparator.
Example:
Code:
{ "Polymorph", "target.maxhealth > 9000", "target" },
9_75. mana
Raw Excerpt:
Code:
ProbablyEngine.condition.register("mana", function(target, spell)
if UnitExists(target) then
return math.floor((UnitMana(target) / UnitManaMax(target)) * 100)
end
return 0
end)
Usage and Explanation:
Example:
9_76. raid.health
Raw Excerpt:
Code:
ProbablyEngine.condition.register("raid.health", function()
return ProbablyEngine.raid.raidPercent()
end)
Usage and Explanation:
Returns the avg raid health against a comparator.
Example:
Code:
{ "Tranquility", "raid.health <= 60" },
9_77. modifier.multitarget
Raw Excerpt:
Code:
ProbablyEngine.condition.register("modifier.multitarget", function()
return ProbablyEngine.condition["modifier.toggle"]('multitarget')
end)
Usage and Explanation:
Simple bool return if multitarget is enabled.
Example:
Code:
{ "Mind Sear", "modifier.multitarget", "target" },
9_78. modifier.cooldowns
Raw Excerpt:
Code:
ProbablyEngine.condition.register("modifier.cooldowns", function()
return ProbablyEngine.condition["modifier.toggle"]('cooldowns')
end)
Usage and Explanation:
Simple bool return if cooldowns is enabled.
Example:
Code:
{ "Heroism", "modifier.cooldown" },
9_79. modifier.cooldown
Raw Excerpt:
Code:
ProbablyEngine.condition.register("modifier.cooldown", function()
return ProbablyEngine.condition["modifier.toggle"]('cooldowns')
end)
Usage and Explanation:
Simple bool return if cooldowns is enabled.
Example:
Code:
{ "Heroism", "modifier.cooldown" },
9_80. modifier.interrupts
Raw Excerpt:
Code:
ProbablyEngine.condition.register("modifier.interrupts", function()
if ProbablyEngine.condition["modifier.toggle"]('interrupt') then
local stop = ProbablyEngine.condition["casting"]('target')
if stop then StopCast() end
return stop
end
return false
end)
Usage and Explanation:
Simple bool check if interrupts is enabled, and if target is casting.
Example:
Code:
{ "Kick", "modifier.interrupts", "target" },
9_81. modifier.interrupt
Raw Excerpt:
Code:
ProbablyEngine.condition.register("modifier.interrupt", function()
if ProbablyEngine.condition["modifier.toggle"]('interrupt') then
return ProbablyEngine.condition["casting"]('target')
end
return false
end)
Usage and Explanation:
Identical to 9_80.
9_82. modifier.last
Raw Excerpt:
Code:
local lastDepWarn = false
ProbablyEngine.condition.register("modifier.last", function(target, spell)
if not lastDepWarn then
ProbablyEngine.print('modifier.last has been deprecated, please use lastcast')
lastDepWarn = true
end
return ProbablyEngine.parser.lastCast == GetSpellName(spell)
end)
Usage and Explanation:
Deprecated, see 9_83
9_83. lastcast
Raw Excerpt:
Code:
ProbablyEngine.condition.register("lastcast", function(spell, arg)
if arg then spell = arg end
return ProbablyEngine.parser.lastCast == GetSpellName(spell)
end)
Usage and Explanation:
Returns last casted spell.
Example:
Code:
{ "Frostbolt", "player.lastcast(Deep Freeze)", "target" },
9_84. enchant.mainhand
Raw Excerpt:
Code:
ProbablyEngine.condition.register("enchant.mainhand", function()
return (select(1, GetWeaponEnchantInfo()) == 1)
end)
Usage and Explanation:
Checks if mainhand has a weapon enchant.
Example:
Code:
{ "Flametongue Weapon", "!enchant.mainhand" },
9_85. enchant.offhand
Raw Excerpt:
Code:
ProbablyEngine.condition.register("enchant.offhand", function()
return (select(4, GetWeaponEnchantInfo()) == 1)
end)
Usage and Explanation:
Offhand, identical to mainhand.
9_86. totem
Raw Excerpt:
Code:
ProbablyEngine.condition.register("totem", function(target, totem)
for index = 1, 4 do
local _, totemName, startTime, duration = GetTotemInfo(index)
if totemName == GetSpellName(totem) then
return true
end
end
return false
end)
Usage and Explanation:
Returns if a totem of X name exists.
Example:
Code:
{ "Storm Elemental Totem", "!player.totem(Storm Elemental Totem)" },
9_87. totem.duration
Raw Excerpt:
Code:
ProbablyEngine.condition.register("totem.duration", function(target, totem)
for index = 1, 4 do
local _, totemName, startTime, duration = GetTotemInfo(index)
if totemName == GetSpellName(totem) then
return floor(startTime + duration - GetTime())
end
end
return 0
end)
Usage and Explanation:
Returns totem duration against comparator.
Example:
Code:
{ "Searing Totem", "player.totem(Searing Totem).duration <= 5
9_88. mushrooms
Raw Excerpt:
Code:
ProbablyEngine.condition.register("mushrooms", function ()
local count = 0
for slot = 1, 3 do
if GetTotemInfo(slot) then
count = count + 1 end
end
return count
end)
Usage and Explanation:
Very deprecated.
9_89. casting.time
Raw Excerpt:
Code:
ProbablyEngine.condition.register('casting.time', function(target, spell)
local name, startTime, endTime = checkCasting(target)
if not endTime or not startTime then return false end
if name then return (endTime - startTime) / 1000 end
return false
end)
Usage and Explanation:
Returns how long it will take to cast a spell.
Example:
Code:
{ "Heroism", "target.casting >= 1" },
9_90. casting.delta
Raw Excerpt:
Code:
ProbablyEngine.condition.register('casting.delta', function(target, spell)
local name, startTime, endTime, notInterruptible = checkCasting(target)
if not endTime or not startTime then return false end
if name and not notInterruptible then
local castLength = (endTime - startTime) / 1000
local secondsLeft = endTime / 1000 - GetTime()
return secondsLeft, castLength
end
return false
end)
Usage and Explanation:
Deprecated.
9_91. casting.percent
Raw Excerpt:
Code:
ProbablyEngine.condition.register('casting.percent', function(target, spell)
local name, startTime, endTime, notInterruptible = checkCasting(target)
if name and not notInterruptible then
local castLength = (endTime - startTime) / 1000
local secondsLeft = endTime / 1000 - GetTime()
return ((secondsLeft/castLength)*100)
end
return false
end)
Usage and Explanation:
Compares cast percentage against comparator.
Example:
Code:
{ "Kick", "target.casting.percent >= 80" },
9_92. channeling and casting
Raw Excerpt:
Code:
ProbablyEngine.condition.register('channeling', function (target, spell)
return checkChanneling(target)
end)
Code:
ProbablyEngine.condition.register("casting", function(target, spell)
local castName,_,_,_,_,endTime,_,_,notInterruptibleCast = UnitCastingInfo(target)
local channelName,_,_,_,_,endTime,_,notInterruptibleChannel = UnitChannelInfo(target)
spell = GetSpellName(spell)
if (castName == spell or channelName == spell) and not not spell then
return true
elseif notInterruptibleCast == false or notInterruptibleChannel == false then
return true
end
return false
end)
Usage and Explanation:
Checks if the target is casting or channeling, respectively. Can be used with spell ID
Example:
Code:
{ "Kick", "target.casting(Frostbolt)", "target" },
{ "Kick", "target.channeling(Penance)", "target" },
9_93. interruptsat
Raw Excerpt:
Code:
ProbablyEngine.condition.register('interruptsAt', function (target, spell)
if ProbablyEngine.condition['modifier.toggle']('interrupt') then
if UnitName('player') == UnitName(target) then return false end
local stopAt = tonumber(spell) or 95
local secondsLeft, castLength = ProbablyEngine.condition['casting.delta'](target)
if secondsLeft and 100 - (secondsLeft / castLength * 100) > stopAt then
StopCast()
return true
end
end
return false
end)
Usage and Explanation:
Returns cast percentage against comparator & interrupts enabled.
Example:
Code:
{ "Kick", "target.interruptsat >= 80", "target" },
9_94. interruptat
Raw Excerpt:
Code:
ProbablyEngine.condition.register('interruptAt', function (target, spell)
if ProbablyEngine.condition['modifier.toggle']('interrupt') then
if UnitName('player') == UnitName(target) then return false end
local stopAt = tonumber(spell) or 95
local secondsLeft, castLength = ProbablyEngine.condition['casting.delta'](target)
if secondsLeft and 100 - (secondsLeft / castLength * 100) > stopAt then
return true
end
end
return false
end)
Usage and Explanation:
Identical to 9_93
9_95. spell.cooldown
Raw Excerpt:
Code:
ProbablyEngine.condition.register("spell.cooldown", function(target, spell)
local start, duration, enabled = GetSpellCooldown(spell)
if not start then return false end
if start ~= 0 then
return (start + duration - GetTime())
end
return 0
end)
Usage and Explanation:
Returns if a spell is on cooldown, bool.
Example:
Code:
{ "Preparation", "player.spell(Vanish).cooldown" },
9_96. spell.recharge
Raw Excerpt:
Code:
ProbablyEngine.condition.register("spell.recharge", function(target, spell)
local charges, maxCharges, start, duration = GetSpellCharges(spell)
if not start then return false end
if start ~= 0 then
return (start + duration - GetTime())
end
return 0
end)
Usage and Explanation:
Returns how long it will take a charge spell to recharge against a comparator.
Example:
Code:
{ "Spell", "player.spell(Spell).recharge >= 10" },
9_97. spell.usable
Raw Excerpt:
Code:
ProbablyEngine.condition.register("spell.usable", function(target, spell)
return (IsUsableSpell(spell) ~= nil)
end)
Usage and Explanation:
Bool check if a spell is usable.
Example:
Code:
{ "Vanish", "player.spell(Vanish).usable" },
9_98. spell.exists
Raw Excerpt:
Code:
ProbablyEngine.condition.register("spell.exists", function(target, spell)
if GetSpellBookIndex(spell) then
return true
end
return false
end)
Usage and Explanation:
Returns if a spell in a book exists. Can be used to check if a talent exists too.
Example:
Code:
{ "Frostbolt", "player.spell(frostbolt).exists" },
9_99. spell.casted
Raw Excerpt:
Code:
ProbablyEngine.condition.register("spell.casted", function(target, spell)
return ProbablyEngine.module.player.casted(GetSpellName(spell))
end)
Usage and Explanation:
The module required dosent exist.
9_100. spell.charges
Raw Excerpt:
Code:
ProbablyEngine.condition.register("spell.charges", function(target, spell)
return select(1, GetSpellCharges(spell))
end)
Usage and Explanation:
Returns charges remaining against a comparator
Example:
Code:
{ "Spell", "player.spell(spell).charges >= 1" },
9_101. spell.cd
Raw Excerpt:
Code:
ProbablyEngine.condition.register("spell.cd", function(target, spell)
return ProbablyEngine.condition["spell.cooldown"](target, spell)
end)
Usage and Explanation:
Alias for 9_95
9_102. spell.range
Raw Excerpt:
Code:
ProbablyEngine.condition.register("spell.range", function(target, spell)
local spellIndex, spellBook = GetSpellBookIndex(spell)
if not spellIndex then return false end
return spellIndex and IsSpellInRange(spellIndex, spellBook, target)
end)
Usage and Explanation:
Returns bool if spell is in range.
Example:
Code:
{ "Arcane Shot", "player.spell(Arcane Shot).range" },
9_103. talent
Raw Excerpt:
Code:
ProbablyEngine.condition.register("talent", function(args)
local row, col = strsplit(",", args, 2)
return hasTalent(tonumber(row), tonumber(col))
end)
Usage and Explanation:
Checks row and column if talent is selected. Harder version of spell.exists.
Example:
Code:
{ "Talent", "player.talent(2,3)", "target" },
9_104. friend
Raw Excerpt:
Code:
ProbablyEngine.condition.register("friend", function(target, spell)
return ( UnitCanAttack("player", target) ~= 1 )
end)
Usage and Explanation:
Checks bool if target is friendly.
Example:
Code:
{ "Revive", { "target.dead", "target.friendly" }, "target" },
9_105. enemy
Raw Excerpt:
Code:
ProbablyEngine.condition.register("enemy", function(target, spell)
return ( UnitCanAttack("player", target) )
end)
Usage and Explanation:
Opposite of 9_104, returns bool if you can attack target.
Example:
Code:
{ "Arcane Shot", "target.enemy", "target" },
9_106. glyph
Raw Excerpt:
Code:
ProbablyEngine.condition.register("glyph", function(target, spell)
local spellId = tonumber(spell)
local glyphName, glyphId
for i = 1, 6 do
glyphId = select(4, GetGlyphSocketInfo(i))
if glyphId then
if spellId then
if select(4, GetGlyphSocketInfo(i)) == spellId then
return true
end
else
glyphName = GetSpellName(glyphId)
if glyphName:find(spell) then
return true
end
end
end
end
return false
end)
Usage and Explanation:
Deprecated, use spell.exists until we find a workaround.
9_107. range
Raw Excerpt:
Code:
ProbablyEngine.condition.register("range", function(target)
return ProbablyEngine.condition["distance"](target)
end)
Usage and Explanation:
Alias for 9_108
9_108. distance
Raw Excerpt:
Code:
ProbablyEngine.condition.register("distance", function(target)
if Distance then
return math.floor(Distance(target, 'player'))
else -- fall back to libRangeCheck
local minRange, maxRange = rangeCheck:GetRange(target)
return maxRange or minRange
end
end)
Usage and Explanation:
Returns estimated distance against comparator unless using advanced unlocker.
Example:
Code:
{ "Charge", "target.range >= 15", "target" },
9_109. level
Raw Excerpt:
Code:
ProbablyEngine.condition.register("level", function(target, range)
return UnitLevel(target)
end)
Usage and Explanation:
Returns integer against comparator for target level.
Example:
Code:
{ "Divine Shield", "target.level > 100" },
9_110. combat
Raw Excerpt:
Code:
ProbablyEngine.condition.register("combat", function(target, range)
return UnitAffectingCombat(target)
end)
Usage and Explanation:
Returns bool if target is in combat.
Example:
Code:
{ "Polymorph", "target.combat", "target" },
9_111. time
Raw Excerpt:
Code:
ProbablyEngine.condition.register("time", function(target, range)
if ProbablyEngine.module.player.combatTime then
return GetTime() - ProbablyEngine.module.player.combatTime
end
return false
end)
Usage and Explanation:
Returns time in combat against comparator in seconds..
Example:
Code:
{ "Heroism", "player.time >= 600" },
9_112. deathin
Raw Excerpt:
Code:
local deathTrack = { }
ProbablyEngine.condition.register("deathin", function(target, range)
local guid = UnitGUID(target)
if deathTrack[target] and deathTrack[target].guid == guid then
local start = deathTrack[target].time
local currentHP = UnitHealth(target)
local maxHP = deathTrack[target].start
local diff = maxHP - currentHP
local dura = GetTime() - start
local hpps = diff / dura
local death = currentHP / hpps
if death == math.huge then
return 8675309
elseif death < 0 then
return 0
else
return death
end
elseif deathTrack[target] then
table.empty(deathTrack[target])
else
deathTrack[target] = { }
end
deathTrack[target].guid = guid
deathTrack[target].time = GetTime()
deathTrack[target].start = UnitHealth(target)
return 8675309
end)
Usage and Explanation:
Returns estimated target time to death against comparator.
Example:
Code:
{ "Berserk", "target.deathin <= 20" },
9_113. ttd
Raw Excerpt:
Code:
ProbablyEngine.condition.register("ttd", function(target, range)
return ProbablyEngine.condition["deathin"](target)
end)
Usage and Explanation:
Alias to 9_112
9_114. role
Raw Excerpt:
Code:
ProbablyEngine.condition.register("role", function(target, role)
role = role:upper()
local damageAliases = { "DAMAGE", "DPS", "DEEPS" }
local targetRole = UnitGroupRolesAssigned(target)
if targetRole == role then return true
elseif role:find("HEAL") and targetRole == "HEALER" then return true
else
for i = 1, #damageAliases do
if role == damageAliases[i] then return true end
end
end
return false
end)
Usage and Explanation:
Returns target's in party/raid role.
Example:
Code:
{ "Fear Ward", "target.role(Healer)", "target" },
9_115. name
Raw Excerpt:
Code:
ProbablyEngine.condition.register("name", function (target, expectedName)
return UnitExists(target) and UnitName(target):lower():find(expectedName:lower()) ~= nil
end)
Usage and Explanation:
Hard check for unit name.
Example:
Code:
{ "Heroism", "target.name(Aeonaxx)" },
9_116. modifier.group
Raw Excerpt:
Code:
ProbablyEngine.condition.register("modifier.party", function()
return IsInGroup()
end)
Usage and Explanation:
Returns bool if you are in a group
Example:
Code:
{ "Spell", "player.party" },
9_117. modifier.raid
Raw Excerpt:
Code:
ProbablyEngine.condition.register("modifier.raid", function()
return IsInRaid()
end)
Usage and Explanation:
Returns bool if you are in raid.
Example:
Code:
{ "Spell", "player.raid", "target" },
9_118. party
Raw Excerpt:
Code:
ProbablyEngine.condition.register("party", function(target)
return UnitInParty(target)
end)
Usage and Explanation:
Returns bool if target is in a party.
Example:
Code:
{ "Spell", "target.party" },
9_119. raid
Raw Excerpt:
Code:
ProbablyEngine.condition.register("raid", function(target)
return UnitInRaid(target)
end)
Usage and Explanation:
Returns bool if target is in raid.
Example:
Code:
{ "Spell", "target.raid" },
9_120. modifier.members
Raw Excerpt:
Code:
ProbablyEngine.condition.register("modifier.members", function()
return (GetNumGroupMembers() or 0)
end)
Usage and Explanation:
Returns integer against comparator for group members.
Example:
Code:
{ "Uplift", "modifier.members >= 10" },
9_121. creatureType
Raw Excerpt:
Code:
ProbablyEngine.condition.register("creatureType", function (target, expectedType)
return UnitCreatureType(target) == expectedType
end)
Usage and Explanation:
Returns creature type against input. Accepted inputs are:
* Beast
* Dragonkin
* Demon
* Elemental
* Giant
* Undead
* Humanoid
* Critter
* Mechanical
* Not specified
* Totem
* Non-combat Pet
* Gas Cloud
Example:
Code:
{ "Shadow Word: Pain", "target.creaturetype(Totem)", "target" },
9_122. class
Raw Excerpt:
Code:
ProbablyEngine.condition.register("class", function (target, expectedClass)
local class, _, classID = UnitClass(target)
if tonumber(expectedClass) then
return tonumber(expectedClass) == classID
else
return expectedClass == class
end
end)
Usage and Explanation:
Returns integer against input. Accepted input:
None = 0
Warrior = 1
Paladin = 2
Hunter = 3
Rogue = 4
Priest = 5
DeathKnight = 6
Shaman = 7
Mage = 8
Warlock = 9
Monk = 10
Druid = 11
Example:
Code:
{ "Polymorph", "!target.class(11)", "target" },
9_123. falling
Raw Excerpt:
Code:
ProbablyEngine.condition.register("falling", function()
return IsFalling()
end)
Usage and Explanation:
Returns bool if target is falling.
Example:
Code:
{ "Slow Fall", "player.falling" },
9_124. timeout
Raw Excerpt:
Code:
ProbablyEngine.condition.register("timeout", function(args)
local name, time = strsplit(",", args, 2)
if tonumber(time) then
if ProbablyEngine.timeout.check(name) then
return false
end
ProbablyEngine.timeout.set(name, tonumber(time))
return true
end
return false
end)
Usage and Explanation:
Blacklists spell for input time since last cast.
Example:
Code:
{ "Frostbolt", "player.spell(Frostbolt).timeout >= 3" },
9_125. hashero
Raw Excerpt:
Code:
local heroismBuffs = { 32182, 90355, 80353, 2825, 146555 }
ProbablyEngine.condition.register("hashero", function(unit, spell)
for i = 1, #heroismBuffs do
if UnitBuff('player', GetSpellName(heroismBuffs[i])) then
return true
end
end
return false
end)
Usage and Explanation:
Simple buff check for heroism-esque spells.
Example:
Code:
{ "Heroism", "!player.hashero" },
9_126. buffs.stats
Raw Excerpt:
Code:
ProbablyEngine.condition.register("buffs.stats", function(unit, _)
return (GetRaidBuffTrayAuraInfo(1) ~= nil)
end)
Usage and Explanation:
Checks if target has a stats buff.
Example:
Code:
{ "Spell", "!target.buffs.stats", "target" },
9_127. buffs.stamina
Raw Excerpt:
Code:
ProbablyEngine.condition.register("buffs.stamina", function(unit, _)
return (GetRaidBuffTrayAuraInfo(2) ~= nil)
end)
Usage and Explanation:
Checks if target has a stamina buff.
Example:
Code:
{ "Spell", "!target.buffs.stamina", "target" },
9_128. buffs.attackpower
Raw Excerpt:
Code:
ProbablyEngine.condition.register("buffs.attackpower", function(unit, _)
return (GetRaidBuffTrayAuraInfo(3) ~= nil)
end)
Usage and Explanation:
Checks if target has an attackpower buff.
Example:
Code:
{ "Spell", "!target.buffs.attackpower", "target" },
9_129. buffs.attackspeed
Raw Excerpt:
Code:
ProbablyEngine.condition.register("buffs.attackspeed", function(unit, _)
return (GetRaidBuffTrayAuraInfo(4) ~= nil)
end)
Usage and Explanation:
Checks if target has an attackspeed buff.
Example:
Code:
{ "Spell", "!target.buffs.attackspeed", "target" },
9_130. buffs.haste
Raw Excerpt:
Code:
ProbablyEngine.condition.register("buffs.haste", function(unit, _)
return (GetRaidBuffTrayAuraInfo(4) ~= nil)
end)
Usage and Explanation:
Checks if target has a haste buff.
Example:
Code:
{ "Spell", "!target.buffs.haste", "target" },
9_131. buffs.spellpower
Raw Excerpt:
Code:
ProbablyEngine.condition.register("buffs.spellpower", function(unit, _)
return (GetRaidBuffTrayAuraInfo(5) ~= nil)
end)
Usage and Explanation:
Checks if target has a spellpower buff.
Example:
Code:
{ "Spell", "!target.buffs.spellpower", "target" },
9_132. buffs.crit
Raw Excerpt:
Code:
ProbablyEngine.condition.register("buffs.crit", function(unit, _)
return (GetRaidBuffTrayAuraInfo(6) ~= nil)
end)
Usage and Explanation:
Checks if target has a crit buff.
Example:
Code:
{ "Spell", "!target.buffs.crit", "target" },
9_133. buffs.critical/criticalstrike
Raw Excerpt:
Code:
ProbablyEngine.condition.register("buffs.critical", function(unit, _)
return (GetRaidBuffTrayAuraInfo(6) ~= nil)
end)
Usage and Explanation:
Alias to 9_133
9_134. buffs.mastery
Raw Excerpt:
Code:
ProbablyEngine.condition.register("buffs.mastery", function(unit, _)
return (GetRaidBuffTrayAuraInfo(7) ~= nil)
end)
Usage and Explanation:
Checks if target has a mastery buff.
Example:
Code:
{ "Spell", "!target.buffs.mastery", "target" },
9_135. buffs.multistrike
Raw Excerpt:
Code:
ProbablyEngine.condition.register("buffs.multistrike", function(unit, _)
return (GetRaidBuffTrayAuraInfo(8) ~= nil)
end)
Usage and Explanation:
Checks if target has a multistrike buff.
Example:
Code:
{ "Spell", "!target.buffs.multistrike", "target" },
9_136. buffs.multi
Raw Excerpt:
Code:
ProbablyEngine.condition.register("buffs.multi", function(unit, _)
return (GetRaidBuffTrayAuraInfo(8) ~= nil)
end)
Usage and Explanation:
Alias to 9_135
9_137. buffs.vers
Raw Excerpt:
Code:
ProbablyEngine.condition.register("buffs.vers", function(unit, _)
return (GetRaidBuffTrayAuraInfo(9) ~= nil)
end)
Usage and Explanation:
Checks if target has a versatility buff.
Example:
Code:
{ "Spell", "!target.buffs.vers", "target" },
9_138. buffs.versatility
Raw Excerpt:
Code:
ProbablyEngine.condition.register("buffs.versatility", function(unit, _)
return (GetRaidBuffTrayAuraInfo(9) ~= nil)
end)
Usage and Explanation:
Alias for 9_137
9_139. charmed
Raw Excerpt:
Code:
ProbablyEngine.condition.register("charmed", function(unit, _)
return (UnitIsCharmed(unit) == true)
end)
Usage and Explanation:
Bool check if target is charmed.
Example:
Code:
{ "Ice Lance", "target.charmed", "target" },
9_140. vengeance
Raw Excerpt:
Code:
ProbablyEngine.condition.register("vengeance", function(unit, spell)
local vengeance = select(15, _G['UnitBuff']("player", GetSpellName(132365)))
if not vengeance then
return 0
end
if spell then
return vengeance
end
return vengeance / UnitHealthMax("player") * 100
end)
Usage and Explanation:
Returns vegeance stack against comparator + integer.
Example:
Code:
{ "Spell", "player.vengeance >= 400" },
9_141. area.enemies
Raw Excerpt:
Code:
ProbablyEngine.condition.register("area.enemies", function(unit, distance)
if UnitsAroundUnit then
local total = UnitsAroundUnit(unit, tonumber(distance))
return total
end
return 0
end)
Usage and Explanation:
Utilizes smart unlocker to calculate enemies around target.
Example:
Code:
{ "Spell", "target.area(10).enemies >= 10" },
9_142. area.friendly
Raw Excerpt:
Code:
ProbablyEngine.condition.register("area.friendly", function(unit, distance)
if FriendlyUnitsAroundUnit then
local total = FriendlyUnitsAroundUnit(unit, tonumber(distance))
return total
end
return 0
end)
Usage and Explanation:
Utilizes smart unlocker to calculate friendlies around target.
Example:
Code:
{ "Spell", "target.area(10).friendly >= 10" },
9_143. ilevel
Raw Excerpt:
Code:
ProbablyEngine.condition.register("ilevel", function(unit, _)
return math.floor(select(1,GetAverageItemLevel()))
end)
Usage and Explanation:
Returns iLevel against integer
Example:
Code:
{ "Spell", "player.ilevel >= 600" },
9_144. firehack
Raw Excerpt:
Code:
ProbablyEngine.condition.register("firehack", function(unit, _)
return FireHack or false
end)
Usage and Explanation:
Bool check for firehack.
Example:
Code:
{ "Spell", "player.firehack" },
[b]9_145. offspring[b]
Raw Excerpt:
Code:
ProbablyEngine.condition.register("offspring", function(unit, _)
return type(opos) == 'function' or false
end)
Usage and Explanation:
Returns boolcheck for offspring
Example:
Code:
{ "Spell", "player.offspring" },