Last active
August 29, 2015 14:15
-
-
Save StinkyTwitch/ab970835ab209fbc01f6 to your computer and use it in GitHub Desktop.
RotAgent version 2.0
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--[[ | |
Probably_RotAgent.lua | |
Rotation Agent (Probably_RotAgent) License | |
This work is licensed under the Creative Commons Attribution-NonCommercial 4.0 International | |
License. To view a copy of this license, visit http://creativecommons.org/licenses/by-nc/4.0/. | |
]] | |
--[[------------------------------------------------------------------------------------------------ | |
GLOBAL TABLE FOR ADDON | |
--------------------------------------------------------------------------------------------------]] | |
RotAgent = {} | |
ProbablyEngine.library.register("RotAgent", RotAgent) | |
--[[------------------------------------------------------------------------------------------------ | |
GLOBAL VARIABLES | |
--------------------------------------------------------------------------------------------------]] | |
BASESTATSVALUE = {} | |
DEBUGLOGLEVEL = 1 | |
DEBUGTOGGLE = true | |
LIBDRAWPARSEDTARGET = nil | |
--[[------------------------------------------------------------------------------------------------ | |
PE EXTENDED | |
--------------------------------------------------------------------------------------------------]] | |
-- Focus Deficit | |
ProbablyEngine.condition.register("deficit", function(target, spell) | |
local max_power = UnitPowerMax(target) | |
local cur_power = UnitPower(target) | |
local deficit = max_power - cur_power | |
print(deficit) | |
return deficit | |
end) | |
-- Spell Regen | |
ProbablyEngine.condition.register("spell.regen", function(target, spell) | |
--local spell = "Cobra Shot" | |
--local name, rank, icon, cast_ime, min_range, max_range = GetSpellInfo("Cobra Shot") | |
local cast_time = 1967 | |
local cur_regen = select(2, GetPowerRegen(target)) | |
local cast_time_in_seconds = cast_time / 1000.0 | |
local cast_regen = cast_time_in_seconds * cur_regen | |
print(cast_regen) | |
return cast_regen | |
end) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Interface: 60000 | |
## Title: Probably_RotAgent | |
## Notes: Rotation Agent for ProbablyEngine | |
## Author: StinkyTwitch | |
## Version: 0.1 | |
## Dependencies: Probably | |
Probably_RotAgent.lua | |
Rotations\Hunter\SurvivalTest.lua |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--[[ | |
SurvivalTest.lua | |
Rotation Agent (Probably_RotAgent) License | |
This work is licensed under the Creative Commons Attribution-NonCommercial 4.0 International | |
License. To view a copy of this license, visit http://creativecommons.org/licenses/by-nc/4.0/. | |
]] | |
local function dynamicEval(condition, spell) | |
if not condition then return false end | |
return ProbablyEngine.dsl.parse(condition, spell or '') | |
end | |
local ooc = { | |
} | |
local combat = { | |
{ "Cobra Shot", { "!player.buff(Steady Focus)", }, }, | |
--actions+=/cobra_shot,if=buff.pre_steady_focus.up&buff.steady_focus.remains<5&(14+cast_regen)<=focus.deficit | |
{ "Cobra Shot", { | |
"lastcast(Cobra Shot)", | |
"player.buff(Steady Focus) < 5", | |
(function() | |
return dynamicEval((14+).."player.spell(Cobra Shot).regen <= player.focus.deficit") | |
end), | |
}, }, | |
--actions+=/arcane_shot,if=focus>=80|talent.focusing_shot.enabled | |
{ "Arcane Shot", { "player.focus >= 80", }, }, | |
{ "Arcane Shot", { "talent(7,2)", }, }, | |
--{ "Cobra Shot" }, | |
} | |
ProbablyEngine.rotation.register_custom(255, "Probably RotAgent - SurvivalTest", | |
{ | |
{ combat }, | |
}, | |
{ | |
{ ooc }, | |
}, | |
function() | |
end | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment