Update
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
|
||||
aura_env.addtostring = function(s, ...)
|
||||
local i = 1
|
||||
while select(i, ...) do
|
||||
s = s .. select(i, ...) .. " "
|
||||
i = i + 1
|
||||
end
|
||||
s = s .. "\n"
|
||||
return s
|
||||
end
|
||||
|
||||
aura_env.addtostring = function(s, ...)
|
||||
local i = 1
|
||||
while select(i, ...) do
|
||||
s = s .. select(i, ...) .. " "
|
||||
i = i + 1
|
||||
end
|
||||
s = s .. "\n"
|
||||
return s
|
||||
end
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
function(expirationTime, duration, progress, formatedDuration, name, icon, stacks)
|
||||
if not aura_env.region.text3 then
|
||||
local text3 = aura_env.region:CreateFontString(nil, "OVERLAY")
|
||||
aura_env.region.text3 = text3
|
||||
aura_env.region.text3:SetFont(aura_env.region.stacks:GetFont())
|
||||
aura_env.region.text3:SetTextColor(1, 1, 1, 1)
|
||||
aura_env.region.text3:SetPoint("BOTTOMRIGHT", aura_env.region, "BOTTOMRIGHT", -1, 1)
|
||||
aura_env.region.text3:Show()
|
||||
end
|
||||
aura_env.region.text3:SetText(progress)
|
||||
end
|
||||
function(expirationTime, duration, progress, formatedDuration, name, icon, stacks)
|
||||
if not aura_env.region.text3 then
|
||||
local text3 = aura_env.region:CreateFontString(nil, "OVERLAY")
|
||||
aura_env.region.text3 = text3
|
||||
aura_env.region.text3:SetFont(aura_env.region.stacks:GetFont())
|
||||
aura_env.region.text3:SetTextColor(1, 1, 1, 1)
|
||||
aura_env.region.text3:SetPoint("BOTTOMRIGHT", aura_env.region, "BOTTOMRIGHT", -1, 1)
|
||||
aura_env.region.text3:Show()
|
||||
end
|
||||
aura_env.region.text3:SetText(progress)
|
||||
end
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
local plate = C_NamePlate.GetNamePlateForUnit("target")
|
||||
if plate then
|
||||
aura_env.region:ClearAllPoints()
|
||||
aura_env.region:SetPoint("BOTTOM", plate, "BOTTOM", 0, 0)
|
||||
end
|
||||
local plate = C_NamePlate.GetNamePlateForUnit("target")
|
||||
if plate then
|
||||
aura_env.region:ClearAllPoints()
|
||||
aura_env.region:SetPoint("BOTTOM", plate, "BOTTOM", 0, 0)
|
||||
end
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
function()
|
||||
local r = WeakAuras.regions['julijatest'].region
|
||||
local b = CreateFrame("Button", "WEAK AURA NAME HERE", r, "SecureActionButtonTemplate") --Does some crazy shit
|
||||
b:SetAllPoints() --No idea
|
||||
b:SetAttribute("unit", "player") --Target I guess?
|
||||
b:SetAttribute("macro", "DN") --What do // sub macro for spell
|
||||
b:SetAttribute("type", "macro") --What do again....? // sub macro for spell
|
||||
end
|
||||
function()
|
||||
local r = WeakAuras.regions['julijatest'].region
|
||||
local b = CreateFrame("Button", "WEAK AURA NAME HERE", r, "SecureActionButtonTemplate") --Does some crazy shit
|
||||
b:SetAllPoints() --No idea
|
||||
b:SetAttribute("unit", "player") --Target I guess?
|
||||
b:SetAttribute("macro", "DN") --What do // sub macro for spell
|
||||
b:SetAttribute("type", "macro") --What do again....? // sub macro for spell
|
||||
end
|
||||
--Goes with PLAYER_ENTERING_WORLD And only with it otherwise doesn't properly load for some reason
|
||||
@@ -1 +1 @@
|
||||
/ script C_Timer.After(15, function() SendChatMessage("lol", "PARTY"); end)
|
||||
/ script C_Timer.After(15, function() SendChatMessage("lol", "PARTY"); end)
|
||||
|
||||
@@ -1,48 +1,48 @@
|
||||
aura_env.classColor = function(class)
|
||||
if class == 6 then return "\124cFFC41F3B" elseif
|
||||
class == 12 then return "\124cFFA330C9" elseif
|
||||
class == 11 then return "\124cFFFF7D0A" elseif
|
||||
class == 3 then return "\124cFFABD473" elseif
|
||||
class == 8 then return "\124cFF40C7EB" elseif
|
||||
class == 10 then return "\124cFF00FF96" elseif
|
||||
class == 2 then return "\124cFFF58CBA" elseif
|
||||
class == 5 then return "\124cFFFFFFFF" elseif
|
||||
class == 4 then return "\124cFFFFF569" elseif
|
||||
class == 7 then return "\124cFF0070DE" elseif
|
||||
class == 9 then return "\124cFF8787ED" elseif
|
||||
class == 1 then return "\124cFFC79C6E" else
|
||||
return "\124cFFFFFFFF" end
|
||||
end
|
||||
|
||||
aura_env.classColor = function(name)
|
||||
local class = UnitClass(name) or ""
|
||||
if class == "Death Knight" then return 0.77, 0.12, 0.23, 1 elseif
|
||||
class == "Demon Hunter" then return 0.64, 0.19, 0.79, 1 elseif
|
||||
class == "Druid" then return 1, 0.49, 0.04, 1 elseif
|
||||
class == "Hunter" then return 0.67, 0.83, 0.45, 1 elseif
|
||||
class == "Mage" then return 0.25, 0.78, 0.92, 1 elseif
|
||||
class == "Monk" then return 0, 1, 0.59, 1 elseif
|
||||
class == "Paladin" then return 0.96, 0.55, 0.73, 1 elseif
|
||||
class == "Priest" then return 1, 1, 1, 1 elseif
|
||||
class == "Rogue" then return 1, 0.96, 0.41, 1 elseif
|
||||
class == "Shaman" then return 0, 0.44, 0.87, 1 elseif
|
||||
class == "Warlock" then return 0.53, 0.53, 0.93, 1 elseif
|
||||
class == "Warrior" then return 0.78, 0.61, 0.43, 1 else
|
||||
return 0, 0, 0, 0 end
|
||||
end
|
||||
|
||||
aura_env.classColor = function(class)
|
||||
if class == 1 then return 0.78, 0.61, 0.43, 1 elseif
|
||||
class == 2 then return 0.96, 0.55, 0.73, 1 elseif
|
||||
class == 3 then return 0.67, 0.83, 0.45, 1 elseif
|
||||
class == 4 then return 1, 0.96, 0.41, 1 elseif
|
||||
class == 5 then return 1, 1, 1, 1 elseif
|
||||
class == 6 then return 0.77, 0.12, 0.23, 1 elseif
|
||||
class == 7 then return 0, 0.44, 0.87, 1 elseif
|
||||
class == 8 then return 0.25, 0.78, 0.92, 1 elseif
|
||||
class == 9 then return 0.53, 0.53, 0.93, 1 elseif
|
||||
class == 10 then return 0, 1, 0.59, 1 elseif
|
||||
class == 11 then return 1, 0.49, 0.04, 1 elseif
|
||||
class == 12 then return 0.64, 0.19, 0.79, 1 else
|
||||
return 1, 1, 1, 1 end
|
||||
end
|
||||
aura_env.classColor = function(class)
|
||||
if class == 6 then return "\124cFFC41F3B" elseif
|
||||
class == 12 then return "\124cFFA330C9" elseif
|
||||
class == 11 then return "\124cFFFF7D0A" elseif
|
||||
class == 3 then return "\124cFFABD473" elseif
|
||||
class == 8 then return "\124cFF40C7EB" elseif
|
||||
class == 10 then return "\124cFF00FF96" elseif
|
||||
class == 2 then return "\124cFFF58CBA" elseif
|
||||
class == 5 then return "\124cFFFFFFFF" elseif
|
||||
class == 4 then return "\124cFFFFF569" elseif
|
||||
class == 7 then return "\124cFF0070DE" elseif
|
||||
class == 9 then return "\124cFF8787ED" elseif
|
||||
class == 1 then return "\124cFFC79C6E" else
|
||||
return "\124cFFFFFFFF" end
|
||||
end
|
||||
|
||||
aura_env.classColor = function(name)
|
||||
local class = UnitClass(name) or ""
|
||||
if class == "Death Knight" then return 0.77, 0.12, 0.23, 1 elseif
|
||||
class == "Demon Hunter" then return 0.64, 0.19, 0.79, 1 elseif
|
||||
class == "Druid" then return 1, 0.49, 0.04, 1 elseif
|
||||
class == "Hunter" then return 0.67, 0.83, 0.45, 1 elseif
|
||||
class == "Mage" then return 0.25, 0.78, 0.92, 1 elseif
|
||||
class == "Monk" then return 0, 1, 0.59, 1 elseif
|
||||
class == "Paladin" then return 0.96, 0.55, 0.73, 1 elseif
|
||||
class == "Priest" then return 1, 1, 1, 1 elseif
|
||||
class == "Rogue" then return 1, 0.96, 0.41, 1 elseif
|
||||
class == "Shaman" then return 0, 0.44, 0.87, 1 elseif
|
||||
class == "Warlock" then return 0.53, 0.53, 0.93, 1 elseif
|
||||
class == "Warrior" then return 0.78, 0.61, 0.43, 1 else
|
||||
return 0, 0, 0, 0 end
|
||||
end
|
||||
|
||||
aura_env.classColor = function(class)
|
||||
if class == 1 then return 0.78, 0.61, 0.43, 1 elseif
|
||||
class == 2 then return 0.96, 0.55, 0.73, 1 elseif
|
||||
class == 3 then return 0.67, 0.83, 0.45, 1 elseif
|
||||
class == 4 then return 1, 0.96, 0.41, 1 elseif
|
||||
class == 5 then return 1, 1, 1, 1 elseif
|
||||
class == 6 then return 0.77, 0.12, 0.23, 1 elseif
|
||||
class == 7 then return 0, 0.44, 0.87, 1 elseif
|
||||
class == 8 then return 0.25, 0.78, 0.92, 1 elseif
|
||||
class == 9 then return 0.53, 0.53, 0.93, 1 elseif
|
||||
class == 10 then return 0, 1, 0.59, 1 elseif
|
||||
class == 11 then return 1, 0.49, 0.04, 1 elseif
|
||||
class == 12 then return 0.64, 0.19, 0.79, 1 else
|
||||
return 1, 1, 1, 1 end
|
||||
end
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
function()
|
||||
StaticPopup1Button1:Click("LeftButton")
|
||||
function()
|
||||
StaticPopup1Button1:Click("LeftButton")
|
||||
end
|
||||
@@ -1,60 +1,60 @@
|
||||
aura_env.grad = function(c)
|
||||
--c expected as [0, 1]
|
||||
if c > 0.5 then
|
||||
c = 1 - (2 * (c - 0.5))
|
||||
return c, 1, 0, 1
|
||||
else
|
||||
c = c * 2
|
||||
return 1, c, 0, 1
|
||||
end
|
||||
end
|
||||
|
||||
local function hexgrad(val, min, max)
|
||||
local function tohex(input)
|
||||
local output = string.format("%x", input * 255)
|
||||
return output
|
||||
end
|
||||
local function grad(c, min, max)
|
||||
c = (((max - c) / (max - min)) * 1)
|
||||
if c > 0.5 then
|
||||
c = 1 - (2 * (c - 0.5))
|
||||
return c, 1, 0, 1
|
||||
else
|
||||
c = c * 2
|
||||
return 1, c, 0, 1
|
||||
end
|
||||
end
|
||||
local color1, color2, color3, color4 = 0, 0, 0, 0
|
||||
color1, color2, color3, color4 = grad(val, min, max)
|
||||
color1, color2, color3, color4 = tohex(color1), tohex(color2), tohex(color3), tohex(color4)
|
||||
color1, color2, color3, color4 = tostring(color1), tostring(color2), tostring(color3), tostring(color4)
|
||||
if string.len(color1) == 1 then color1 = "0" .. color1 end
|
||||
if string.len(color2) == 1 then color2 = "0" .. color2 end
|
||||
if string.len(color3) == 1 then color3 = "0" .. color3 end
|
||||
if string.len(color4) == 1 then color4 = "0" .. color4 end
|
||||
local color = "\124c" .. color4 .. color1 .. color2 .. color3
|
||||
return color
|
||||
end
|
||||
|
||||
local function RGBtoHex(rgb)
|
||||
local hexadecimal = 'FF'
|
||||
for key, value in pairs(rgb) do
|
||||
local hex = ''
|
||||
|
||||
while(value > 0)do
|
||||
local index = math.fmod(value, 16) + 1
|
||||
value = math.floor(value / 16)
|
||||
hex = string.sub('0123456789ABCDEF', index, index) .. hex
|
||||
end
|
||||
|
||||
if(string.len(hex) == 0)then
|
||||
hex = '00'
|
||||
|
||||
elseif(string.len(hex) == 1)then
|
||||
hex = '0' .. hex
|
||||
end
|
||||
|
||||
hexadecimal = hexadecimal .. hex
|
||||
end
|
||||
return hexadecimal
|
||||
end
|
||||
aura_env.grad = function(c)
|
||||
--c expected as [0, 1]
|
||||
if c > 0.5 then
|
||||
c = 1 - (2 * (c - 0.5))
|
||||
return c, 1, 0, 1
|
||||
else
|
||||
c = c * 2
|
||||
return 1, c, 0, 1
|
||||
end
|
||||
end
|
||||
|
||||
local function hexgrad(val, min, max)
|
||||
local function tohex(input)
|
||||
local output = string.format("%x", input * 255)
|
||||
return output
|
||||
end
|
||||
local function grad(c, min, max)
|
||||
c = (((max - c) / (max - min)) * 1)
|
||||
if c > 0.5 then
|
||||
c = 1 - (2 * (c - 0.5))
|
||||
return c, 1, 0, 1
|
||||
else
|
||||
c = c * 2
|
||||
return 1, c, 0, 1
|
||||
end
|
||||
end
|
||||
local color1, color2, color3, color4 = 0, 0, 0, 0
|
||||
color1, color2, color3, color4 = grad(val, min, max)
|
||||
color1, color2, color3, color4 = tohex(color1), tohex(color2), tohex(color3), tohex(color4)
|
||||
color1, color2, color3, color4 = tostring(color1), tostring(color2), tostring(color3), tostring(color4)
|
||||
if string.len(color1) == 1 then color1 = "0" .. color1 end
|
||||
if string.len(color2) == 1 then color2 = "0" .. color2 end
|
||||
if string.len(color3) == 1 then color3 = "0" .. color3 end
|
||||
if string.len(color4) == 1 then color4 = "0" .. color4 end
|
||||
local color = "\124c" .. color4 .. color1 .. color2 .. color3
|
||||
return color
|
||||
end
|
||||
|
||||
local function RGBtoHex(rgb)
|
||||
local hexadecimal = 'FF'
|
||||
for key, value in pairs(rgb) do
|
||||
local hex = ''
|
||||
|
||||
while(value > 0)do
|
||||
local index = math.fmod(value, 16) + 1
|
||||
value = math.floor(value / 16)
|
||||
hex = string.sub('0123456789ABCDEF', index, index) .. hex
|
||||
end
|
||||
|
||||
if(string.len(hex) == 0)then
|
||||
hex = '00'
|
||||
|
||||
elseif(string.len(hex) == 1)then
|
||||
hex = '0' .. hex
|
||||
end
|
||||
|
||||
hexadecimal = hexadecimal .. hex
|
||||
end
|
||||
return hexadecimal
|
||||
end
|
||||
|
||||
@@ -1,43 +1,43 @@
|
||||
aura_env.getDate = function()
|
||||
local date = date()
|
||||
local year = date:match("%d%d%/%d%d/(%d%d)") + 2000 --01/07/(19) 14:36:42
|
||||
local month = date:match("(%d%d)") --(01)/07/19 14:36:42
|
||||
local day = date:match("%d%d%/(%d%d)") --01/(07)/19 14:36:42
|
||||
--Remove first place zeros
|
||||
if day:find("0") == 1 then
|
||||
day = day:gsub("0", "")
|
||||
end
|
||||
if month:find("0") == 1 then
|
||||
month = month:gsub("0", "")
|
||||
end
|
||||
local localdate = day .. "." .. month .. "." .. year
|
||||
return localdate
|
||||
end
|
||||
|
||||
aura_env.getTime = function()
|
||||
local date = date()
|
||||
local localtime = date:match("%d%d%/%d%d%/%d%d%s(%d%d%p%d%d%p%d%d)")
|
||||
return localtime
|
||||
end
|
||||
|
||||
local function getDate()
|
||||
local date = date()
|
||||
local year = date:match("%d%d%/%d%d/(%d%d)") + 2000 --01/07/(19) 14:36:42
|
||||
local month = date:match("(%d%d)") --(01)/07/19 14:36:42
|
||||
local day = date:match("%d%d%/(%d%d)") --01/(07)/19 14:36:42
|
||||
--Remove first place zeros
|
||||
if day:find("0") == 1 then
|
||||
day = day:gsub("0", "")
|
||||
end
|
||||
if month:find("0") == 1 then
|
||||
month = month:gsub("0", "")
|
||||
end
|
||||
local localdate = day .. "." .. month .. "." .. year
|
||||
return localdate
|
||||
end
|
||||
|
||||
local function getTime()
|
||||
local date = date()
|
||||
local localtime = date:match("%d%d%/%d%d%/%d%d%s(%d%d%p%d%d%p%d%d)")
|
||||
return localtime
|
||||
aura_env.getDate = function()
|
||||
local date = date()
|
||||
local year = date:match("%d%d%/%d%d/(%d%d)") + 2000 --01/07/(19) 14:36:42
|
||||
local month = date:match("(%d%d)") --(01)/07/19 14:36:42
|
||||
local day = date:match("%d%d%/(%d%d)") --01/(07)/19 14:36:42
|
||||
--Remove first place zeros
|
||||
if day:find("0") == 1 then
|
||||
day = day:gsub("0", "")
|
||||
end
|
||||
if month:find("0") == 1 then
|
||||
month = month:gsub("0", "")
|
||||
end
|
||||
local localdate = day .. "." .. month .. "." .. year
|
||||
return localdate
|
||||
end
|
||||
|
||||
aura_env.getTime = function()
|
||||
local date = date()
|
||||
local localtime = date:match("%d%d%/%d%d%/%d%d%s(%d%d%p%d%d%p%d%d)")
|
||||
return localtime
|
||||
end
|
||||
|
||||
local function getDate()
|
||||
local date = date()
|
||||
local year = date:match("%d%d%/%d%d/(%d%d)") + 2000 --01/07/(19) 14:36:42
|
||||
local month = date:match("(%d%d)") --(01)/07/19 14:36:42
|
||||
local day = date:match("%d%d%/(%d%d)") --01/(07)/19 14:36:42
|
||||
--Remove first place zeros
|
||||
if day:find("0") == 1 then
|
||||
day = day:gsub("0", "")
|
||||
end
|
||||
if month:find("0") == 1 then
|
||||
month = month:gsub("0", "")
|
||||
end
|
||||
local localdate = day .. "." .. month .. "." .. year
|
||||
return localdate
|
||||
end
|
||||
|
||||
local function getTime()
|
||||
local date = date()
|
||||
local localtime = date:match("%d%d%/%d%d%/%d%d%s(%d%d%p%d%d%p%d%d)")
|
||||
return localtime
|
||||
end
|
||||
@@ -1,6 +1,6 @@
|
||||
aura_env.stackDef = function(def1, def2)
|
||||
local x = 1 - def1
|
||||
local y = 1 - def2
|
||||
local var = x * y
|
||||
return 1 - var
|
||||
end
|
||||
aura_env.stackDef = function(def1, def2)
|
||||
local x = 1 - def1
|
||||
local y = 1 - def2
|
||||
local var = x * y
|
||||
return 1 - var
|
||||
end
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
aura_env.auraID = function(spell)
|
||||
for i = 1, 40 do
|
||||
local name = UnitBuff("player", i)
|
||||
if name then
|
||||
if name == spell then
|
||||
return i
|
||||
end
|
||||
else
|
||||
break
|
||||
end
|
||||
end
|
||||
aura_env.auraID = function(spell)
|
||||
for i = 1, 40 do
|
||||
local name = UnitBuff("player", i)
|
||||
if name then
|
||||
if name == spell then
|
||||
return i
|
||||
end
|
||||
else
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -1,13 +1,13 @@
|
||||
local function formatTime(time)
|
||||
local res, m, s = time, 0, 0
|
||||
while res >= 60 do
|
||||
m = m + 1
|
||||
res = res - 60
|
||||
end
|
||||
s = res
|
||||
if s < 10 then
|
||||
s = string.format("0%d", s)
|
||||
end
|
||||
if type(s) ~= "string" then tostring(s) end
|
||||
return string.format("%d:%s", m, s)
|
||||
local function formatTime(time)
|
||||
local res, m, s = time, 0, 0
|
||||
while res >= 60 do
|
||||
m = m + 1
|
||||
res = res - 60
|
||||
end
|
||||
s = res
|
||||
if s < 10 then
|
||||
s = string.format("0%d", s)
|
||||
end
|
||||
if type(s) ~= "string" then tostring(s) end
|
||||
return string.format("%d:%s", m, s)
|
||||
end
|
||||
@@ -1,5 +1,5 @@
|
||||
local function name(arguments)
|
||||
end
|
||||
|
||||
aura_env.name = function(arguments)
|
||||
end
|
||||
local function name(arguments)
|
||||
end
|
||||
|
||||
aura_env.name = function(arguments)
|
||||
end
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
|
||||
for itemLink in msg:gmatch("|%x+|Hitem:.-|h.-|h|r") do
|
||||
itemID = itemLink:match("item:(%d+):")
|
||||
icon = select(10, GetItemInfo(itemLink))
|
||||
end
|
||||
|
||||
for itemLink in msg:gmatch("|%x+|Hitem:.-|h.-|h|r") do
|
||||
itemID = itemLink:match("item:(%d+):")
|
||||
icon = select(10, GetItemInfo(itemLink))
|
||||
end
|
||||
|
||||
@@ -1,41 +1,41 @@
|
||||
--INIT
|
||||
local i = 1
|
||||
while true do
|
||||
local spellName, spellSubName = GetSpellBookItemName(i, BOOKTYPE_SPELL)
|
||||
local type, ID = GetSpellBookItemInfo(i, BOOKTYPE_SPELL)
|
||||
if not spellName then
|
||||
do break end
|
||||
end
|
||||
|
||||
if spellName:match("Mastery:") then
|
||||
break
|
||||
end
|
||||
if spellName ~= "Revive Battle Pets" and spellName ~= "Mobile Banking" then
|
||||
if (GetSpellBaseCooldown(ID) or 0) > 20000 then
|
||||
print(spellName, ID, GetSpellBaseCooldown(ID) / 1000)
|
||||
end
|
||||
end
|
||||
|
||||
i = i + 1
|
||||
end
|
||||
|
||||
for row = 1, 7 do
|
||||
for column = 1, 3 do
|
||||
local ID = select(6, GetTalentInfo(row, column, 1))
|
||||
local spellName = select(2, GetTalentInfo(row, column, 1))
|
||||
if GetSpellBaseCooldown(ID) > 20000 then
|
||||
print(spellName, ID, GetSpellBaseCooldown(ID) / 1000)
|
||||
end
|
||||
end
|
||||
end
|
||||
for row = 1, 7 do
|
||||
for column = 1, 3 do
|
||||
local ID = select(6, GetPvpTalentInfo(row, column, 1))
|
||||
if ID then
|
||||
local spellName = select(2, GetPvpTalentInfo(row, column, 1))
|
||||
if GetSpellBaseCooldown(ID) > 20000 then
|
||||
print(spellName, ID, GetSpellBaseCooldown(ID) / 1000)
|
||||
end
|
||||
end
|
||||
end
|
||||
--INIT
|
||||
local i = 1
|
||||
while true do
|
||||
local spellName, spellSubName = GetSpellBookItemName(i, BOOKTYPE_SPELL)
|
||||
local type, ID = GetSpellBookItemInfo(i, BOOKTYPE_SPELL)
|
||||
if not spellName then
|
||||
do break end
|
||||
end
|
||||
|
||||
if spellName:match("Mastery:") then
|
||||
break
|
||||
end
|
||||
if spellName ~= "Revive Battle Pets" and spellName ~= "Mobile Banking" then
|
||||
if (GetSpellBaseCooldown(ID) or 0) > 20000 then
|
||||
print(spellName, ID, GetSpellBaseCooldown(ID) / 1000)
|
||||
end
|
||||
end
|
||||
|
||||
i = i + 1
|
||||
end
|
||||
|
||||
for row = 1, 7 do
|
||||
for column = 1, 3 do
|
||||
local ID = select(6, GetTalentInfo(row, column, 1))
|
||||
local spellName = select(2, GetTalentInfo(row, column, 1))
|
||||
if GetSpellBaseCooldown(ID) > 20000 then
|
||||
print(spellName, ID, GetSpellBaseCooldown(ID) / 1000)
|
||||
end
|
||||
end
|
||||
end
|
||||
for row = 1, 7 do
|
||||
for column = 1, 3 do
|
||||
local ID = select(6, GetPvpTalentInfo(row, column, 1))
|
||||
if ID then
|
||||
local spellName = select(2, GetPvpTalentInfo(row, column, 1))
|
||||
if GetSpellBaseCooldown(ID) > 20000 then
|
||||
print(spellName, ID, GetSpellBaseCooldown(ID) / 1000)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -1,101 +1,101 @@
|
||||
local function tonum(cchar)
|
||||
if cchar == ":" then return 58 end
|
||||
if cchar == "-" then return 45 end
|
||||
if cchar == "!" then return 32 end
|
||||
if cchar == "," then return 44 end
|
||||
|
||||
if cchar == "0" then return 48 end
|
||||
if cchar == "1" then return 49 end
|
||||
if cchar == "2" then return 50 end
|
||||
if cchar == "3" then return 51 end
|
||||
if cchar == "4" then return 52 end
|
||||
if cchar == "5" then return 53 end
|
||||
if cchar == "6" then return 54 end
|
||||
if cchar == "7" then return 55 end
|
||||
if cchar == "8" then return 56 end
|
||||
if cchar == "9" then return 57 end
|
||||
|
||||
if cchar == "A" then return 65 end
|
||||
if cchar == "B" then return 66 end
|
||||
if cchar == "C" then return 67 end
|
||||
if cchar == "D" then return 68 end
|
||||
if cchar == "E" then return 69 end
|
||||
if cchar == "F" then return 70 end
|
||||
if cchar == "G" then return 71 end
|
||||
if cchar == "H" then return 72 end
|
||||
if cchar == "I" then return 73 end
|
||||
if cchar == "J" then return 74 end
|
||||
if cchar == "K" then return 75 end
|
||||
if cchar == "L" then return 76 end
|
||||
if cchar == "M" then return 77 end
|
||||
if cchar == "N" then return 78 end
|
||||
if cchar == "O" then return 79 end
|
||||
if cchar == "P" then return 80 end
|
||||
if cchar == "Q" then return 81 end
|
||||
if cchar == "R" then return 82 end
|
||||
if cchar == "S" then return 83 end
|
||||
if cchar == "T" then return 84 end
|
||||
if cchar == "U" then return 85 end
|
||||
if cchar == "V" then return 86 end
|
||||
if cchar == "W" then return 87 end
|
||||
if cchar == "X" then return 88 end
|
||||
if cchar == "Y" then return 89 end
|
||||
if cchar == "Z" then return 90 end
|
||||
|
||||
if cchar == "a" then return 97 end
|
||||
if cchar == "b" then return 98 end
|
||||
if cchar == "c" then return 99 end
|
||||
if cchar == "d" then return 100 end
|
||||
if cchar == "e" then return 101 end
|
||||
if cchar == "f" then return 102 end
|
||||
if cchar == "g" then return 103 end
|
||||
if cchar == "h" then return 104 end
|
||||
if cchar == "i" then return 105 end
|
||||
if cchar == "j" then return 106 end
|
||||
if cchar == "k" then return 107 end
|
||||
if cchar == "l" then return 108 end
|
||||
if cchar == "m" then return 109 end
|
||||
if cchar == "n" then return 110 end
|
||||
if cchar == "o" then return 111 end
|
||||
if cchar == "p" then return 112 end
|
||||
if cchar == "q" then return 113 end
|
||||
if cchar == "r" then return 114 end
|
||||
if cchar == "s" then return 115 end
|
||||
if cchar == "t" then return 116 end
|
||||
if cchar == "u" then return 117 end
|
||||
if cchar == "v" then return 118 end
|
||||
if cchar == "w" then return 119 end
|
||||
if cchar == "x" then return 120 end
|
||||
if cchar == "y" then return 121 end
|
||||
if cchar == "z" then return 122 end
|
||||
end
|
||||
local function findcollision(hash_table, array)
|
||||
local collisions = 0
|
||||
for k,v in ipairs(hash_table) do
|
||||
for i = 1, table.getn(hash_table) do
|
||||
if i ~= k then
|
||||
if hash_table[i] == hash_table[k] then
|
||||
collisions = collisions + 1
|
||||
print(hash_table[i], hash_table[k], i, k, array[i], array[k])
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
return collisions
|
||||
end
|
||||
aura_env.tohash = function(tempvar)
|
||||
local charTable = {}
|
||||
local hash = 0
|
||||
for char in tempvar:gmatch("%a") do
|
||||
charTable[#charTable + 1] = char
|
||||
hash = hash + tonum(char)
|
||||
hash = hash / table.getn(charTable)
|
||||
end
|
||||
hash = math.floor(hash * 10000)
|
||||
return hash
|
||||
--print(aura_env.spellarray[hash], hash)
|
||||
end
|
||||
aura_env.checkbase = function(spell)
|
||||
if aura_env.spellarray[aura_env.tohash(spell)] == nil then return 0 end
|
||||
if aura_env.spellarray[aura_env.tohash(spell)] == spell then return 1 end
|
||||
local function tonum(cchar)
|
||||
if cchar == ":" then return 58 end
|
||||
if cchar == "-" then return 45 end
|
||||
if cchar == "!" then return 32 end
|
||||
if cchar == "," then return 44 end
|
||||
|
||||
if cchar == "0" then return 48 end
|
||||
if cchar == "1" then return 49 end
|
||||
if cchar == "2" then return 50 end
|
||||
if cchar == "3" then return 51 end
|
||||
if cchar == "4" then return 52 end
|
||||
if cchar == "5" then return 53 end
|
||||
if cchar == "6" then return 54 end
|
||||
if cchar == "7" then return 55 end
|
||||
if cchar == "8" then return 56 end
|
||||
if cchar == "9" then return 57 end
|
||||
|
||||
if cchar == "A" then return 65 end
|
||||
if cchar == "B" then return 66 end
|
||||
if cchar == "C" then return 67 end
|
||||
if cchar == "D" then return 68 end
|
||||
if cchar == "E" then return 69 end
|
||||
if cchar == "F" then return 70 end
|
||||
if cchar == "G" then return 71 end
|
||||
if cchar == "H" then return 72 end
|
||||
if cchar == "I" then return 73 end
|
||||
if cchar == "J" then return 74 end
|
||||
if cchar == "K" then return 75 end
|
||||
if cchar == "L" then return 76 end
|
||||
if cchar == "M" then return 77 end
|
||||
if cchar == "N" then return 78 end
|
||||
if cchar == "O" then return 79 end
|
||||
if cchar == "P" then return 80 end
|
||||
if cchar == "Q" then return 81 end
|
||||
if cchar == "R" then return 82 end
|
||||
if cchar == "S" then return 83 end
|
||||
if cchar == "T" then return 84 end
|
||||
if cchar == "U" then return 85 end
|
||||
if cchar == "V" then return 86 end
|
||||
if cchar == "W" then return 87 end
|
||||
if cchar == "X" then return 88 end
|
||||
if cchar == "Y" then return 89 end
|
||||
if cchar == "Z" then return 90 end
|
||||
|
||||
if cchar == "a" then return 97 end
|
||||
if cchar == "b" then return 98 end
|
||||
if cchar == "c" then return 99 end
|
||||
if cchar == "d" then return 100 end
|
||||
if cchar == "e" then return 101 end
|
||||
if cchar == "f" then return 102 end
|
||||
if cchar == "g" then return 103 end
|
||||
if cchar == "h" then return 104 end
|
||||
if cchar == "i" then return 105 end
|
||||
if cchar == "j" then return 106 end
|
||||
if cchar == "k" then return 107 end
|
||||
if cchar == "l" then return 108 end
|
||||
if cchar == "m" then return 109 end
|
||||
if cchar == "n" then return 110 end
|
||||
if cchar == "o" then return 111 end
|
||||
if cchar == "p" then return 112 end
|
||||
if cchar == "q" then return 113 end
|
||||
if cchar == "r" then return 114 end
|
||||
if cchar == "s" then return 115 end
|
||||
if cchar == "t" then return 116 end
|
||||
if cchar == "u" then return 117 end
|
||||
if cchar == "v" then return 118 end
|
||||
if cchar == "w" then return 119 end
|
||||
if cchar == "x" then return 120 end
|
||||
if cchar == "y" then return 121 end
|
||||
if cchar == "z" then return 122 end
|
||||
end
|
||||
local function findcollision(hash_table, array)
|
||||
local collisions = 0
|
||||
for k,v in ipairs(hash_table) do
|
||||
for i = 1, table.getn(hash_table) do
|
||||
if i ~= k then
|
||||
if hash_table[i] == hash_table[k] then
|
||||
collisions = collisions + 1
|
||||
print(hash_table[i], hash_table[k], i, k, array[i], array[k])
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
return collisions
|
||||
end
|
||||
aura_env.tohash = function(tempvar)
|
||||
local charTable = {}
|
||||
local hash = 0
|
||||
for char in tempvar:gmatch("%a") do
|
||||
charTable[#charTable + 1] = char
|
||||
hash = hash + tonum(char)
|
||||
hash = hash / table.getn(charTable)
|
||||
end
|
||||
hash = math.floor(hash * 10000)
|
||||
return hash
|
||||
--print(aura_env.spellarray[hash], hash)
|
||||
end
|
||||
aura_env.checkbase = function(spell)
|
||||
if aura_env.spellarray[aura_env.tohash(spell)] == nil then return 0 end
|
||||
if aura_env.spellarray[aura_env.tohash(spell)] == spell then return 1 end
|
||||
end
|
||||
@@ -1,2 +1,2 @@
|
||||
"\124T%s:0\124t"
|
||||
"\124T%s:0\124t"
|
||||
Where %s is icon ID
|
||||
@@ -1,3 +1,3 @@
|
||||
hooksecurefunc( "JumpOrAscendStart", function()
|
||||
DEFAULT_CHAT_FRAME:AddMessage( "Jump" );
|
||||
hooksecurefunc( "JumpOrAscendStart", function()
|
||||
DEFAULT_CHAT_FRAME:AddMessage( "Jump" );
|
||||
end );
|
||||
@@ -1,8 +1,8 @@
|
||||
aura_env.glow = function(unit, s)
|
||||
local nameplate = C_NamePlate.GetNamePlateForUnit(unit)
|
||||
if nameplate and s == 1 then
|
||||
ActionButton_ShowOverlayGlow(nameplate.UnitFrame.HealthBar)
|
||||
else
|
||||
ActionButton_HideOverlayGlow(nameplate.UnitFrame.HealthBar)
|
||||
end
|
||||
end
|
||||
aura_env.glow = function(unit, s)
|
||||
local nameplate = C_NamePlate.GetNamePlateForUnit(unit)
|
||||
if nameplate and s == 1 then
|
||||
ActionButton_ShowOverlayGlow(nameplate.UnitFrame.HealthBar)
|
||||
else
|
||||
ActionButton_HideOverlayGlow(nameplate.UnitFrame.HealthBar)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
--INIT
|
||||
if not aura_env.region.texture then
|
||||
local texture = aura_env.region:CreateTexture(nil, "OVERLAY")
|
||||
aura_env.region.texture = texture
|
||||
end
|
||||
aura_env.region:SetHeight(128)
|
||||
aura_env.region:SetWidth(128)
|
||||
aura_env.region.texture:SetTexture("Interface\\Addons\\WeakAuras\\PowerAurasMedia\\Auras\\Aura51")
|
||||
aura_env.region.texture:SetHeight(128)
|
||||
aura_env.region.texture:SetWidth(128)
|
||||
aura_env.region.texture:SetAllPoints(aura_env.region)
|
||||
aura_env.region.texture:Show()
|
||||
local plate = C_NamePlate.GetNamePlateForUnit("target")
|
||||
if plate then
|
||||
aura_env.region.texture:ClearAllPoints()
|
||||
aura_env.region.texture:SetPoint("BOTTOM", plate, "BOTTOM", 0, 0)
|
||||
end
|
||||
--INIT
|
||||
if not aura_env.region.texture then
|
||||
local texture = aura_env.region:CreateTexture(nil, "OVERLAY")
|
||||
aura_env.region.texture = texture
|
||||
end
|
||||
aura_env.region:SetHeight(128)
|
||||
aura_env.region:SetWidth(128)
|
||||
aura_env.region.texture:SetTexture("Interface\\Addons\\WeakAuras\\PowerAurasMedia\\Auras\\Aura51")
|
||||
aura_env.region.texture:SetHeight(128)
|
||||
aura_env.region.texture:SetWidth(128)
|
||||
aura_env.region.texture:SetAllPoints(aura_env.region)
|
||||
aura_env.region.texture:Show()
|
||||
local plate = C_NamePlate.GetNamePlateForUnit("target")
|
||||
if plate then
|
||||
aura_env.region.texture:ClearAllPoints()
|
||||
aura_env.region.texture:SetPoint("BOTTOM", plate, "BOTTOM", 0, 0)
|
||||
end
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
local function printTable(table, n)
|
||||
if not n then n = 0 end
|
||||
for k,v in pairs(table) do
|
||||
local printText = ""
|
||||
for i = 1, n do
|
||||
printText = printText .. " "
|
||||
end
|
||||
printText = printText .. "[" .. k .. "] = " .. tostring(v)
|
||||
print(printText)
|
||||
if type(v) == "table" then
|
||||
n = n + 1
|
||||
printTable(v, n)
|
||||
end
|
||||
end
|
||||
local function printTable(table, n)
|
||||
if not n then n = 0 end
|
||||
for k,v in pairs(table) do
|
||||
local printText = ""
|
||||
for i = 1, n do
|
||||
printText = printText .. " "
|
||||
end
|
||||
printText = printText .. "[" .. k .. "] = " .. tostring(v)
|
||||
print(printText)
|
||||
if type(v) == "table" then
|
||||
n = n + 1
|
||||
printTable(v, n)
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -1,11 +1,11 @@
|
||||
-- somewhere in your addon's initialization
|
||||
local myTooltip = CreateFrame("GameTooltip", "MyAddOnTooltip", UIParent, "GameTooltipTemplate")
|
||||
myTooltip:SetOwner(UIParent, "ANCHOR_NONE")
|
||||
|
||||
-- later, when you want to look at a tooltip
|
||||
myTooltip:SetUnitBuff("player", index of buff)
|
||||
for i = 1, myTooltip:NumLines() do
|
||||
local textLeft = _G["MyAddOnTooltipTextLeft"..i]:GetText()
|
||||
local textRight = _G["MyAddOnTooltipTextRight"..i]:GetText()
|
||||
-- do a :match or whatever to look for pertinent text
|
||||
end
|
||||
-- somewhere in your addon's initialization
|
||||
local myTooltip = CreateFrame("GameTooltip", "MyAddOnTooltip", UIParent, "GameTooltipTemplate")
|
||||
myTooltip:SetOwner(UIParent, "ANCHOR_NONE")
|
||||
|
||||
-- later, when you want to look at a tooltip
|
||||
myTooltip:SetUnitBuff("player", index of buff)
|
||||
for i = 1, myTooltip:NumLines() do
|
||||
local textLeft = _G["MyAddOnTooltipTextLeft"..i]:GetText()
|
||||
local textRight = _G["MyAddOnTooltipTextRight"..i]:GetText()
|
||||
-- do a :match or whatever to look for pertinent text
|
||||
end
|
||||
|
||||
@@ -1,84 +1,84 @@
|
||||
registers = {
|
||||
["filostack"] = {},
|
||||
["fifostack"] = {},
|
||||
["lifostack"] = {},
|
||||
["lilostack"] = {},
|
||||
["filo"] = {
|
||||
["push"] = function(var)
|
||||
if not var then return false end
|
||||
registers.filostack[#registers.filostack + 1] = var
|
||||
return true
|
||||
end,
|
||||
["pop"] = function()
|
||||
local var = registers.filostack[#registers.filostack]
|
||||
if not var then return false end
|
||||
registers.filostack[#registers.filostack] = nil
|
||||
return var
|
||||
end,
|
||||
},
|
||||
["fifo"] = {
|
||||
["push"] = function(var)
|
||||
if not var then return false end
|
||||
registers.fifostack[#registers.fifostack + 1] = var
|
||||
return true
|
||||
end,
|
||||
["pop"] = function()
|
||||
local var = registers.fifostack[1]
|
||||
if not var then return false end
|
||||
registers.fifostack[1] = nil
|
||||
for i = 1, #registers.fifostack do
|
||||
registers.fifostack[i] = registers.fifostack[i + 1]
|
||||
registers.fifostack[i + 1] = nil
|
||||
end
|
||||
return var
|
||||
end,
|
||||
},
|
||||
["lifo"] = {
|
||||
["push"] = function(var)
|
||||
if not var then return false end
|
||||
for i = 1, #registers.lifostack do
|
||||
registers.lifostack[i + 1] = registers.lifostack[i]
|
||||
end
|
||||
registers.lifostack[1] = var
|
||||
return true
|
||||
end,
|
||||
["pop"] = function()
|
||||
local var = #registers.lifostack
|
||||
if not var then return false end
|
||||
registers.lifostack[#registers.lifostack] = nil
|
||||
return var
|
||||
end,
|
||||
},
|
||||
}
|
||||
|
||||
print("lifo")
|
||||
print("")
|
||||
for i = 1, 10 do
|
||||
print("push")
|
||||
print(registers.lifo.push(i))
|
||||
end
|
||||
print("")
|
||||
for k,v in ipairs(registers.lifostack) do
|
||||
print(v)
|
||||
end
|
||||
print("")
|
||||
for i = 1, #registers.lifostack do
|
||||
print("pop")
|
||||
print(registers.lifo.pop())
|
||||
end
|
||||
print("")
|
||||
print("lilo")
|
||||
print("")
|
||||
for i = 1, 4 do
|
||||
print("push")
|
||||
print(registers.lilo.push(i))
|
||||
end
|
||||
print("")
|
||||
for k,v in ipairs(registers.lilostack) do
|
||||
print(v)
|
||||
end
|
||||
print("")
|
||||
for i = 1, #registers.lilostack do
|
||||
print("pop")
|
||||
print(registers.lilo.pop())
|
||||
registers = {
|
||||
["filostack"] = {},
|
||||
["fifostack"] = {},
|
||||
["lifostack"] = {},
|
||||
["lilostack"] = {},
|
||||
["filo"] = {
|
||||
["push"] = function(var)
|
||||
if not var then return false end
|
||||
registers.filostack[#registers.filostack + 1] = var
|
||||
return true
|
||||
end,
|
||||
["pop"] = function()
|
||||
local var = registers.filostack[#registers.filostack]
|
||||
if not var then return false end
|
||||
registers.filostack[#registers.filostack] = nil
|
||||
return var
|
||||
end,
|
||||
},
|
||||
["fifo"] = {
|
||||
["push"] = function(var)
|
||||
if not var then return false end
|
||||
registers.fifostack[#registers.fifostack + 1] = var
|
||||
return true
|
||||
end,
|
||||
["pop"] = function()
|
||||
local var = registers.fifostack[1]
|
||||
if not var then return false end
|
||||
registers.fifostack[1] = nil
|
||||
for i = 1, #registers.fifostack do
|
||||
registers.fifostack[i] = registers.fifostack[i + 1]
|
||||
registers.fifostack[i + 1] = nil
|
||||
end
|
||||
return var
|
||||
end,
|
||||
},
|
||||
["lifo"] = {
|
||||
["push"] = function(var)
|
||||
if not var then return false end
|
||||
for i = 1, #registers.lifostack do
|
||||
registers.lifostack[i + 1] = registers.lifostack[i]
|
||||
end
|
||||
registers.lifostack[1] = var
|
||||
return true
|
||||
end,
|
||||
["pop"] = function()
|
||||
local var = #registers.lifostack
|
||||
if not var then return false end
|
||||
registers.lifostack[#registers.lifostack] = nil
|
||||
return var
|
||||
end,
|
||||
},
|
||||
}
|
||||
|
||||
print("lifo")
|
||||
print("")
|
||||
for i = 1, 10 do
|
||||
print("push")
|
||||
print(registers.lifo.push(i))
|
||||
end
|
||||
print("")
|
||||
for k,v in ipairs(registers.lifostack) do
|
||||
print(v)
|
||||
end
|
||||
print("")
|
||||
for i = 1, #registers.lifostack do
|
||||
print("pop")
|
||||
print(registers.lifo.pop())
|
||||
end
|
||||
print("")
|
||||
print("lilo")
|
||||
print("")
|
||||
for i = 1, 4 do
|
||||
print("push")
|
||||
print(registers.lilo.push(i))
|
||||
end
|
||||
print("")
|
||||
for k,v in ipairs(registers.lilostack) do
|
||||
print(v)
|
||||
end
|
||||
print("")
|
||||
for i = 1, #registers.lilostack do
|
||||
print("pop")
|
||||
print(registers.lilo.pop())
|
||||
end
|
||||
@@ -1,8 +1,8 @@
|
||||
aura_env.round = function(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
|
||||
aura_env.round = function(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
|
||||
@@ -1,20 +1,20 @@
|
||||
aura_env.shorten = function(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
|
||||
aura_env.shorten = function(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
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
aura_env.range = function(val, min, max, max2)
|
||||
val = 1 - (((max - val) / (max - min)) * max2)
|
||||
return val
|
||||
aura_env.range = function(val, min, max, max2)
|
||||
val = 1 - (((max - val) / (max - min)) * max2)
|
||||
return val
|
||||
end
|
||||
@@ -1,22 +1,22 @@
|
||||
local function sortArray(array)
|
||||
local lastMax = 1000
|
||||
local maxv, maxk = 0, 0
|
||||
local temparray = {}
|
||||
for k, v in ipairs(array) do
|
||||
temparray[k] = v
|
||||
end
|
||||
local sorted = {}
|
||||
for k, v in ipairs(array) do
|
||||
maxv, maxk = 0, 0
|
||||
for k2, v2 in ipairs(temparray) do
|
||||
if lastMax and v2 > maxv and v2 <= lastMax then
|
||||
maxv = v2
|
||||
maxk = k2
|
||||
end
|
||||
end
|
||||
sorted[k] = maxv
|
||||
table.remove(temparray, maxk)
|
||||
lastMax = maxv
|
||||
end
|
||||
return sorted
|
||||
end
|
||||
local function sortArray(array)
|
||||
local lastMax = 1000
|
||||
local maxv, maxk = 0, 0
|
||||
local temparray = {}
|
||||
for k, v in ipairs(array) do
|
||||
temparray[k] = v
|
||||
end
|
||||
local sorted = {}
|
||||
for k, v in ipairs(array) do
|
||||
maxv, maxk = 0, 0
|
||||
for k2, v2 in ipairs(temparray) do
|
||||
if lastMax and v2 > maxv and v2 <= lastMax then
|
||||
maxv = v2
|
||||
maxk = k2
|
||||
end
|
||||
end
|
||||
sorted[k] = maxv
|
||||
table.remove(temparray, maxk)
|
||||
lastMax = maxv
|
||||
end
|
||||
return sorted
|
||||
end
|
||||
|
||||
@@ -1,46 +1,46 @@
|
||||
[12:15 AM] 22428
|
||||
[12:15 AM] Holy Shield
|
||||
[12:15 AM] 22558
|
||||
[12:15 AM] Blessed Hammer
|
||||
[12:15 AM] 22430
|
||||
[12:15 AM] Consecrated Hammer
|
||||
[12:15 AM] 22431
|
||||
[12:15 AM] First Avenger
|
||||
[12:15 AM] 22604
|
||||
[12:15 AM] Bastion of Light
|
||||
[12:15 AM] 22594
|
||||
[12:15 AM] Crusader's Judgment
|
||||
[12:15 AM] 22179
|
||||
[12:15 AM] Fist of Justice
|
||||
[12:15 AM] 22180
|
||||
[12:15 AM] Repentance
|
||||
[12:15 AM] 21811
|
||||
[12:15 AM] Blinding Light
|
||||
[12:15 AM] 22433
|
||||
[12:15 AM] Blessing of Spellwarding
|
||||
[12:15 AM] 22434
|
||||
[12:15 AM] Cavalier
|
||||
[12:15 AM] 22435
|
||||
[12:15 AM] Retribution Aura
|
||||
[12:15 AM] 22705
|
||||
[12:15 AM] Hand of the Protector
|
||||
[12:15 AM] 21795
|
||||
[12:15 AM] Knight Templar
|
||||
[12:15 AM] 17601
|
||||
[12:15 AM] Final Stand
|
||||
[12:15 AM] 22564
|
||||
[12:15 AM] Aegis of Light
|
||||
[12:15 AM] 22438
|
||||
[12:15 AM] Consecrated Ground
|
||||
[12:15 AM] 22484
|
||||
[12:15 AM] Judgment of Light
|
||||
[12:15 AM] 21201
|
||||
[12:15 AM] Righteous Protector
|
||||
[12:15 AM] 21202
|
||||
[12:15 AM] Seraphim
|
||||
[12:15 AM] 22645
|
||||
[12:15 AM] Last Defender
|
||||
|
||||
/run for row = 1, 7 do for column = 1, 3 do local tempvar = select(1, GetTalentInfo(row, column, 1)); print(tempvar); tempvar = select(2, GetTalentInfo(row, column, 1)); print(tempvar) end end
|
||||
|
||||
[12:15 AM] 22428
|
||||
[12:15 AM] Holy Shield
|
||||
[12:15 AM] 22558
|
||||
[12:15 AM] Blessed Hammer
|
||||
[12:15 AM] 22430
|
||||
[12:15 AM] Consecrated Hammer
|
||||
[12:15 AM] 22431
|
||||
[12:15 AM] First Avenger
|
||||
[12:15 AM] 22604
|
||||
[12:15 AM] Bastion of Light
|
||||
[12:15 AM] 22594
|
||||
[12:15 AM] Crusader's Judgment
|
||||
[12:15 AM] 22179
|
||||
[12:15 AM] Fist of Justice
|
||||
[12:15 AM] 22180
|
||||
[12:15 AM] Repentance
|
||||
[12:15 AM] 21811
|
||||
[12:15 AM] Blinding Light
|
||||
[12:15 AM] 22433
|
||||
[12:15 AM] Blessing of Spellwarding
|
||||
[12:15 AM] 22434
|
||||
[12:15 AM] Cavalier
|
||||
[12:15 AM] 22435
|
||||
[12:15 AM] Retribution Aura
|
||||
[12:15 AM] 22705
|
||||
[12:15 AM] Hand of the Protector
|
||||
[12:15 AM] 21795
|
||||
[12:15 AM] Knight Templar
|
||||
[12:15 AM] 17601
|
||||
[12:15 AM] Final Stand
|
||||
[12:15 AM] 22564
|
||||
[12:15 AM] Aegis of Light
|
||||
[12:15 AM] 22438
|
||||
[12:15 AM] Consecrated Ground
|
||||
[12:15 AM] 22484
|
||||
[12:15 AM] Judgment of Light
|
||||
[12:15 AM] 21201
|
||||
[12:15 AM] Righteous Protector
|
||||
[12:15 AM] 21202
|
||||
[12:15 AM] Seraphim
|
||||
[12:15 AM] 22645
|
||||
[12:15 AM] Last Defender
|
||||
|
||||
/run for row = 1, 7 do for column = 1, 3 do local tempvar = select(1, GetTalentInfo(row, column, 1)); print(tempvar); tempvar = select(2, GetTalentInfo(row, column, 1)); print(tempvar) end end
|
||||
|
||||
/run local tempvar = ""; for i = 1, 40 do tempvar = select(i, GetTalentInfoByID(22430)); if tempvar ~= nil then print(tempvar, i) end end
|
||||
@@ -1,8 +1,8 @@
|
||||
aura_env.f1 = CreateFrame("Frame", nil, UIParent)
|
||||
aura_env.f1:SetWidth(100)
|
||||
aura_env.f1:SetHeight(100)
|
||||
aura_env.f1:SetPoint("CENTER", 0, 100)
|
||||
aura_env.f1.text = aura_env.f1:CreateFontString(nil, "ARTWORK")
|
||||
aura_env.f1.text:SetFont("Fonts\\ARIALN.ttf", 26, "OUTLINE")
|
||||
aura_env.f1.text:SetPoint("CENTER", 0, 0)
|
||||
aura_env.f1:Hide()
|
||||
aura_env.f1 = CreateFrame("Frame", nil, UIParent)
|
||||
aura_env.f1:SetWidth(100)
|
||||
aura_env.f1:SetHeight(100)
|
||||
aura_env.f1:SetPoint("CENTER", 0, 100)
|
||||
aura_env.f1.text = aura_env.f1:CreateFontString(nil, "ARTWORK")
|
||||
aura_env.f1.text:SetFont("Fonts\\ARIALN.ttf", 26, "OUTLINE")
|
||||
aura_env.f1.text:SetPoint("CENTER", 0, 0)
|
||||
aura_env.f1:Hide()
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
aura_env.region:Show()
|
||||
local aura_env = aura_env
|
||||
C_Timer.After(1, function() aura_env.region:Hide() end)
|
||||
aura_env.region:Show()
|
||||
local aura_env = aura_env
|
||||
C_Timer.After(1, function() aura_env.region:Hide() end)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
local function tohex(input)
|
||||
local output = string.format("%x", input * 256)
|
||||
return output
|
||||
|
||||
local function tohex(input)
|
||||
local output = string.format("%x", input * 256)
|
||||
return output
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
aura_env.CUnitBuff = function(spell)
|
||||
for i = 1, 40 do
|
||||
local name = UnitBuff("player", i)
|
||||
if name then
|
||||
if name == spell then
|
||||
return UnitBuff("player", i)
|
||||
end
|
||||
else
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
aura_env.CUnitBuff = function(spell)
|
||||
for i = 1, 40 do
|
||||
local name = UnitBuff("player", i)
|
||||
if name then
|
||||
if name == spell then
|
||||
return UnitBuff("player", i)
|
||||
end
|
||||
else
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,25 +1,25 @@
|
||||
|
||||
aura_env.UnitDebuffC = function(unit, spell)
|
||||
for i = 1, 40 do
|
||||
local name = UnitDebuff(unit, i)
|
||||
if name then
|
||||
if name == spell then
|
||||
return UnitDebuff(unit, i)
|
||||
end
|
||||
else
|
||||
return nil
|
||||
end
|
||||
end
|
||||
end
|
||||
aura_env.UnitBuffC = function(unit, spell)
|
||||
for i = 1, 40 do
|
||||
local name = UnitBuff(unit, i)
|
||||
if name then
|
||||
if name == spell then
|
||||
return UnitBuff(unit, i)
|
||||
end
|
||||
else
|
||||
return nil
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
aura_env.UnitDebuffC = function(unit, spell)
|
||||
for i = 1, 40 do
|
||||
local name = UnitDebuff(unit, i)
|
||||
if name then
|
||||
if name == spell then
|
||||
return UnitDebuff(unit, i)
|
||||
end
|
||||
else
|
||||
return nil
|
||||
end
|
||||
end
|
||||
end
|
||||
aura_env.UnitBuffC = function(unit, spell)
|
||||
for i = 1, 40 do
|
||||
local name = UnitBuff(unit, i)
|
||||
if name then
|
||||
if name == spell then
|
||||
return UnitBuff(unit, i)
|
||||
end
|
||||
else
|
||||
return nil
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
/ run local f, x = CreateFrame("frame", nil, UIParent); f:SetScript("OnUpdate", function() if GameTooltipTextLeft1:GetText():match("Angellianna") then PlaySound(11466, "master", true); if not x then Screenshot(); x = true; end end end)
|
||||
|
||||
--debugprofilestop() for accurate time like os.clock
|
||||
/ run local f, x = CreateFrame("frame", nil, UIParent); f:SetScript("OnUpdate", function() if GameTooltipTextLeft1:GetText():match("Angellianna") then PlaySound(11466, "master", true); if not x then Screenshot(); x = true; end end end)
|
||||
|
||||
--debugprofilestop() for accurate time like os.clock
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
function()
|
||||
if not aura_env.tooltip then aura_env.tooltip = CreateFrame("GameTooltip", "tooltip1", UIParent, "GameTooltipTemplate") end
|
||||
aura_env.tooltip:SetOwner(ElvUF_RaidGroup1UnitButton1, "ANCHOR_NONE")
|
||||
--tooltip1:SetUnit("raid" .. 2)
|
||||
local text = _G["tooltip1TextLeft1"]:GetText()
|
||||
print(text)
|
||||
end
|
||||
function()
|
||||
if not aura_env.tooltip then aura_env.tooltip = CreateFrame("GameTooltip", "tooltip1", UIParent, "GameTooltipTemplate") end
|
||||
aura_env.tooltip:SetOwner(ElvUF_RaidGroup1UnitButton1, "ANCHOR_NONE")
|
||||
--tooltip1:SetUnit("raid" .. 2)
|
||||
local text = _G["tooltip1TextLeft1"]:GetText()
|
||||
print(text)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user