Last active
August 29, 2015 14:13
-
-
Save StinkyTwitch/1e446f71fc15183c0938 to your computer and use it in GitHub Desktop.
Check Hunter Queue
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
--[[------------------------------------------------------------------------------------------------ | |
CHECK HUNTER QUEUE | |
--------------------------------------------------------------------------------------------------]] | |
function LibHunter.CheckHunterQueue(spell_id) | |
if (GetTime() - LibHunter.QueueTime) > LibHunter.QueueTimeValidFor then | |
LibHunter.QueueTime = 0 | |
LibHunter.QueueSpell = nil | |
return false | |
else | |
if LibHunter.QueueSpell then | |
if LibHunter.QueueSpell == spell_id then | |
if ProbablyEngine.parser.lastCast == GetSpellName(spell_id) then | |
LibHunter.QueueSpell = nil | |
LibHunter.QueueTime = 0 | |
end | |
NotificationFrame:message(GetSpellName(spell_id).." Queued") | |
DEBUG(5, "CheckHunterQueue->true") | |
return true | |
else | |
DEBUG(5, "CheckHunterQueue->false") | |
return false | |
end | |
end | |
end | |
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
--[[------------------------------------------------------------------------------------------------ | |
RA HUNTER SLASH COMMAND LIST | |
--------------------------------------------------------------------------------------------------]] | |
SLASH_RAHUNTERCMD1 = "/rahunter" | |
function SlashCmdList.RAHUNTERCMD(msg, editbox) | |
local command, moretext = msg:match("^(%S*)%s*(.-)$") | |
command = string.lower(command) | |
moretext = string.lower(moretext) | |
if msg == "" then | |
-- Help listing. | |
-- ? | |
elseif command == "cast" then | |
if moretext == "aimed shot" then -- MM | |
LibHunter.QueueSpell = 19434 | |
elseif moretext == "amoc" then -- ALL Talent | |
LibHunter.QueueSpell = 131894 | |
elseif moretext == "aotf" then -- ALL | |
LibHunter.QueueSpell = 172106 | |
elseif moretext == "arcane shot" then -- SV | |
LibHunter.QueueSpell = 3044 | |
elseif moretext == "barrage" then -- ALL Talent | |
LibHunter.QueueSpell = 120360 | |
elseif moretext == "binding shot" then -- ALL Talent | |
LibHunter.QueueSpell = 109248 | |
elseif moretext == "black arrow" then -- SV | |
LibHunter.QueueSpell = 3674 | |
elseif moretext == "camouflage" then -- ALL | |
LibHunter.QueueSpell = 51753 | |
elseif moretext == "chimaera shot" then -- MM | |
LibHunter.QueueSpell = 53209 | |
elseif moretext == "concussive shot" then -- ALL | |
LibHunter.QueueSpell = 5116 | |
elseif moretext == "counter shot" then -- ALL | |
LibHunter.QueueSpell = 147362 | |
elseif moretext == "deterrence" then -- ALL | |
LibHunter.QueueSpell = 148467 | |
elseif moretext == "disengage" then -- ALL | |
LibHunter.QueueSpell = 781 | |
elseif moretext == "distracting shot" then -- ALL | |
LibHunter.QueueSpell = 20736 | |
elseif moretext == "explosive shot" then -- SV | |
LibHunter.QueueSpell = 53301 | |
elseif moretext == "explosive trap" then -- ALL | |
if UnitAura("player", "Trap Launcher") then | |
LibHunter.QueueSpell = 82939 | |
else | |
LibHunter.QueueSpell = 13813 | |
end | |
elseif moretext == "feign death" then -- ALL | |
LibHunter.QueueSpell = 5384 | |
elseif moretext == "flare" then -- ALL | |
LibHunter.QueueSpell = 1543 | |
elseif moretext == "focusing shot" then -- ALL Talent | |
LibHunter.QueueSpell = 152245 | |
elseif moretext == "freezing trap" then -- ALL | |
if UnitAura("player", "Trap Launcher") then | |
LibHunter.QueueSpell = 60192 | |
else | |
LibHunter.QueueSpell = 1499 | |
end | |
elseif moretext == "glaive toss" then -- ALL Talent | |
LibHunter.QueueSpell = 117050 | |
elseif moretext == "ice trap" then | |
if UnitAura("player", "Trap Launcher") then -- ALL | |
LibHunter.QueueSpell = 82941 | |
else | |
LibHunter.QueueSpell = 13809 | |
end | |
elseif moretext == "intimidation" then -- ALL Talent | |
LibHunter.QueueSpell = 19577 | |
elseif moretext == "kill shot" then -- MM | |
LibHunter.QueueSpell = 157708 | |
elseif moretext == "masters call" then -- ALL | |
LibHunter.QueueSpell = 53271 | |
elseif moretext == "multi-shot" then -- ALL | |
LibHunter.QueueSpell = 2643 | |
elseif moretext == "powershot" then -- ALL Talent | |
LibHunter.QueueSpell = 109259 | |
elseif moretext == "rapid fire" then -- MM | |
LibHunter.QueueSpell = 3045 | |
elseif moretext == "stampede" then -- ALL Talent | |
LibHunter.QueueSpell = 121818 | |
elseif moretext == "steady shot" then -- MM | |
LibHunter.QueueSpell = 56641 | |
elseif moretext == "tranquilizing shot" then -- ALL | |
LibHunter.QueueSpell = 19801 | |
elseif moretext == "wyvern sting" then -- ALL Talent | |
LibHunter.QueueSpell = 19386 | |
else | |
print("Unknown 'cast' command.") | |
end | |
else | |
LibHunter.QueueSpell = nil | |
end | |
if LibHunter.QueueSpell ~= nil then LibHunter.QueueTime = GetTime() end | |
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
--[[------------------------------------------------------------------------------------------------ | |
HUNTER JUMP | |
--------------------------------------------------------------------------------------------------]] | |
-- Slash Command | |
SLASH_HUNTERJUMPCMD1 = "/hunterjump" | |
-- Slash Command List | |
function SlashCmdList.HUNTERJUMPCMD(msg, editbox) | |
if msg == "" then | |
DisengageForward() | |
else | |
return | |
end | |
end | |
-- Verify Vector | |
function VerifyDisengage(vector) | |
local current_vector = ObjectFacing("player") | |
if current_vector ~= vector then | |
FaceDirection(vector) | |
CastSpellByName("Disengage") | |
else | |
CastSpellByName("Disengage") | |
end | |
end | |
-- Disengage Forward | |
function DisengageForward() | |
local initial_vector = (ObjectFacing("player")) | |
local disengage_vector = (mod( ObjectFacing("player") + math.pi, math.pi * 2 )) | |
C_Timer.After(.001, function() FaceDirection(disengage_vector) end) | |
C_Timer.After(.35, function() VerifyDisengage(disengage_vector) end) | |
C_Timer.After(.50, function () FaceDirection(initial_vector) end) | |
DEBUG(1, "Jump: "..initial_vector..", "..disengage_vector.."") | |
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
--[[------------------------------------------------------------------------------------------------ | |
REGISTER LIBRARY | |
--------------------------------------------------------------------------------------------------]] | |
ProbablyEngine.library.register('LibHunter', LibHunter) |
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
--[[-------------------------------------------------------------------------------------------- | |
SPELL QUEUE | |
----------------------------------------------------------------------------------------------]] | |
{ "Explosive Trap", "@LibHunter.CheckHunterQueue(82939)", "mouseover.ground", }, | |
{ "Freezing Trap", "@LibHunter.CheckHunterQueue(60192)", "mouseover.ground", }, | |
{ "Ice Trap", "@LibHunter.CheckHunterQueue(82941)", "mouseover.ground", }, | |
{ "Binding Shot", "@LibHunter.CheckHunterQueue(109248)", "mouseover.ground", }, | |
{ "Flare", "@LibHunter.CheckHunterQueue(1543)", "mouseover.ground", }, | |
{ "A Murder of Crows", "@LibHunter.CheckHunterQueue(131894)", }, | |
{ "Aspect of the Fox", "@LibHunter.CheckHunterQueue(172106)", }, | |
{ "Barrage", "@LibHunter.CheckHunterQueue(120360)", }, | |
{ "Concussive Shot", "@LibHunter.CheckHunterQueue(5116)", }, | |
{ "!Feign Death", "@LibHunter.CheckHunterQueue(5384)", }, | |
{ "Glaive Toss", "@LibHunter.CheckHunterQueue(117050)", }, | |
{ "Intimidation", "@LibHunter.CheckHunterQueue(19577)", }, | |
{ "Multi-Shot", "@LibHunter.CheckHunterQueue(2643)", }, | |
{ "Stampede", "@LibHunter.CheckHunterQueue(121818)", }, | |
{ "Wyvern Sting", "@LibHunter.CheckHunterQueue(19386)", }, | |
{ "/stopcasting\n/stopcasting\n/hunterjump", { "@LibHunter.CheckHunterQueue(781)", "timeout(HunterJump, 1)", }, }, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Macro's for your action bars would go like this:
/rahunter cast spell name