Active Member
LUA Function to check if Global Cooldown is done.
-- Global Cooldown Check
-- Call it with:
-- if not GCDDone() then return; end
function GCDDone(spellName)
local spellID = nil;
if spellName == nil then spellID = 61304; end
if spellID == nil then
local spellID = GetSpellID(spellName);
end
local minValue = 0.05;
local maxValue = 0.3;
local curPing = tonumber((select(3, GetNetStats()) + select(4, GetNetStats())) / 1000) + .025;
if curPing < minValue then
curPing = minValue;
elseif curPing > maxValue then
curPing = maxValue;
end
if GetSpellCooldown(spellID) - curPing <= 0 then
return true;
end
return false;
end
These ads disappear when you log in.