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
local libPST = {} | |
--[[------------------------------------------------------------------------------------------------ | |
DISTANCE BETWEEN PET AND TARGET | |
--------------------------------------------------------------------------------------------------]] | |
function libPST.PetToTargetDistance(check) | |
local x1, y1, z1 = ObjectPosition("Pet") | |
local x2, y2, z2 = ObjectPosition("Target") | |
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
TALADOR TREASURES | |
Aarko's Family Treasure | |
Amethyl Crystal | |
Aruuna Mining Cart | |
Barrel of Fish | |
Bonechewer Remnants | |
Bonechewer Spear | |
Bright Coin |
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
function LineOfSight(a, b) | |
local ax, ay, az = ObjectPosition(a) | |
local bx, by, bz = ObjectPosition(b) | |
if UnitID( "Target" ) == "76585" then | |
return true | |
elseif TraceLine(ax, ay, az+2.25, bx, by, bz+2.25, losFlags) then | |
return false | |
end | |
return true | |
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
-- Current r10 starting at Line 103 | |
function UnitID(target) | |
local guid = UnitGUID(target) | |
if guid then | |
local type, zero, server_id, instance_id, zone_uid, npc_id, spawn_uid = strsplit("-", guid) | |
if type == "Player" then return tonumber(ServerID) end | |
if npc_id then return tonumber(npc_id) end | |
end | |
return false |
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
--[[-------------------------------------------------------------------------------------------- | |
AUTOTARGET | |
* Will automatically target nearest enemy. If you accidentally select a friendly target it | |
clears your selection and reselects the nearest enemy. To override this press and hold Right | |
Control. | |
----------------------------------------------------------------------------------------------]] | |
{{ | |
{ "/script TargetNearestEnemy(); if not UnitAffectingCombat('target') and not CheckSpecialTarget() then ClearTarget() end;", { "!target.exists", }, }, | |
{ "/script TargetNearestEnemy(); if UnitIsDeadOrGhost('target') then ClearTarget() end;", { "target.exists", "target.dead", }, }, | |
{ "/cleartarget", { "@LibPRA.ClearTarget()", "!modifier.rcontrol", }, }, |
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
-- version: 0.9 | |
-- This variable is here just for testing purposes while I/we verify the code works correctly in | |
-- all situations. Will eventually not be needed. | |
GRunAutoTargetCode = false | |
-- Our main table for storing the objects and their distance from the player. | |
-- The table looks like this: [index] [object_pointer_address] [distance_to_player] | |
-- The table is sorted by distance to the player. | |
-- To get the object pointer use "GUnitCache[i].key" |
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 |
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
--[[------------------------------------------------------------------------------------------------ | |
GLOBAL TABLE OF SPECIAL CASE TARGETS | |
* Credit: MrTheSoulz for the framework | |
--------------------------------------------------------------------------------------------------]] | |
SpecialTargets = { | |
-- TRAINING DUMMIES | |
31144, -- Training Dummy - Lvl 80 | |
31146, -- Raider's Training Dummy - Lvl ?? | |
32541, -- Initiate's Training Dummy - Lvl 55 (Scarlet Enclave) | |
32542, -- Disciple's Training Dummy - Lvl 65 |
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
-- ProbablyEngine Rotations | |
-- Released under modified BSD, see attached LICENSE. | |
-- Functions that require FireHack | |
local SpecialTargets = { | |
-- TRAINING DUMMIES | |
31144, -- Training Dummy - Lvl 80 | |
31146, -- Raider's Training Dummy - Lvl ?? | |
32541, -- Initiate's Training Dummy - Lvl 55 (Scarlet Enclave) |
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
function PrintDuration(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 | |
C_Timer.NewTicker(0.1, (function() print(PrintDuration("Fists of Fury")) end), nil) |
OlderNewer