This commit is contained in:
2024-08-24 22:41:08 +02:00
parent 77f1ac5d7a
commit c21f59778f
431 changed files with 68581 additions and 68581 deletions

View File

@@ -1,39 +1,39 @@
--TRIGGER
function()
return true --always on
end
--DURATION
function()
local function shorten(val)
local function round(var, n)
if (n) then
var = math.floor((var * 10^n) + 0.5) / (10^n)
else
var = math.floor(var+0.5)
end
return var
end
local n = 2
if val < 1e3 then
return round(val, n)
elseif val > 1e3 and val < 1e6 then
return round(val / 1e3, n) .. "k"
elseif val > 1e6 and val < 1e9 then
return round(val / 1e6, n) .. "M"
elseif val > 1e9 then
return round(val / 1e9, n) .. "G"
end
end
for i = 1, 40 do
local spellID = select(11, UnitBuff("player", i)) -- don't know which return arg it is
if spellID == 214577 then
local AP = select(17, UnitBuff("player", i))
return shorten(AP)
end
if spellID == 214572 then
local AP = select(4, UnitBuff("player", i))
return AP
end
end
--TRIGGER
function()
return true --always on
end
--DURATION
function()
local function shorten(val)
local function round(var, n)
if (n) then
var = math.floor((var * 10^n) + 0.5) / (10^n)
else
var = math.floor(var+0.5)
end
return var
end
local n = 2
if val < 1e3 then
return round(val, n)
elseif val > 1e3 and val < 1e6 then
return round(val / 1e3, n) .. "k"
elseif val > 1e6 and val < 1e9 then
return round(val / 1e6, n) .. "M"
elseif val > 1e9 then
return round(val / 1e9, n) .. "G"
end
end
for i = 1, 40 do
local spellID = select(11, UnitBuff("player", i)) -- don't know which return arg it is
if spellID == 214577 then
local AP = select(17, UnitBuff("player", i))
return shorten(AP)
end
if spellID == 214572 then
local AP = select(4, UnitBuff("player", i))
return AP
end
end
end