Code format

This commit is contained in:
2025-05-15 20:37:50 +02:00
parent 9e6432d0b0
commit 69d1f9fd93
105 changed files with 24069 additions and 28084 deletions

View File

@@ -1,4 +1,4 @@
globals = { "CykaPersistentData", "CreateFrame", "GetItemInfo" } globals = { "CykaPersistentData", "CreateFrame", "GetItemInfo", "aura_env" }
unused_args = false unused_args = false
max_line_length = 150 max_line_length = 150
exclude_files = { "Meta/" } exclude_files = { "Meta/" }

View File

@@ -7,5 +7,8 @@
"diagnostics.disable": [ "diagnostics.disable": [
"unused-local", "unused-local",
"unused-vararg" "unused-vararg"
],
"diagnostics.globals": [
"aura_env"
] ]
} }

View File

@@ -4,52 +4,55 @@
--Look at tolerances as well --Look at tolerances as well
local dataSet2s = { local dataSet2s = {
[1]=540390408.9506, [1] = 540390408.9506,
[2]=540392394.9163, [2] = 540392394.9163,
[3]=540394398.5326, [3] = 540394398.5326,
[4]=540396409.5288, [4] = 540396409.5288,
[5]=540398396.6414, [5] = 540398396.6414,
[6]=540400397.0754, [6] = 540400397.0754,
[7]=540402384.8113, [7] = 540402384.8113,
[8]=540404385.3304, [8] = 540404385.3304,
[9]=540406398.99, [9] = 540406398.99,
[10]=540408386.472, [10] = 540408386.472,
[11]=540410386.9851, [11] = 540410386.9851,
[12]=540412374.8497, [12] = 540412374.8497,
[13]=540414375.1427, [13] = 540414375.1427,
[14]=540416373.0995, [14] = 540416373.0995,
[15]=540418376.9931, [15] = 540418376.9931,
[16]=540420390.6971 [16] = 540420390.6971,
} }
local dataSet1p5s = { local dataSet1p5s = {
[1]=541651364.1916, [1] = 541651364.1916,
[2]=541652857.9058, [2] = 541652857.9058,
[3]=541654365.8491, [3] = 541654365.8491,
[4]=541655858.3292, [4] = 541655858.3292,
[5]=541657352.4962, [5] = 541657352.4962,
[6]=541658846.2963, [6] = 541658846.2963,
[7]=541660354.015, [7] = 541660354.015,
[8]=541661847.0112, [8] = 541661847.0112,
[9]=541663340.6759, [9] = 541663340.6759,
[10]=541664861.3772, [10] = 541664861.3772,
[11]=541666354.9449, [11] = 541666354.9449,
[12]=541667848.8308, [12] = 541667848.8308,
[13]=541669343.2332, [13] = 541669343.2332,
[14]=541670849.9777, [14] = 541670849.9777,
[15]=541672344.0613, [15] = 541672344.0613,
[16]=541673851.2346 [16] = 541673851.2346,
} }
local tolerance = 50 local tolerance = 50
local tempAverages = {} local tempAverages = {}
-- rounds .5 to 0 or 1; want to round to .5 or .2 or alike -- rounds .5 to 0 or 1; want to round to .5 or .2 or alike
for k,v in ipairs(dataSet1p5s) do for k, v in ipairs(dataSet1p5s) do
if k > 1 then if k > 1 then
local tempAvg = (dataSet1p5s[k] - dataSet1p5s[k - 1]) local tempAvg = (dataSet1p5s[k] - dataSet1p5s[k - 1])
print(((math.floor(tempAvg / 1000) - (tempAvg / 1000)) * 1000), (math.ceil(tempAvg / 1000) - (tempAvg / 1000)) * 1000) print(
((math.floor(tempAvg / 1000) - (tempAvg / 1000)) * 1000),
(math.ceil(tempAvg / 1000) - (tempAvg / 1000)) * 1000
)
if not tempAverages[tempAvg] then tempAverages[tempAvg] = 0 end if not tempAverages[tempAvg] then tempAverages[tempAvg] = 0 end
tempAverages[tempAvg] = tempAverages[tempAvg] + 1 tempAverages[tempAvg] = tempAverages[tempAvg] + 1
end end
end end
for k,v in pairs(tempAverages) do for k, v in pairs(tempAverages) do
print(k,v) print(k, v)
end end

View File

@@ -1,7 +1,7 @@
if not aura_env.region.text then if not aura_env.region.text then
local text = aura_env.region:CreateFontString(nil, aura_env.region) local text = aura_env.region:CreateFontString(nil, aura_env.region)
aura_env.region.text = text aura_env.region.text = text
print("ok!") print("ok!")
end end
aura_env.region.text:SetFont("Fonts\\FRIZQT__.TTF", 10, "OUTLINE, MONOCHROME") aura_env.region.text:SetFont("Fonts\\FRIZQT__.TTF", 10, "OUTLINE, MONOCHROME")
aura_env.region.text:SetTextColor(0, 1, 0, 0.8) aura_env.region.text:SetTextColor(0, 1, 0, 0.8)

View File

@@ -3,70 +3,58 @@ local keybind = "CTRL-C"
local popupText = "Wowhead %s Link\n" .. keybind .. " to copy" local popupText = "Wowhead %s Link\n" .. keybind .. " to copy"
local typeAttributeMap = { local typeAttributeMap = {
quest = {"id", "questId", "questID"}, quest = { "id", "questId", "questID" },
item = {info = {"id"}} item = { info = { "id" } },
} }
local function ShowUrlPopup(id, type) local function ShowUrlPopup(id, type)
if not (id or type) then return end if not (id or type) then return end
local url = baseUrl .. type .. "=" .. id local url = baseUrl .. type .. "=" .. id
StaticPopup_Show("WowheadQuestLinkUrl", type:sub(1, 1):upper() .. type:sub(2), _, url) StaticPopup_Show("WowheadQuestLinkUrl", type:sub(1, 1):upper() .. type:sub(2), _, url)
end end
local function getIdAndType(focus) local function getIdAndType(focus)
local function loop(focus, keys) local function loop(focus, keys)
if not focus then return end if not focus then return end
for key, value in pairs(keys) do for key, value in pairs(keys) do
if type(value) == "table" then if type(value) == "table" then return loop(focus[key], value) end
return loop(focus[key], value) local id = focus[value]
end if id then return id end
local id = focus[value] end
if id then end
return id if not focus then return end
end for type, keys in pairs(typeAttributeMap) do
end local id = loop(focus, keys)
end if id then return id, type end
if not focus then return end end
for type, keys in pairs(typeAttributeMap) do return getIdAndType(focus:GetParent())
local id = loop(focus, keys)
if id then
return id, type
end
end
return getIdAndType(focus:GetParent())
end end
local function run() local function run()
local focus = GetMouseFocus() local focus = GetMouseFocus()
local id, type = getIdAndType(focus) local id, type = getIdAndType(focus)
ShowUrlPopup(id, type) ShowUrlPopup(id, type)
end end
StaticPopupDialogs["WowheadQuestLinkUrl"] = { StaticPopupDialogs["WowheadQuestLinkUrl"] = {
text = popupText, text = popupText,
button1 = "Close", button1 = "Close",
OnShow = function(self, data) OnShow = function(self, data)
local function HidePopup(self) self:GetParent():Hide() end local function HidePopup(self) self:GetParent():Hide() end
self.editBox:SetScript("OnEscapePressed", HidePopup) self.editBox:SetScript("OnEscapePressed", HidePopup)
self.editBox:SetScript("OnEnterPressed", HidePopup) self.editBox:SetScript("OnEnterPressed", HidePopup)
self.editBox:SetMaxLetters(0) self.editBox:SetMaxLetters(0)
self.editBox:SetText(data) self.editBox:SetText(data)
self.editBox:HighlightText(0, self.editBox:GetNumLetters()) self.editBox:HighlightText(0, self.editBox:GetNumLetters())
end, end,
hasEditBox = true, hasEditBox = true,
editBoxWidth = 233, editBoxWidth = 233,
timeout = 0, timeout = 0,
whileDead = true, whileDead = true,
hideOnEscape = true, hideOnEscape = true,
preferredIndex = 3, preferredIndex = 3,
} }
local btn = CreateFrame("BUTTON", "KeybindBtn") local btn = CreateFrame("BUTTON", "KeybindBtn")
SetBindingClick(keybind, btn:GetName()) SetBindingClick(keybind, btn:GetName())
btn:SetScript("OnClick", run) btn:SetScript("OnClick", run)

View File

@@ -1,25 +1,29 @@
-- DISPLAY -- DISPLAY
function aa() function aa()
if UnitDebuff("focus", "Paralytic Poison") then -- application for stun if UnitDebuff("focus", "Paralytic Poison") then -- application for stun
local stacks = select(4, UnitDebuff("focus", "Paralytic Poison")) local stacks = select(4, UnitDebuff("focus", "Paralytic Poison"))
return stacks return stacks
end end
if UnitDebuff("focus", "Partial Paralysis") then return "ROOT'D" end if UnitDebuff("focus", "Partial Paralysis") then return "ROOT'D" end
if UnitDebuff("focus", "Paralysis") then return "PLS HELP" end if UnitDebuff("focus", "Paralysis") then return "PLS HELP" end
end end
-- TRIGGER -- TRIGGER
function bb() function bb()
if UnitDebuff("focus", "Paralytic Poison") or if
UnitDebuff("focus", "Partial Paralysis") or UnitDebuff("focus", "Paralytic Poison")
UnitDebuff("focus", "Paralysis") then -- application for stun or UnitDebuff("focus", "Partial Paralysis")
return true or UnitDebuff("focus", "Paralysis")
end then -- application for stun
return true
end
end end
-- UNTRIGGER -- UNTRIGGER
function cc() function cc()
if UnitDebuff("focus", "Paralytic Poison") == nil and if
UnitDebuff("focus", "Partial Paralysis") == nil and UnitDebuff("focus", "Paralytic Poison") == nil
UnitDebuff("focus", "Paralysis") == nil then -- application for stun and UnitDebuff("focus", "Partial Paralysis") == nil
return true and UnitDebuff("focus", "Paralysis") == nil
end then -- application for stun
return true
end
end end

View File

@@ -29,18 +29,18 @@ SlashCmdList["FREMOVE"] = cleanse
SLASH_FUPDATE1 = "/fupdate" SLASH_FUPDATE1 = "/fupdate"
SLASH_FUPDATE2 = "/fu" SLASH_FUPDATE2 = "/fu"
SlashCmdList["FUPDATE"] = function(msg) SlashCmdList["FUPDATE"] = function(msg)
cleanse() cleanse()
add() add()
end end
local chatEvents = { local chatEvents = {
"CHAT_MSG_SAY", "CHAT_MSG_SAY",
"CHAT_MSG_RAID", "CHAT_MSG_RAID",
"CHAT_MSG_YELL", "CHAT_MSG_YELL",
"CHAT_MSG_PARTY", "CHAT_MSG_PARTY",
"CHAT_MSG_GUILD", "CHAT_MSG_GUILD",
"CHAT_MSG_WHISPER", "CHAT_MSG_WHISPER",
"CHAT_MSG_CHANNEL", "CHAT_MSG_CHANNEL",
} }
if not ChatFilter then ChatFilter = {} end if not ChatFilter then ChatFilter = {} end
@@ -51,85 +51,92 @@ if not ChatFilter.RemovedCommon then ChatFilter.RemovedCommon = {} end
--Own filter --Own filter
local function myChatFilter(self, e, msg, author, lang) local function myChatFilter(self, e, msg, author, lang)
print(msg, author, lang) print(msg, author, lang)
local function getDate() local function getDate()
local date = date() local date = date()
local year = date:match("%d%d%/%d%d/(%d%d)") + 2000 --01/07/(19) 14:36:42 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 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 local day = date:match("%d%d%/(%d%d)") --01/(07)/19 14:36:42
--Remove first place zeros --Remove first place zeros
if day:find("0") == 1 then if day:find("0") == 1 then day = day:gsub("0", "") end
day = day:gsub("0", "") if month:find("0") == 1 then month = month:gsub("0", "") end
end local localdate = day .. "." .. month .. "." .. year
if month:find("0") == 1 then return localdate
month = month:gsub("0", "") end
end
local localdate = day .. "." .. month .. "." .. year
return localdate
end
local function getTime() local function getTime()
local date = date() local date = date()
local localtime = date:match("%d%d%/%d%d%/%d%d%s(%d%d%p%d%d%p%d%d)") local localtime = date:match("%d%d%/%d%d%/%d%d%s(%d%d%p%d%d%p%d%d)")
return localtime return localtime
end end
author = author:match("(.+)-") author = author:match("(.+)-")
--Remove Alliance --Remove Alliance
if lang == "Common" then if lang == "Common" then
-- print("Caught one!") -- print("Caught one!")
ChatFilter.RemovedCommon[#ChatFilter.RemovedCommon + 1] = format("\[%s\]\[%s\]%s: %s", getDate(), getTime(), author, msg) ChatFilter.RemovedCommon[#ChatFilter.RemovedCommon + 1] =
return true format("[%s][%s]%s: %s", getDate(), getTime(), author, msg)
end return true
end
--Remove People --Remove People
for k, v in pairs(ChatFilter.People) do for k, v in pairs(ChatFilter.People) do
if author == v then if author == v then
if e == "CHAT_MSG_WHISPER" and author ~= UnitName("player") then if e == "CHAT_MSG_WHISPER" and author ~= UnitName("player") then
SendChatMessage(format("Your message \"%s\" has been filtered out because I hate fun", msg), "WHISPER", nil, author) SendChatMessage(
end format('Your message "%s" has been filtered out because I hate fun', msg),
ChatFilter.RemovedLines[#ChatFilter.RemovedLines + 1] = format("\[%s\]\[%s\]%s: %s", getDate(), getTime(), author, msg) "WHISPER",
-- print("Caught one!") nil,
return true author
end )
end end
ChatFilter.RemovedLines[#ChatFilter.RemovedLines + 1] =
format("[%s][%s]%s: %s", getDate(), getTime(), author, msg)
-- print("Caught one!")
return true
end
end
--Remove Words --Remove Words
for k, v in pairs(ChatFilter.Words) do for k, v in pairs(ChatFilter.Words) do
if msg:match(v) then if msg:match(v) then
if e == "CHAT_MSG_WHISPER" and author ~= UnitName("player") then if e == "CHAT_MSG_WHISPER" and author ~= UnitName("player") then
SendChatMessage(format("Your message \"%s\" has been filtered out because I hate fun", msg), "WHISPER", nil, author) SendChatMessage(
end format('Your message "%s" has been filtered out because I hate fun', msg),
ChatFilter.RemovedLines[#ChatFilter.RemovedLines + 1] = format("\[%s\]\[%s\]%s: %s", getDate(), getTime(), author, msg) "WHISPER",
-- print("Caught one!") nil,
return true author
end )
end end
ChatFilter.RemovedLines[#ChatFilter.RemovedLines + 1] =
format("[%s][%s]%s: %s", getDate(), getTime(), author, msg)
-- print("Caught one!")
return true
end
end
end end
--Remove all filters --Remove all filters
local function cleanse() local function cleanse()
for k, v in pairs(chatEvents) do for k, v in pairs(chatEvents) do
if ChatFrame_GetMessageEventFilters(v) then if ChatFrame_GetMessageEventFilters(v) then
print(v, unpack(ChatFrame_GetMessageEventFilters(v))) print(v, unpack(ChatFrame_GetMessageEventFilters(v)))
for k2, v2 in pairs(ChatFrame_GetMessageEventFilters(v)) do for k2, v2 in pairs(ChatFrame_GetMessageEventFilters(v)) do
ChatFrame_RemoveMessageEventFilter(v, v2) ChatFrame_RemoveMessageEventFilter(v, v2)
end end
end end
print("Done?") print("Done?")
if ChatFrame_GetMessageEventFilters(v) then if ChatFrame_GetMessageEventFilters(v) then print(unpack(ChatFrame_GetMessageEventFilters(v))) end
print(unpack(ChatFrame_GetMessageEventFilters(v))) print("Got it.")
end end
print("Got it.")
end
end end
--Add filter --Add filter
local function add() local function add()
for k, v in pairs(chatEvents) do for k, v in pairs(chatEvents) do
print("Adding filter to", v) print("Adding filter to", v)
ChatFrame_AddMessageEventFilter(v, myChatFilter) ChatFrame_AddMessageEventFilter(v, myChatFilter)
end end
end end

View File

@@ -1,82 +1,85 @@
aura_env.herbs = { aura_env.herbs = {
[1] = { [1] = {
["X"] = 49.38, ["X"] = 49.38,
["Y"] = 77.73, ["Y"] = 77.73,
["CD"] = 0, ["CD"] = 0,
}, },
[2] = { [2] = {
["X"] = 48.13, ["X"] = 48.13,
["Y"] = 85.04, ["Y"] = 85.04,
["CD"] = 0, ["CD"] = 0,
}, },
[3] = { [3] = {
["X"] = 47.99, ["X"] = 47.99,
["Y"] = 73.48, ["Y"] = 73.48,
["CD"] = 0, ["CD"] = 0,
}, },
[4] = { [4] = {
["X"] = 55.28, ["X"] = 55.28,
["Y"] = 61.71, ["Y"] = 61.71,
["CD"] = 0, ["CD"] = 0,
}, },
[5] = { [5] = {
["X"] = 58.67, ["X"] = 58.67,
["Y"] = 59.56, ["Y"] = 59.56,
["CD"] = 0, ["CD"] = 0,
}, },
[6] = { [6] = {
["X"] = 57.57, ["X"] = 57.57,
["Y"] = 57.4, ["Y"] = 57.4,
["CD"] = 0, ["CD"] = 0,
}, },
[7] = { [7] = {
["X"] = 57.13, ["X"] = 57.13,
["Y"] = 60.08, ["Y"] = 60.08,
["CD"] = 0, ["CD"] = 0,
}, },
[8] = { [8] = {
["X"] = 55.73, ["X"] = 55.73,
["Y"] = 51.76, ["Y"] = 51.76,
["CD"] = 0, ["CD"] = 0,
}, },
[9] = { [9] = {
["X"] = 56.14, ["X"] = 56.14,
["Y"] = 51.59, ["Y"] = 51.59,
["CD"] = 0, ["CD"] = 0,
}, },
[10] = { [10] = {
["X"] = 41.07, ["X"] = 41.07,
["Y"] = 73.8, ["Y"] = 73.8,
["CD"] = 0, ["CD"] = 0,
}, },
} }
aura_env.cooldown = 600 aura_env.cooldown = 600
aura_env.wipeDistance = 50 aura_env.wipeDistance = 50
aura_env.angle = 0 aura_env.angle = 0
aura_env.hyp = 0 aura_env.hyp = 0
aura_env.GetClosestHerb = function() aura_env.GetClosestHerb = function()
aura_env.minID = { aura_env.minID = {
["X"] = 0, ["X"] = 0,
["Y"] = 0, ["Y"] = 0,
["D"] = 1000, ["D"] = 1000,
["ID"] = -1 ["ID"] = -1,
} }
local pX = GetPlayerMapPosition("player") or 0 local pX = GetPlayerMapPosition("player") or 0
local pY = select(2, GetPlayerMapPosition("player")) or 0 local pY = select(2, GetPlayerMapPosition("player")) or 0
pX, pY = pX * 100, pY * 100 pX, pY = pX * 100, pY * 100
for k, v in ipairs(aura_env.herbs) do for k, v in ipairs(aura_env.herbs) do
local hX, hY, cd = aura_env.herbs[k].X, aura_env.herbs[k].Y, aura_env.herbs[k].CD local hX, hY, cd = aura_env.herbs[k].X, aura_env.herbs[k].Y, aura_env.herbs[k].CD
if cd == 0 then if cd == 0 then
local X, Y = pX - hX, pY - hY local X, Y = pX - hX, pY - hY
local hyp = math.sqrt((math.abs(X ^ 2)) + (math.abs(Y ^ 2))) local hyp = math.sqrt((math.abs(X ^ 2)) + (math.abs(Y ^ 2)))
if hyp < aura_env.minID.D then if hyp < aura_env.minID.D then
aura_env.minID.X = hX aura_env.minID.X = hX
aura_env.minID.Y = hY aura_env.minID.Y = hY
aura_env.minID.D = hyp aura_env.minID.D = hyp
aura_env.minID.ID = k aura_env.minID.ID = k
end end
end end
end end
return aura_env.minID.ID return aura_env.minID.ID
end
if WeakAuras.IsOptionsOpen() then
WeakAurasSaved.HerbSniffer.CD = 0
WeakAurasSaved.HerbSniffer.NoCD = #aura_env.herbs
end end
if WeakAuras.IsOptionsOpen() then WeakAurasSaved.HerbSniffer.CD = 0; WeakAurasSaved.HerbSniffer.NoCD = #aura_env.herbs end

File diff suppressed because it is too large Load Diff

View File

@@ -1,77 +1,77 @@
aura_env.herbs = { aura_env.herbs = {
[1] = { [1] = {
["X"] = 58.54, ["X"] = 58.54,
["Y"] = 51.33, ["Y"] = 51.33,
["CD"] = 0, ["CD"] = 0,
}, },
[2] = { [2] = {
["X"] = 55.51, ["X"] = 55.51,
["Y"] = 55.97, ["Y"] = 55.97,
["CD"] = 0, ["CD"] = 0,
}, },
[3] = { [3] = {
["X"] = 49.55, ["X"] = 49.55,
["Y"] = 58.43, ["Y"] = 58.43,
["CD"] = 0, ["CD"] = 0,
}, },
[4] = { [4] = {
["X"] = 55.87, ["X"] = 55.87,
["Y"] = 79, ["Y"] = 79,
["CD"] = 0, ["CD"] = 0,
}, },
[5] = { [5] = {
["X"] = 56.32, ["X"] = 56.32,
["Y"] = 77.94, ["Y"] = 77.94,
["CD"] = 0, ["CD"] = 0,
}, },
[6] = { [6] = {
["X"] = 57.65, ["X"] = 57.65,
["Y"] = 72.89, ["Y"] = 72.89,
["CD"] = 0, ["CD"] = 0,
}, },
[7] = { [7] = {
["X"] = 52.06, ["X"] = 52.06,
["Y"] = 22.41, ["Y"] = 22.41,
["CD"] = 0, ["CD"] = 0,
}, },
[8] = { [8] = {
["X"] = 49.8, ["X"] = 49.8,
["Y"] = 14.15, ["Y"] = 14.15,
["CD"] = 0, ["CD"] = 0,
}, },
[9] = { [9] = {
["X"] = 42.4, ["X"] = 42.4,
["Y"] = 71.35, ["Y"] = 71.35,
["CD"] = 0, ["CD"] = 0,
}, },
[10] = { [10] = {
["X"] = 66.74, ["X"] = 66.74,
["Y"] = 37.04, ["Y"] = 37.04,
["CD"] = 0, ["CD"] = 0,
}, },
[11] = { [11] = {
["X"] = 71.61, ["X"] = 71.61,
["Y"] = 34.02, ["Y"] = 34.02,
["CD"] = 0, ["CD"] = 0,
}, },
[12] = { [12] = {
["X"] = 43.66, ["X"] = 43.66,
["Y"] = 42.8, ["Y"] = 42.8,
["CD"] = 0, ["CD"] = 0,
}, },
[13] = { [13] = {
["X"] = 51.79, ["X"] = 51.79,
["Y"] = 70.39, ["Y"] = 70.39,
["CD"] = 0, ["CD"] = 0,
}, },
[14] = { [14] = {
["X"] = 45.17, ["X"] = 45.17,
["Y"] = 53.13, ["Y"] = 53.13,
["CD"] = 0, ["CD"] = 0,
}, },
[15] = { [15] = {
["X"] = 71.88, ["X"] = 71.88,
["Y"] = 27.85, ["Y"] = 27.85,
["CD"] = 0, ["CD"] = 0,
}, },
} }

View File

@@ -1,519 +1,436 @@
aura_env.herbs = aura_env.herbs = {
{ [1] = {
[1] = ["X"] = 39.26,
{ ["Y"] = 49.83,
["X"] = 39.26, ["CD"] = 0,
["Y"] = 49.83, },
["CD"] = 0 [2] = {
}, ["X"] = 37.03,
[2] = ["Y"] = 50.59,
{ ["CD"] = 0,
["X"] = 37.03, },
["Y"] = 50.59, [3] = {
["CD"] = 0 ["X"] = 28.08,
}, ["Y"] = 56.13,
[3] = ["CD"] = 0,
{ },
["X"] = 28.08, [4] = {
["Y"] = 56.13, ["X"] = 29.49,
["CD"] = 0 ["Y"] = 55.41,
}, ["CD"] = 0,
[4] = },
{ [5] = {
["X"] = 29.49, ["X"] = 30.68,
["Y"] = 55.41, ["Y"] = 54.32,
["CD"] = 0 ["CD"] = 0,
}, },
[5] = [6] = {
{ ["X"] = 35.43,
["X"] = 30.68, ["Y"] = 50.28,
["Y"] = 54.32, ["CD"] = 0,
["CD"] = 0 },
}, [7] = {
[6] = ["X"] = 36.67,
{ ["Y"] = 48.79,
["X"] = 35.43, ["CD"] = 0,
["Y"] = 50.28, },
["CD"] = 0 [8] = {
}, ["X"] = 38.25,
[7] = ["Y"] = 48.17,
{ ["CD"] = 0,
["X"] = 36.67, },
["Y"] = 48.79, [9] = {
["CD"] = 0 ["X"] = 46.08,
}, ["Y"] = 23.02,
[8] = ["CD"] = 0,
{ },
["X"] = 38.25, [10] = {
["Y"] = 48.17, ["X"] = 45.35,
["CD"] = 0 ["Y"] = 21.67,
}, ["CD"] = 0,
[9] = },
{ [11] = {
["X"] = 46.08, ["X"] = 44.45,
["Y"] = 23.02, ["Y"] = 20.35,
["CD"] = 0 ["CD"] = 0,
}, },
[10] = [12] = {
{ ["X"] = 45.48,
["X"] = 45.35, ["Y"] = 19.74,
["Y"] = 21.67, ["CD"] = 0,
["CD"] = 0 },
}, [13] = {
[11] = ["X"] = 46.97,
{ ["Y"] = 18.39,
["X"] = 44.45, ["CD"] = 0,
["Y"] = 20.35, },
["CD"] = 0 [14] = {
}, ["X"] = 47.91,
[12] = ["Y"] = 17.92,
{ ["CD"] = 0,
["X"] = 45.48, },
["Y"] = 19.74, [15] = {
["CD"] = 0 ["X"] = 49.28,
}, ["Y"] = 19.47,
[13] = ["CD"] = 0,
{ },
["X"] = 46.97, [16] = {
["Y"] = 18.39, ["X"] = 50.02,
["CD"] = 0 ["Y"] = 21.88,
}, ["CD"] = 0,
[14] = },
{ [17] = {
["X"] = 47.91, ["X"] = 50.97,
["Y"] = 17.92, ["Y"] = 23.78,
["CD"] = 0 ["CD"] = 0,
}, },
[15] = [18] = {
{ ["X"] = 57.33,
["X"] = 49.28, ["Y"] = 24.33,
["Y"] = 19.47, ["CD"] = 0,
["CD"] = 0 },
}, [19] = {
[16] = ["X"] = 52.96,
{ ["Y"] = 28.43,
["X"] = 50.02, ["CD"] = 0,
["Y"] = 21.88, },
["CD"] = 0 [20] = {
}, ["X"] = 53.04,
[17] = ["Y"] = 26.47,
{ ["CD"] = 0,
["X"] = 50.97, },
["Y"] = 23.78, [21] = {
["CD"] = 0 ["X"] = 54.27,
}, ["Y"] = 25.68,
[18] = ["CD"] = 0,
{ },
["X"] = 57.33, [22] = {
["Y"] = 24.33, ["X"] = 55.57,
["CD"] = 0 ["Y"] = 26,
}, ["CD"] = 0,
[19] = },
{ [23] = {
["X"] = 52.96, ["X"] = 54.52,
["Y"] = 28.43, ["Y"] = 26.35,
["CD"] = 0 ["CD"] = 0,
}, },
[20] = [24] = {
{ ["X"] = 53.71,
["X"] = 53.04, ["Y"] = 27.51,
["Y"] = 26.47, ["CD"] = 0,
["CD"] = 0 },
}, [25] = {
[21] = ["X"] = 53.92,
{ ["Y"] = 30.54,
["X"] = 54.27, ["CD"] = 0,
["Y"] = 25.68, },
["CD"] = 0 [26] = {
}, ["X"] = 53.84,
[22] = ["Y"] = 31.85,
{ ["CD"] = 0,
["X"] = 55.57, },
["Y"] = 26, [27] = {
["CD"] = 0 ["X"] = 53.49,
}, ["Y"] = 33.43,
[23] = ["CD"] = 0,
{ },
["X"] = 54.52, [28] = {
["Y"] = 26.35, ["X"] = 54.42,
["CD"] = 0 ["Y"] = 34.99,
}, ["CD"] = 0,
[24] = },
{ [29] = {
["X"] = 53.71, ["X"] = 54.65,
["Y"] = 27.51, ["Y"] = 37.19,
["CD"] = 0 ["CD"] = 0,
}, },
[25] = [30] = {
{ ["X"] = 54.78,
["X"] = 53.92, ["Y"] = 38.61,
["Y"] = 30.54, ["CD"] = 0,
["CD"] = 0 },
}, [31] = {
[26] = ["X"] = 58.46,
{ ["Y"] = 42.74,
["X"] = 53.84, ["CD"] = 0,
["Y"] = 31.85, },
["CD"] = 0 [32] = {
}, ["X"] = 59.89,
[27] = ["Y"] = 42.95,
{ ["CD"] = 0,
["X"] = 53.49, },
["Y"] = 33.43, [33] = {
["CD"] = 0 ["X"] = 61.04,
}, ["Y"] = 43.6,
[28] = ["CD"] = 0,
{ },
["X"] = 54.42, [34] = {
["Y"] = 34.99, ["X"] = 62.82,
["CD"] = 0 ["Y"] = 44.77,
}, ["CD"] = 0,
[29] = },
{ [35] = {
["X"] = 54.65, ["X"] = 64.28,
["Y"] = 37.19, ["Y"] = 47.39,
["CD"] = 0 ["CD"] = 0,
}, },
[30] = [36] = {
{ ["X"] = 65.46,
["X"] = 54.78, ["Y"] = 50.29,
["Y"] = 38.61, ["CD"] = 0,
["CD"] = 0 },
}, [37] = {
[31] = ["X"] = 66.36,
{ ["Y"] = 51.96,
["X"] = 58.46, ["CD"] = 0,
["Y"] = 42.74, },
["CD"] = 0 [38] = {
}, ["X"] = 67.58,
[32] = ["Y"] = 55.86,
{ ["CD"] = 0,
["X"] = 59.89, },
["Y"] = 42.95, [39] = {
["CD"] = 0 ["X"] = 67.69,
}, ["Y"] = 57.08,
[33] = ["CD"] = 0,
{ },
["X"] = 61.04, [40] = {
["Y"] = 43.6, ["X"] = 66.7,
["CD"] = 0 ["Y"] = 59.1,
}, ["CD"] = 0,
[34] = },
{ [41] = {
["X"] = 62.82, ["X"] = 66.09,
["Y"] = 44.77, ["Y"] = 61.15,
["CD"] = 0 ["CD"] = 0,
}, },
[35] = [42] = {
{ ["X"] = 65.52,
["X"] = 64.28, ["Y"] = 62.29,
["Y"] = 47.39, ["CD"] = 0,
["CD"] = 0 },
}, [43] = {
[36] = ["X"] = 65.16,
{ ["Y"] = 62.99,
["X"] = 65.46, ["CD"] = 0,
["Y"] = 50.29, },
["CD"] = 0 [44] = {
}, ["X"] = 45.97,
[37] = ["Y"] = 13.34,
{ ["CD"] = 0,
["X"] = 66.36, },
["Y"] = 51.96, [45] = {
["CD"] = 0 ["X"] = 40.08,
}, ["Y"] = 15.91,
[38] = ["CD"] = 0,
{ },
["X"] = 67.58, [46] = {
["Y"] = 55.86, ["X"] = 41.09,
["CD"] = 0 ["Y"] = 18.18,
}, ["CD"] = 0,
[39] = },
{ [47] = {
["X"] = 67.69, ["X"] = 43.27,
["Y"] = 57.08, ["Y"] = 19.12,
["CD"] = 0 ["CD"] = 0,
}, },
[40] = [48] = {
{ ["X"] = 44.76,
["X"] = 66.7, ["Y"] = 16.28,
["Y"] = 59.1, ["CD"] = 0,
["CD"] = 0 },
}, [49] = {
[41] = ["X"] = 47.09,
{ ["Y"] = 16.2,
["X"] = 66.09, ["CD"] = 0,
["Y"] = 61.15, },
["CD"] = 0 [50] = {
}, ["X"] = 49.71,
[42] = ["Y"] = 18,
{ ["CD"] = 0,
["X"] = 65.52, },
["Y"] = 62.29, [51] = {
["CD"] = 0 ["X"] = 52.2,
}, ["Y"] = 18.56,
[43] = ["CD"] = 0,
{ },
["X"] = 65.16, [52] = {
["Y"] = 62.99, ["X"] = 51.68,
["CD"] = 0 ["Y"] = 21.51,
}, ["CD"] = 0,
[44] = },
{ [53] = {
["X"] = 45.97, ["X"] = 55.89,
["Y"] = 13.34, ["Y"] = 40.14,
["CD"] = 0 ["CD"] = 0,
}, },
[45] = [54] = {
{ ["X"] = 57.1,
["X"] = 40.08, ["Y"] = 41.6,
["Y"] = 15.91, ["CD"] = 0,
["CD"] = 0 },
}, [55] = {
[46] = ["X"] = 57.64,
{ ["Y"] = 41.94,
["X"] = 41.09, ["CD"] = 0,
["Y"] = 18.18, },
["CD"] = 0 [56] = {
}, ["X"] = 67.58,
[47] = ["Y"] = 52.38,
{ ["CD"] = 0,
["X"] = 43.27, },
["Y"] = 19.12, [57] = {
["CD"] = 0 ["X"] = 66.9,
}, ["Y"] = 54.24,
[48] = ["CD"] = 0,
{ },
["X"] = 44.76, [58] = {
["Y"] = 16.28, ["X"] = 66.73,
["CD"] = 0 ["Y"] = 56.48,
}, ["CD"] = 0,
[49] = },
{ [59] = {
["X"] = 47.09, ["X"] = 59.94,
["Y"] = 16.2, ["Y"] = 67.07,
["CD"] = 0 ["CD"] = 0,
}, },
[50] = [60] = {
{ ["X"] = 58.56,
["X"] = 49.71, ["Y"] = 67.12,
["Y"] = 18, ["CD"] = 0,
["CD"] = 0 },
}, [61] = {
[51] = ["X"] = 57.31,
{ ["Y"] = 67.5,
["X"] = 52.2, ["CD"] = 0,
["Y"] = 18.56, },
["CD"] = 0 [62] = {
}, ["X"] = 49.51,
[52] = ["Y"] = 58.28,
{ ["CD"] = 0,
["X"] = 51.68, },
["Y"] = 21.51, [63] = {
["CD"] = 0 ["X"] = 49.02,
}, ["Y"] = 57.03,
[53] = ["CD"] = 0,
{ },
["X"] = 55.89, [64] = {
["Y"] = 40.14, ["X"] = 48.15,
["CD"] = 0 ["Y"] = 55.84,
}, ["CD"] = 0,
[54] = },
{ [65] = {
["X"] = 57.1, ["X"] = 41.46,
["Y"] = 41.6, ["Y"] = 49.57,
["CD"] = 0 ["CD"] = 0,
}, },
[55] = [66] = {
{ ["X"] = 40,
["X"] = 57.64, ["Y"] = 48.65,
["Y"] = 41.94, ["CD"] = 0,
["CD"] = 0 },
}, [67] = {
[56] = ["X"] = 38.79,
{ ["Y"] = 48.34,
["X"] = 67.58, ["CD"] = 0,
["Y"] = 52.38, },
["CD"] = 0 [68] = {
}, ["X"] = 34.57,
[57] = ["Y"] = 51.11,
{ ["CD"] = 0,
["X"] = 66.9, },
["Y"] = 54.24, [69] = {
["CD"] = 0 ["X"] = 33.22,
}, ["Y"] = 52.3,
[58] = ["CD"] = 0,
{ },
["X"] = 66.73, [70] = {
["Y"] = 56.48, ["X"] = 31.83,
["CD"] = 0 ["Y"] = 53.23,
}, ["CD"] = 0,
[59] = },
{ [71] = {
["X"] = 59.94, ["X"] = 31.47,
["Y"] = 67.07, ["Y"] = 53.57,
["CD"] = 0 ["CD"] = 0,
}, },
[60] = [72] = {
{ ["X"] = 53.43,
["X"] = 58.56, ["Y"] = 18.24,
["Y"] = 67.12, ["CD"] = 0,
["CD"] = 0 },
}, [73] = {
[61] = ["X"] = 50.1,
{ ["Y"] = 11.22,
["X"] = 57.31, ["CD"] = 0,
["Y"] = 67.5, },
["CD"] = 0 [74] = {
}, ["X"] = 51.42,
[62] = ["Y"] = 23.49,
{ ["CD"] = 0,
["X"] = 49.51, },
["Y"] = 58.28, [75] = {
["CD"] = 0 ["X"] = 44.44,
}, ["Y"] = 13.95,
[63] = ["CD"] = 0,
{ },
["X"] = 49.02, [76] = {
["Y"] = 57.03, ["X"] = 43.51,
["CD"] = 0 ["Y"] = 17.14,
}, ["CD"] = 0,
[64] = },
{ [77] = {
["X"] = 48.15, ["X"] = 41.16,
["Y"] = 55.84, ["Y"] = 49.52,
["CD"] = 0 ["CD"] = 0,
}, },
[65] = [78] = {
{ ["X"] = 46.7,
["X"] = 41.46, ["Y"] = 53.95,
["Y"] = 49.57, ["CD"] = 0,
["CD"] = 0 },
}, [79] = {
[66] = ["X"] = 58.72,
{ ["Y"] = 67.38,
["X"] = 40, ["CD"] = 0,
["Y"] = 48.65, },
["CD"] = 0 [80] = {
}, ["X"] = 56.91,
[67] = ["Y"] = 41.1,
{ ["CD"] = 0,
["X"] = 38.79, },
["Y"] = 48.34, [81] = {
["CD"] = 0 ["X"] = 68.57,
}, ["Y"] = 51.75,
[68] = ["CD"] = 0,
{ },
["X"] = 34.57,
["Y"] = 51.11,
["CD"] = 0
},
[69] =
{
["X"] = 33.22,
["Y"] = 52.3,
["CD"] = 0
},
[70] =
{
["X"] = 31.83,
["Y"] = 53.23,
["CD"] = 0
},
[71] =
{
["X"] = 31.47,
["Y"] = 53.57,
["CD"] = 0
},
[72] =
{
["X"] = 53.43,
["Y"] = 18.24,
["CD"] = 0
},
[73] =
{
["X"] = 50.1,
["Y"] = 11.22,
["CD"] = 0
},
[74] =
{
["X"] = 51.42,
["Y"] = 23.49,
["CD"] = 0
},
[75] =
{
["X"] = 44.44,
["Y"] = 13.95,
["CD"] = 0
},
[76] =
{
["X"] = 43.51,
["Y"] = 17.14,
["CD"] = 0
},
[77] =
{
["X"] = 41.16,
["Y"] = 49.52,
["CD"] = 0
},
[78] =
{
["X"] = 46.7,
["Y"] = 53.95,
["CD"] = 0
},
[79] =
{
["X"] = 58.72,
["Y"] = 67.38,
["CD"] = 0
},
[80] =
{
["X"] = 56.91,
["Y"] = 41.1,
["CD"] = 0
},
[81] =
{
["X"] = 68.57,
["Y"] = 51.75,
["CD"] = 0
}
} }
aura_env.cooldown = 600 aura_env.cooldown = 600
aura_env.wipeDistance = 50 aura_env.wipeDistance = 50
aura_env.angle = 0 aura_env.angle = 0
aura_env.hyp = 0 aura_env.hyp = 0
aura_env.GetClosestHerb = function() aura_env.GetClosestHerb = function()
aura_env.minID = aura_env.minID = {
{ ["X"] = 0,
["X"] = 0, ["Y"] = 0,
["Y"] = 0, ["D"] = 1000,
["D"] = 1000, ["ID"] = 0,
["ID"] = 0 }
} local pX = GetPlayerMapPosition("player") or 0
local pX = GetPlayerMapPosition("player") or 0 local pY = select(2, GetPlayerMapPosition("player")) or 0
local pY = select(2, GetPlayerMapPosition("player")) or 0 pX, pY = pX * 100, pY * 100
pX, pY = pX * 100, pY * 100 for k, v in ipairs(aura_env.herbs) do
for k,v in ipairs(aura_env.herbs) do local hX, hY, cd = aura_env.herbs[k]["X"], aura_env.herbs[k]["Y"], aura_env.herbs[k]["CD"]
local hX, hY, cd = aura_env.herbs[k]["X"], aura_env.herbs[k]["Y"], aura_env.herbs[k]["CD"] if cd == 0 then
if cd == 0 then local X, Y = pX - hX, pY - hY
local X, Y = pX - hX, pY - hY local hyp = math.sqrt((math.abs(X ^ 2)) + (math.abs(Y ^ 2)))
local hyp = math.sqrt((math.abs(X^2)) + (math.abs(Y^2))) if hyp < aura_env.minID["D"] then
if hyp < aura_env.minID["D"] then aura_env.minID["X"] = hX
aura_env.minID["X"] = hX aura_env.minID["Y"] = hY
aura_env.minID["Y"] = hY aura_env.minID["D"] = hyp
aura_env.minID["D"] = hyp aura_env.minID["ID"] = k
aura_env.minID["ID"] = k end
end end
end end
end return aura_env.minID["ID"]
return aura_env.minID["ID"]
end end

View File

@@ -1,453 +1,381 @@
aura_env.herbs = aura_env.herbs = {
{ [1] = {
[1] = ["X"] = 55.83,
{ ["Y"] = 70.82,
["X"] = 55.83, ["CD"] = 0,
["Y"] = 70.82, },
["CD"] = 0 [2] = {
}, ["X"] = 54.79,
[2] = ["Y"] = 69.62,
{ ["CD"] = 0,
["X"] = 54.79, },
["Y"] = 69.62, [3] = {
["CD"] = 0 ["X"] = 54.46,
}, ["Y"] = 68.85,
[3] = ["CD"] = 0,
{ },
["X"] = 54.46, [4] = {
["Y"] = 68.85, ["X"] = 54.06,
["CD"] = 0 ["Y"] = 67.47,
}, ["CD"] = 0,
[4] = },
{ [5] = {
["X"] = 54.06, ["X"] = 53.67,
["Y"] = 67.47, ["Y"] = 65.79,
["CD"] = 0 ["CD"] = 0,
}, },
[5] = [6] = {
{ ["X"] = 54.4,
["X"] = 53.67, ["Y"] = 64.58,
["Y"] = 65.79, ["CD"] = 0,
["CD"] = 0 },
}, [7] = {
[6] = ["X"] = 55.43,
{ ["Y"] = 63.88,
["X"] = 54.4, ["CD"] = 0,
["Y"] = 64.58, },
["CD"] = 0 [8] = {
}, ["X"] = 56.1,
[7] = ["Y"] = 64.35,
{ ["CD"] = 0,
["X"] = 55.43, },
["Y"] = 63.88, [9] = {
["CD"] = 0 ["X"] = 56.57,
}, ["Y"] = 65.06,
[8] = ["CD"] = 0,
{ },
["X"] = 56.1, [10] = {
["Y"] = 64.35, ["X"] = 57.3,
["CD"] = 0 ["Y"] = 65.21,
}, ["CD"] = 0,
[9] = },
{ [11] = {
["X"] = 56.57, ["X"] = 58.88,
["Y"] = 65.06, ["Y"] = 64.48,
["CD"] = 0 ["CD"] = 0,
}, },
[10] = [12] = {
{ ["X"] = 60.57,
["X"] = 57.3, ["Y"] = 63.9,
["Y"] = 65.21, ["CD"] = 0,
["CD"] = 0 },
}, [13] = {
[11] = ["X"] = 61.47,
{ ["Y"] = 63.7,
["X"] = 58.88, ["CD"] = 0,
["Y"] = 64.48, },
["CD"] = 0 [14] = {
}, ["X"] = 62.21,
[12] = ["Y"] = 63.3,
{ ["CD"] = 0,
["X"] = 60.57, },
["Y"] = 63.9, [15] = {
["CD"] = 0 ["X"] = 63.2,
}, ["Y"] = 63.12,
[13] = ["CD"] = 0,
{ },
["X"] = 61.47, [16] = {
["Y"] = 63.7, ["X"] = 64.17,
["CD"] = 0 ["Y"] = 62.56,
}, ["CD"] = 0,
[14] = },
{ [17] = {
["X"] = 62.21, ["X"] = 65.08,
["Y"] = 63.3, ["Y"] = 61.77,
["CD"] = 0 ["CD"] = 0,
}, },
[15] = [18] = {
{ ["X"] = 65.39,
["X"] = 63.2, ["Y"] = 60.16,
["Y"] = 63.12, ["CD"] = 0,
["CD"] = 0 },
}, [19] = {
[16] = ["X"] = 65.57,
{ ["Y"] = 57.98,
["X"] = 64.17, ["CD"] = 0,
["Y"] = 62.56, },
["CD"] = 0 [20] = {
}, ["X"] = 65.53,
[17] = ["Y"] = 55.56,
{ ["CD"] = 0,
["X"] = 65.08, },
["Y"] = 61.77, [21] = {
["CD"] = 0 ["X"] = 64.44,
}, ["Y"] = 52.37,
[18] = ["CD"] = 0,
{ },
["X"] = 65.39, [22] = {
["Y"] = 60.16, ["X"] = 63.86,
["CD"] = 0 ["Y"] = 50.96,
}, ["CD"] = 0,
[19] = },
{ [23] = {
["X"] = 65.57, ["X"] = 63.14,
["Y"] = 57.98, ["Y"] = 49.74,
["CD"] = 0 ["CD"] = 0,
}, },
[20] = [24] = {
{ ["X"] = 58.31,
["X"] = 65.53, ["Y"] = 47.48,
["Y"] = 55.56, ["CD"] = 0,
["CD"] = 0 },
}, [25] = {
[21] = ["X"] = 56.2,
{ ["Y"] = 46.51,
["X"] = 64.44, ["CD"] = 0,
["Y"] = 52.37, },
["CD"] = 0 [26] = {
}, ["X"] = 55.45,
[22] = ["Y"] = 47.13,
{ ["CD"] = 0,
["X"] = 63.86, },
["Y"] = 50.96, [27] = {
["CD"] = 0 ["X"] = 55.15,
}, ["Y"] = 48.26,
[23] = ["CD"] = 0,
{ },
["X"] = 63.14, [28] = {
["Y"] = 49.74, ["X"] = 54.81,
["CD"] = 0 ["Y"] = 49.21,
}, ["CD"] = 0,
[24] = },
{ [29] = {
["X"] = 58.31, ["X"] = 55.15,
["Y"] = 47.48, ["Y"] = 49.72,
["CD"] = 0 ["CD"] = 0,
}, },
[25] = [30] = {
{ ["X"] = 56.01,
["X"] = 56.2, ["Y"] = 50.37,
["Y"] = 46.51, ["CD"] = 0,
["CD"] = 0 },
}, [31] = {
[26] = ["X"] = 56.01,
{ ["Y"] = 50.37,
["X"] = 55.45, ["CD"] = 0,
["Y"] = 47.13, },
["CD"] = 0 [32] = {
}, ["X"] = 56.01,
[27] = ["Y"] = 50.37,
{ ["CD"] = 0,
["X"] = 55.15, },
["Y"] = 48.26, [33] = {
["CD"] = 0 ["X"] = 57.26,
}, ["Y"] = 51.69,
[28] = ["CD"] = 0,
{ },
["X"] = 54.81, [34] = {
["Y"] = 49.21, ["X"] = 57.23,
["CD"] = 0 ["Y"] = 53.17,
}, ["CD"] = 0,
[29] = },
{ [35] = {
["X"] = 55.15, ["X"] = 57.06,
["Y"] = 49.72, ["Y"] = 53.85,
["CD"] = 0 ["CD"] = 0,
}, },
[30] = [36] = {
{ ["X"] = 57.09,
["X"] = 56.01, ["Y"] = 54.24,
["Y"] = 50.37, ["CD"] = 0,
["CD"] = 0 },
}, [37] = {
[31] = ["X"] = 56.75,
{ ["Y"] = 54.17,
["X"] = 56.01, ["CD"] = 0,
["Y"] = 50.37, },
["CD"] = 0 [38] = {
}, ["X"] = 56.22,
[32] = ["Y"] = 53.84,
{ ["CD"] = 0,
["X"] = 56.01, },
["Y"] = 50.37, [39] = {
["CD"] = 0 ["X"] = 55.69,
}, ["Y"] = 53.19,
[33] = ["CD"] = 0,
{ },
["X"] = 57.26, [40] = {
["Y"] = 51.69, ["X"] = 55.34,
["CD"] = 0 ["Y"] = 53.27,
}, ["CD"] = 0,
[34] = },
{ [41] = {
["X"] = 57.23, ["X"] = 54.31,
["Y"] = 53.17, ["Y"] = 53.97,
["CD"] = 0 ["CD"] = 0,
}, },
[35] = [42] = {
{ ["X"] = 54.17,
["X"] = 57.06, ["Y"] = 53.51,
["Y"] = 53.85, ["CD"] = 0,
["CD"] = 0 },
}, [43] = {
[36] = ["X"] = 53.38,
{ ["Y"] = 53.84,
["X"] = 57.09, ["CD"] = 0,
["Y"] = 54.24, },
["CD"] = 0 [44] = {
}, ["X"] = 52.77,
[37] = ["Y"] = 53.98,
{ ["CD"] = 0,
["X"] = 56.75, },
["Y"] = 54.17, [45] = {
["CD"] = 0 ["X"] = 51.93,
}, ["Y"] = 53.19,
[38] = ["CD"] = 0,
{ },
["X"] = 56.22, [46] = {
["Y"] = 53.84, ["X"] = 51.84,
["CD"] = 0 ["Y"] = 52.64,
}, ["CD"] = 0,
[39] = },
{ [47] = {
["X"] = 55.69, ["X"] = 52.12,
["Y"] = 53.19, ["Y"] = 51.32,
["CD"] = 0 ["CD"] = 0,
}, },
[40] = [48] = {
{ ["X"] = 52.44,
["X"] = 55.34, ["Y"] = 49.9,
["Y"] = 53.27, ["CD"] = 0,
["CD"] = 0 },
}, [49] = {
[41] = ["X"] = 52.48,
{ ["Y"] = 48.98,
["X"] = 54.31, ["CD"] = 0,
["Y"] = 53.97, },
["CD"] = 0 [50] = {
}, ["X"] = 52.39,
[42] = ["Y"] = 48.33,
{ ["CD"] = 0,
["X"] = 54.17, },
["Y"] = 53.51, [51] = {
["CD"] = 0 ["X"] = 52.08,
}, ["Y"] = 47.18,
[43] = ["CD"] = 0,
{ },
["X"] = 53.38, [52] = {
["Y"] = 53.84, ["X"] = 51.87,
["CD"] = 0 ["Y"] = 46.8,
}, ["CD"] = 0,
[44] = },
{ [53] = {
["X"] = 52.77, ["X"] = 50.91,
["Y"] = 53.98, ["Y"] = 47.03,
["CD"] = 0 ["CD"] = 0,
}, },
[45] = [54] = {
{ ["X"] = 50.39,
["X"] = 51.93, ["Y"] = 46.97,
["Y"] = 53.19, ["CD"] = 0,
["CD"] = 0 },
}, [55] = {
[46] = ["X"] = 50,
{ ["Y"] = 46.65,
["X"] = 51.84, ["CD"] = 0,
["Y"] = 52.64, },
["CD"] = 0 [56] = {
}, ["X"] = 49.86,
[47] = ["Y"] = 46.22,
{ ["CD"] = 0,
["X"] = 52.12, },
["Y"] = 51.32, [57] = {
["CD"] = 0 ["X"] = 49.44,
}, ["Y"] = 46.49,
[48] = ["CD"] = 0,
{ },
["X"] = 52.44, [58] = {
["Y"] = 49.9, ["X"] = 48.98,
["CD"] = 0 ["Y"] = 46.35,
}, ["CD"] = 0,
[49] = },
{ [59] = {
["X"] = 52.48, ["X"] = 48.4,
["Y"] = 48.98, ["Y"] = 45.7,
["CD"] = 0 ["CD"] = 0,
}, },
[50] = [60] = {
{ ["X"] = 47.67,
["X"] = 52.39, ["Y"] = 45.04,
["Y"] = 48.33, ["CD"] = 0,
["CD"] = 0 },
}, [61] = {
[51] = ["X"] = 47.06,
{ ["Y"] = 44.67,
["X"] = 52.08, ["CD"] = 0,
["Y"] = 47.18, },
["CD"] = 0 [62] = {
}, ["X"] = 46.5,
[52] = ["Y"] = 43.44,
{ ["CD"] = 0,
["X"] = 51.87, },
["Y"] = 46.8, [63] = {
["CD"] = 0 ["X"] = 32.58,
}, ["Y"] = 38.7,
[53] = ["CD"] = 0,
{ },
["X"] = 50.91, [64] = {
["Y"] = 47.03, ["X"] = 34.29,
["CD"] = 0 ["Y"] = 39.32,
}, ["CD"] = 0,
[54] = },
{ [65] = {
["X"] = 50.39, ["X"] = 36.08,
["Y"] = 46.97, ["Y"] = 39.31,
["CD"] = 0 ["CD"] = 0,
}, },
[55] = [66] = {
{ ["X"] = 36.91,
["X"] = 50, ["Y"] = 41.58,
["Y"] = 46.65, ["CD"] = 0,
["CD"] = 0 },
}, [67] = {
[56] = ["X"] = 38.79,
{ ["Y"] = 40.82,
["X"] = 49.86, ["CD"] = 0,
["Y"] = 46.22, },
["CD"] = 0 [68] = {
}, ["X"] = 39.68,
[57] = ["Y"] = 40.87,
{ ["CD"] = 0,
["X"] = 49.44, },
["Y"] = 46.49, [69] = {
["CD"] = 0 ["X"] = 41.32,
}, ["Y"] = 41.66,
[58] = ["CD"] = 0,
{ },
["X"] = 48.98, [70] = {
["Y"] = 46.35, ["X"] = 42.81,
["CD"] = 0 ["Y"] = 43.91,
}, ["CD"] = 0,
[59] = },
{
["X"] = 48.4,
["Y"] = 45.7,
["CD"] = 0
},
[60] =
{
["X"] = 47.67,
["Y"] = 45.04,
["CD"] = 0
},
[61] =
{
["X"] = 47.06,
["Y"] = 44.67,
["CD"] = 0
},
[62] =
{
["X"] = 46.5,
["Y"] = 43.44,
["CD"] = 0
},
[63] =
{
["X"] = 32.58,
["Y"] = 38.7,
["CD"] = 0
},
[64] =
{
["X"] = 34.29,
["Y"] = 39.32,
["CD"] = 0
},
[65] =
{
["X"] = 36.08,
["Y"] = 39.31,
["CD"] = 0
},
[66] =
{
["X"] = 36.91,
["Y"] = 41.58,
["CD"] = 0
},
[67] =
{
["X"] = 38.79,
["Y"] = 40.82,
["CD"] = 0
},
[68] =
{
["X"] = 39.68,
["Y"] = 40.87,
["CD"] = 0
},
[69] =
{
["X"] = 41.32,
["Y"] = 41.66,
["CD"] = 0
},
[70] =
{
["X"] = 42.81,
["Y"] = 43.91,
["CD"] = 0
}
} }
aura_env.cooldown = 600 aura_env.cooldown = 600
aura_env.wipeDistance = 50 aura_env.wipeDistance = 50
aura_env.angle = 0 aura_env.angle = 0
aura_env.hyp = 0 aura_env.hyp = 0
aura_env.GetClosestHerb = function() aura_env.GetClosestHerb = function()
aura_env.minID = aura_env.minID = {
{ ["X"] = 0,
["X"] = 0, ["Y"] = 0,
["Y"] = 0, ["D"] = 1000,
["D"] = 1000, ["ID"] = 0,
["ID"] = 0 }
} local pX = GetPlayerMapPosition("player") or 0
local pX = GetPlayerMapPosition("player") or 0 local pY = select(2, GetPlayerMapPosition("player")) or 0
local pY = select(2, GetPlayerMapPosition("player")) or 0 pX, pY = pX * 100, pY * 100
pX, pY = pX * 100, pY * 100 for k, v in ipairs(aura_env.herbs) do
for k,v in ipairs(aura_env.herbs) do local hX, hY, cd = aura_env.herbs[k]["X"], aura_env.herbs[k]["Y"], aura_env.herbs[k]["CD"]
local hX, hY, cd = aura_env.herbs[k]["X"], aura_env.herbs[k]["Y"], aura_env.herbs[k]["CD"] if cd == 0 then
if cd == 0 then local X, Y = pX - hX, pY - hY
local X, Y = pX - hX, pY - hY local hyp = math.sqrt((math.abs(X ^ 2)) + (math.abs(Y ^ 2)))
local hyp = math.sqrt((math.abs(X^2)) + (math.abs(Y^2))) if hyp < aura_env.minID["D"] then
if hyp < aura_env.minID["D"] then aura_env.minID["X"] = hX
aura_env.minID["X"] = hX aura_env.minID["Y"] = hY
aura_env.minID["Y"] = hY aura_env.minID["D"] = hyp
aura_env.minID["D"] = hyp aura_env.minID["ID"] = k
aura_env.minID["ID"] = k end
end end
end end
end return aura_env.minID["ID"]
return aura_env.minID["ID"]
end end

View File

@@ -1,321 +1,271 @@
aura_env.herbs = aura_env.herbs = {
{ [1] = {
[1] = ["X"] = 43.7,
{ ["Y"] = 47.52,
["X"] = 43.7, ["CD"] = 0,
["Y"] = 47.52,
["CD"] = 0
}, },
[2] = [2] = {
{ ["X"] = 55.11,
["X"] = 55.11, ["Y"] = 53.52,
["Y"] = 53.52, ["CD"] = 0,
["CD"] = 0
}, },
[3] = [3] = {
{ ["X"] = 67.75,
["X"] = 67.75, ["Y"] = 35.39,
["Y"] = 35.39, ["CD"] = 0,
["CD"] = 0
}, },
[4] = [4] = {
{ ["X"] = 46.51,
["X"] = 46.51, ["Y"] = 31.41,
["Y"] = 31.41, ["CD"] = 0,
["CD"] = 0
}, },
[5] = [5] = {
{ ["X"] = 46.21,
["X"] = 46.21, ["Y"] = 39.28,
["Y"] = 39.28, ["CD"] = 0,
["CD"] = 0
}, },
[6] = [6] = {
{ ["X"] = 41.5,
["X"] = 41.5, ["Y"] = 42.11,
["Y"] = 42.11, ["CD"] = 0,
["CD"] = 0
}, },
[7] = [7] = {
{ ["X"] = 50.73,
["X"] = 50.73, ["Y"] = 36.37,
["Y"] = 36.37, ["CD"] = 0,
["CD"] = 0
}, },
[8] = [8] = {
{ ["X"] = 52,
["X"] = 52, ["Y"] = 38.74,
["Y"] = 38.74, ["CD"] = 0,
["CD"] = 0
}, },
[9] = [9] = {
{ ["X"] = 51.73,
["X"] = 51.73, ["Y"] = 44.44,
["Y"] = 44.44, ["CD"] = 0,
["CD"] = 0
}, },
[10] = [10] = {
{ ["X"] = 48.85,
["X"] = 48.85, ["Y"] = 43.36,
["Y"] = 43.36, ["CD"] = 0,
["CD"] = 0
}, },
[11] = [11] = {
{ ["X"] = 43.36,
["X"] = 43.36, ["Y"] = 27.42,
["Y"] = 27.42, ["CD"] = 0,
["CD"] = 0
}, },
[12] = [12] = {
{ ["X"] = 38.9,
["X"] = 38.9, ["Y"] = 37.15,
["Y"] = 37.15, ["CD"] = 0,
["CD"] = 0
}, },
[13] = [13] = {
{ ["X"] = 39.14,
["X"] = 39.14, ["Y"] = 48.19,
["Y"] = 48.19, ["CD"] = 0,
["CD"] = 0
}, },
[14] = [14] = {
{ ["X"] = 45.77,
["X"] = 45.77, ["Y"] = 43.29,
["Y"] = 43.29, ["CD"] = 0,
["CD"] = 0
}, },
[15] = [15] = {
{ ["X"] = 42.81,
["X"] = 42.81, ["Y"] = 39.12,
["Y"] = 39.12, ["CD"] = 0,
["CD"] = 0
}, },
[16] = [16] = {
{ ["X"] = 44.9,
["X"] = 44.9, ["Y"] = 33.39,
["Y"] = 33.39, ["CD"] = 0,
["CD"] = 0
}, },
[17] = [17] = {
{ ["X"] = 51.19,
["X"] = 51.19, ["Y"] = 34.46,
["Y"] = 34.46, ["CD"] = 0,
["CD"] = 0
}, },
[18] = [18] = {
{ ["X"] = 54.96,
["X"] = 54.96, ["Y"] = 29.9,
["Y"] = 29.9, ["CD"] = 0,
["CD"] = 0
}, },
[19] = [19] = {
{ ["X"] = 53.75,
["X"] = 53.75, ["Y"] = 55.53,
["Y"] = 55.53, ["CD"] = 0,
["CD"] = 0
}, },
[20] = [20] = {
{ ["X"] = 58.01,
["X"] = 58.01, ["Y"] = 52.44,
["Y"] = 52.44, ["CD"] = 0,
["CD"] = 0
}, },
[21] = [21] = {
{ ["X"] = 73.65,
["X"] = 73.65, ["Y"] = 35.59,
["Y"] = 35.59, ["CD"] = 0,
["CD"] = 0
}, },
[22] = [22] = {
{ ["X"] = 68.83,
["X"] = 68.83, ["Y"] = 38.1,
["Y"] = 38.1, ["CD"] = 0,
["CD"] = 0
}, },
[23] = [23] = {
{ ["X"] = 64.86,
["X"] = 64.86, ["Y"] = 31.35,
["Y"] = 31.35, ["CD"] = 0,
["CD"] = 0
}, },
[24] = [24] = {
{ ["X"] = 55.37,
["X"] = 55.37, ["Y"] = 46.09,
["Y"] = 46.09, ["CD"] = 0,
["CD"] = 0
}, },
[25] = [25] = {
{ ["X"] = 51.96,
["X"] = 51.96, ["Y"] = 54.69,
["Y"] = 54.69, ["CD"] = 0,
["CD"] = 0
}, },
[26] = [26] = {
{ ["X"] = 52.07,
["X"] = 52.07, ["Y"] = 48.12,
["Y"] = 48.12, ["CD"] = 0,
["CD"] = 0
}, },
[27] = [27] = {
{ ["X"] = 39.85,
["X"] = 39.85, ["Y"] = 43.02,
["Y"] = 43.02, ["CD"] = 0,
["CD"] = 0
}, },
[28] = [28] = {
{ ["X"] = 45.11,
["X"] = 45.11, ["Y"] = 31.92,
["Y"] = 31.92, ["CD"] = 0,
["CD"] = 0
}, },
[29] = [29] = {
{ ["X"] = 58.81,
["X"] = 58.81, ["Y"] = 42.23,
["Y"] = 42.23, ["CD"] = 0,
["CD"] = 0
}, },
[30] = [30] = {
{ ["X"] = 56.87,
["X"] = 56.87, ["Y"] = 35.36,
["Y"] = 35.36, ["CD"] = 0,
["CD"] = 0
}, },
[31] = [31] = {
{ ["X"] = 80.46,
["X"] = 80.46, ["Y"] = 42.58,
["Y"] = 42.58, ["CD"] = 0,
["CD"] = 0
}, },
[32] = [32] = {
{ ["X"] = 73.35,
["X"] = 73.35, ["Y"] = 40.36,
["Y"] = 40.36, ["CD"] = 0,
["CD"] = 0
}, },
[33] = [33] = {
{ ["X"] = 65.26,
["X"] = 65.26, ["Y"] = 49,
["Y"] = 49, ["CD"] = 0,
["CD"] = 0
}, },
[34] = [34] = {
{ ["X"] = 38.29,
["X"] = 38.29, ["Y"] = 21.84,
["Y"] = 21.84, ["CD"] = 0,
["CD"] = 0
}, },
[35] = [35] = {
{ ["X"] = 64.95,
["X"] = 64.95, ["Y"] = 44.66,
["Y"] = 44.66, ["CD"] = 0,
["CD"] = 0
}, },
[36] = [36] = {
{ ["X"] = 48.04,
["X"] = 48.04, ["Y"] = 40.24,
["Y"] = 40.24, ["CD"] = 0,
["CD"] = 0
}, },
[37] = [37] = {
{ ["X"] = 47.18,
["X"] = 47.18, ["Y"] = 41.63,
["Y"] = 41.63, ["CD"] = 0,
["CD"] = 0
}, },
[38] = [38] = {
{ ["X"] = 30.84,
["X"] = 30.84, ["Y"] = 32.27,
["Y"] = 32.27, ["CD"] = 0,
["CD"] = 0
}, },
[39] = [39] = {
{ ["X"] = 43.7,
["X"] = 43.7, ["Y"] = 47.52,
["Y"] = 47.52, ["CD"] = 0,
["CD"] = 0
}, },
[40] = [40] = {
{ ["X"] = 44.9,
["X"] = 44.9, ["Y"] = 33.39,
["Y"] = 33.39, ["CD"] = 0,
["CD"] = 0
}, },
[41] = [41] = {
{ ["X"] = 49.05,
["X"] = 49.05, ["Y"] = 39.41,
["Y"] = 39.41, ["CD"] = 0,
["CD"] = 0
}, },
[42] = [42] = {
{ ["X"] = 44.09,
["X"] = 44.09, ["Y"] = 53.11,
["Y"] = 53.11, ["CD"] = 0,
["CD"] = 0
}, },
[43] = [43] = {
{ ["X"] = 39.14,
["X"] = 39.14, ["Y"] = 32.32,
["Y"] = 32.32, ["CD"] = 0,
["CD"] = 0
}, },
[44] = [44] = {
{ ["X"] = 61.13,
["X"] = 61.13, ["Y"] = 44.07,
["Y"] = 44.07, ["CD"] = 0,
["CD"] = 0
}, },
[45] = [45] = {
{ ["X"] = 60.53,
["X"] = 60.53, ["Y"] = 46.91,
["Y"] = 46.91, ["CD"] = 0,
["CD"] = 0
}, },
[46] = [46] = {
{ ["X"] = 52.47,
["X"] = 52.47, ["Y"] = 52.01,
["Y"] = 52.01, ["CD"] = 0,
["CD"] = 0
}, },
[47] = [47] = {
{ ["X"] = 68.45,
["X"] = 68.45, ["Y"] = 27.27,
["Y"] = 27.27, ["CD"] = 0,
["CD"] = 0 },
[48] = {
["X"] = 68.14,
["Y"] = 32.64,
["CD"] = 0,
}, },
[48] =
{
["X"] = 68.14,
["Y"] = 32.64,
["CD"] = 0
}
} }
aura_env.cooldown = 600 aura_env.cooldown = 600
aura_env.wipeDistance = 50 aura_env.wipeDistance = 50
aura_env.angle = 0 aura_env.angle = 0
aura_env.hyp = 0 aura_env.hyp = 0
aura_env.GetClosestHerb = function() aura_env.GetClosestHerb = function()
aura_env.minID = aura_env.minID = {
{ ["X"] = 0,
["X"] = 0, ["Y"] = 0,
["Y"] = 0, ["D"] = 1000,
["D"] = 1000, ["ID"] = 0,
["ID"] = 0 }
} local pX = GetPlayerMapPosition("player") or 0
local pX = GetPlayerMapPosition("player") or 0 local pY = select(2, GetPlayerMapPosition("player")) or 0
local pY = select(2, GetPlayerMapPosition("player")) or 0 pX, pY = pX * 100, pY * 100
pX, pY = pX * 100, pY * 100 for k, v in ipairs(aura_env.herbs) do
for k,v in ipairs(aura_env.herbs) do local hX, hY, cd = aura_env.herbs[k]["X"], aura_env.herbs[k]["Y"], aura_env.herbs[k]["CD"]
local hX, hY, cd = aura_env.herbs[k]["X"], aura_env.herbs[k]["Y"], aura_env.herbs[k]["CD"] if cd == 0 then
if cd == 0 then local X, Y = pX - hX, pY - hY
local X, Y = pX - hX, pY - hY local hyp = math.sqrt((math.abs(X ^ 2)) + (math.abs(Y ^ 2)))
local hyp = math.sqrt((math.abs(X^2)) + (math.abs(Y^2))) if hyp < aura_env.minID["D"] then
if hyp < aura_env.minID["D"] then aura_env.minID["X"] = hX
aura_env.minID["X"] = hX aura_env.minID["Y"] = hY
aura_env.minID["Y"] = hY aura_env.minID["D"] = hyp
aura_env.minID["D"] = hyp aura_env.minID["ID"] = k
aura_env.minID["ID"] = k end
end end
end end
end return aura_env.minID["ID"]
return aura_env.minID["ID"]
end end

View File

@@ -1,453 +1,451 @@
aura_env.herbs = { aura_env.herbs = {
[1] = { [1] = {
["X"] = 59.16, ["X"] = 59.16,
["Y"] = 84.77, ["Y"] = 84.77,
["CD"] = 0, ["CD"] = 0,
}, },
[2] = { [2] = {
["X"] = 62.31, ["X"] = 62.31,
["Y"] = 83, ["Y"] = 83,
["CD"] = 0, ["CD"] = 0,
}, },
[3] = { [3] = {
["X"] = 57.11, ["X"] = 57.11,
["Y"] = 82.01, ["Y"] = 82.01,
["CD"] = 0, ["CD"] = 0,
}, },
[4] = { [4] = {
["X"] = 64.06, ["X"] = 64.06,
["Y"] = 78.62, ["Y"] = 78.62,
["CD"] = 0, ["CD"] = 0,
}, },
[5] = { [5] = {
["X"] = 61.3, ["X"] = 61.3,
["Y"] = 77.48, ["Y"] = 77.48,
["CD"] = 0, ["CD"] = 0,
}, },
[6] = { [6] = {
["X"] = 62.98, ["X"] = 62.98,
["Y"] = 75.01, ["Y"] = 75.01,
["CD"] = 0, ["CD"] = 0,
}, },
[7] = { [7] = {
["X"] = 60.57, ["X"] = 60.57,
["Y"] = 72.97, ["Y"] = 72.97,
["CD"] = 0, ["CD"] = 0,
}, },
[8] = { [8] = {
["X"] = 57.89, ["X"] = 57.89,
["Y"] = 76.61, ["Y"] = 76.61,
["CD"] = 0, ["CD"] = 0,
}, },
[9] = { [9] = {
["X"] = 58.81, ["X"] = 58.81,
["Y"] = 71.72, ["Y"] = 71.72,
["CD"] = 0, ["CD"] = 0,
}, },
[10] = { [10] = {
["X"] = 61.9, ["X"] = 61.9,
["Y"] = 70.8, ["Y"] = 70.8,
["CD"] = 0, ["CD"] = 0,
}, },
[11] = { [11] = {
["X"] = 55.55, ["X"] = 55.55,
["Y"] = 66.93, ["Y"] = 66.93,
["CD"] = 0, ["CD"] = 0,
}, },
[12] = { [12] = {
["X"] = 57.47, ["X"] = 57.47,
["Y"] = 67.97, ["Y"] = 67.97,
["CD"] = 0, ["CD"] = 0,
}, },
[13] = { [13] = {
["X"] = 64.62, ["X"] = 64.62,
["Y"] = 67.64, ["Y"] = 67.64,
["CD"] = 0, ["CD"] = 0,
}, },
[14] = { [14] = {
["X"] = 58.61, ["X"] = 58.61,
["Y"] = 64.35, ["Y"] = 64.35,
["CD"] = 0, ["CD"] = 0,
}, },
[15] = { [15] = {
["X"] = 60.58, ["X"] = 60.58,
["Y"] = 63.25, ["Y"] = 63.25,
["CD"] = 0, ["CD"] = 0,
}, },
[16] = { [16] = {
["X"] = 66.46, ["X"] = 66.46,
["Y"] = 63.37, ["Y"] = 63.37,
["CD"] = 0, ["CD"] = 0,
}, },
[17] = { [17] = {
["X"] = 54.22, ["X"] = 54.22,
["Y"] = 59.72, ["Y"] = 59.72,
["CD"] = 0, ["CD"] = 0,
}, },
[18] = { [18] = {
["X"] = 50.02, ["X"] = 50.02,
["Y"] = 59.7, ["Y"] = 59.7,
["CD"] = 0, ["CD"] = 0,
}, },
[19] = { [19] = {
["X"] = 55.15, ["X"] = 55.15,
["Y"] = 58.99, ["Y"] = 58.99,
["CD"] = 0, ["CD"] = 0,
}, },
[20] = { [20] = {
["X"] = 58.3, ["X"] = 58.3,
["Y"] = 57.27, ["Y"] = 57.27,
["CD"] = 0, ["CD"] = 0,
}, },
[21] = { [21] = {
["X"] = 66.48, ["X"] = 66.48,
["Y"] = 58.7, ["Y"] = 58.7,
["CD"] = 0, ["CD"] = 0,
}, },
[22] = { [22] = {
["X"] = 65.73, ["X"] = 65.73,
["Y"] = 55.86, ["Y"] = 55.86,
["CD"] = 0, ["CD"] = 0,
}, },
[23] = { [23] = {
["X"] = 67.08, ["X"] = 67.08,
["Y"] = 55.5, ["Y"] = 55.5,
["CD"] = 0, ["CD"] = 0,
}, },
[24] = { [24] = {
["X"] = 56.21, ["X"] = 56.21,
["Y"] = 54.41, ["Y"] = 54.41,
["CD"] = 0, ["CD"] = 0,
}, },
[25] = { [25] = {
["X"] = 63.85, ["X"] = 63.85,
["Y"] = 54.34, ["Y"] = 54.34,
["CD"] = 0, ["CD"] = 0,
}, },
[26] = { [26] = {
["X"] = 57.63, ["X"] = 57.63,
["Y"] = 53.91, ["Y"] = 53.91,
["CD"] = 0, ["CD"] = 0,
}, },
[27] = { [27] = {
["X"] = 62.95, ["X"] = 62.95,
["Y"] = 52.24, ["Y"] = 52.24,
["CD"] = 0, ["CD"] = 0,
}, },
[28] = { [28] = {
["X"] = 54.26, ["X"] = 54.26,
["Y"] = 51.46, ["Y"] = 51.46,
["CD"] = 0, ["CD"] = 0,
}, },
[29] = { [29] = {
["X"] = 53.42, ["X"] = 53.42,
["Y"] = 52.49, ["Y"] = 52.49,
["CD"] = 0, ["CD"] = 0,
}, },
[30] = { [30] = {
["X"] = 51.05, ["X"] = 51.05,
["Y"] = 47.74, ["Y"] = 47.74,
["CD"] = 0, ["CD"] = 0,
}, },
[31] = { [31] = {
["X"] = 62.14, ["X"] = 62.14,
["Y"] = 46, ["Y"] = 46,
["CD"] = 0, ["CD"] = 0,
}, },
[32] = { [32] = {
["X"] = 57.41, ["X"] = 57.41,
["Y"] = 44.12, ["Y"] = 44.12,
["CD"] = 0, ["CD"] = 0,
}, },
[33] = { [33] = {
["X"] = 67.38, ["X"] = 67.38,
["Y"] = 43.91, ["Y"] = 43.91,
["CD"] = 0, ["CD"] = 0,
}, },
[34] = { [34] = {
["X"] = 64.77, ["X"] = 64.77,
["Y"] = 44.54, ["Y"] = 44.54,
["CD"] = 0, ["CD"] = 0,
}, },
[35] = { [35] = {
["X"] = 63.95, ["X"] = 63.95,
["Y"] = 38.93, ["Y"] = 38.93,
["CD"] = 0, ["CD"] = 0,
}, },
[36] = { [36] = {
["X"] = 56.38, ["X"] = 56.38,
["Y"] = 40.05, ["Y"] = 40.05,
["CD"] = 0, ["CD"] = 0,
}, },
[37] = { [37] = {
["X"] = 53.33, ["X"] = 53.33,
["Y"] = 40.12, ["Y"] = 40.12,
["CD"] = 0, ["CD"] = 0,
}, },
[38] = { [38] = {
["X"] = 54.33, ["X"] = 54.33,
["Y"] = 39.28, ["Y"] = 39.28,
["CD"] = 0, ["CD"] = 0,
}, },
[39] = { [39] = {
["X"] = 58.25, ["X"] = 58.25,
["Y"] = 36.59, ["Y"] = 36.59,
["CD"] = 0, ["CD"] = 0,
}, },
[40] = { [40] = {
["X"] = 66.39, ["X"] = 66.39,
["Y"] = 31.62, ["Y"] = 31.62,
["CD"] = 0, ["CD"] = 0,
}, },
[41] = { [41] = {
["X"] = 65.34, ["X"] = 65.34,
["Y"] = 33.85, ["Y"] = 33.85,
["CD"] = 0, ["CD"] = 0,
}, },
[42] = { [42] = {
["X"] = 56.84, ["X"] = 56.84,
["Y"] = 35.19, ["Y"] = 35.19,
["CD"] = 0, ["CD"] = 0,
}, },
[43] = { [43] = {
["X"] = 53.46, ["X"] = 53.46,
["Y"] = 28.57, ["Y"] = 28.57,
["CD"] = 0, ["CD"] = 0,
}, },
[44] = { [44] = {
["X"] = 61.98, ["X"] = 61.98,
["Y"] = 31.58, ["Y"] = 31.58,
["CD"] = 0, ["CD"] = 0,
}, },
[45] = { [45] = {
["X"] = 61.24, ["X"] = 61.24,
["Y"] = 31.93, ["Y"] = 31.93,
["CD"] = 0, ["CD"] = 0,
}, },
[46] = { [46] = {
["X"] = 57.11, ["X"] = 57.11,
["Y"] = 33.25, ["Y"] = 33.25,
["CD"] = 0, ["CD"] = 0,
}, },
[47] = { [47] = {
["X"] = 47.75, ["X"] = 47.75,
["Y"] = 31.28, ["Y"] = 31.28,
["CD"] = 0, ["CD"] = 0,
}, },
[48] = { [48] = {
["X"] = 53.36, ["X"] = 53.36,
["Y"] = 33.23, ["Y"] = 33.23,
["CD"] = 0, ["CD"] = 0,
}, },
[49] = { [49] = {
["X"] = 58, ["X"] = 58,
["Y"] = 25.44, ["Y"] = 25.44,
["CD"] = 0, ["CD"] = 0,
}, },
[50] = { [50] = {
["X"] = 56.97, ["X"] = 56.97,
["Y"] = 26.83, ["Y"] = 26.83,
["CD"] = 0, ["CD"] = 0,
}, },
[51] = { [51] = {
["X"] = 49.79, ["X"] = 49.79,
["Y"] = 25.15, ["Y"] = 25.15,
["CD"] = 0, ["CD"] = 0,
}, },
[52] = { [52] = {
["X"] = 56.02, ["X"] = 56.02,
["Y"] = 22.75, ["Y"] = 22.75,
["CD"] = 0, ["CD"] = 0,
}, },
[53] = { [53] = {
["X"] = 46.42, ["X"] = 46.42,
["Y"] = 24.46, ["Y"] = 24.46,
["CD"] = 0, ["CD"] = 0,
}, },
[54] = { [54] = {
["X"] = 50.08, ["X"] = 50.08,
["Y"] = 22.67, ["Y"] = 22.67,
["CD"] = 0, ["CD"] = 0,
}, },
[55] = { [55] = {
["X"] = 46.7, ["X"] = 46.7,
["Y"] = 18.24, ["Y"] = 18.24,
["CD"] = 0, ["CD"] = 0,
}, },
[56] = { [56] = {
["X"] = 48.65, ["X"] = 48.65,
["Y"] = 17.22, ["Y"] = 17.22,
["CD"] = 0, ["CD"] = 0,
}, },
[57] = { [57] = {
["X"] = 49.35, ["X"] = 49.35,
["Y"] = 18.76, ["Y"] = 18.76,
["CD"] = 0, ["CD"] = 0,
}, },
[58] = { [58] = {
["X"] = 52.3, ["X"] = 52.3,
["Y"] = 20.68, ["Y"] = 20.68,
["CD"] = 0, ["CD"] = 0,
}, },
[59] = { [59] = {
["X"] = 45.21, ["X"] = 45.21,
["Y"] = 14.81, ["Y"] = 14.81,
["CD"] = 0, ["CD"] = 0,
}, },
[60] = { [60] = {
["X"] = 45.87, ["X"] = 45.87,
["Y"] = 20.86, ["Y"] = 20.86,
["CD"] = 0, ["CD"] = 0,
}, },
[61] = { [61] = {
["X"] = 47.49, ["X"] = 47.49,
["Y"] = 50.39, ["Y"] = 50.39,
["CD"] = 0, ["CD"] = 0,
}, },
[62] = { [62] = {
["X"] = 48.23, ["X"] = 48.23,
["Y"] = 53.43, ["Y"] = 53.43,
["CD"] = 0, ["CD"] = 0,
}, },
[63] = { [63] = {
["X"] = 47.36, ["X"] = 47.36,
["Y"] = 58.17, ["Y"] = 58.17,
["CD"] = 0, ["CD"] = 0,
}, },
[64] = { [64] = {
["X"] = 48.56, ["X"] = 48.56,
["Y"] = 57.74, ["Y"] = 57.74,
["CD"] = 0, ["CD"] = 0,
}, },
[65] = { [65] = {
["X"] = 45.22, ["X"] = 45.22,
["Y"] = 57.7, ["Y"] = 57.7,
["CD"] = 0, ["CD"] = 0,
}, },
[66] = { [66] = {
["X"] = 45.19, ["X"] = 45.19,
["Y"] = 59.5, ["Y"] = 59.5,
["CD"] = 0, ["CD"] = 0,
}, },
[67] = { [67] = {
["X"] = 42.43, ["X"] = 42.43,
["Y"] = 49.82, ["Y"] = 49.82,
["CD"] = 0, ["CD"] = 0,
}, },
[68] = { [68] = {
["X"] = 40.35, ["X"] = 40.35,
["Y"] = 49.45, ["Y"] = 49.45,
["CD"] = 0, ["CD"] = 0,
}, },
[69] = { [69] = {
["X"] = 40.46, ["X"] = 40.46,
["Y"] = 54.28, ["Y"] = 54.28,
["CD"] = 0, ["CD"] = 0,
}, },
[70] = { [70] = {
["X"] = 39.05, ["X"] = 39.05,
["Y"] = 55.74, ["Y"] = 55.74,
["CD"] = 0, ["CD"] = 0,
}, },
[71] = { [71] = {
["X"] = 37.6, ["X"] = 37.6,
["Y"] = 55.77, ["Y"] = 55.77,
["CD"] = 0, ["CD"] = 0,
}, },
[72] = { [72] = {
["X"] = 34.89, ["X"] = 34.89,
["Y"] = 57.33, ["Y"] = 57.33,
["CD"] = 0, ["CD"] = 0,
}, },
[73] = { [73] = {
["X"] = 34.59, ["X"] = 34.59,
["Y"] = 50.15, ["Y"] = 50.15,
["CD"] = 0, ["CD"] = 0,
}, },
[74] = { [74] = {
["X"] = 33.26, ["X"] = 33.26,
["Y"] = 48.43, ["Y"] = 48.43,
["CD"] = 0, ["CD"] = 0,
}, },
[75] = { [75] = {
["X"] = 32.77, ["X"] = 32.77,
["Y"] = 51.29, ["Y"] = 51.29,
["CD"] = 0, ["CD"] = 0,
}, },
[76] = { [76] = {
["X"] = 31.15, ["X"] = 31.15,
["Y"] = 57.24, ["Y"] = 57.24,
["CD"] = 0, ["CD"] = 0,
}, },
[77] = { [77] = {
["X"] = 30.3, ["X"] = 30.3,
["Y"] = 54.04, ["Y"] = 54.04,
["CD"] = 0, ["CD"] = 0,
}, },
[78] = { [78] = {
["X"] = 28.92, ["X"] = 28.92,
["Y"] = 52.76, ["Y"] = 52.76,
["CD"] = 0, ["CD"] = 0,
}, },
[79] = { [79] = {
["X"] = 28.32, ["X"] = 28.32,
["Y"] = 55.97, ["Y"] = 55.97,
["CD"] = 0, ["CD"] = 0,
}, },
[80] = { [80] = {
["X"] = 26.04, ["X"] = 26.04,
["Y"] = 49.17, ["Y"] = 49.17,
["CD"] = 0, ["CD"] = 0,
}, },
[81] = { [81] = {
["X"] = 24.02, ["X"] = 24.02,
["Y"] = 49.75, ["Y"] = 49.75,
["CD"] = 0, ["CD"] = 0,
}, },
[82] = { [82] = {
["X"] = 25.24, ["X"] = 25.24,
["Y"] = 51.71, ["Y"] = 51.71,
["CD"] = 0, ["CD"] = 0,
}, },
[83] = { [83] = {
["X"] = 24.44, ["X"] = 24.44,
["Y"] = 50.98, ["Y"] = 50.98,
["CD"] = 0, ["CD"] = 0,
}, },
[84] = { [84] = {
["X"] = 24.27, ["X"] = 24.27,
["Y"] = 56.95, ["Y"] = 56.95,
["CD"] = 0, ["CD"] = 0,
}, },
} }
aura_env.cooldown = 600 aura_env.cooldown = 600
aura_env.wipeDistance = 50 aura_env.wipeDistance = 50
aura_env.angle = 0 aura_env.angle = 0
aura_env.hyp = 0 aura_env.hyp = 0
aura_env.GetClosestHerb = function() aura_env.GetClosestHerb = function()
aura_env.minID = aura_env.minID = {
{ ["X"] = 0,
["X"] = 0, ["Y"] = 0,
["Y"] = 0, ["D"] = 1000,
["D"] = 1000, ["ID"] = 0,
["ID"] = 0 }
} local pX = GetPlayerMapPosition("player") or 0
local pX = GetPlayerMapPosition("player") or 0 local pY = select(2, GetPlayerMapPosition("player")) or 0
local pY = select(2, GetPlayerMapPosition("player")) or 0 pX, pY = pX * 100, pY * 100
pX, pY = pX * 100, pY * 100 for k, v in ipairs(aura_env.herbs) do
for k, v in ipairs(aura_env.herbs) do local hX, hY, cd = aura_env.herbs[k]["X"], aura_env.herbs[k]["Y"], aura_env.herbs[k]["CD"]
local hX, hY, cd = aura_env.herbs[k]["X"], aura_env.herbs[k]["Y"], aura_env.herbs[k]["CD"] if cd == 0 then
if cd == 0 then local X, Y = pX - hX, pY - hY
local X, Y = pX - hX, pY - hY local hyp = math.sqrt((math.abs(X ^ 2)) + (math.abs(Y ^ 2)))
local hyp = math.sqrt((math.abs(X ^ 2)) + (math.abs(Y ^ 2))) if hyp < aura_env.minID["D"] then
if hyp < aura_env.minID["D"] then aura_env.minID["X"] = hX
aura_env.minID["X"] = hX aura_env.minID["Y"] = hY
aura_env.minID["Y"] = hY aura_env.minID["D"] = hyp
aura_env.minID["D"] = hyp aura_env.minID["ID"] = k
aura_env.minID["ID"] = k end
end end
end end
end return aura_env.minID["ID"]
return aura_env.minID["ID"]
end end

View File

@@ -1,297 +1,296 @@
aura_env.herbs = { aura_env.herbs = {
[1] = { [1] = {
["X"] = 66.76, ["X"] = 66.76,
["Y"] = 84.03, ["Y"] = 84.03,
["CD"] = 0, ["CD"] = 0,
}, },
[2] = { [2] = {
["X"] = 66.36, ["X"] = 66.36,
["Y"] = 80.75, ["Y"] = 80.75,
["CD"] = 0, ["CD"] = 0,
}, },
[3] = { [3] = {
["X"] = 62.24, ["X"] = 62.24,
["Y"] = 80.15, ["Y"] = 80.15,
["CD"] = 0, ["CD"] = 0,
}, },
[4] = { [4] = {
["X"] = 55.96, ["X"] = 55.96,
["Y"] = 78.8, ["Y"] = 78.8,
["CD"] = 0, ["CD"] = 0,
}, },
[5] = { [5] = {
["X"] = 56.02, ["X"] = 56.02,
["Y"] = 76.95, ["Y"] = 76.95,
["CD"] = 0, ["CD"] = 0,
}, },
[6] = { [6] = {
["X"] = 64.96, ["X"] = 64.96,
["Y"] = 72.59, ["Y"] = 72.59,
["CD"] = 0, ["CD"] = 0,
}, },
[7] = { [7] = {
["X"] = 65.44, ["X"] = 65.44,
["Y"] = 70.65, ["Y"] = 70.65,
["CD"] = 0, ["CD"] = 0,
}, },
[8] = { [8] = {
["X"] = 68.36, ["X"] = 68.36,
["Y"] = 69, ["Y"] = 69,
["CD"] = 0, ["CD"] = 0,
}, },
[9] = { [9] = {
["X"] = 52.57, ["X"] = 52.57,
["Y"] = 67.93, ["Y"] = 67.93,
["CD"] = 0, ["CD"] = 0,
}, },
[10] = { [10] = {
["X"] = 53.37, ["X"] = 53.37,
["Y"] = 66.5, ["Y"] = 66.5,
["CD"] = 0, ["CD"] = 0,
}, },
[11] = { [11] = {
["X"] = 61.09, ["X"] = 61.09,
["Y"] = 66.97, ["Y"] = 66.97,
["CD"] = 0, ["CD"] = 0,
}, },
[12] = { [12] = {
["X"] = 67.45, ["X"] = 67.45,
["Y"] = 66.84, ["Y"] = 66.84,
["CD"] = 0, ["CD"] = 0,
}, },
[13] = { [13] = {
["X"] = 68.19, ["X"] = 68.19,
["Y"] = 64.02, ["Y"] = 64.02,
["CD"] = 0, ["CD"] = 0,
}, },
[14] = { [14] = {
["X"] = 47.6, ["X"] = 47.6,
["Y"] = 63.37, ["Y"] = 63.37,
["CD"] = 0, ["CD"] = 0,
}, },
[15] = { [15] = {
["X"] = 67.42, ["X"] = 67.42,
["Y"] = 57.23, ["Y"] = 57.23,
["CD"] = 0, ["CD"] = 0,
}, },
[16] = { [16] = {
["X"] = 67.19, ["X"] = 67.19,
["Y"] = 51.85, ["Y"] = 51.85,
["CD"] = 0, ["CD"] = 0,
}, },
[17] = { [17] = {
["X"] = 63.49, ["X"] = 63.49,
["Y"] = 50.05, ["Y"] = 50.05,
["CD"] = 0, ["CD"] = 0,
}, },
[18] = { [18] = {
["X"] = 58.87, ["X"] = 58.87,
["Y"] = 45.42, ["Y"] = 45.42,
["CD"] = 0, ["CD"] = 0,
}, },
[19] = { [19] = {
["X"] = 53.68, ["X"] = 53.68,
["Y"] = 45.06, ["Y"] = 45.06,
["CD"] = 0, ["CD"] = 0,
}, },
[20] = { [20] = {
["X"] = 69.19, ["X"] = 69.19,
["Y"] = 44.89, ["Y"] = 44.89,
["CD"] = 0, ["CD"] = 0,
}, },
[21] = { [21] = {
["X"] = 59.6, ["X"] = 59.6,
["Y"] = 42, ["Y"] = 42,
["CD"] = 0, ["CD"] = 0,
}, },
[22] = { [22] = {
["X"] = 67.82, ["X"] = 67.82,
["Y"] = 39.48, ["Y"] = 39.48,
["CD"] = 0, ["CD"] = 0,
}, },
[23] = { [23] = {
["X"] = 59.84, ["X"] = 59.84,
["Y"] = 37.64, ["Y"] = 37.64,
["CD"] = 0, ["CD"] = 0,
}, },
[24] = { [24] = {
["X"] = 67.43, ["X"] = 67.43,
["Y"] = 35.4, ["Y"] = 35.4,
["CD"] = 0, ["CD"] = 0,
}, },
[25] = { [25] = {
["X"] = 66.7, ["X"] = 66.7,
["Y"] = 29.13, ["Y"] = 29.13,
["CD"] = 0, ["CD"] = 0,
}, },
[26] = { [26] = {
["X"] = 60.88, ["X"] = 60.88,
["Y"] = 28.01, ["Y"] = 28.01,
["CD"] = 0, ["CD"] = 0,
}, },
[27] = { [27] = {
["X"] = 60.16, ["X"] = 60.16,
["Y"] = 21.19, ["Y"] = 21.19,
["CD"] = 0, ["CD"] = 0,
}, },
[28] = { [28] = {
["X"] = 53.95, ["X"] = 53.95,
["Y"] = 19.05, ["Y"] = 19.05,
["CD"] = 0, ["CD"] = 0,
}, },
[29] = { [29] = {
["X"] = 52.44, ["X"] = 52.44,
["Y"] = 18.27, ["Y"] = 18.27,
["CD"] = 0, ["CD"] = 0,
}, },
[30] = { [30] = {
["X"] = 48.51, ["X"] = 48.51,
["Y"] = 14.34, ["Y"] = 14.34,
["CD"] = 0, ["CD"] = 0,
}, },
[31] = { [31] = {
["X"] = 44.13, ["X"] = 44.13,
["Y"] = 14.69, ["Y"] = 14.69,
["CD"] = 0, ["CD"] = 0,
}, },
[32] = { [32] = {
["X"] = 44.53, ["X"] = 44.53,
["Y"] = 21.08, ["Y"] = 21.08,
["CD"] = 0, ["CD"] = 0,
}, },
[33] = { [33] = {
["X"] = 45.31, ["X"] = 45.31,
["Y"] = 26.71, ["Y"] = 26.71,
["CD"] = 0, ["CD"] = 0,
}, },
[34] = { [34] = {
["X"] = 46.16, ["X"] = 46.16,
["Y"] = 33.23, ["Y"] = 33.23,
["CD"] = 0, ["CD"] = 0,
}, },
[35] = { [35] = {
["X"] = 48.2, ["X"] = 48.2,
["Y"] = 45.28, ["Y"] = 45.28,
["CD"] = 0, ["CD"] = 0,
}, },
[36] = { [36] = {
["X"] = 42.52, ["X"] = 42.52,
["Y"] = 56.26, ["Y"] = 56.26,
["CD"] = 0, ["CD"] = 0,
}, },
[37] = { [37] = {
["X"] = 42.18, ["X"] = 42.18,
["Y"] = 53.86, ["Y"] = 53.86,
["CD"] = 0, ["CD"] = 0,
}, },
[38] = { [38] = {
["X"] = 42.49, ["X"] = 42.49,
["Y"] = 45.67, ["Y"] = 45.67,
["CD"] = 0, ["CD"] = 0,
}, },
[39] = { [39] = {
["X"] = 40.75, ["X"] = 40.75,
["Y"] = 46.4, ["Y"] = 46.4,
["CD"] = 0, ["CD"] = 0,
}, },
[40] = { [40] = {
["X"] = 40.5, ["X"] = 40.5,
["Y"] = 58, ["Y"] = 58,
["CD"] = 0, ["CD"] = 0,
}, },
[41] = { [41] = {
["X"] = 39.56, ["X"] = 39.56,
["Y"] = 44.86, ["Y"] = 44.86,
["CD"] = 0, ["CD"] = 0,
}, },
[42] = { [42] = {
["X"] = 37.41, ["X"] = 37.41,
["Y"] = 47.1, ["Y"] = 47.1,
["CD"] = 0, ["CD"] = 0,
}, },
[43] = { [43] = {
["X"] = 37.05, ["X"] = 37.05,
["Y"] = 58.92, ["Y"] = 58.92,
["CD"] = 0, ["CD"] = 0,
}, },
[44] = { [44] = {
["X"] = 35.56, ["X"] = 35.56,
["Y"] = 47.08, ["Y"] = 47.08,
["CD"] = 0, ["CD"] = 0,
}, },
[45] = { [45] = {
["X"] = 34.11, ["X"] = 34.11,
["Y"] = 59.82, ["Y"] = 59.82,
["CD"] = 0, ["CD"] = 0,
}, },
[46] = { [46] = {
["X"] = 31.96, ["X"] = 31.96,
["Y"] = 59.46, ["Y"] = 59.46,
["CD"] = 0, ["CD"] = 0,
}, },
[47] = { [47] = {
["X"] = 31.19, ["X"] = 31.19,
["Y"] = 47.17, ["Y"] = 47.17,
["CD"] = 0, ["CD"] = 0,
}, },
[48] = { [48] = {
["X"] = 27.81, ["X"] = 27.81,
["Y"] = 58.83, ["Y"] = 58.83,
["CD"] = 0, ["CD"] = 0,
}, },
[49] = { [49] = {
["X"] = 27.7, ["X"] = 27.7,
["Y"] = 47.35, ["Y"] = 47.35,
["CD"] = 0, ["CD"] = 0,
}, },
[50] = { [50] = {
["X"] = 26.52, ["X"] = 26.52,
["Y"] = 47.47, ["Y"] = 47.47,
["CD"] = 0, ["CD"] = 0,
}, },
[51] = { [51] = {
["X"] = 24.62, ["X"] = 24.62,
["Y"] = 62.82, ["Y"] = 62.82,
["CD"] = 0, ["CD"] = 0,
}, },
[52] = { [52] = {
["X"] = 21.76, ["X"] = 21.76,
["Y"] = 62.47, ["Y"] = 62.47,
["CD"] = 0, ["CD"] = 0,
}, },
[53] = { [53] = {
["X"] = 22.41, ["X"] = 22.41,
["Y"] = 58.99, ["Y"] = 58.99,
["CD"] = 0, ["CD"] = 0,
}, },
} }
aura_env.cooldown = 600 aura_env.cooldown = 600
aura_env.wipeDistance = 50 aura_env.wipeDistance = 50
aura_env.angle = 0 aura_env.angle = 0
aura_env.hyp = 0 aura_env.hyp = 0
aura_env.GetClosestHerb = function() aura_env.GetClosestHerb = function()
aura_env.minID = aura_env.minID = {
{ ["X"] = 0,
["X"] = 0, ["Y"] = 0,
["Y"] = 0, ["D"] = 1000,
["D"] = 1000, ["ID"] = 0,
["ID"] = 0 }
} local pX = GetPlayerMapPosition("player") or 0
local pX = GetPlayerMapPosition("player") or 0 local pY = select(2, GetPlayerMapPosition("player")) or 0
local pY = select(2, GetPlayerMapPosition("player")) or 0 pX, pY = pX * 100, pY * 100
pX, pY = pX * 100, pY * 100 for k, v in ipairs(aura_env.herbs) do
for k, v in ipairs(aura_env.herbs) do local hX, hY, cd = aura_env.herbs[k]["X"], aura_env.herbs[k]["Y"], aura_env.herbs[k]["CD"]
local hX, hY, cd = aura_env.herbs[k]["X"], aura_env.herbs[k]["Y"], aura_env.herbs[k]["CD"] if cd == 0 then
if cd == 0 then local X, Y = pX - hX, pY - hY
local X, Y = pX - hX, pY - hY local hyp = math.sqrt((math.abs(X ^ 2)) + (math.abs(Y ^ 2)))
local hyp = math.sqrt((math.abs(X ^ 2)) + (math.abs(Y ^ 2))) if hyp < aura_env.minID["D"] then
if hyp < aura_env.minID["D"] then aura_env.minID["X"] = hX
aura_env.minID["X"] = hX aura_env.minID["Y"] = hY
aura_env.minID["Y"] = hY aura_env.minID["D"] = hyp
aura_env.minID["D"] = hyp aura_env.minID["ID"] = k
aura_env.minID["ID"] = k end
end end
end end
end return aura_env.minID["ID"]
return aura_env.minID["ID"]
end end

View File

@@ -1,327 +1,276 @@
aura_env.herbs = aura_env.herbs = {
{ [1] = {
[1] = ["X"] = 88.46,
{ ["Y"] = 17.99,
["X"] = 88.46, ["CD"] = 0,
["Y"] = 17.99,
["CD"] = 0
}, },
[2] = [2] = {
{ ["X"] = 87.27,
["X"] = 87.27, ["Y"] = 17.3,
["Y"] = 17.3, ["CD"] = 0,
["CD"] = 0
}, },
[3] = [3] = {
{ ["X"] = 86.48,
["X"] = 86.48, ["Y"] = 17.2,
["Y"] = 17.2, ["CD"] = 0,
["CD"] = 0
}, },
[4] = [4] = {
{ ["X"] = 85.78,
["X"] = 85.78, ["Y"] = 17.6,
["Y"] = 17.6, ["CD"] = 0,
["CD"] = 0
}, },
[5] = [5] = {
{ ["X"] = 85,
["X"] = 85, ["Y"] = 18.05,
["Y"] = 18.05, ["CD"] = 0,
["CD"] = 0
}, },
[6] = [6] = {
{ ["X"] = 84.03,
["X"] = 84.03, ["Y"] = 19.24,
["Y"] = 19.24, ["CD"] = 0,
["CD"] = 0
}, },
[7] = [7] = {
{ ["X"] = 83.28,
["X"] = 83.28, ["Y"] = 20.08,
["Y"] = 20.08, ["CD"] = 0,
["CD"] = 0
}, },
[8] = [8] = {
{ ["X"] = 82.62,
["X"] = 82.62, ["Y"] = 20.74,
["Y"] = 20.74, ["CD"] = 0,
["CD"] = 0
}, },
[9] = [9] = {
{ ["X"] = 81.96,
["X"] = 81.96, ["Y"] = 22.01,
["Y"] = 22.01, ["CD"] = 0,
["CD"] = 0
}, },
[10] = [10] = {
{ ["X"] = 81.22,
["X"] = 81.22, ["Y"] = 22.72,
["Y"] = 22.72, ["CD"] = 0,
["CD"] = 0
}, },
[11] = [11] = {
{ ["X"] = 80.32,
["X"] = 80.32, ["Y"] = 25.03,
["Y"] = 25.03, ["CD"] = 0,
["CD"] = 0
}, },
[12] = [12] = {
{ ["X"] = 80.19,
["X"] = 80.19, ["Y"] = 25.92,
["Y"] = 25.92, ["CD"] = 0,
["CD"] = 0
}, },
[13] = [13] = {
{ ["X"] = 78.88,
["X"] = 78.88, ["Y"] = 27.21,
["Y"] = 27.21, ["CD"] = 0,
["CD"] = 0
}, },
[14] = [14] = {
{ ["X"] = 77.91,
["X"] = 77.91, ["Y"] = 27.41,
["Y"] = 27.41, ["CD"] = 0,
["CD"] = 0
}, },
[15] = [15] = {
{ ["X"] = 76.98,
["X"] = 76.98, ["Y"] = 28.38,
["Y"] = 28.38, ["CD"] = 0,
["CD"] = 0
}, },
[16] = [16] = {
{ ["X"] = 75.11,
["X"] = 75.11, ["Y"] = 32.51,
["Y"] = 32.51, ["CD"] = 0,
["CD"] = 0
}, },
[17] = [17] = {
{ ["X"] = 74.55,
["X"] = 74.55, ["Y"] = 33.31,
["Y"] = 33.31, ["CD"] = 0,
["CD"] = 0
}, },
[18] = [18] = {
{ ["X"] = 73.58,
["X"] = 73.58, ["Y"] = 32.76,
["Y"] = 32.76, ["CD"] = 0,
["CD"] = 0
}, },
[19] = [19] = {
{ ["X"] = 73.64,
["X"] = 73.64, ["Y"] = 31.74,
["Y"] = 31.74, ["CD"] = 0,
["CD"] = 0
}, },
[20] = [20] = {
{ ["X"] = 73.51,
["X"] = 73.51, ["Y"] = 30.48,
["Y"] = 30.48, ["CD"] = 0,
["CD"] = 0
}, },
[21] = [21] = {
{ ["X"] = 72.86,
["X"] = 72.86, ["Y"] = 29.99,
["Y"] = 29.99, ["CD"] = 0,
["CD"] = 0
}, },
[22] = [22] = {
{ ["X"] = 72.18,
["X"] = 72.18, ["Y"] = 28.74,
["Y"] = 28.74, ["CD"] = 0,
["CD"] = 0
}, },
[23] = [23] = {
{ ["X"] = 72.13,
["X"] = 72.13, ["Y"] = 26.96,
["Y"] = 26.96, ["CD"] = 0,
["CD"] = 0
}, },
[24] = [24] = {
{ ["X"] = 71.46,
["X"] = 71.46, ["Y"] = 26.17,
["Y"] = 26.17, ["CD"] = 0,
["CD"] = 0
}, },
[25] = [25] = {
{ ["X"] = 70.67,
["X"] = 70.67, ["Y"] = 26.16,
["Y"] = 26.16, ["CD"] = 0,
["CD"] = 0
}, },
[26] = [26] = {
{ ["X"] = 90.04,
["X"] = 90.04, ["Y"] = 50.75,
["Y"] = 50.75, ["CD"] = 0,
["CD"] = 0
}, },
[27] = [27] = {
{ ["X"] = 90.84,
["X"] = 90.84, ["Y"] = 50.84,
["Y"] = 50.84, ["CD"] = 0,
["CD"] = 0
}, },
[28] = [28] = {
{ ["X"] = 88.81,
["X"] = 88.81, ["Y"] = 61.52,
["Y"] = 61.52, ["CD"] = 0,
["CD"] = 0
}, },
[29] = [29] = {
{ ["X"] = 78.92,
["X"] = 78.92, ["Y"] = 61.4,
["Y"] = 61.4, ["CD"] = 0,
["CD"] = 0
}, },
[30] = [30] = {
{ ["X"] = 82.26,
["X"] = 82.26, ["Y"] = 59.77,
["Y"] = 59.77, ["CD"] = 0,
["CD"] = 0
}, },
[31] = [31] = {
{ ["X"] = 85.43,
["X"] = 85.43, ["Y"] = 57.03,
["Y"] = 57.03, ["CD"] = 0,
["CD"] = 0
}, },
[32] = [32] = {
{ ["X"] = 74.46,
["X"] = 74.46, ["Y"] = 28.13,
["Y"] = 28.13, ["CD"] = 0,
["CD"] = 0
}, },
[33] = [33] = {
{ ["X"] = 69.36,
["X"] = 69.36, ["Y"] = 25.49,
["Y"] = 25.49, ["CD"] = 0,
["CD"] = 0
}, },
[34] = [34] = {
{ ["X"] = 73.21,
["X"] = 73.21, ["Y"] = 26.13,
["Y"] = 26.13, ["CD"] = 0,
["CD"] = 0
}, },
[35] = [35] = {
{ ["X"] = 56.52,
["X"] = 56.52, ["Y"] = 35.9,
["Y"] = 35.9, ["CD"] = 0,
["CD"] = 0
}, },
[36] = [36] = {
{ ["X"] = 57.94,
["X"] = 57.94, ["Y"] = 33.32,
["Y"] = 33.32, ["CD"] = 0,
["CD"] = 0
}, },
[37] = [37] = {
{ ["X"] = 55.19,
["X"] = 55.19, ["Y"] = 32.83,
["Y"] = 32.83, ["CD"] = 0,
["CD"] = 0
}, },
[38] = [38] = {
{ ["X"] = 54.89,
["X"] = 54.89, ["Y"] = 37.13,
["Y"] = 37.13, ["CD"] = 0,
["CD"] = 0
}, },
[39] = [39] = {
{ ["X"] = 51.74,
["X"] = 51.74, ["Y"] = 38.92,
["Y"] = 38.92, ["CD"] = 0,
["CD"] = 0
}, },
[40] = [40] = {
{ ["X"] = 52.5,
["X"] = 52.5, ["Y"] = 38.18,
["Y"] = 38.18, ["CD"] = 0,
["CD"] = 0
}, },
[41] = [41] = {
{ ["X"] = 49.22,
["X"] = 49.22, ["Y"] = 43.37,
["Y"] = 43.37, ["CD"] = 0,
["CD"] = 0
}, },
[42] = [42] = {
{ ["X"] = 49.78,
["X"] = 49.78, ["Y"] = 50.78,
["Y"] = 50.78, ["CD"] = 0,
["CD"] = 0
}, },
[43] = [43] = {
{ ["X"] = 45.13,
["X"] = 45.13, ["Y"] = 52.25,
["Y"] = 52.25, ["CD"] = 0,
["CD"] = 0
}, },
[44] = [44] = {
{ ["X"] = 45.02,
["X"] = 45.02, ["Y"] = 47.11,
["Y"] = 47.11, ["CD"] = 0,
["CD"] = 0
}, },
[45] = [45] = {
{ ["X"] = 31.45,
["X"] = 31.45, ["Y"] = 55.09,
["Y"] = 55.09, ["CD"] = 0,
["CD"] = 0
}, },
[46] = [46] = {
{ ["X"] = 30.49,
["X"] = 30.49, ["Y"] = 60.35,
["Y"] = 60.35, ["CD"] = 0,
["CD"] = 0
}, },
[47] = [47] = {
{ ["X"] = 26.19,
["X"] = 26.19, ["Y"] = 62.12,
["Y"] = 62.12, ["CD"] = 0,
["CD"] = 0
}, },
[48] = [48] = {
{ ["X"] = 19.5,
["X"] = 19.5, ["Y"] = 61.05,
["Y"] = 61.05, ["CD"] = 0,
["CD"] = 0 },
[49] = {
["X"] = 21.36,
["Y"] = 56.44,
["CD"] = 0,
}, },
[49] =
{
["X"] = 21.36,
["Y"] = 56.44,
["CD"] = 0
}
} }
aura_env.cooldown = 600 aura_env.cooldown = 600
aura_env.wipeDistance = 15 aura_env.wipeDistance = 15
aura_env.angle = 0 aura_env.angle = 0
aura_env.hyp = 0 aura_env.hyp = 0
aura_env.GetClosestHerb = function() aura_env.GetClosestHerb = function()
aura_env.minID = aura_env.minID = {
{ ["X"] = 0,
["X"] = 0, ["Y"] = 0,
["Y"] = 0, ["D"] = 1000,
["D"] = 1000, ["ID"] = 0,
["ID"] = 0 }
} local pX = GetPlayerMapPosition("player") or 0
local pX = GetPlayerMapPosition("player") or 0 local pY = select(2, GetPlayerMapPosition("player")) or 0
local pY = select(2, GetPlayerMapPosition("player")) or 0 pX, pY = pX * 100, pY * 100
pX, pY = pX * 100, pY * 100 for k, v in ipairs(aura_env.herbs) do
for k,v in ipairs(aura_env.herbs) do local hX, hY, cd = aura_env.herbs[k]["X"], aura_env.herbs[k]["Y"], aura_env.herbs[k]["CD"]
local hX, hY, cd = aura_env.herbs[k]["X"], aura_env.herbs[k]["Y"], aura_env.herbs[k]["CD"] if cd == 0 then
if cd == 0 then local X, Y = pX - hX, pY - hY
local X, Y = pX - hX, pY - hY local hyp = math.sqrt((math.abs(X ^ 2)) + (math.abs(Y ^ 2)))
local hyp = math.sqrt((math.abs(X^2)) + (math.abs(Y^2))) if hyp < aura_env.minID["D"] then
if hyp < aura_env.minID["D"] then aura_env.minID["X"] = hX
aura_env.minID["X"] = hX aura_env.minID["Y"] = hY
aura_env.minID["Y"] = hY aura_env.minID["D"] = hyp
aura_env.minID["D"] = hyp aura_env.minID["ID"] = k
aura_env.minID["ID"] = k end
end end
end end
end return aura_env.minID["ID"]
return aura_env.minID["ID"]
end end

View File

@@ -1,219 +1,186 @@
aura_env.herbs = aura_env.herbs = {
{ [1] = {
[1] = ["X"] = 62.63,
{ ["Y"] = 80.15,
["X"] = 62.63, ["CD"] = 0,
["Y"] = 80.15,
["CD"] = 0
}, },
[2] = [2] = {
{ ["X"] = 61.03,
["X"] = 61.03, ["Y"] = 83.67,
["Y"] = 83.67, ["CD"] = 0,
["CD"] = 0
}, },
[3] = [3] = {
{ ["X"] = 60.11,
["X"] = 60.11, ["Y"] = 80.98,
["Y"] = 80.98, ["CD"] = 0,
["CD"] = 0
}, },
[4] = [4] = {
{ ["X"] = 59.29,
["X"] = 59.29, ["Y"] = 77.46,
["Y"] = 77.46, ["CD"] = 0,
["CD"] = 0
}, },
[5] = [5] = {
{ ["X"] = 56.55,
["X"] = 56.55, ["Y"] = 77.25,
["Y"] = 77.25, ["CD"] = 0,
["CD"] = 0
}, },
[6] = [6] = {
{ ["X"] = 56.87,
["X"] = 56.87, ["Y"] = 75.77,
["Y"] = 75.77, ["CD"] = 0,
["CD"] = 0
}, },
[7] = [7] = {
{ ["X"] = 51.04,
["X"] = 51.04, ["Y"] = 72.92,
["Y"] = 72.92, ["CD"] = 0,
["CD"] = 0
}, },
[8] = [8] = {
{ ["X"] = 45.02,
["X"] = 45.02, ["Y"] = 70.03,
["Y"] = 70.03, ["CD"] = 0,
["CD"] = 0
}, },
[9] = [9] = {
{ ["X"] = 72.27,
["X"] = 72.27, ["Y"] = 20.18,
["Y"] = 20.18, ["CD"] = 0,
["CD"] = 0
}, },
[10] = [10] = {
{ ["X"] = 75.45,
["X"] = 75.45, ["Y"] = 17.55,
["Y"] = 17.55, ["CD"] = 0,
["CD"] = 0
}, },
[11] = [11] = {
{ ["X"] = 76.63,
["X"] = 76.63, ["Y"] = 19.67,
["Y"] = 19.67, ["CD"] = 0,
["CD"] = 0
}, },
[12] = [12] = {
{ ["X"] = 75.67,
["X"] = 75.67, ["Y"] = 21.71,
["Y"] = 21.71, ["CD"] = 0,
["CD"] = 0
}, },
[13] = [13] = {
{ ["X"] = 73.78,
["X"] = 73.78, ["Y"] = 24.85,
["Y"] = 24.85, ["CD"] = 0,
["CD"] = 0
}, },
[14] = [14] = {
{ ["X"] = 70.92,
["X"] = 70.92, ["Y"] = 34.01,
["Y"] = 34.01, ["CD"] = 0,
["CD"] = 0
}, },
[15] = [15] = {
{ ["X"] = 65.32,
["X"] = 65.32, ["Y"] = 47.25,
["Y"] = 47.25, ["CD"] = 0,
["CD"] = 0
}, },
[16] = [16] = {
{ ["X"] = 69.86,
["X"] = 69.86, ["Y"] = 52.11,
["Y"] = 52.11, ["CD"] = 0,
["CD"] = 0
}, },
[17] = [17] = {
{ ["X"] = 74.82,
["X"] = 74.82, ["Y"] = 57.8,
["Y"] = 57.8, ["CD"] = 0,
["CD"] = 0
}, },
[18] = [18] = {
{ ["X"] = 73.72,
["X"] = 73.72, ["Y"] = 55.53,
["Y"] = 55.53, ["CD"] = 0,
["CD"] = 0
}, },
[19] = [19] = {
{ ["X"] = 75.55,
["X"] = 75.55, ["Y"] = 56.07,
["Y"] = 56.07, ["CD"] = 0,
["CD"] = 0
}, },
[20] = [20] = {
{ ["X"] = 78.32,
["X"] = 78.32, ["Y"] = 59.4,
["Y"] = 59.4, ["CD"] = 0,
["CD"] = 0
}, },
[21] = [21] = {
{ ["X"] = 77.23,
["X"] = 77.23, ["Y"] = 61.88,
["Y"] = 61.88, ["CD"] = 0,
["CD"] = 0
}, },
[22] = [22] = {
{ ["X"] = 75.08,
["X"] = 75.08, ["Y"] = 61.89,
["Y"] = 61.89, ["CD"] = 0,
["CD"] = 0
}, },
[23] = [23] = {
{ ["X"] = 72.99,
["X"] = 72.99, ["Y"] = 62.81,
["Y"] = 62.81, ["CD"] = 0,
["CD"] = 0
}, },
[24] = [24] = {
{ ["X"] = 71.3,
["X"] = 71.3, ["Y"] = 63.82,
["Y"] = 63.82, ["CD"] = 0,
["CD"] = 0
}, },
[25] = [25] = {
{ ["X"] = 68.84,
["X"] = 68.84, ["Y"] = 59.76,
["Y"] = 59.76, ["CD"] = 0,
["CD"] = 0
}, },
[26] = [26] = {
{ ["X"] = 68.09,
["X"] = 68.09, ["Y"] = 59.63,
["Y"] = 59.63, ["CD"] = 0,
["CD"] = 0
}, },
[27] = [27] = {
{ ["X"] = 67.89,
["X"] = 67.89, ["Y"] = 59.57,
["Y"] = 59.57, ["CD"] = 0,
["CD"] = 0
}, },
[28] = [28] = {
{ ["X"] = 42.19,
["X"] = 42.19, ["Y"] = 84.08,
["Y"] = 84.08, ["CD"] = 0,
["CD"] = 0
}, },
[29] = [29] = {
{ ["X"] = 34.22,
["X"] = 34.22, ["Y"] = 48.33,
["Y"] = 48.33, ["CD"] = 0,
["CD"] = 0
}, },
[30] = [30] = {
{ ["X"] = 34.19,
["X"] = 34.19, ["Y"] = 42.54,
["Y"] = 42.54, ["CD"] = 0,
["CD"] = 0 },
[31] = {
["X"] = 19.86,
["Y"] = 48.49,
["CD"] = 0,
}, },
[31] =
{
["X"] = 19.86,
["Y"] = 48.49,
["CD"] = 0
}
} }
aura_env.cooldown = 600 aura_env.cooldown = 600
aura_env.wipeDistance = 15 aura_env.wipeDistance = 15
aura_env.angle = 0 aura_env.angle = 0
aura_env.hyp = 0 aura_env.hyp = 0
aura_env.GetClosestHerb = function() aura_env.GetClosestHerb = function()
aura_env.minID = aura_env.minID = {
{ ["X"] = 0,
["X"] = 0, ["Y"] = 0,
["Y"] = 0, ["D"] = 1000,
["D"] = 1000, ["ID"] = 0,
["ID"] = 0 }
} local pX = GetPlayerMapPosition("player") or 0
local pX = GetPlayerMapPosition("player") or 0 local pY = select(2, GetPlayerMapPosition("player")) or 0
local pY = select(2, GetPlayerMapPosition("player")) or 0 pX, pY = pX * 100, pY * 100
pX, pY = pX * 100, pY * 100 for k, v in ipairs(aura_env.herbs) do
for k,v in ipairs(aura_env.herbs) do local hX, hY, cd = aura_env.herbs[k]["X"], aura_env.herbs[k]["Y"], aura_env.herbs[k]["CD"]
local hX, hY, cd = aura_env.herbs[k]["X"], aura_env.herbs[k]["Y"], aura_env.herbs[k]["CD"] if cd == 0 then
if cd == 0 then local X, Y = pX - hX, pY - hY
local X, Y = pX - hX, pY - hY local hyp = math.sqrt((math.abs(X ^ 2)) + (math.abs(Y ^ 2)))
local hyp = math.sqrt((math.abs(X^2)) + (math.abs(Y^2))) if hyp < aura_env.minID["D"] then
if hyp < aura_env.minID["D"] then aura_env.minID["X"] = hX
aura_env.minID["X"] = hX aura_env.minID["Y"] = hY
aura_env.minID["Y"] = hY aura_env.minID["D"] = hyp
aura_env.minID["D"] = hyp aura_env.minID["ID"] = k
aura_env.minID["ID"] = k end
end end
end end
end return aura_env.minID["ID"]
return aura_env.minID["ID"]
end end

View File

@@ -1,513 +1,431 @@
aura_env.herbs = aura_env.herbs = {
{ [1] = {
[1] = ["X"] = 14.35,
{ ["Y"] = 76.35,
["X"] = 14.35, ["CD"] = 0,
["Y"] = 76.35, },
["CD"] = 0 [2] = {
}, ["X"] = 25.28,
[2] = ["Y"] = 79.69,
{ ["CD"] = 0,
["X"] = 25.28, },
["Y"] = 79.69, [3] = {
["CD"] = 0 ["X"] = 28.67,
}, ["Y"] = 77.03,
[3] = ["CD"] = 0,
{ },
["X"] = 28.67, [4] = {
["Y"] = 77.03, ["X"] = 31.66,
["CD"] = 0 ["Y"] = 55.57,
}, ["CD"] = 0,
[4] = },
{ [5] = {
["X"] = 31.66, ["X"] = 33.42,
["Y"] = 55.57, ["Y"] = 64.79,
["CD"] = 0 ["CD"] = 0,
}, },
[5] = [6] = {
{ ["X"] = 41.99,
["X"] = 33.42, ["Y"] = 64.58,
["Y"] = 64.79, ["CD"] = 0,
["CD"] = 0 },
}, [7] = {
[6] = ["X"] = 48.03,
{ ["Y"] = 62.96,
["X"] = 41.99, ["CD"] = 0,
["Y"] = 64.58, },
["CD"] = 0 [8] = {
}, ["X"] = 58.05,
[7] = ["Y"] = 68.72,
{ ["CD"] = 0,
["X"] = 48.03, },
["Y"] = 62.96, [9] = {
["CD"] = 0 ["X"] = 60.82,
}, ["Y"] = 59.27,
[8] = ["CD"] = 0,
{ },
["X"] = 58.05, [10] = {
["Y"] = 68.72, ["X"] = 69.4,
["CD"] = 0 ["Y"] = 18.06,
}, ["CD"] = 0,
[9] = },
{ [11] = {
["X"] = 60.82, ["X"] = 64.09,
["Y"] = 59.27, ["Y"] = 33.24,
["CD"] = 0 ["CD"] = 0,
}, },
[10] = [12] = {
{ ["X"] = 25.89,
["X"] = 69.4, ["Y"] = 52.4,
["Y"] = 18.06, ["CD"] = 0,
["CD"] = 0 },
}, [13] = {
[11] = ["X"] = 12.88,
{ ["Y"] = 53.56,
["X"] = 64.09, ["CD"] = 0,
["Y"] = 33.24, },
["CD"] = 0 [14] = {
}, ["X"] = 11.28,
[12] = ["Y"] = 76.14,
{ ["CD"] = 0,
["X"] = 25.89, },
["Y"] = 52.4, [15] = {
["CD"] = 0 ["X"] = 16.6,
}, ["Y"] = 76.51,
[13] = ["CD"] = 0,
{ },
["X"] = 12.88, [16] = {
["Y"] = 53.56, ["X"] = 33.37,
["CD"] = 0 ["Y"] = 67.96,
}, ["CD"] = 0,
[14] = },
{ [17] = {
["X"] = 11.28, ["X"] = 36.36,
["Y"] = 76.14, ["Y"] = 76.93,
["CD"] = 0 ["CD"] = 0,
}, },
[15] = [18] = {
{ ["X"] = 30.05,
["X"] = 16.6, ["Y"] = 26.97,
["Y"] = 76.51, ["CD"] = 0,
["CD"] = 0 },
}, [19] = {
[16] = ["X"] = 31.46,
{ ["Y"] = 25.61,
["X"] = 33.37, ["CD"] = 0,
["Y"] = 67.96, },
["CD"] = 0 [20] = {
}, ["X"] = 29.86,
[17] = ["Y"] = 26.25,
{ ["CD"] = 0,
["X"] = 36.36, },
["Y"] = 76.93, [21] = {
["CD"] = 0 ["X"] = 32.14,
}, ["Y"] = 25.25,
[18] = ["CD"] = 0,
{ },
["X"] = 30.05, [22] = {
["Y"] = 26.97, ["X"] = 30.97,
["CD"] = 0 ["Y"] = 60.08,
}, ["CD"] = 0,
[19] = },
{ [23] = {
["X"] = 31.46, ["X"] = 32.46,
["Y"] = 25.61, ["Y"] = 62.51,
["CD"] = 0 ["CD"] = 0,
}, },
[20] = [24] = {
{ ["X"] = 71.46,
["X"] = 29.86, ["Y"] = 26.17,
["Y"] = 26.25, ["CD"] = 0,
["CD"] = 0 },
}, [25] = {
[21] = ["X"] = 70.67,
{ ["Y"] = 26.16,
["X"] = 32.14, ["CD"] = 0,
["Y"] = 25.25, },
["CD"] = 0 [26] = {
}, ["X"] = 90.04,
[22] = ["Y"] = 50.75,
{ ["CD"] = 0,
["X"] = 30.97, },
["Y"] = 60.08, [27] = {
["CD"] = 0 ["X"] = 90.84,
}, ["Y"] = 50.84,
[23] = ["CD"] = 0,
{ },
["X"] = 32.46, [28] = {
["Y"] = 62.51, ["X"] = 88.81,
["CD"] = 0 ["Y"] = 61.52,
}, ["CD"] = 0,
[24] = },
{ [29] = {
["X"] = 71.46, ["X"] = 78.92,
["Y"] = 26.17, ["Y"] = 61.4,
["CD"] = 0 ["CD"] = 0,
}, },
[25] = [30] = {
{ ["X"] = 82.26,
["X"] = 70.67, ["Y"] = 59.77,
["Y"] = 26.16, ["CD"] = 0,
["CD"] = 0 },
}, [31] = {
[26] = ["X"] = 85.43,
{ ["Y"] = 57.03,
["X"] = 90.04, ["CD"] = 0,
["Y"] = 50.75, },
["CD"] = 0 [32] = {
}, ["X"] = 74.46,
[27] = ["Y"] = 28.13,
{ ["CD"] = 0,
["X"] = 90.84, },
["Y"] = 50.84, [33] = {
["CD"] = 0 ["X"] = 69.36,
}, ["Y"] = 25.49,
[28] = ["CD"] = 0,
{ },
["X"] = 88.81, [34] = {
["Y"] = 61.52, ["X"] = 73.21,
["CD"] = 0 ["Y"] = 26.13,
}, ["CD"] = 0,
[29] = },
{ [35] = {
["X"] = 78.92, ["X"] = 56.52,
["Y"] = 61.4, ["Y"] = 35.9,
["CD"] = 0 ["CD"] = 0,
}, },
[30] = [36] = {
{ ["X"] = 57.94,
["X"] = 82.26, ["Y"] = 33.32,
["Y"] = 59.77, ["CD"] = 0,
["CD"] = 0 },
}, [37] = {
[31] = ["X"] = 55.19,
{ ["Y"] = 32.83,
["X"] = 85.43, ["CD"] = 0,
["Y"] = 57.03, },
["CD"] = 0 [38] = {
}, ["X"] = 54.89,
[32] = ["Y"] = 37.13,
{ ["CD"] = 0,
["X"] = 74.46, },
["Y"] = 28.13, [39] = {
["CD"] = 0 ["X"] = 51.74,
}, ["Y"] = 38.92,
[33] = ["CD"] = 0,
{ },
["X"] = 69.36, [40] = {
["Y"] = 25.49, ["X"] = 52.5,
["CD"] = 0 ["Y"] = 38.18,
}, ["CD"] = 0,
[34] = },
{ [41] = {
["X"] = 73.21, ["X"] = 49.22,
["Y"] = 26.13, ["Y"] = 43.37,
["CD"] = 0 ["CD"] = 0,
}, },
[35] = [42] = {
{ ["X"] = 49.78,
["X"] = 56.52, ["Y"] = 50.78,
["Y"] = 35.9, ["CD"] = 0,
["CD"] = 0 },
}, [43] = {
[36] = ["X"] = 45.13,
{ ["Y"] = 52.25,
["X"] = 57.94, ["CD"] = 0,
["Y"] = 33.32, },
["CD"] = 0 [44] = {
}, ["X"] = 45.02,
[37] = ["Y"] = 47.11,
{ ["CD"] = 0,
["X"] = 55.19, },
["Y"] = 32.83, [45] = {
["CD"] = 0 ["X"] = 31.45,
}, ["Y"] = 55.09,
[38] = ["CD"] = 0,
{ },
["X"] = 54.89, [46] = {
["Y"] = 37.13, ["X"] = 30.49,
["CD"] = 0 ["Y"] = 60.35,
}, ["CD"] = 0,
[39] = },
{ [47] = {
["X"] = 51.74, ["X"] = 26.19,
["Y"] = 38.92, ["Y"] = 62.12,
["CD"] = 0 ["CD"] = 0,
}, },
[40] = [48] = {
{ ["X"] = 19.5,
["X"] = 52.5, ["Y"] = 61.05,
["Y"] = 38.18, ["CD"] = 0,
["CD"] = 0 },
}, [49] = {
[41] = ["X"] = 21.36,
{ ["Y"] = 56.44,
["X"] = 49.22, ["CD"] = 0,
["Y"] = 43.37, },
["CD"] = 0 [50] = {
}, ["X"] = 62.63,
[42] = ["Y"] = 80.15,
{ ["CD"] = 0,
["X"] = 49.78, },
["Y"] = 50.78, [51] = {
["CD"] = 0 ["X"] = 61.03,
}, ["Y"] = 83.67,
[43] = ["CD"] = 0,
{ },
["X"] = 45.13, [52] = {
["Y"] = 52.25, ["X"] = 60.11,
["CD"] = 0 ["Y"] = 80.98,
}, ["CD"] = 0,
[44] = },
{ [53] = {
["X"] = 45.02, ["X"] = 59.29,
["Y"] = 47.11, ["Y"] = 77.46,
["CD"] = 0 ["CD"] = 0,
}, },
[45] = [54] = {
{ ["X"] = 56.55,
["X"] = 31.45, ["Y"] = 77.25,
["Y"] = 55.09, ["CD"] = 0,
["CD"] = 0 },
}, [55] = {
[46] = ["X"] = 56.87,
{ ["Y"] = 75.77,
["X"] = 30.49, ["CD"] = 0,
["Y"] = 60.35, },
["CD"] = 0 [56] = {
}, ["X"] = 51.04,
[47] = ["Y"] = 72.92,
{ ["CD"] = 0,
["X"] = 26.19, },
["Y"] = 62.12, [57] = {
["CD"] = 0 ["X"] = 45.02,
}, ["Y"] = 70.03,
[48] = ["CD"] = 0,
{ },
["X"] = 19.5, [58] = {
["Y"] = 61.05, ["X"] = 72.27,
["CD"] = 0 ["Y"] = 20.18,
}, ["CD"] = 0,
[49] = },
{ [59] = {
["X"] = 21.36, ["X"] = 75.45,
["Y"] = 56.44, ["Y"] = 17.55,
["CD"] = 0 ["CD"] = 0,
}, },
[50] = [60] = {
{ ["X"] = 76.63,
["X"] = 62.63, ["Y"] = 19.67,
["Y"] = 80.15, ["CD"] = 0,
["CD"] = 0 },
}, [61] = {
[51] = ["X"] = 75.67,
{ ["Y"] = 21.71,
["X"] = 61.03, ["CD"] = 0,
["Y"] = 83.67, },
["CD"] = 0 [62] = {
}, ["X"] = 73.78,
[52] = ["Y"] = 24.85,
{ ["CD"] = 0,
["X"] = 60.11, },
["Y"] = 80.98, [63] = {
["CD"] = 0 ["X"] = 70.92,
}, ["Y"] = 34.01,
[53] = ["CD"] = 0,
{ },
["X"] = 59.29, [64] = {
["Y"] = 77.46, ["X"] = 65.32,
["CD"] = 0 ["Y"] = 47.25,
}, ["CD"] = 0,
[54] = },
{ [65] = {
["X"] = 56.55, ["X"] = 69.86,
["Y"] = 77.25, ["Y"] = 52.11,
["CD"] = 0 ["CD"] = 0,
}, },
[55] = [66] = {
{ ["X"] = 74.82,
["X"] = 56.87, ["Y"] = 57.8,
["Y"] = 75.77, ["CD"] = 0,
["CD"] = 0 },
}, [67] = {
[56] = ["X"] = 73.72,
{ ["Y"] = 55.53,
["X"] = 51.04, ["CD"] = 0,
["Y"] = 72.92, },
["CD"] = 0 [68] = {
}, ["X"] = 75.55,
[57] = ["Y"] = 56.07,
{ ["CD"] = 0,
["X"] = 45.02, },
["Y"] = 70.03, [69] = {
["CD"] = 0 ["X"] = 78.32,
}, ["Y"] = 59.4,
[58] = ["CD"] = 0,
{ },
["X"] = 72.27, [70] = {
["Y"] = 20.18, ["X"] = 77.23,
["CD"] = 0 ["Y"] = 61.88,
}, ["CD"] = 0,
[59] = },
{ [71] = {
["X"] = 75.45, ["X"] = 75.08,
["Y"] = 17.55, ["Y"] = 61.89,
["CD"] = 0 ["CD"] = 0,
}, },
[60] = [72] = {
{ ["X"] = 72.99,
["X"] = 76.63, ["Y"] = 62.81,
["Y"] = 19.67, ["CD"] = 0,
["CD"] = 0 },
}, [73] = {
[61] = ["X"] = 71.3,
{ ["Y"] = 63.82,
["X"] = 75.67, ["CD"] = 0,
["Y"] = 21.71, },
["CD"] = 0 [74] = {
}, ["X"] = 68.84,
[62] = ["Y"] = 59.76,
{ ["CD"] = 0,
["X"] = 73.78, },
["Y"] = 24.85, [75] = {
["CD"] = 0 ["X"] = 68.09,
}, ["Y"] = 59.63,
[63] = ["CD"] = 0,
{ },
["X"] = 70.92, [76] = {
["Y"] = 34.01, ["X"] = 67.89,
["CD"] = 0 ["Y"] = 59.57,
}, ["CD"] = 0,
[64] = },
{ [77] = {
["X"] = 65.32, ["X"] = 42.19,
["Y"] = 47.25, ["Y"] = 84.08,
["CD"] = 0 ["CD"] = 0,
}, },
[65] = [78] = {
{ ["X"] = 34.22,
["X"] = 69.86, ["Y"] = 48.33,
["Y"] = 52.11, ["CD"] = 0,
["CD"] = 0 },
}, [79] = {
[66] = ["X"] = 34.19,
{ ["Y"] = 42.54,
["X"] = 74.82, ["CD"] = 0,
["Y"] = 57.8, },
["CD"] = 0 [80] = {
}, ["X"] = 19.86,
[67] = ["Y"] = 48.49,
{ ["CD"] = 0,
["X"] = 73.72, },
["Y"] = 55.53,
["CD"] = 0
},
[68] =
{
["X"] = 75.55,
["Y"] = 56.07,
["CD"] = 0
},
[69] =
{
["X"] = 78.32,
["Y"] = 59.4,
["CD"] = 0
},
[70] =
{
["X"] = 77.23,
["Y"] = 61.88,
["CD"] = 0
},
[71] =
{
["X"] = 75.08,
["Y"] = 61.89,
["CD"] = 0
},
[72] =
{
["X"] = 72.99,
["Y"] = 62.81,
["CD"] = 0
},
[73] =
{
["X"] = 71.3,
["Y"] = 63.82,
["CD"] = 0
},
[74] =
{
["X"] = 68.84,
["Y"] = 59.76,
["CD"] = 0
},
[75] =
{
["X"] = 68.09,
["Y"] = 59.63,
["CD"] = 0
},
[76] =
{
["X"] = 67.89,
["Y"] = 59.57,
["CD"] = 0
},
[77] =
{
["X"] = 42.19,
["Y"] = 84.08,
["CD"] = 0
},
[78] =
{
["X"] = 34.22,
["Y"] = 48.33,
["CD"] = 0
},
[79] =
{
["X"] = 34.19,
["Y"] = 42.54,
["CD"] = 0
},
[80] =
{
["X"] = 19.86,
["Y"] = 48.49,
["CD"] = 0
}
} }
aura_env.cooldown = 600 aura_env.cooldown = 600
aura_env.wipeDistance = 15 aura_env.wipeDistance = 15
aura_env.angle = 0 aura_env.angle = 0
aura_env.hyp = 0 aura_env.hyp = 0
aura_env.GetClosestHerb = function() aura_env.GetClosestHerb = function()
aura_env.minID = aura_env.minID = {
{ ["X"] = 0,
["X"] = 0, ["Y"] = 0,
["Y"] = 0, ["D"] = 1000,
["D"] = 1000, ["ID"] = 0,
["ID"] = 0 }
} local pX = GetPlayerMapPosition("player") or 0
local pX = GetPlayerMapPosition("player") or 0 local pY = select(2, GetPlayerMapPosition("player")) or 0
local pY = select(2, GetPlayerMapPosition("player")) or 0 pX, pY = pX * 100, pY * 100
pX, pY = pX * 100, pY * 100 for k, v in ipairs(aura_env.herbs) do
for k,v in ipairs(aura_env.herbs) do local hX, hY, cd = aura_env.herbs[k]["X"], aura_env.herbs[k]["Y"], aura_env.herbs[k]["CD"]
local hX, hY, cd = aura_env.herbs[k]["X"], aura_env.herbs[k]["Y"], aura_env.herbs[k]["CD"] if cd == 0 then
if cd == 0 then local X, Y = pX - hX, pY - hY
local X, Y = pX - hX, pY - hY local hyp = math.sqrt((math.abs(X ^ 2)) + (math.abs(Y ^ 2)))
local hyp = math.sqrt((math.abs(X^2)) + (math.abs(Y^2))) if hyp < aura_env.minID["D"] then
if hyp < aura_env.minID["D"] then aura_env.minID["X"] = hX
aura_env.minID["X"] = hX aura_env.minID["Y"] = hY
aura_env.minID["Y"] = hY aura_env.minID["D"] = hyp
aura_env.minID["D"] = hyp aura_env.minID["ID"] = k
aura_env.minID["ID"] = k end
end end
end end
end return aura_env.minID["ID"]
return aura_env.minID["ID"]
end end

View File

@@ -1,555 +1,466 @@
aura_env.herbs = aura_env.herbs = {
{ [1] = {
[1] =
{
["X"] = 50.79, ["X"] = 50.79,
["Y"] = 52.35, ["Y"] = 52.35,
["CD"] = 0 ["CD"] = 0,
}, },
[2] = [2] = {
{
["X"] = 52.7, ["X"] = 52.7,
["Y"] = 53.22, ["Y"] = 53.22,
["CD"] = 0 ["CD"] = 0,
}, },
[3] = [3] = {
{
["X"] = 53.94, ["X"] = 53.94,
["Y"] = 53.78, ["Y"] = 53.78,
["CD"] = 0 ["CD"] = 0,
}, },
[4] = [4] = {
{
["X"] = 53.24, ["X"] = 53.24,
["Y"] = 55.02, ["Y"] = 55.02,
["CD"] = 0 ["CD"] = 0,
}, },
[5] = [5] = {
{
["X"] = 52.65, ["X"] = 52.65,
["Y"] = 55.24, ["Y"] = 55.24,
["CD"] = 0 ["CD"] = 0,
}, },
[6] = [6] = {
{
["X"] = 51.67, ["X"] = 51.67,
["Y"] = 54.04, ["Y"] = 54.04,
["CD"] = 0 ["CD"] = 0,
}, },
[7] = [7] = {
{
["X"] = 51.15, ["X"] = 51.15,
["Y"] = 52.08, ["Y"] = 52.08,
["CD"] = 0 ["CD"] = 0,
}, },
[8] = [8] = {
{
["X"] = 49.47, ["X"] = 49.47,
["Y"] = 53.86, ["Y"] = 53.86,
["CD"] = 0 ["CD"] = 0,
}, },
[9] = [9] = {
{
["X"] = 44.63, ["X"] = 44.63,
["Y"] = 60.71, ["Y"] = 60.71,
["CD"] = 0 ["CD"] = 0,
}, },
[10] = [10] = {
{
["X"] = 44.89, ["X"] = 44.89,
["Y"] = 67.28, ["Y"] = 67.28,
["CD"] = 0 ["CD"] = 0,
}, },
[11] = [11] = {
{
["X"] = 44.44, ["X"] = 44.44,
["Y"] = 67.36, ["Y"] = 67.36,
["CD"] = 0 ["CD"] = 0,
}, },
[12] = [12] = {
{
["X"] = 44.34, ["X"] = 44.34,
["Y"] = 68.45, ["Y"] = 68.45,
["CD"] = 0 ["CD"] = 0,
}, },
[13] = [13] = {
{
["X"] = 44.14, ["X"] = 44.14,
["Y"] = 69.89, ["Y"] = 69.89,
["CD"] = 0 ["CD"] = 0,
}, },
[14] = [14] = {
{
["X"] = 44.17, ["X"] = 44.17,
["Y"] = 71.32, ["Y"] = 71.32,
["CD"] = 0 ["CD"] = 0,
}, },
[15] = [15] = {
{
["X"] = 47.78, ["X"] = 47.78,
["Y"] = 68.45, ["Y"] = 68.45,
["CD"] = 0 ["CD"] = 0,
}, },
[16] = [16] = {
{
["X"] = 46.65, ["X"] = 46.65,
["Y"] = 68.58, ["Y"] = 68.58,
["CD"] = 0 ["CD"] = 0,
}, },
[17] = [17] = {
{
["X"] = 48.76, ["X"] = 48.76,
["Y"] = 73.26, ["Y"] = 73.26,
["CD"] = 0 ["CD"] = 0,
}, },
[18] = [18] = {
{
["X"] = 48.01, ["X"] = 48.01,
["Y"] = 72.75, ["Y"] = 72.75,
["CD"] = 0 ["CD"] = 0,
}, },
[19] = [19] = {
{
["X"] = 49.41, ["X"] = 49.41,
["Y"] = 72.56, ["Y"] = 72.56,
["CD"] = 0 ["CD"] = 0,
}, },
[20] = [20] = {
{
["X"] = 48.95, ["X"] = 48.95,
["Y"] = 70.6, ["Y"] = 70.6,
["CD"] = 0 ["CD"] = 0,
}, },
[21] = [21] = {
{
["X"] = 47.55, ["X"] = 47.55,
["Y"] = 70.14, ["Y"] = 70.14,
["CD"] = 0 ["CD"] = 0,
}, },
[22] = [22] = {
{
["X"] = 44.82, ["X"] = 44.82,
["Y"] = 75.25, ["Y"] = 75.25,
["CD"] = 0 ["CD"] = 0,
}, },
[23] = [23] = {
{
["X"] = 45.77, ["X"] = 45.77,
["Y"] = 77.89, ["Y"] = 77.89,
["CD"] = 0 ["CD"] = 0,
}, },
[24] = [24] = {
{
["X"] = 44.83, ["X"] = 44.83,
["Y"] = 76, ["Y"] = 76,
["CD"] = 0 ["CD"] = 0,
}, },
[25] = [25] = {
{
["X"] = 43.85, ["X"] = 43.85,
["Y"] = 75.69, ["Y"] = 75.69,
["CD"] = 0 ["CD"] = 0,
}, },
[26] = [26] = {
{
["X"] = 43.04, ["X"] = 43.04,
["Y"] = 75.56, ["Y"] = 75.56,
["CD"] = 0 ["CD"] = 0,
}, },
[27] = [27] = {
{
["X"] = 44.83, ["X"] = 44.83,
["Y"] = 75.18, ["Y"] = 75.18,
["CD"] = 0 ["CD"] = 0,
}, },
[28] = [28] = {
{
["X"] = 43.97, ["X"] = 43.97,
["Y"] = 74.02, ["Y"] = 74.02,
["CD"] = 0 ["CD"] = 0,
}, },
[29] = [29] = {
{
["X"] = 43.68, ["X"] = 43.68,
["Y"] = 73.14, ["Y"] = 73.14,
["CD"] = 0 ["CD"] = 0,
}, },
[30] = [30] = {
{
["X"] = 43.75, ["X"] = 43.75,
["Y"] = 54.52, ["Y"] = 54.52,
["CD"] = 0 ["CD"] = 0,
}, },
[31] = [31] = {
{
["X"] = 45.46, ["X"] = 45.46,
["Y"] = 53.73, ["Y"] = 53.73,
["CD"] = 0 ["CD"] = 0,
}, },
[32] = [32] = {
{
["X"] = 45.89, ["X"] = 45.89,
["Y"] = 42.83, ["Y"] = 42.83,
["CD"] = 0 ["CD"] = 0,
}, },
[33] = [33] = {
{
["X"] = 45.45, ["X"] = 45.45,
["Y"] = 42.34, ["Y"] = 42.34,
["CD"] = 0 ["CD"] = 0,
}, },
[34] = [34] = {
{
["X"] = 45.1, ["X"] = 45.1,
["Y"] = 42.78, ["Y"] = 42.78,
["CD"] = 0 ["CD"] = 0,
}, },
[35] = [35] = {
{
["X"] = 45.03, ["X"] = 45.03,
["Y"] = 43.2, ["Y"] = 43.2,
["CD"] = 0 ["CD"] = 0,
}, },
[36] = [36] = {
{
["X"] = 45.68, ["X"] = 45.68,
["Y"] = 43.92, ["Y"] = 43.92,
["CD"] = 0 ["CD"] = 0,
}, },
[37] = [37] = {
{
["X"] = 47.01, ["X"] = 47.01,
["Y"] = 44.4, ["Y"] = 44.4,
["CD"] = 0 ["CD"] = 0,
}, },
[38] = [38] = {
{
["X"] = 47.62, ["X"] = 47.62,
["Y"] = 45.31, ["Y"] = 45.31,
["CD"] = 0 ["CD"] = 0,
}, },
[39] = [39] = {
{
["X"] = 44.35, ["X"] = 44.35,
["Y"] = 50.32, ["Y"] = 50.32,
["CD"] = 0 ["CD"] = 0,
}, },
[40] = [40] = {
{
["X"] = 43.54, ["X"] = 43.54,
["Y"] = 47.68, ["Y"] = 47.68,
["CD"] = 0 ["CD"] = 0,
}, },
[41] = [41] = {
{
["X"] = 43.35, ["X"] = 43.35,
["Y"] = 47.13, ["Y"] = 47.13,
["CD"] = 0 ["CD"] = 0,
}, },
[42] = [42] = {
{
["X"] = 40.68, ["X"] = 40.68,
["Y"] = 34.69, ["Y"] = 34.69,
["CD"] = 0 ["CD"] = 0,
}, },
[43] = [43] = {
{
["X"] = 41.47, ["X"] = 41.47,
["Y"] = 36.3, ["Y"] = 36.3,
["CD"] = 0 ["CD"] = 0,
}, },
[44] = [44] = {
{
["X"] = 42.18, ["X"] = 42.18,
["Y"] = 36.37, ["Y"] = 36.37,
["CD"] = 0 ["CD"] = 0,
}, },
[45] = [45] = {
{
["X"] = 42.68, ["X"] = 42.68,
["Y"] = 35.45, ["Y"] = 35.45,
["CD"] = 0 ["CD"] = 0,
}, },
[46] = [46] = {
{
["X"] = 42.41, ["X"] = 42.41,
["Y"] = 34.31, ["Y"] = 34.31,
["CD"] = 0 ["CD"] = 0,
}, },
[47] = [47] = {
{
["X"] = 43.14, ["X"] = 43.14,
["Y"] = 34.43, ["Y"] = 34.43,
["CD"] = 0 ["CD"] = 0,
}, },
[48] = [48] = {
{
["X"] = 42.81, ["X"] = 42.81,
["Y"] = 32.83, ["Y"] = 32.83,
["CD"] = 0 ["CD"] = 0,
}, },
[49] = [49] = {
{
["X"] = 43.7, ["X"] = 43.7,
["Y"] = 33.32, ["Y"] = 33.32,
["CD"] = 0 ["CD"] = 0,
}, },
[50] = [50] = {
{
["X"] = 44.13, ["X"] = 44.13,
["Y"] = 30.6, ["Y"] = 30.6,
["CD"] = 0 ["CD"] = 0,
}, },
[51] = [51] = {
{
["X"] = 44.71, ["X"] = 44.71,
["Y"] = 29.48, ["Y"] = 29.48,
["CD"] = 0 ["CD"] = 0,
}, },
[52] = [52] = {
{
["X"] = 43.81, ["X"] = 43.81,
["Y"] = 27.15, ["Y"] = 27.15,
["CD"] = 0 ["CD"] = 0,
}, },
[53] = [53] = {
{
["X"] = 43.3, ["X"] = 43.3,
["Y"] = 25.86, ["Y"] = 25.86,
["CD"] = 0 ["CD"] = 0,
}, },
[54] = [54] = {
{
["X"] = 41.18, ["X"] = 41.18,
["Y"] = 25.89, ["Y"] = 25.89,
["CD"] = 0 ["CD"] = 0,
}, },
[55] = [55] = {
{
["X"] = 41.63, ["X"] = 41.63,
["Y"] = 24.99, ["Y"] = 24.99,
["CD"] = 0 ["CD"] = 0,
}, },
[56] = [56] = {
{
["X"] = 43.99, ["X"] = 43.99,
["Y"] = 24.13, ["Y"] = 24.13,
["CD"] = 0 ["CD"] = 0,
}, },
[57] = [57] = {
{
["X"] = 45, ["X"] = 45,
["Y"] = 24.59, ["Y"] = 24.59,
["CD"] = 0 ["CD"] = 0,
}, },
[58] = [58] = {
{
["X"] = 51.32, ["X"] = 51.32,
["Y"] = 25.48, ["Y"] = 25.48,
["CD"] = 0 ["CD"] = 0,
}, },
[59] = [59] = {
{
["X"] = 50.95, ["X"] = 50.95,
["Y"] = 26.35, ["Y"] = 26.35,
["CD"] = 0 ["CD"] = 0,
}, },
[60] = [60] = {
{
["X"] = 49.69, ["X"] = 49.69,
["Y"] = 27.85, ["Y"] = 27.85,
["CD"] = 0 ["CD"] = 0,
}, },
[61] = [61] = {
{
["X"] = 49.88, ["X"] = 49.88,
["Y"] = 28.33, ["Y"] = 28.33,
["CD"] = 0 ["CD"] = 0,
}, },
[62] = [62] = {
{
["X"] = 49.1, ["X"] = 49.1,
["Y"] = 29.38, ["Y"] = 29.38,
["CD"] = 0 ["CD"] = 0,
}, },
[63] = [63] = {
{
["X"] = 47.93, ["X"] = 47.93,
["Y"] = 29.24, ["Y"] = 29.24,
["CD"] = 0 ["CD"] = 0,
}, },
[64] = [64] = {
{
["X"] = 47.05, ["X"] = 47.05,
["Y"] = 30.01, ["Y"] = 30.01,
["CD"] = 0 ["CD"] = 0,
}, },
[65] = [65] = {
{
["X"] = 46.76, ["X"] = 46.76,
["Y"] = 32.28, ["Y"] = 32.28,
["CD"] = 0 ["CD"] = 0,
}, },
[66] = [66] = {
{
["X"] = 51.53, ["X"] = 51.53,
["Y"] = 37.03, ["Y"] = 37.03,
["CD"] = 0 ["CD"] = 0,
}, },
[67] = [67] = {
{
["X"] = 52.24, ["X"] = 52.24,
["Y"] = 39.43, ["Y"] = 39.43,
["CD"] = 0 ["CD"] = 0,
}, },
[68] = [68] = {
{
["X"] = 51.9, ["X"] = 51.9,
["Y"] = 38.07, ["Y"] = 38.07,
["CD"] = 0 ["CD"] = 0,
}, },
[69] = [69] = {
{
["X"] = 50.52, ["X"] = 50.52,
["Y"] = 38.82, ["Y"] = 38.82,
["CD"] = 0 ["CD"] = 0,
}, },
[70] = [70] = {
{
["X"] = 49.72, ["X"] = 49.72,
["Y"] = 39.5, ["Y"] = 39.5,
["CD"] = 0 ["CD"] = 0,
}, },
[71] = [71] = {
{
["X"] = 47.85, ["X"] = 47.85,
["Y"] = 68.43, ["Y"] = 68.43,
["CD"] = 0 ["CD"] = 0,
}, },
[72] = [72] = {
{
["X"] = 32.68, ["X"] = 32.68,
["Y"] = 51.4, ["Y"] = 51.4,
["CD"] = 0 ["CD"] = 0,
}, },
[73] = [73] = {
{
["X"] = 33.07, ["X"] = 33.07,
["Y"] = 48.65, ["Y"] = 48.65,
["CD"] = 0 ["CD"] = 0,
}, },
[74] = [74] = {
{
["X"] = 34.22, ["X"] = 34.22,
["Y"] = 47.52, ["Y"] = 47.52,
["CD"] = 0 ["CD"] = 0,
}, },
[75] = [75] = {
{
["X"] = 35.38, ["X"] = 35.38,
["Y"] = 49.24, ["Y"] = 49.24,
["CD"] = 0 ["CD"] = 0,
}, },
[76] = [76] = {
{
["X"] = 36.3, ["X"] = 36.3,
["Y"] = 49.81, ["Y"] = 49.81,
["CD"] = 0 ["CD"] = 0,
}, },
[77] = [77] = {
{
["X"] = 37.23, ["X"] = 37.23,
["Y"] = 53.49, ["Y"] = 53.49,
["CD"] = 0 ["CD"] = 0,
}, },
[78] = [78] = {
{
["X"] = 37.55, ["X"] = 37.55,
["Y"] = 54.77, ["Y"] = 54.77,
["CD"] = 0 ["CD"] = 0,
}, },
[79] = [79] = {
{
["X"] = 37.48, ["X"] = 37.48,
["Y"] = 55.75, ["Y"] = 55.75,
["CD"] = 0 ["CD"] = 0,
}, },
[80] = [80] = {
{
["X"] = 39.14, ["X"] = 39.14,
["Y"] = 59.76, ["Y"] = 59.76,
["CD"] = 0 ["CD"] = 0,
}, },
[81] = [81] = {
{
["X"] = 39.01, ["X"] = 39.01,
["Y"] = 58.93, ["Y"] = 58.93,
["CD"] = 0 ["CD"] = 0,
}, },
[82] = [82] = {
{
["X"] = 38.69, ["X"] = 38.69,
["Y"] = 58.31, ["Y"] = 58.31,
["CD"] = 0 ["CD"] = 0,
}, },
[83] = [83] = {
{
["X"] = 38.55, ["X"] = 38.55,
["Y"] = 57.23, ["Y"] = 57.23,
["CD"] = 0 ["CD"] = 0,
}, },
[84] = [84] = {
{
["X"] = 36.59, ["X"] = 36.59,
["Y"] = 56.72, ["Y"] = 56.72,
["CD"] = 0 ["CD"] = 0,
}, },
[85] = [85] = {
{
["X"] = 34.3, ["X"] = 34.3,
["Y"] = 55.25, ["Y"] = 55.25,
["CD"] = 0 ["CD"] = 0,
}, },
[86] = [86] = {
{
["X"] = 26.1, ["X"] = 26.1,
["Y"] = 14.77, ["Y"] = 14.77,
["CD"] = 0 ["CD"] = 0,
}, },
[87] = [87] = {
{
["X"] = 45.95, ["X"] = 45.95,
["Y"] = 29.55, ["Y"] = 29.55,
["CD"] = 0 ["CD"] = 0,
} },
} }
aura_env.cooldown = 600 aura_env.cooldown = 600
aura_env.wipeDistance = 20 aura_env.wipeDistance = 20
aura_env.angle = 0 aura_env.angle = 0
aura_env.hyp = 0 aura_env.hyp = 0
aura_env.GetClosestHerb = function() aura_env.GetClosestHerb = function()
aura_env.minID = aura_env.minID = {
{ ["X"] = 0,
["X"] = 0, ["Y"] = 0,
["Y"] = 0, ["D"] = 1000,
["D"] = 1000, ["ID"] = 0,
["ID"] = 0 }
} local pX = GetPlayerMapPosition("player") or 0
local pX = GetPlayerMapPosition("player") or 0 local pY = select(2, GetPlayerMapPosition("player")) or 0
local pY = select(2, GetPlayerMapPosition("player")) or 0 pX, pY = pX * 100, pY * 100
pX, pY = pX * 100, pY * 100 for k, v in ipairs(aura_env.herbs) do
for k,v in ipairs(aura_env.herbs) do local hX, hY, cd = aura_env.herbs[k]["X"], aura_env.herbs[k]["Y"], aura_env.herbs[k]["CD"]
local hX, hY, cd = aura_env.herbs[k]["X"], aura_env.herbs[k]["Y"], aura_env.herbs[k]["CD"] if cd == 0 then
if cd == 0 then local X, Y = pX - hX, pY - hY
local X, Y = pX - hX, pY - hY local hyp = math.sqrt((math.abs(X ^ 2)) + (math.abs(Y ^ 2)))
local hyp = math.sqrt((math.abs(X^2)) + (math.abs(Y^2))) if hyp < aura_env.minID["D"] then
if hyp < aura_env.minID["D"] then aura_env.minID["X"] = hX
aura_env.minID["X"] = hX aura_env.minID["Y"] = hY
aura_env.minID["Y"] = hY aura_env.minID["D"] = hyp
aura_env.minID["D"] = hyp aura_env.minID["ID"] = k
aura_env.minID["ID"] = k end
end end
end end
end return aura_env.minID["ID"]
return aura_env.minID["ID"]
end end

View File

@@ -1,555 +1,466 @@
aura_env.herbs = aura_env.herbs = {
{ [1] = {
[1] =
{
["X"] = 67.25, ["X"] = 67.25,
["Y"] = 73.74, ["Y"] = 73.74,
["CD"] = 0 ["CD"] = 0,
}, },
[2] = [2] = {
{
["X"] = 68.53, ["X"] = 68.53,
["Y"] = 73.25, ["Y"] = 73.25,
["CD"] = 0 ["CD"] = 0,
}, },
[3] = [3] = {
{
["X"] = 69.34, ["X"] = 69.34,
["Y"] = 73.84, ["Y"] = 73.84,
["CD"] = 0 ["CD"] = 0,
}, },
[4] = [4] = {
{
["X"] = 62.86, ["X"] = 62.86,
["Y"] = 51.94, ["Y"] = 51.94,
["CD"] = 0 ["CD"] = 0,
}, },
[5] = [5] = {
{
["X"] = 63.66, ["X"] = 63.66,
["Y"] = 50.43, ["Y"] = 50.43,
["CD"] = 0 ["CD"] = 0,
}, },
[6] = [6] = {
{
["X"] = 65.41, ["X"] = 65.41,
["Y"] = 50.69, ["Y"] = 50.69,
["CD"] = 0 ["CD"] = 0,
}, },
[7] = [7] = {
{
["X"] = 64.95, ["X"] = 64.95,
["Y"] = 51.87, ["Y"] = 51.87,
["CD"] = 0 ["CD"] = 0,
}, },
[8] = [8] = {
{
["X"] = 64.6, ["X"] = 64.6,
["Y"] = 54.88, ["Y"] = 54.88,
["CD"] = 0 ["CD"] = 0,
}, },
[9] = [9] = {
{
["X"] = 52.44, ["X"] = 52.44,
["Y"] = 43.72, ["Y"] = 43.72,
["CD"] = 0 ["CD"] = 0,
}, },
[10] = [10] = {
{
["X"] = 51.89, ["X"] = 51.89,
["Y"] = 42.38, ["Y"] = 42.38,
["CD"] = 0 ["CD"] = 0,
}, },
[11] = [11] = {
{
["X"] = 50.37, ["X"] = 50.37,
["Y"] = 42.54, ["Y"] = 42.54,
["CD"] = 0 ["CD"] = 0,
}, },
[12] = [12] = {
{
["X"] = 49.81, ["X"] = 49.81,
["Y"] = 41.96, ["Y"] = 41.96,
["CD"] = 0 ["CD"] = 0,
}, },
[13] = [13] = {
{
["X"] = 49.12, ["X"] = 49.12,
["Y"] = 40.6, ["Y"] = 40.6,
["CD"] = 0 ["CD"] = 0,
}, },
[14] = [14] = {
{
["X"] = 48.34, ["X"] = 48.34,
["Y"] = 39.21, ["Y"] = 39.21,
["CD"] = 0 ["CD"] = 0,
}, },
[15] = [15] = {
{
["X"] = 48.02, ["X"] = 48.02,
["Y"] = 36.6, ["Y"] = 36.6,
["CD"] = 0 ["CD"] = 0,
}, },
[16] = [16] = {
{
["X"] = 46.86, ["X"] = 46.86,
["Y"] = 36.72, ["Y"] = 36.72,
["CD"] = 0 ["CD"] = 0,
}, },
[17] = [17] = {
{
["X"] = 46.75, ["X"] = 46.75,
["Y"] = 34.53, ["Y"] = 34.53,
["CD"] = 0 ["CD"] = 0,
}, },
[18] = [18] = {
{
["X"] = 25.94, ["X"] = 25.94,
["Y"] = 28.99, ["Y"] = 28.99,
["CD"] = 0 ["CD"] = 0,
}, },
[19] = [19] = {
{
["X"] = 29.48, ["X"] = 29.48,
["Y"] = 25.3, ["Y"] = 25.3,
["CD"] = 0 ["CD"] = 0,
}, },
[20] = [20] = {
{
["X"] = 28.4, ["X"] = 28.4,
["Y"] = 25.56, ["Y"] = 25.56,
["CD"] = 0 ["CD"] = 0,
}, },
[21] = [21] = {
{
["X"] = 28.51, ["X"] = 28.51,
["Y"] = 23.82, ["Y"] = 23.82,
["CD"] = 0 ["CD"] = 0,
}, },
[22] = [22] = {
{
["X"] = 29.61, ["X"] = 29.61,
["Y"] = 22.79, ["Y"] = 22.79,
["CD"] = 0 ["CD"] = 0,
}, },
[23] = [23] = {
{
["X"] = 29.75, ["X"] = 29.75,
["Y"] = 21.84, ["Y"] = 21.84,
["CD"] = 0 ["CD"] = 0,
}, },
[24] = [24] = {
{
["X"] = 26.43, ["X"] = 26.43,
["Y"] = 10.9, ["Y"] = 10.9,
["CD"] = 0 ["CD"] = 0,
}, },
[25] = [25] = {
{
["X"] = 25.97, ["X"] = 25.97,
["Y"] = 12.48, ["Y"] = 12.48,
["CD"] = 0 ["CD"] = 0,
}, },
[26] = [26] = {
{
["X"] = 25.9, ["X"] = 25.9,
["Y"] = 15.81, ["Y"] = 15.81,
["CD"] = 0 ["CD"] = 0,
}, },
[27] = [27] = {
{
["X"] = 25.73, ["X"] = 25.73,
["Y"] = 16.64, ["Y"] = 16.64,
["CD"] = 0 ["CD"] = 0,
}, },
[28] = [28] = {
{
["X"] = 25.45, ["X"] = 25.45,
["Y"] = 17.29, ["Y"] = 17.29,
["CD"] = 0 ["CD"] = 0,
}, },
[29] = [29] = {
{
["X"] = 25.4, ["X"] = 25.4,
["Y"] = 18.4, ["Y"] = 18.4,
["CD"] = 0 ["CD"] = 0,
}, },
[30] = [30] = {
{
["X"] = 25.26, ["X"] = 25.26,
["Y"] = 19.79, ["Y"] = 19.79,
["CD"] = 0 ["CD"] = 0,
}, },
[31] = [31] = {
{
["X"] = 26.03, ["X"] = 26.03,
["Y"] = 24.44, ["Y"] = 24.44,
["CD"] = 0 ["CD"] = 0,
}, },
[32] = [32] = {
{
["X"] = 26.04, ["X"] = 26.04,
["Y"] = 23.22, ["Y"] = 23.22,
["CD"] = 0 ["CD"] = 0,
}, },
[33] = [33] = {
{
["X"] = 24.19, ["X"] = 24.19,
["Y"] = 23.27, ["Y"] = 23.27,
["CD"] = 0 ["CD"] = 0,
}, },
[34] = [34] = {
{
["X"] = 24.28, ["X"] = 24.28,
["Y"] = 24.89, ["Y"] = 24.89,
["CD"] = 0 ["CD"] = 0,
}, },
[35] = [35] = {
{
["X"] = 24.47, ["X"] = 24.47,
["Y"] = 25.24, ["Y"] = 25.24,
["CD"] = 0 ["CD"] = 0,
}, },
[36] = [36] = {
{
["X"] = 24.46, ["X"] = 24.46,
["Y"] = 26.17, ["Y"] = 26.17,
["CD"] = 0 ["CD"] = 0,
}, },
[37] = [37] = {
{
["X"] = 24.98, ["X"] = 24.98,
["Y"] = 27.02, ["Y"] = 27.02,
["CD"] = 0 ["CD"] = 0,
}, },
[38] = [38] = {
{
["X"] = 24.82, ["X"] = 24.82,
["Y"] = 27.95, ["Y"] = 27.95,
["CD"] = 0 ["CD"] = 0,
}, },
[39] = [39] = {
{
["X"] = 24.87, ["X"] = 24.87,
["Y"] = 29.34, ["Y"] = 29.34,
["CD"] = 0 ["CD"] = 0,
}, },
[40] = [40] = {
{
["X"] = 24.49, ["X"] = 24.49,
["Y"] = 30.19, ["Y"] = 30.19,
["CD"] = 0 ["CD"] = 0,
}, },
[41] = [41] = {
{
["X"] = 23.53, ["X"] = 23.53,
["Y"] = 30.88, ["Y"] = 30.88,
["CD"] = 0 ["CD"] = 0,
}, },
[42] = [42] = {
{
["X"] = 23.17, ["X"] = 23.17,
["Y"] = 31.72, ["Y"] = 31.72,
["CD"] = 0 ["CD"] = 0,
}, },
[43] = [43] = {
{
["X"] = 22.88, ["X"] = 22.88,
["Y"] = 32.62, ["Y"] = 32.62,
["CD"] = 0 ["CD"] = 0,
}, },
[44] = [44] = {
{
["X"] = 21.65, ["X"] = 21.65,
["Y"] = 33.2, ["Y"] = 33.2,
["CD"] = 0 ["CD"] = 0,
}, },
[45] = [45] = {
{
["X"] = 19.95, ["X"] = 19.95,
["Y"] = 33.28, ["Y"] = 33.28,
["CD"] = 0 ["CD"] = 0,
}, },
[46] = [46] = {
{
["X"] = 21.16, ["X"] = 21.16,
["Y"] = 34.77, ["Y"] = 34.77,
["CD"] = 0 ["CD"] = 0,
}, },
[47] = [47] = {
{
["X"] = 22.35, ["X"] = 22.35,
["Y"] = 34.03, ["Y"] = 34.03,
["CD"] = 0 ["CD"] = 0,
}, },
[48] = [48] = {
{
["X"] = 31.87, ["X"] = 31.87,
["Y"] = 52.38, ["Y"] = 52.38,
["CD"] = 0 ["CD"] = 0,
}, },
[49] = [49] = {
{
["X"] = 30.31, ["X"] = 30.31,
["Y"] = 53, ["Y"] = 53,
["CD"] = 0 ["CD"] = 0,
}, },
[50] = [50] = {
{
["X"] = 28.27, ["X"] = 28.27,
["Y"] = 53.65, ["Y"] = 53.65,
["CD"] = 0 ["CD"] = 0,
}, },
[51] = [51] = {
{
["X"] = 27.54, ["X"] = 27.54,
["Y"] = 53.51, ["Y"] = 53.51,
["CD"] = 0 ["CD"] = 0,
}, },
[52] = [52] = {
{
["X"] = 27.6, ["X"] = 27.6,
["Y"] = 52.81, ["Y"] = 52.81,
["CD"] = 0 ["CD"] = 0,
}, },
[53] = [53] = {
{
["X"] = 26.91, ["X"] = 26.91,
["Y"] = 53.27, ["Y"] = 53.27,
["CD"] = 0 ["CD"] = 0,
}, },
[54] = [54] = {
{
["X"] = 25.45, ["X"] = 25.45,
["Y"] = 54.29, ["Y"] = 54.29,
["CD"] = 0 ["CD"] = 0,
}, },
[55] = [55] = {
{
["X"] = 25.36, ["X"] = 25.36,
["Y"] = 53.45, ["Y"] = 53.45,
["CD"] = 0 ["CD"] = 0,
}, },
[56] = [56] = {
{
["X"] = 22.29, ["X"] = 22.29,
["Y"] = 54.37, ["Y"] = 54.37,
["CD"] = 0 ["CD"] = 0,
}, },
[57] = [57] = {
{
["X"] = 23.11, ["X"] = 23.11,
["Y"] = 55.13, ["Y"] = 55.13,
["CD"] = 0 ["CD"] = 0,
}, },
[58] = [58] = {
{
["X"] = 24.34, ["X"] = 24.34,
["Y"] = 55.09, ["Y"] = 55.09,
["CD"] = 0 ["CD"] = 0,
}, },
[59] = [59] = {
{
["X"] = 24.03, ["X"] = 24.03,
["Y"] = 55.88, ["Y"] = 55.88,
["CD"] = 0 ["CD"] = 0,
}, },
[60] = [60] = {
{
["X"] = 24.95, ["X"] = 24.95,
["Y"] = 59.85, ["Y"] = 59.85,
["CD"] = 0 ["CD"] = 0,
}, },
[61] = [61] = {
{
["X"] = 24.84, ["X"] = 24.84,
["Y"] = 61.41, ["Y"] = 61.41,
["CD"] = 0 ["CD"] = 0,
}, },
[62] = [62] = {
{
["X"] = 34.59, ["X"] = 34.59,
["Y"] = 69.79, ["Y"] = 69.79,
["CD"] = 0 ["CD"] = 0,
}, },
[63] = [63] = {
{
["X"] = 33.59, ["X"] = 33.59,
["Y"] = 68.41, ["Y"] = 68.41,
["CD"] = 0 ["CD"] = 0,
}, },
[64] = [64] = {
{
["X"] = 31.96, ["X"] = 31.96,
["Y"] = 69.06, ["Y"] = 69.06,
["CD"] = 0 ["CD"] = 0,
}, },
[65] = [65] = {
{
["X"] = 29.87, ["X"] = 29.87,
["Y"] = 65.93, ["Y"] = 65.93,
["CD"] = 0 ["CD"] = 0,
}, },
[66] = [66] = {
{
["X"] = 30.95, ["X"] = 30.95,
["Y"] = 64.82, ["Y"] = 64.82,
["CD"] = 0 ["CD"] = 0,
}, },
[67] = [67] = {
{
["X"] = 32.43, ["X"] = 32.43,
["Y"] = 62.85, ["Y"] = 62.85,
["CD"] = 0 ["CD"] = 0,
}, },
[68] = [68] = {
{
["X"] = 32.7, ["X"] = 32.7,
["Y"] = 61.83, ["Y"] = 61.83,
["CD"] = 0 ["CD"] = 0,
}, },
[69] = [69] = {
{
["X"] = 33.05, ["X"] = 33.05,
["Y"] = 57.88, ["Y"] = 57.88,
["CD"] = 0 ["CD"] = 0,
}, },
[70] = [70] = {
{
["X"] = 32.43, ["X"] = 32.43,
["Y"] = 56.41, ["Y"] = 56.41,
["CD"] = 0 ["CD"] = 0,
}, },
[71] = [71] = {
{
["X"] = 33.85, ["X"] = 33.85,
["Y"] = 54.08, ["Y"] = 54.08,
["CD"] = 0 ["CD"] = 0,
}, },
[72] = [72] = {
{
["X"] = 32.68, ["X"] = 32.68,
["Y"] = 51.4, ["Y"] = 51.4,
["CD"] = 0 ["CD"] = 0,
}, },
[73] = [73] = {
{
["X"] = 33.07, ["X"] = 33.07,
["Y"] = 48.65, ["Y"] = 48.65,
["CD"] = 0 ["CD"] = 0,
}, },
[74] = [74] = {
{
["X"] = 34.22, ["X"] = 34.22,
["Y"] = 47.52, ["Y"] = 47.52,
["CD"] = 0 ["CD"] = 0,
}, },
[75] = [75] = {
{
["X"] = 35.38, ["X"] = 35.38,
["Y"] = 49.24, ["Y"] = 49.24,
["CD"] = 0 ["CD"] = 0,
}, },
[76] = [76] = {
{
["X"] = 36.3, ["X"] = 36.3,
["Y"] = 49.81, ["Y"] = 49.81,
["CD"] = 0 ["CD"] = 0,
}, },
[77] = [77] = {
{
["X"] = 37.23, ["X"] = 37.23,
["Y"] = 53.49, ["Y"] = 53.49,
["CD"] = 0 ["CD"] = 0,
}, },
[78] = [78] = {
{
["X"] = 37.55, ["X"] = 37.55,
["Y"] = 54.77, ["Y"] = 54.77,
["CD"] = 0 ["CD"] = 0,
}, },
[79] = [79] = {
{
["X"] = 37.48, ["X"] = 37.48,
["Y"] = 55.75, ["Y"] = 55.75,
["CD"] = 0 ["CD"] = 0,
}, },
[80] = [80] = {
{
["X"] = 39.14, ["X"] = 39.14,
["Y"] = 59.76, ["Y"] = 59.76,
["CD"] = 0 ["CD"] = 0,
}, },
[81] = [81] = {
{
["X"] = 39.01, ["X"] = 39.01,
["Y"] = 58.93, ["Y"] = 58.93,
["CD"] = 0 ["CD"] = 0,
}, },
[82] = [82] = {
{
["X"] = 38.69, ["X"] = 38.69,
["Y"] = 58.31, ["Y"] = 58.31,
["CD"] = 0 ["CD"] = 0,
}, },
[83] = [83] = {
{
["X"] = 38.55, ["X"] = 38.55,
["Y"] = 57.23, ["Y"] = 57.23,
["CD"] = 0 ["CD"] = 0,
}, },
[84] = [84] = {
{
["X"] = 36.59, ["X"] = 36.59,
["Y"] = 56.72, ["Y"] = 56.72,
["CD"] = 0 ["CD"] = 0,
}, },
[85] = [85] = {
{
["X"] = 34.3, ["X"] = 34.3,
["Y"] = 55.25, ["Y"] = 55.25,
["CD"] = 0 ["CD"] = 0,
}, },
[86] = [86] = {
{
["X"] = 26.1, ["X"] = 26.1,
["Y"] = 14.77, ["Y"] = 14.77,
["CD"] = 0 ["CD"] = 0,
}, },
[87] = [87] = {
{
["X"] = 45.95, ["X"] = 45.95,
["Y"] = 29.55, ["Y"] = 29.55,
["CD"] = 0 ["CD"] = 0,
} },
} }
aura_env.cooldown = 600 aura_env.cooldown = 600
aura_env.wipeDistance = 20 aura_env.wipeDistance = 20
aura_env.angle = 0 aura_env.angle = 0
aura_env.hyp = 0 aura_env.hyp = 0
aura_env.GetClosestHerb = function() aura_env.GetClosestHerb = function()
aura_env.minID = aura_env.minID = {
{ ["X"] = 0,
["X"] = 0, ["Y"] = 0,
["Y"] = 0, ["D"] = 1000,
["D"] = 1000, ["ID"] = 0,
["ID"] = 0 }
} local pX = GetPlayerMapPosition("player") or 0
local pX = GetPlayerMapPosition("player") or 0 local pY = select(2, GetPlayerMapPosition("player")) or 0
local pY = select(2, GetPlayerMapPosition("player")) or 0 pX, pY = pX * 100, pY * 100
pX, pY = pX * 100, pY * 100 for k, v in ipairs(aura_env.herbs) do
for k,v in ipairs(aura_env.herbs) do local hX, hY, cd = aura_env.herbs[k]["X"], aura_env.herbs[k]["Y"], aura_env.herbs[k]["CD"]
local hX, hY, cd = aura_env.herbs[k]["X"], aura_env.herbs[k]["Y"], aura_env.herbs[k]["CD"] if cd == 0 then
if cd == 0 then local X, Y = pX - hX, pY - hY
local X, Y = pX - hX, pY - hY local hyp = math.sqrt((math.abs(X ^ 2)) + (math.abs(Y ^ 2)))
local hyp = math.sqrt((math.abs(X^2)) + (math.abs(Y^2))) if hyp < aura_env.minID["D"] then
if hyp < aura_env.minID["D"] then aura_env.minID["X"] = hX
aura_env.minID["X"] = hX aura_env.minID["Y"] = hY
aura_env.minID["Y"] = hY aura_env.minID["D"] = hyp
aura_env.minID["D"] = hyp aura_env.minID["ID"] = k
aura_env.minID["ID"] = k end
end end
end end
end return aura_env.minID["ID"]
return aura_env.minID["ID"]
end end

View File

@@ -1,513 +1,431 @@
aura_env.herbs = aura_env.herbs = {
{ [1] = {
[1] = ["X"] = 29.47,
{ ["Y"] = 31.25,
["X"] = 29.47, ["CD"] = 0,
["Y"] = 31.25, },
["CD"] = 0 [2] = {
}, ["X"] = 28.15,
[2] = ["Y"] = 37.03,
{ ["CD"] = 0,
["X"] = 28.15, },
["Y"] = 37.03, [3] = {
["CD"] = 0 ["X"] = 26.89,
}, ["Y"] = 35.94,
[3] = ["CD"] = 0,
{ },
["X"] = 26.89, [4] = {
["Y"] = 35.94, ["X"] = 26.1,
["CD"] = 0 ["Y"] = 38.55,
}, ["CD"] = 0,
[4] = },
{ [5] = {
["X"] = 26.1, ["X"] = 24.92,
["Y"] = 38.55, ["Y"] = 42.79,
["CD"] = 0 ["CD"] = 0,
}, },
[5] = [6] = {
{ ["X"] = 24.22,
["X"] = 24.92, ["Y"] = 45.41,
["Y"] = 42.79, ["CD"] = 0,
["CD"] = 0 },
}, [7] = {
[6] = ["X"] = 23.88,
{ ["Y"] = 48.95,
["X"] = 24.22, ["CD"] = 0,
["Y"] = 45.41, },
["CD"] = 0 [8] = {
}, ["X"] = 25.79,
[7] = ["Y"] = 49.81,
{ ["CD"] = 0,
["X"] = 23.88, },
["Y"] = 48.95, [9] = {
["CD"] = 0 ["X"] = 26.82,
}, ["Y"] = 46.94,
[8] = ["CD"] = 0,
{ },
["X"] = 25.79, [10] = {
["Y"] = 49.81, ["X"] = 31.6,
["CD"] = 0 ["Y"] = 49.24,
}, ["CD"] = 0,
[9] = },
{ [11] = {
["X"] = 26.82, ["X"] = 33.02,
["Y"] = 46.94, ["Y"] = 46.44,
["CD"] = 0 ["CD"] = 0,
}, },
[10] = [12] = {
{ ["X"] = 28.44,
["X"] = 31.6, ["Y"] = 43.1,
["Y"] = 49.24, ["CD"] = 0,
["CD"] = 0 },
}, [13] = {
[11] = ["X"] = 23.55,
{ ["Y"] = 48.35,
["X"] = 33.02, ["CD"] = 0,
["Y"] = 46.44, },
["CD"] = 0 [14] = {
}, ["X"] = 20.43,
[12] = ["Y"] = 52.82,
{ ["CD"] = 0,
["X"] = 28.44, },
["Y"] = 43.1, [15] = {
["CD"] = 0 ["X"] = 25.81,
}, ["Y"] = 52.62,
[13] = ["CD"] = 0,
{ },
["X"] = 23.55, [16] = {
["Y"] = 48.35, ["X"] = 26.13,
["CD"] = 0 ["Y"] = 55.42,
}, ["CD"] = 0,
[14] = },
{ [17] = {
["X"] = 20.43, ["X"] = 26.22,
["Y"] = 52.82, ["Y"] = 53.16,
["CD"] = 0 ["CD"] = 0,
}, },
[15] = [18] = {
{ ["X"] = 24.67,
["X"] = 25.81, ["Y"] = 51.58,
["Y"] = 52.62, ["CD"] = 0,
["CD"] = 0 },
}, [19] = {
[16] = ["X"] = 24.61,
{ ["Y"] = 47.73,
["X"] = 26.13, ["CD"] = 0,
["Y"] = 55.42, },
["CD"] = 0 [20] = {
}, ["X"] = 26.03,
[17] = ["Y"] = 47.65,
{ ["CD"] = 0,
["X"] = 26.22, },
["Y"] = 53.16, [21] = {
["CD"] = 0 ["X"] = 27.94,
}, ["Y"] = 47.19,
[18] = ["CD"] = 0,
{ },
["X"] = 24.67, [22] = {
["Y"] = 51.58, ["X"] = 27.39,
["CD"] = 0 ["Y"] = 44.65,
}, ["CD"] = 0,
[19] = },
{ [23] = {
["X"] = 24.61, ["X"] = 32.73,
["Y"] = 47.73, ["Y"] = 43.41,
["CD"] = 0 ["CD"] = 0,
}, },
[20] = [24] = {
{ ["X"] = 31.98,
["X"] = 26.03, ["Y"] = 47.64,
["Y"] = 47.65, ["CD"] = 0,
["CD"] = 0 },
}, [25] = {
[21] = ["X"] = 32.51,
{ ["Y"] = 38.82,
["X"] = 27.94, ["CD"] = 0,
["Y"] = 47.19, },
["CD"] = 0 [26] = {
}, ["X"] = 31.03,
[22] = ["Y"] = 38.81,
{ ["CD"] = 0,
["X"] = 27.39, },
["Y"] = 44.65, [27] = {
["CD"] = 0 ["X"] = 30.59,
}, ["Y"] = 39.67,
[23] = ["CD"] = 0,
{ },
["X"] = 32.73, [28] = {
["Y"] = 43.41, ["X"] = 30.03,
["CD"] = 0 ["Y"] = 40.09,
}, ["CD"] = 0,
[24] = },
{ [29] = {
["X"] = 31.98, ["X"] = 29.63,
["Y"] = 47.64, ["Y"] = 41.35,
["CD"] = 0 ["CD"] = 0,
}, },
[25] = [30] = {
{ ["X"] = 28.81,
["X"] = 32.51, ["Y"] = 43.12,
["Y"] = 38.82, ["CD"] = 0,
["CD"] = 0 },
}, [31] = {
[26] = ["X"] = 30.08,
{ ["Y"] = 45.64,
["X"] = 31.03, ["CD"] = 0,
["Y"] = 38.81, },
["CD"] = 0 [32] = {
}, ["X"] = 30.28,
[27] = ["Y"] = 48.27,
{ ["CD"] = 0,
["X"] = 30.59, },
["Y"] = 39.67, [33] = {
["CD"] = 0 ["X"] = 29.93,
}, ["Y"] = 47.4,
[28] = ["CD"] = 0,
{ },
["X"] = 30.03, [34] = {
["Y"] = 40.09, ["X"] = 28.94,
["CD"] = 0 ["Y"] = 47.14,
}, ["CD"] = 0,
[29] = },
{ [35] = {
["X"] = 29.63, ["X"] = 27.59,
["Y"] = 41.35, ["Y"] = 45.29,
["CD"] = 0 ["CD"] = 0,
}, },
[30] = [36] = {
{ ["X"] = 30.01,
["X"] = 28.81, ["Y"] = 44.34,
["Y"] = 43.12, ["CD"] = 0,
["CD"] = 0 },
}, [37] = {
[31] = ["X"] = 32.22,
{ ["Y"] = 39.24,
["X"] = 30.08, ["CD"] = 0,
["Y"] = 45.64, },
["CD"] = 0 [38] = {
}, ["X"] = 31.38,
[32] = ["Y"] = 38.07,
{ ["CD"] = 0,
["X"] = 30.28, },
["Y"] = 48.27, [39] = {
["CD"] = 0 ["X"] = 32.23,
}, ["Y"] = 36.98,
[33] = ["CD"] = 0,
{ },
["X"] = 29.93, [40] = {
["Y"] = 47.4, ["X"] = 31.55,
["CD"] = 0 ["Y"] = 31.57,
}, ["CD"] = 0,
[34] = },
{ [41] = {
["X"] = 28.94, ["X"] = 30.92,
["Y"] = 47.14, ["Y"] = 34.67,
["CD"] = 0 ["CD"] = 0,
}, },
[35] = [42] = {
{ ["X"] = 47.19,
["X"] = 27.59, ["Y"] = 39.83,
["Y"] = 45.29, ["CD"] = 0,
["CD"] = 0 },
}, [43] = {
[36] = ["X"] = 50.82,
{ ["Y"] = 40.62,
["X"] = 30.01, ["CD"] = 0,
["Y"] = 44.34, },
["CD"] = 0 [44] = {
}, ["X"] = 48.38,
[37] = ["Y"] = 34.1,
{ ["CD"] = 0,
["X"] = 32.22, },
["Y"] = 39.24, [45] = {
["CD"] = 0 ["X"] = 45.59,
}, ["Y"] = 31.09,
[38] = ["CD"] = 0,
{ },
["X"] = 31.38, [46] = {
["Y"] = 38.07, ["X"] = 43.61,
["CD"] = 0 ["Y"] = 35.49,
}, ["CD"] = 0,
[39] = },
{ [47] = {
["X"] = 32.23, ["X"] = 35.64,
["Y"] = 36.98, ["Y"] = 41.64,
["CD"] = 0 ["CD"] = 0,
}, },
[40] = [48] = {
{ ["X"] = 34.44,
["X"] = 31.55, ["Y"] = 43,
["Y"] = 31.57, ["CD"] = 0,
["CD"] = 0 },
}, [49] = {
[41] = ["X"] = 47.66,
{ ["Y"] = 49.41,
["X"] = 30.92, ["CD"] = 0,
["Y"] = 34.67, },
["CD"] = 0 [50] = {
}, ["X"] = 48.82,
[42] = ["Y"] = 47.86,
{ ["CD"] = 0,
["X"] = 47.19, },
["Y"] = 39.83, [51] = {
["CD"] = 0 ["X"] = 44.12,
}, ["Y"] = 47.05,
[43] = ["CD"] = 0,
{ },
["X"] = 50.82, [52] = {
["Y"] = 40.62, ["X"] = 43.09,
["CD"] = 0 ["Y"] = 48.75,
}, ["CD"] = 0,
[44] = },
{ [53] = {
["X"] = 48.38, ["X"] = 40.23,
["Y"] = 34.1, ["Y"] = 47.62,
["CD"] = 0 ["CD"] = 0,
}, },
[45] = [54] = {
{ ["X"] = 37.28,
["X"] = 45.59, ["Y"] = 50.18,
["Y"] = 31.09, ["CD"] = 0,
["CD"] = 0 },
}, [55] = {
[46] = ["X"] = 36.33,
{ ["Y"] = 56.29,
["X"] = 43.61, ["CD"] = 0,
["Y"] = 35.49, },
["CD"] = 0 [56] = {
}, ["X"] = 38.4,
[47] = ["Y"] = 56.36,
{ ["CD"] = 0,
["X"] = 35.64, },
["Y"] = 41.64, [57] = {
["CD"] = 0 ["X"] = 40.05,
}, ["Y"] = 56.12,
[48] = ["CD"] = 0,
{ },
["X"] = 34.44, [58] = {
["Y"] = 43, ["X"] = 39.51,
["CD"] = 0 ["Y"] = 57.12,
}, ["CD"] = 0,
[49] = },
{ [59] = {
["X"] = 47.66, ["X"] = 39.43,
["Y"] = 49.41, ["Y"] = 54.75,
["CD"] = 0 ["CD"] = 0,
}, },
[50] = [60] = {
{ ["X"] = 38.8,
["X"] = 48.82, ["Y"] = 51.65,
["Y"] = 47.86, ["CD"] = 0,
["CD"] = 0 },
}, [61] = {
[51] = ["X"] = 38.74,
{ ["Y"] = 53.13,
["X"] = 44.12, ["CD"] = 0,
["Y"] = 47.05, },
["CD"] = 0 [62] = {
}, ["X"] = 38.11,
[52] = ["Y"] = 53.06,
{ ["CD"] = 0,
["X"] = 43.09, },
["Y"] = 48.75, [63] = {
["CD"] = 0 ["X"] = 36.71,
}, ["Y"] = 53.46,
[53] = ["CD"] = 0,
{ },
["X"] = 40.23, [64] = {
["Y"] = 47.62, ["X"] = 36.17,
["CD"] = 0 ["Y"] = 53.81,
}, ["CD"] = 0,
[54] = },
{ [65] = {
["X"] = 37.28, ["X"] = 34.25,
["Y"] = 50.18, ["Y"] = 55.15,
["CD"] = 0 ["CD"] = 0,
}, },
[55] = [66] = {
{ ["X"] = 35.35,
["X"] = 36.33, ["Y"] = 54.5,
["Y"] = 56.29, ["CD"] = 0,
["CD"] = 0 },
}, [67] = {
[56] = ["X"] = 35.27,
{ ["Y"] = 52.65,
["X"] = 38.4, ["CD"] = 0,
["Y"] = 56.36, },
["CD"] = 0 [68] = {
}, ["X"] = 32.47,
[57] = ["Y"] = 45.01,
{ ["CD"] = 0,
["X"] = 40.05, },
["Y"] = 56.12, [69] = {
["CD"] = 0 ["X"] = 34.72,
}, ["Y"] = 47.72,
[58] = ["CD"] = 0,
{ },
["X"] = 39.51, [70] = {
["Y"] = 57.12, ["X"] = 36.55,
["CD"] = 0 ["Y"] = 51.57,
}, ["CD"] = 0,
[59] = },
{ [71] = {
["X"] = 39.43, ["X"] = 70.42,
["Y"] = 54.75, ["Y"] = 64.46,
["CD"] = 0 ["CD"] = 0,
}, },
[60] = [72] = {
{ ["X"] = 64.84,
["X"] = 38.8, ["Y"] = 55.38,
["Y"] = 51.65, ["CD"] = 0,
["CD"] = 0 },
}, [73] = {
[61] = ["X"] = 44.86,
{ ["Y"] = 48.82,
["X"] = 38.74, ["CD"] = 0,
["Y"] = 53.13, },
["CD"] = 0 [74] = {
}, ["X"] = 29.45,
[62] = ["Y"] = 77.91,
{ ["CD"] = 0,
["X"] = 38.11, },
["Y"] = 53.06, [75] = {
["CD"] = 0 ["X"] = 29.8,
}, ["Y"] = 70.65,
[63] = ["CD"] = 0,
{ },
["X"] = 36.71, [76] = {
["Y"] = 53.46, ["X"] = 44.01,
["CD"] = 0 ["Y"] = 41.2,
}, ["CD"] = 0,
[64] = },
{ [77] = {
["X"] = 36.17, ["X"] = 41.54,
["Y"] = 53.81, ["Y"] = 40.12,
["CD"] = 0 ["CD"] = 0,
}, },
[65] = [78] = {
{ ["X"] = 20.2,
["X"] = 34.25, ["Y"] = 53.96,
["Y"] = 55.15, ["CD"] = 0,
["CD"] = 0 },
}, [79] = {
[66] = ["X"] = 31.44,
{ ["Y"] = 29.22,
["X"] = 35.35, ["CD"] = 0,
["Y"] = 54.5, },
["CD"] = 0 [80] = {
}, ["X"] = 15.67,
[67] = ["Y"] = 37.13,
{ ["CD"] = 0,
["X"] = 35.27, },
["Y"] = 52.65,
["CD"] = 0
},
[68] =
{
["X"] = 32.47,
["Y"] = 45.01,
["CD"] = 0
},
[69] =
{
["X"] = 34.72,
["Y"] = 47.72,
["CD"] = 0
},
[70] =
{
["X"] = 36.55,
["Y"] = 51.57,
["CD"] = 0
},
[71] =
{
["X"] = 70.42,
["Y"] = 64.46,
["CD"] = 0
},
[72] =
{
["X"] = 64.84,
["Y"] = 55.38,
["CD"] = 0
},
[73] =
{
["X"] = 44.86,
["Y"] = 48.82,
["CD"] = 0
},
[74] =
{
["X"] = 29.45,
["Y"] = 77.91,
["CD"] = 0
},
[75] =
{
["X"] = 29.8,
["Y"] = 70.65,
["CD"] = 0
},
[76] =
{
["X"] = 44.01,
["Y"] = 41.2,
["CD"] = 0
},
[77] =
{
["X"] = 41.54,
["Y"] = 40.12,
["CD"] = 0
},
[78] =
{
["X"] = 20.2,
["Y"] = 53.96,
["CD"] = 0
},
[79] =
{
["X"] = 31.44,
["Y"] = 29.22,
["CD"] = 0
},
[80] =
{
["X"] = 15.67,
["Y"] = 37.13,
["CD"] = 0
}
} }
aura_env.cooldown = 600 aura_env.cooldown = 600
aura_env.wipeDistance = 50 aura_env.wipeDistance = 50
aura_env.angle = 0 aura_env.angle = 0
aura_env.hyp = 0 aura_env.hyp = 0
aura_env.GetClosestHerb = function() aura_env.GetClosestHerb = function()
aura_env.minID = aura_env.minID = {
{ ["X"] = 0,
["X"] = 0, ["Y"] = 0,
["Y"] = 0, ["D"] = 1000,
["D"] = 1000, ["ID"] = 0,
["ID"] = 0 }
} local pX = GetPlayerMapPosition("player") or 0
local pX = GetPlayerMapPosition("player") or 0 local pY = select(2, GetPlayerMapPosition("player")) or 0
local pY = select(2, GetPlayerMapPosition("player")) or 0 pX, pY = pX * 100, pY * 100
pX, pY = pX * 100, pY * 100 for k, v in ipairs(aura_env.herbs) do
for k,v in ipairs(aura_env.herbs) do local hX, hY, cd = aura_env.herbs[k]["X"], aura_env.herbs[k]["Y"], aura_env.herbs[k]["CD"]
local hX, hY, cd = aura_env.herbs[k]["X"], aura_env.herbs[k]["Y"], aura_env.herbs[k]["CD"] if cd == 0 then
if cd == 0 then local X, Y = pX - hX, pY - hY
local X, Y = pX - hX, pY - hY local hyp = math.sqrt((math.abs(X ^ 2)) + (math.abs(Y ^ 2)))
local hyp = math.sqrt((math.abs(X^2)) + (math.abs(Y^2))) if hyp < aura_env.minID["D"] then
if hyp < aura_env.minID["D"] then aura_env.minID["X"] = hX
aura_env.minID["X"] = hX aura_env.minID["Y"] = hY
aura_env.minID["Y"] = hY aura_env.minID["D"] = hyp
aura_env.minID["D"] = hyp aura_env.minID["ID"] = k
aura_env.minID["ID"] = k end
end end
end end
end return aura_env.minID["ID"]
return aura_env.minID["ID"]
end end

View File

@@ -1,423 +1,356 @@
aura_env.herbs = aura_env.herbs = {
{ [1] = {
[1] = ["X"] = 20.97,
{ ["Y"] = 15.47,
["X"] = 20.97, ["CD"] = 0,
["Y"] = 15.47,
["CD"] = 0
}, },
[2] = [2] = {
{ ["X"] = 27.52,
["X"] = 27.52, ["Y"] = 9.17,
["Y"] = 9.17, ["CD"] = 0,
["CD"] = 0
}, },
[3] = [3] = {
{ ["X"] = 25.93,
["X"] = 25.93, ["Y"] = 25.58,
["Y"] = 25.58, ["CD"] = 0,
["CD"] = 0
}, },
[4] = [4] = {
{ ["X"] = 34.07,
["X"] = 34.07, ["Y"] = 50.83,
["Y"] = 50.83, ["CD"] = 0,
["CD"] = 0
}, },
[5] = [5] = {
{ ["X"] = 37.23,
["X"] = 37.23, ["Y"] = 54.85,
["Y"] = 54.85, ["CD"] = 0,
["CD"] = 0
}, },
[6] = [6] = {
{ ["X"] = 34.77,
["X"] = 34.77, ["Y"] = 58.4,
["Y"] = 58.4, ["CD"] = 0,
["CD"] = 0
}, },
[7] = [7] = {
{ ["X"] = 39.56,
["X"] = 39.56, ["Y"] = 79.48,
["Y"] = 79.48, ["CD"] = 0,
["CD"] = 0
}, },
[8] = [8] = {
{ ["X"] = 66.46,
["X"] = 66.46, ["Y"] = 57.51,
["Y"] = 57.51, ["CD"] = 0,
["CD"] = 0
}, },
[9] = [9] = {
{ ["X"] = 66.74,
["X"] = 66.74, ["Y"] = 66.02,
["Y"] = 66.02, ["CD"] = 0,
["CD"] = 0
}, },
[10] = [10] = {
{ ["X"] = 71.94,
["X"] = 71.94, ["Y"] = 68.81,
["Y"] = 68.81, ["CD"] = 0,
["CD"] = 0
}, },
[11] = [11] = {
{ ["X"] = 69.51,
["X"] = 69.51, ["Y"] = 67.83,
["Y"] = 67.83, ["CD"] = 0,
["CD"] = 0
}, },
[12] = [12] = {
{ ["X"] = 69.31,
["X"] = 69.31, ["Y"] = 50.72,
["Y"] = 50.72, ["CD"] = 0,
["CD"] = 0
}, },
[13] = [13] = {
{ ["X"] = 63.31,
["X"] = 63.31, ["Y"] = 53.33,
["Y"] = 53.33, ["CD"] = 0,
["CD"] = 0
}, },
[14] = [14] = {
{ ["X"] = 63.96,
["X"] = 63.96, ["Y"] = 50.46,
["Y"] = 50.46, ["CD"] = 0,
["CD"] = 0
}, },
[15] = [15] = {
{ ["X"] = 65.37,
["X"] = 65.37, ["Y"] = 43.82,
["Y"] = 43.82, ["CD"] = 0,
["CD"] = 0
}, },
[16] = [16] = {
{ ["X"] = 63.15,
["X"] = 63.15, ["Y"] = 35.17,
["Y"] = 35.17, ["CD"] = 0,
["CD"] = 0
}, },
[17] = [17] = {
{ ["X"] = 60.59,
["X"] = 60.59, ["Y"] = 44.44,
["Y"] = 44.44, ["CD"] = 0,
["CD"] = 0
}, },
[18] = [18] = {
{ ["X"] = 35.55,
["X"] = 35.55, ["Y"] = 61.86,
["Y"] = 61.86, ["CD"] = 0,
["CD"] = 0
}, },
[19] = [19] = {
{ ["X"] = 40.1,
["X"] = 40.1, ["Y"] = 53.5,
["Y"] = 53.5, ["CD"] = 0,
["CD"] = 0
}, },
[20] = [20] = {
{ ["X"] = 47.46,
["X"] = 47.46, ["Y"] = 47.36,
["Y"] = 47.36, ["CD"] = 0,
["CD"] = 0
}, },
[21] = [21] = {
{ ["X"] = 49.48,
["X"] = 49.48, ["Y"] = 39.04,
["Y"] = 39.04, ["CD"] = 0,
["CD"] = 0
}, },
[22] = [22] = {
{ ["X"] = 35.79,
["X"] = 35.79, ["Y"] = 42.74,
["Y"] = 42.74, ["CD"] = 0,
["CD"] = 0
}, },
[23] = [23] = {
{ ["X"] = 33.35,
["X"] = 33.35, ["Y"] = 45.99,
["Y"] = 45.99, ["CD"] = 0,
["CD"] = 0
}, },
[24] = [24] = {
{ ["X"] = 30.25,
["X"] = 30.25, ["Y"] = 43.1,
["Y"] = 43.1, ["CD"] = 0,
["CD"] = 0
}, },
[25] = [25] = {
{ ["X"] = 28.76,
["X"] = 28.76, ["Y"] = 48.41,
["Y"] = 48.41, ["CD"] = 0,
["CD"] = 0
}, },
[26] = [26] = {
{ ["X"] = 30.18,
["X"] = 30.18, ["Y"] = 65.31,
["Y"] = 65.31, ["CD"] = 0,
["CD"] = 0
}, },
[27] = [27] = {
{ ["X"] = 32.64,
["X"] = 32.64, ["Y"] = 74.92,
["Y"] = 74.92, ["CD"] = 0,
["CD"] = 0
}, },
[28] = [28] = {
{ ["X"] = 35.41,
["X"] = 35.41, ["Y"] = 80.33,
["Y"] = 80.33, ["CD"] = 0,
["CD"] = 0
}, },
[29] = [29] = {
{ ["X"] = 32.08,
["X"] = 32.08, ["Y"] = 81.08,
["Y"] = 81.08, ["CD"] = 0,
["CD"] = 0
}, },
[30] = [30] = {
{ ["X"] = 30.03,
["X"] = 30.03, ["Y"] = 82.65,
["Y"] = 82.65, ["CD"] = 0,
["CD"] = 0
}, },
[31] = [31] = {
{ ["X"] = 27.52,
["X"] = 27.52, ["Y"] = 67.32,
["Y"] = 67.32, ["CD"] = 0,
["CD"] = 0
}, },
[32] = [32] = {
{ ["X"] = 26.24,
["X"] = 26.24, ["Y"] = 69.06,
["Y"] = 69.06, ["CD"] = 0,
["CD"] = 0
}, },
[33] = [33] = {
{ ["X"] = 24.97,
["X"] = 24.97, ["Y"] = 61.8,
["Y"] = 61.8, ["CD"] = 0,
["CD"] = 0
}, },
[34] = [34] = {
{ ["X"] = 25.91,
["X"] = 25.91, ["Y"] = 58.23,
["Y"] = 58.23, ["CD"] = 0,
["CD"] = 0
}, },
[35] = [35] = {
{ ["X"] = 34.69,
["X"] = 34.69, ["Y"] = 39.51,
["Y"] = 39.51, ["CD"] = 0,
["CD"] = 0
}, },
[36] = [36] = {
{ ["X"] = 37.45,
["X"] = 37.45, ["Y"] = 38.69,
["Y"] = 38.69, ["CD"] = 0,
["CD"] = 0
}, },
[37] = [37] = {
{ ["X"] = 45.96,
["X"] = 45.96, ["Y"] = 36.33,
["Y"] = 36.33, ["CD"] = 0,
["CD"] = 0
}, },
[38] = [38] = {
{ ["X"] = 46.54,
["X"] = 46.54, ["Y"] = 33.81,
["Y"] = 33.81, ["CD"] = 0,
["CD"] = 0
}, },
[39] = [39] = {
{ ["X"] = 37.6,
["X"] = 37.6, ["Y"] = 31.35,
["Y"] = 31.35, ["CD"] = 0,
["CD"] = 0
}, },
[40] = [40] = {
{ ["X"] = 24.73,
["X"] = 24.73, ["Y"] = 54.01,
["Y"] = 54.01, ["CD"] = 0,
["CD"] = 0
}, },
[41] = [41] = {
{ ["X"] = 21.68,
["X"] = 21.68, ["Y"] = 47.55,
["Y"] = 47.55, ["CD"] = 0,
["CD"] = 0
}, },
[42] = [42] = {
{ ["X"] = 23.58,
["X"] = 23.58, ["Y"] = 50.81,
["Y"] = 50.81, ["CD"] = 0,
["CD"] = 0
}, },
[43] = [43] = {
{ ["X"] = 25.01,
["X"] = 25.01, ["Y"] = 35.96,
["Y"] = 35.96, ["CD"] = 0,
["CD"] = 0
}, },
[44] = [44] = {
{ ["X"] = 25.25,
["X"] = 25.25, ["Y"] = 37.61,
["Y"] = 37.61, ["CD"] = 0,
["CD"] = 0
}, },
[45] = [45] = {
{ ["X"] = 41.53,
["X"] = 41.53, ["Y"] = 17.47,
["Y"] = 17.47, ["CD"] = 0,
["CD"] = 0
}, },
[46] = [46] = {
{ ["X"] = 27.84,
["X"] = 27.84, ["Y"] = 15.94,
["Y"] = 15.94, ["CD"] = 0,
["CD"] = 0
}, },
[47] = [47] = {
{ ["X"] = 44.1,
["X"] = 44.1, ["Y"] = 24.69,
["Y"] = 24.69, ["CD"] = 0,
["CD"] = 0
}, },
[48] = [48] = {
{ ["X"] = 41.45,
["X"] = 41.45, ["Y"] = 24.26,
["Y"] = 24.26, ["CD"] = 0,
["CD"] = 0
}, },
[49] = [49] = {
{ ["X"] = 40.28,
["X"] = 40.28, ["Y"] = 27.75,
["Y"] = 27.75, ["CD"] = 0,
["CD"] = 0
}, },
[50] = [50] = {
{ ["X"] = 37.57,
["X"] = 37.57, ["Y"] = 27.05,
["Y"] = 27.05, ["CD"] = 0,
["CD"] = 0
}, },
[51] = [51] = {
{ ["X"] = 33.71,
["X"] = 33.71, ["Y"] = 31.04,
["Y"] = 31.04, ["CD"] = 0,
["CD"] = 0
}, },
[52] = [52] = {
{ ["X"] = 28.85,
["X"] = 28.85, ["Y"] = 29.61,
["Y"] = 29.61, ["CD"] = 0,
["CD"] = 0
}, },
[53] = [53] = {
{ ["X"] = 27.2,
["X"] = 27.2, ["Y"] = 29.85,
["Y"] = 29.85, ["CD"] = 0,
["CD"] = 0
}, },
[54] = [54] = {
{ ["X"] = 23.31,
["X"] = 23.31, ["Y"] = 34.44,
["Y"] = 34.44, ["CD"] = 0,
["CD"] = 0
}, },
[55] = [55] = {
{ ["X"] = 15.86,
["X"] = 15.86, ["Y"] = 43.89,
["Y"] = 43.89, ["CD"] = 0,
["CD"] = 0
}, },
[56] = [56] = {
{ ["X"] = 16.17,
["X"] = 16.17, ["Y"] = 39.56,
["Y"] = 39.56, ["CD"] = 0,
["CD"] = 0
}, },
[57] = [57] = {
{ ["X"] = 16.88,
["X"] = 16.88, ["Y"] = 28.87,
["Y"] = 28.87, ["CD"] = 0,
["CD"] = 0
}, },
[58] = [58] = {
{ ["X"] = 19.56,
["X"] = 19.56, ["Y"] = 18.08,
["Y"] = 18.08, ["CD"] = 0,
["CD"] = 0
}, },
[59] = [59] = {
{ ["X"] = 19.99,
["X"] = 19.99, ["Y"] = 18.12,
["Y"] = 18.12, ["CD"] = 0,
["CD"] = 0
}, },
[60] = [60] = {
{ ["X"] = 49.54,
["X"] = 49.54, ["Y"] = 43.54,
["Y"] = 43.54, ["CD"] = 0,
["CD"] = 0
}, },
[61] = [61] = {
{ ["X"] = 55.47,
["X"] = 55.47, ["Y"] = 40.72,
["Y"] = 40.72, ["CD"] = 0,
["CD"] = 0
}, },
[62] = [62] = {
{ ["X"] = 57.64,
["X"] = 57.64, ["Y"] = 37.85,
["Y"] = 37.85, ["CD"] = 0,
["CD"] = 0
}, },
[63] = [63] = {
{ ["X"] = 62.48,
["X"] = 62.48, ["Y"] = 57.85,
["Y"] = 57.85, ["CD"] = 0,
["CD"] = 0
}, },
[64] = [64] = {
{ ["X"] = 63.78,
["X"] = 63.78, ["Y"] = 60.52,
["Y"] = 60.52, ["CD"] = 0,
["CD"] = 0 },
[65] = {
["X"] = 50.61,
["Y"] = 60.74,
["CD"] = 0,
}, },
[65] =
{
["X"] = 50.61,
["Y"] = 60.74,
["CD"] = 0
}
} }
aura_env.cooldown = 600 aura_env.cooldown = 600
aura_env.wipeDistance = 50 aura_env.wipeDistance = 50
aura_env.angle = 0 aura_env.angle = 0
aura_env.hyp = 0 aura_env.hyp = 0
aura_env.GetClosestHerb = function() aura_env.GetClosestHerb = function()
aura_env.minID = aura_env.minID = {
{ ["X"] = 0,
["X"] = 0, ["Y"] = 0,
["Y"] = 0, ["D"] = 1000,
["D"] = 1000, ["ID"] = 0,
["ID"] = 0 }
} local pX = GetPlayerMapPosition("player") or 0
local pX = GetPlayerMapPosition("player") or 0 local pY = select(2, GetPlayerMapPosition("player")) or 0
local pY = select(2, GetPlayerMapPosition("player")) or 0 pX, pY = pX * 100, pY * 100
pX, pY = pX * 100, pY * 100 for k, v in ipairs(aura_env.herbs) do
for k,v in ipairs(aura_env.herbs) do local hX, hY, cd = aura_env.herbs[k]["X"], aura_env.herbs[k]["Y"], aura_env.herbs[k]["CD"]
local hX, hY, cd = aura_env.herbs[k]["X"], aura_env.herbs[k]["Y"], aura_env.herbs[k]["CD"] if cd == 0 then
if cd == 0 then local X, Y = pX - hX, pY - hY
local X, Y = pX - hX, pY - hY local hyp = math.sqrt((math.abs(X ^ 2)) + (math.abs(Y ^ 2)))
local hyp = math.sqrt((math.abs(X^2)) + (math.abs(Y^2))) if hyp < aura_env.minID["D"] then
if hyp < aura_env.minID["D"] then aura_env.minID["X"] = hX
aura_env.minID["X"] = hX aura_env.minID["Y"] = hY
aura_env.minID["Y"] = hY aura_env.minID["D"] = hyp
aura_env.minID["D"] = hyp aura_env.minID["ID"] = k
aura_env.minID["ID"] = k end
end end
end end
end return aura_env.minID["ID"]
return aura_env.minID["ID"]
end end

View File

@@ -1,453 +1,381 @@
aura_env.herbs = aura_env.herbs = {
{ [1] = {
[1] = ["X"] = 64.49,
{ ["Y"] = 56.55,
["X"] = 64.49, ["CD"] = 0,
["Y"] = 56.55, },
["CD"] = 0 [2] = {
}, ["X"] = 63.79,
[2] = ["Y"] = 54.73,
{ ["CD"] = 0,
["X"] = 63.79, },
["Y"] = 54.73, [3] = {
["CD"] = 0 ["X"] = 61.99,
}, ["Y"] = 53.82,
[3] = ["CD"] = 0,
{ },
["X"] = 61.99, [4] = {
["Y"] = 53.82, ["X"] = 61.48,
["CD"] = 0 ["Y"] = 49.4,
}, ["CD"] = 0,
[4] = },
{ [5] = {
["X"] = 61.48, ["X"] = 61.46,
["Y"] = 49.4, ["Y"] = 47.17,
["CD"] = 0 ["CD"] = 0,
}, },
[5] = [6] = {
{ ["X"] = 59.23,
["X"] = 61.46, ["Y"] = 46.84,
["Y"] = 47.17, ["CD"] = 0,
["CD"] = 0 },
}, [7] = {
[6] = ["X"] = 56.86,
{ ["Y"] = 45.6,
["X"] = 59.23, ["CD"] = 0,
["Y"] = 46.84, },
["CD"] = 0 [8] = {
}, ["X"] = 55.78,
[7] = ["Y"] = 44.91,
{ ["CD"] = 0,
["X"] = 56.86, },
["Y"] = 45.6, [9] = {
["CD"] = 0 ["X"] = 55.06,
}, ["Y"] = 34.48,
[8] = ["CD"] = 0,
{ },
["X"] = 55.78, [10] = {
["Y"] = 44.91, ["X"] = 56.92,
["CD"] = 0 ["Y"] = 34.22,
}, ["CD"] = 0,
[9] = },
{ [11] = {
["X"] = 55.06, ["X"] = 59,
["Y"] = 34.48, ["Y"] = 34.83,
["CD"] = 0 ["CD"] = 0,
}, },
[10] = [12] = {
{ ["X"] = 60.2,
["X"] = 56.92, ["Y"] = 36.57,
["Y"] = 34.22, ["CD"] = 0,
["CD"] = 0 },
}, [13] = {
[11] = ["X"] = 61.85,
{ ["Y"] = 36.99,
["X"] = 59, ["CD"] = 0,
["Y"] = 34.83, },
["CD"] = 0 [14] = {
}, ["X"] = 64.38,
[12] = ["Y"] = 35.48,
{ ["CD"] = 0,
["X"] = 60.2, },
["Y"] = 36.57, [15] = {
["CD"] = 0 ["X"] = 66.81,
}, ["Y"] = 36.14,
[13] = ["CD"] = 0,
{ },
["X"] = 61.85, [16] = {
["Y"] = 36.99, ["X"] = 67.47,
["CD"] = 0 ["Y"] = 35.67,
}, ["CD"] = 0,
[14] = },
{ [17] = {
["X"] = 64.38, ["X"] = 69.55,
["Y"] = 35.48, ["Y"] = 37.38,
["CD"] = 0 ["CD"] = 0,
}, },
[15] = [18] = {
{ ["X"] = 69.25,
["X"] = 66.81, ["Y"] = 37.57,
["Y"] = 36.14, ["CD"] = 0,
["CD"] = 0 },
}, [19] = {
[16] = ["X"] = 68.77,
{ ["Y"] = 39.03,
["X"] = 67.47, ["CD"] = 0,
["Y"] = 35.67, },
["CD"] = 0 [20] = {
}, ["X"] = 70.23,
[17] = ["Y"] = 39.53,
{ ["CD"] = 0,
["X"] = 69.55, },
["Y"] = 37.38, [21] = {
["CD"] = 0 ["X"] = 72.53,
}, ["Y"] = 40.98,
[18] = ["CD"] = 0,
{ },
["X"] = 69.25, [22] = {
["Y"] = 37.57, ["X"] = 77.18,
["CD"] = 0 ["Y"] = 44.12,
}, ["CD"] = 0,
[19] = },
{ [23] = {
["X"] = 68.77, ["X"] = 77.7,
["Y"] = 39.03, ["Y"] = 50.51,
["CD"] = 0 ["CD"] = 0,
}, },
[20] = [24] = {
{ ["X"] = 77.21,
["X"] = 70.23, ["Y"] = 49.87,
["Y"] = 39.53, ["CD"] = 0,
["CD"] = 0 },
}, [25] = {
[21] = ["X"] = 77.8,
{ ["Y"] = 48.72,
["X"] = 72.53, ["CD"] = 0,
["Y"] = 40.98, },
["CD"] = 0 [26] = {
}, ["X"] = 77.04,
[22] = ["Y"] = 47.98,
{ ["CD"] = 0,
["X"] = 77.18, },
["Y"] = 44.12, [27] = {
["CD"] = 0 ["X"] = 74.84,
}, ["Y"] = 48.86,
[23] = ["CD"] = 0,
{ },
["X"] = 77.7, [28] = {
["Y"] = 50.51, ["X"] = 74.71,
["CD"] = 0 ["Y"] = 49.87,
}, ["CD"] = 0,
[24] = },
{ [29] = {
["X"] = 77.21, ["X"] = 77.44,
["Y"] = 49.87, ["Y"] = 51.67,
["CD"] = 0 ["CD"] = 0,
}, },
[25] = [30] = {
{ ["X"] = 78.28,
["X"] = 77.8, ["Y"] = 52.79,
["Y"] = 48.72, ["CD"] = 0,
["CD"] = 0 },
}, [31] = {
[26] = ["X"] = 76.61,
{ ["Y"] = 56.1,
["X"] = 77.04, ["CD"] = 0,
["Y"] = 47.98, },
["CD"] = 0 [32] = {
}, ["X"] = 78.15,
[27] = ["Y"] = 58.13,
{ ["CD"] = 0,
["X"] = 74.84, },
["Y"] = 48.86, [33] = {
["CD"] = 0 ["X"] = 77.88,
}, ["Y"] = 59.33,
[28] = ["CD"] = 0,
{ },
["X"] = 74.71, [34] = {
["Y"] = 49.87, ["X"] = 78.99,
["CD"] = 0 ["Y"] = 59.38,
}, ["CD"] = 0,
[29] = },
{ [35] = {
["X"] = 77.44, ["X"] = 78.7,
["Y"] = 51.67, ["Y"] = 61.8,
["CD"] = 0 ["CD"] = 0,
}, },
[30] = [36] = {
{ ["X"] = 80.81,
["X"] = 78.28, ["Y"] = 62.57,
["Y"] = 52.79, ["CD"] = 0,
["CD"] = 0 },
}, [37] = {
[31] = ["X"] = 80.67,
{ ["Y"] = 63.24,
["X"] = 76.61, ["CD"] = 0,
["Y"] = 56.1, },
["CD"] = 0 [38] = {
}, ["X"] = 81.77,
[32] = ["Y"] = 64.74,
{ ["CD"] = 0,
["X"] = 78.15, },
["Y"] = 58.13, [39] = {
["CD"] = 0 ["X"] = 81.61,
}, ["Y"] = 67.37,
[33] = ["CD"] = 0,
{ },
["X"] = 77.88, [40] = {
["Y"] = 59.33, ["X"] = 80.59,
["CD"] = 0 ["Y"] = 69.27,
}, ["CD"] = 0,
[34] = },
{ [41] = {
["X"] = 78.99, ["X"] = 54.85,
["Y"] = 59.38, ["Y"] = 78.82,
["CD"] = 0 ["CD"] = 0,
}, },
[35] = [42] = {
{ ["X"] = 54.64,
["X"] = 78.7, ["Y"] = 77.06,
["Y"] = 61.8, ["CD"] = 0,
["CD"] = 0 },
}, [43] = {
[36] = ["X"] = 54.11,
{ ["Y"] = 76.34,
["X"] = 80.81, ["CD"] = 0,
["Y"] = 62.57, },
["CD"] = 0 [44] = {
}, ["X"] = 52.14,
[37] = ["Y"] = 71.88,
{ ["CD"] = 0,
["X"] = 80.67, },
["Y"] = 63.24, [45] = {
["CD"] = 0 ["X"] = 49.89,
}, ["Y"] = 61.13,
[38] = ["CD"] = 0,
{ },
["X"] = 81.77, [46] = {
["Y"] = 64.74, ["X"] = 49.47,
["CD"] = 0 ["Y"] = 56.45,
}, ["CD"] = 0,
[39] = },
{ [47] = {
["X"] = 81.61, ["X"] = 49.33,
["Y"] = 67.37, ["Y"] = 52.48,
["CD"] = 0 ["CD"] = 0,
}, },
[40] = [48] = {
{ ["X"] = 49.79,
["X"] = 80.59, ["Y"] = 47.5,
["Y"] = 69.27, ["CD"] = 0,
["CD"] = 0 },
}, [49] = {
[41] = ["X"] = 78.74,
{ ["Y"] = 32.35,
["X"] = 54.85, ["CD"] = 0,
["Y"] = 78.82, },
["CD"] = 0 [50] = {
}, ["X"] = 76.86,
[42] = ["Y"] = 33.06,
{ ["CD"] = 0,
["X"] = 54.64, },
["Y"] = 77.06, [51] = {
["CD"] = 0 ["X"] = 74.67,
}, ["Y"] = 37.87,
[43] = ["CD"] = 0,
{ },
["X"] = 54.11, [52] = {
["Y"] = 76.34, ["X"] = 74.93,
["CD"] = 0 ["Y"] = 41.16,
}, ["CD"] = 0,
[44] = },
{ [53] = {
["X"] = 52.14, ["X"] = 70.73,
["Y"] = 71.88, ["Y"] = 43.54,
["CD"] = 0 ["CD"] = 0,
}, },
[45] = [54] = {
{ ["X"] = 70.35,
["X"] = 49.89, ["Y"] = 45.76,
["Y"] = 61.13, ["CD"] = 0,
["CD"] = 0 },
}, [55] = {
[46] = ["X"] = 37.66,
{ ["Y"] = 22.47,
["X"] = 49.47, ["CD"] = 0,
["Y"] = 56.45, },
["CD"] = 0 [56] = {
}, ["X"] = 36.85,
[47] = ["Y"] = 26.28,
{ ["CD"] = 0,
["X"] = 49.33, },
["Y"] = 52.48, [57] = {
["CD"] = 0 ["X"] = 33.63,
}, ["Y"] = 29.7,
[48] = ["CD"] = 0,
{ },
["X"] = 49.79, [58] = {
["Y"] = 47.5, ["X"] = 31.25,
["CD"] = 0 ["Y"] = 33.5,
}, ["CD"] = 0,
[49] = },
{ [59] = {
["X"] = 78.74, ["X"] = 29,
["Y"] = 32.35, ["Y"] = 41.91,
["CD"] = 0 ["CD"] = 0,
}, },
[50] = [60] = {
{ ["X"] = 27.51,
["X"] = 76.86, ["Y"] = 43.03,
["Y"] = 33.06, ["CD"] = 0,
["CD"] = 0 },
}, [61] = {
[51] = ["X"] = 29.19,
{ ["Y"] = 44.39,
["X"] = 74.67, ["CD"] = 0,
["Y"] = 37.87, },
["CD"] = 0 [62] = {
}, ["X"] = 30.22,
[52] = ["Y"] = 46.68,
{ ["CD"] = 0,
["X"] = 74.93, },
["Y"] = 41.16, [63] = {
["CD"] = 0 ["X"] = 30.56,
}, ["Y"] = 60.35,
[53] = ["CD"] = 0,
{ },
["X"] = 70.73, [64] = {
["Y"] = 43.54, ["X"] = 31.8,
["CD"] = 0 ["Y"] = 62.23,
}, ["CD"] = 0,
[54] = },
{ [65] = {
["X"] = 70.35, ["X"] = 32.24,
["Y"] = 45.76, ["Y"] = 64.21,
["CD"] = 0 ["CD"] = 0,
}, },
[55] = [66] = {
{ ["X"] = 33,
["X"] = 37.66, ["Y"] = 66.87,
["Y"] = 22.47, ["CD"] = 0,
["CD"] = 0 },
}, [67] = {
[56] = ["X"] = 35.52,
{ ["Y"] = 69.32,
["X"] = 36.85, ["CD"] = 0,
["Y"] = 26.28, },
["CD"] = 0 [68] = {
}, ["X"] = 33.51,
[57] = ["Y"] = 70.23,
{ ["CD"] = 0,
["X"] = 33.63, },
["Y"] = 29.7, [69] = {
["CD"] = 0 ["X"] = 32.51,
}, ["Y"] = 67.22,
[58] = ["CD"] = 0,
{ },
["X"] = 31.25, [70] = {
["Y"] = 33.5, ["X"] = 30.69,
["CD"] = 0 ["Y"] = 67.28,
}, ["CD"] = 0,
[59] = },
{
["X"] = 29,
["Y"] = 41.91,
["CD"] = 0
},
[60] =
{
["X"] = 27.51,
["Y"] = 43.03,
["CD"] = 0
},
[61] =
{
["X"] = 29.19,
["Y"] = 44.39,
["CD"] = 0
},
[62] =
{
["X"] = 30.22,
["Y"] = 46.68,
["CD"] = 0
},
[63] =
{
["X"] = 30.56,
["Y"] = 60.35,
["CD"] = 0
},
[64] =
{
["X"] = 31.8,
["Y"] = 62.23,
["CD"] = 0
},
[65] =
{
["X"] = 32.24,
["Y"] = 64.21,
["CD"] = 0
},
[66] =
{
["X"] = 33,
["Y"] = 66.87,
["CD"] = 0
},
[67] =
{
["X"] = 35.52,
["Y"] = 69.32,
["CD"] = 0
},
[68] =
{
["X"] = 33.51,
["Y"] = 70.23,
["CD"] = 0
},
[69] =
{
["X"] = 32.51,
["Y"] = 67.22,
["CD"] = 0
},
[70] =
{
["X"] = 30.69,
["Y"] = 67.28,
["CD"] = 0
}
} }
aura_env.cooldown = 600 aura_env.cooldown = 600
aura_env.wipeDistance = 50 aura_env.wipeDistance = 50
aura_env.angle = 0 aura_env.angle = 0
aura_env.hyp = 0 aura_env.hyp = 0
aura_env.GetClosestHerb = function() aura_env.GetClosestHerb = function()
aura_env.minID = aura_env.minID = {
{ ["X"] = 0,
["X"] = 0, ["Y"] = 0,
["Y"] = 0, ["D"] = 1000,
["D"] = 1000, ["ID"] = 0,
["ID"] = 0 }
} local pX = GetPlayerMapPosition("player") or 0
local pX = GetPlayerMapPosition("player") or 0 local pY = select(2, GetPlayerMapPosition("player")) or 0
local pY = select(2, GetPlayerMapPosition("player")) or 0 pX, pY = pX * 100, pY * 100
pX, pY = pX * 100, pY * 100 for k, v in ipairs(aura_env.herbs) do
for k,v in ipairs(aura_env.herbs) do local hX, hY, cd = aura_env.herbs[k]["X"], aura_env.herbs[k]["Y"], aura_env.herbs[k]["CD"]
local hX, hY, cd = aura_env.herbs[k]["X"], aura_env.herbs[k]["Y"], aura_env.herbs[k]["CD"] if cd == 0 then
if cd == 0 then local X, Y = pX - hX, pY - hY
local X, Y = pX - hX, pY - hY local hyp = math.sqrt((math.abs(X ^ 2)) + (math.abs(Y ^ 2)))
local hyp = math.sqrt((math.abs(X^2)) + (math.abs(Y^2))) if hyp < aura_env.minID["D"] then
if hyp < aura_env.minID["D"] then aura_env.minID["X"] = hX
aura_env.minID["X"] = hX aura_env.minID["Y"] = hY
aura_env.minID["Y"] = hY aura_env.minID["D"] = hyp
aura_env.minID["D"] = hyp aura_env.minID["ID"] = k
aura_env.minID["ID"] = k end
end end
end end
end return aura_env.minID["ID"]
return aura_env.minID["ID"]
end end

View File

@@ -1,435 +1,366 @@
aura_env.herbs = aura_env.herbs = {
{ [1] = {
[1] = ["X"] = 55.21,
{ ["Y"] = 29.38,
["X"] = 55.21, ["CD"] = 0,
["Y"] = 29.38, },
["CD"] = 0 [2] = {
}, ["X"] = 56.38,
[2] = ["Y"] = 30.8,
{ ["CD"] = 0,
["X"] = 56.38, },
["Y"] = 30.8, [3] = {
["CD"] = 0 ["X"] = 54.25,
}, ["Y"] = 31.3,
[3] = ["CD"] = 0,
{ },
["X"] = 54.25, [4] = {
["Y"] = 31.3, ["X"] = 56.5,
["CD"] = 0 ["Y"] = 32.12,
}, ["CD"] = 0,
[4] = },
{ [5] = {
["X"] = 56.5, ["X"] = 58.44,
["Y"] = 32.12, ["Y"] = 35.06,
["CD"] = 0 ["CD"] = 0,
}, },
[5] = [6] = {
{ ["X"] = 53.05,
["X"] = 58.44, ["Y"] = 37.22,
["Y"] = 35.06, ["CD"] = 0,
["CD"] = 0 },
}, [7] = {
[6] = ["X"] = 52.92,
{ ["Y"] = 37.71,
["X"] = 53.05, ["CD"] = 0,
["Y"] = 37.22, },
["CD"] = 0 [8] = {
}, ["X"] = 56.85,
[7] = ["Y"] = 37.89,
{ ["CD"] = 0,
["X"] = 52.92, },
["Y"] = 37.71, [9] = {
["CD"] = 0 ["X"] = 59.32,
}, ["Y"] = 39.96,
[8] = ["CD"] = 0,
{ },
["X"] = 56.85, [10] = {
["Y"] = 37.89, ["X"] = 60.24,
["CD"] = 0 ["Y"] = 43.26,
}, ["CD"] = 0,
[9] = },
{ [11] = {
["X"] = 59.32, ["X"] = 62.38,
["Y"] = 39.96, ["Y"] = 44.15,
["CD"] = 0 ["CD"] = 0,
}, },
[10] = [12] = {
{ ["X"] = 60.31,
["X"] = 60.24, ["Y"] = 44.75,
["Y"] = 43.26, ["CD"] = 0,
["CD"] = 0 },
}, [13] = {
[11] = ["X"] = 62.63,
{ ["Y"] = 45,
["X"] = 62.38, ["CD"] = 0,
["Y"] = 44.15, },
["CD"] = 0 [14] = {
}, ["X"] = 58.79,
[12] = ["Y"] = 66.11,
{ ["CD"] = 0,
["X"] = 60.31, },
["Y"] = 44.75, [15] = {
["CD"] = 0 ["X"] = 58.07,
}, ["Y"] = 67.24,
[13] = ["CD"] = 0,
{ },
["X"] = 62.63, [16] = {
["Y"] = 45, ["X"] = 58.8,
["CD"] = 0 ["Y"] = 68.04,
}, ["CD"] = 0,
[14] = },
{ [17] = {
["X"] = 58.79, ["X"] = 56.18,
["Y"] = 66.11, ["Y"] = 68.4,
["CD"] = 0 ["CD"] = 0,
}, },
[15] = [18] = {
{ ["X"] = 56.89,
["X"] = 58.07, ["Y"] = 68.83,
["Y"] = 67.24, ["CD"] = 0,
["CD"] = 0 },
}, [19] = {
[16] = ["X"] = 55.99,
{ ["Y"] = 68.92,
["X"] = 58.8, ["CD"] = 0,
["Y"] = 68.04, },
["CD"] = 0 [20] = {
}, ["X"] = 54.79,
[17] = ["Y"] = 69.16,
{ ["CD"] = 0,
["X"] = 56.18, },
["Y"] = 68.4, [21] = {
["CD"] = 0 ["X"] = 78.12,
}, ["Y"] = 69.46,
[18] = ["CD"] = 0,
{ },
["X"] = 56.89, [22] = {
["Y"] = 68.83, ["X"] = 55.23,
["CD"] = 0 ["Y"] = 69.82,
}, ["CD"] = 0,
[19] = },
{ [23] = {
["X"] = 55.99, ["X"] = 56.47,
["Y"] = 68.92, ["Y"] = 69.86,
["CD"] = 0 ["CD"] = 0,
}, },
[20] = [24] = {
{ ["X"] = 78.49,
["X"] = 54.79, ["Y"] = 70,
["Y"] = 69.16, ["CD"] = 0,
["CD"] = 0 },
}, [25] = {
[21] = ["X"] = 57.49,
{ ["Y"] = 70.1,
["X"] = 78.12, ["CD"] = 0,
["Y"] = 69.46, },
["CD"] = 0 [26] = {
}, ["X"] = 62.05,
[22] = ["Y"] = 70.16,
{ ["CD"] = 0,
["X"] = 55.23, },
["Y"] = 69.82, [27] = {
["CD"] = 0 ["X"] = 53.23,
}, ["Y"] = 70.74,
[23] = ["CD"] = 0,
{ },
["X"] = 56.47, [28] = {
["Y"] = 69.86, ["X"] = 55.72,
["CD"] = 0 ["Y"] = 70.85,
}, ["CD"] = 0,
[24] = },
{ [29] = {
["X"] = 78.49, ["X"] = 60.45,
["Y"] = 70, ["Y"] = 70.99,
["CD"] = 0 ["CD"] = 0,
}, },
[25] = [30] = {
{ ["X"] = 78.71,
["X"] = 57.49, ["Y"] = 71.05,
["Y"] = 70.1, ["CD"] = 0,
["CD"] = 0 },
}, [31] = {
[26] = ["X"] = 59.93,
{ ["Y"] = 71.54,
["X"] = 62.05, ["CD"] = 0,
["Y"] = 70.16, },
["CD"] = 0 [32] = {
}, ["X"] = 60.96,
[27] = ["Y"] = 71.64,
{ ["CD"] = 0,
["X"] = 53.23, },
["Y"] = 70.74, [33] = {
["CD"] = 0 ["X"] = 78.05,
}, ["Y"] = 71.69,
[28] = ["CD"] = 0,
{ },
["X"] = 55.72, [34] = {
["Y"] = 70.85, ["X"] = 53.97,
["CD"] = 0 ["Y"] = 71.7,
}, ["CD"] = 0,
[29] = },
{ [35] = {
["X"] = 60.45, ["X"] = 58.78,
["Y"] = 70.99, ["Y"] = 71.92,
["CD"] = 0 ["CD"] = 0,
}, },
[30] = [36] = {
{ ["X"] = 59.19,
["X"] = 78.71, ["Y"] = 72.7,
["Y"] = 71.05, ["CD"] = 0,
["CD"] = 0 },
}, [37] = {
[31] = ["X"] = 57.1,
{ ["Y"] = 72.76,
["X"] = 59.93, ["CD"] = 0,
["Y"] = 71.54, },
["CD"] = 0 [38] = {
}, ["X"] = 63.61,
[32] = ["Y"] = 73.32,
{ ["CD"] = 0,
["X"] = 60.96, },
["Y"] = 71.64, [39] = {
["CD"] = 0 ["X"] = 57.6,
}, ["Y"] = 73.39,
[33] = ["CD"] = 0,
{ },
["X"] = 78.05, [40] = {
["Y"] = 71.69, ["X"] = 55.82,
["CD"] = 0 ["Y"] = 73.97,
}, ["CD"] = 0,
[34] = },
{ [41] = {
["X"] = 53.97, ["X"] = 56.83,
["Y"] = 71.7, ["Y"] = 74.09,
["CD"] = 0 ["CD"] = 0,
}, },
[35] = [42] = {
{ ["X"] = 59.48,
["X"] = 58.78, ["Y"] = 75.05,
["Y"] = 71.92, ["CD"] = 0,
["CD"] = 0 },
}, [43] = {
[36] = ["X"] = 57.28,
{ ["Y"] = 75.33,
["X"] = 59.19, ["CD"] = 0,
["Y"] = 72.7, },
["CD"] = 0 [44] = {
}, ["X"] = 56.2,
[37] = ["Y"] = 75.37,
{ ["CD"] = 0,
["X"] = 57.1, },
["Y"] = 72.76, [45] = {
["CD"] = 0 ["X"] = 65.04,
}, ["Y"] = 75.73,
[38] = ["CD"] = 0,
{ },
["X"] = 63.61, [46] = {
["Y"] = 73.32, ["X"] = 57.1,
["CD"] = 0 ["Y"] = 75.83,
}, ["CD"] = 0,
[39] = },
{ [47] = {
["X"] = 57.6, ["X"] = 64.03,
["Y"] = 73.39, ["Y"] = 76.03,
["CD"] = 0 ["CD"] = 0,
}, },
[40] = [48] = {
{ ["X"] = 65.94,
["X"] = 55.82, ["Y"] = 76.67,
["Y"] = 73.97, ["CD"] = 0,
["CD"] = 0 },
}, [49] = {
[41] = ["X"] = 60.04,
{ ["Y"] = 76.75,
["X"] = 56.83, ["CD"] = 0,
["Y"] = 74.09, },
["CD"] = 0 [50] = {
}, ["X"] = 51.69,
[42] = ["Y"] = 77.08,
{ ["CD"] = 0,
["X"] = 59.48, },
["Y"] = 75.05, [51] = {
["CD"] = 0 ["X"] = 66.38,
}, ["Y"] = 77.13,
[43] = ["CD"] = 0,
{ },
["X"] = 57.28, [52] = {
["Y"] = 75.33, ["X"] = 61.34,
["CD"] = 0 ["Y"] = 77.69,
}, ["CD"] = 0,
[44] = },
{ [53] = {
["X"] = 56.2, ["X"] = 56.96,
["Y"] = 75.37, ["Y"] = 77.71,
["CD"] = 0 ["CD"] = 0,
}, },
[45] = [54] = {
{ ["X"] = 63.81,
["X"] = 65.04, ["Y"] = 77.73,
["Y"] = 75.73, ["CD"] = 0,
["CD"] = 0 },
}, [55] = {
[46] = ["X"] = 65.79,
{ ["Y"] = 77.78,
["X"] = 57.1, ["CD"] = 0,
["Y"] = 75.83, },
["CD"] = 0 [56] = {
}, ["X"] = 66.91,
[47] = ["Y"] = 78.43,
{ ["CD"] = 0,
["X"] = 64.03, },
["Y"] = 76.03, [57] = {
["CD"] = 0 ["X"] = 64.63,
}, ["Y"] = 79.29,
[48] = ["CD"] = 0,
{ },
["X"] = 65.94, [58] = {
["Y"] = 76.67, ["X"] = 63.47,
["CD"] = 0 ["Y"] = 79.63,
}, ["CD"] = 0,
[49] = },
{ [59] = {
["X"] = 60.04, ["X"] = 61.37,
["Y"] = 76.75, ["Y"] = 79.81,
["CD"] = 0 ["CD"] = 0,
}, },
[50] = [60] = {
{ ["X"] = 60.47,
["X"] = 51.69, ["Y"] = 80.35,
["Y"] = 77.08, ["CD"] = 0,
["CD"] = 0 },
}, [61] = {
[51] = ["X"] = 62.7,
{ ["Y"] = 80.54,
["X"] = 66.38, ["CD"] = 0,
["Y"] = 77.13, },
["CD"] = 0 [62] = {
}, ["X"] = 70.7,
[52] = ["Y"] = 80.98,
{ ["CD"] = 0,
["X"] = 61.34, },
["Y"] = 77.69, [63] = {
["CD"] = 0 ["X"] = 60.52,
}, ["Y"] = 81.06,
[53] = ["CD"] = 0,
{ },
["X"] = 56.96, [64] = {
["Y"] = 77.71, ["X"] = 72.19,
["CD"] = 0 ["Y"] = 82.3,
}, ["CD"] = 0,
[54] = },
{ [65] = {
["X"] = 63.81, ["X"] = 71.35,
["Y"] = 77.73, ["Y"] = 82.53,
["CD"] = 0 ["CD"] = 0,
}, },
[55] = [66] = {
{ ["X"] = 67.39,
["X"] = 65.79, ["Y"] = 83.15,
["Y"] = 77.78, ["CD"] = 0,
["CD"] = 0 },
}, [67] = {
[56] = ["X"] = 71.42,
{ ["Y"] = 84.27,
["X"] = 66.91, ["CD"] = 0,
["Y"] = 78.43, },
["CD"] = 0
},
[57] =
{
["X"] = 64.63,
["Y"] = 79.29,
["CD"] = 0
},
[58] =
{
["X"] = 63.47,
["Y"] = 79.63,
["CD"] = 0
},
[59] =
{
["X"] = 61.37,
["Y"] = 79.81,
["CD"] = 0
},
[60] =
{
["X"] = 60.47,
["Y"] = 80.35,
["CD"] = 0
},
[61] =
{
["X"] = 62.7,
["Y"] = 80.54,
["CD"] = 0
},
[62] =
{
["X"] = 70.7,
["Y"] = 80.98,
["CD"] = 0
},
[63] =
{
["X"] = 60.52,
["Y"] = 81.06,
["CD"] = 0
},
[64] =
{
["X"] = 72.19,
["Y"] = 82.3,
["CD"] = 0
},
[65] =
{
["X"] = 71.35,
["Y"] = 82.53,
["CD"] = 0
},
[66] =
{
["X"] = 67.39,
["Y"] = 83.15,
["CD"] = 0
},
[67] =
{
["X"] = 71.42,
["Y"] = 84.27,
["CD"] = 0
}
} }
aura_env.cooldown = 92 aura_env.cooldown = 92
aura_env.wipeDistance = 15 aura_env.wipeDistance = 15
aura_env.angle = 0 aura_env.angle = 0
aura_env.hyp = 0 aura_env.hyp = 0
aura_env.GetClosestHerb = function() aura_env.GetClosestHerb = function()
aura_env.minID = aura_env.minID = {
{ ["X"] = 0,
["X"] = 0, ["Y"] = 0,
["Y"] = 0, ["D"] = 1000,
["D"] = 1000, ["ID"] = 0,
["ID"] = 0 }
} local pX = GetPlayerMapPosition("player") or 0
local pX = GetPlayerMapPosition("player") or 0 local pY = select(2, GetPlayerMapPosition("player")) or 0
local pY = select(2, GetPlayerMapPosition("player")) or 0 pX, pY = pX * 100, pY * 100
pX, pY = pX * 100, pY * 100 for k, v in ipairs(aura_env.herbs) do
for k,v in ipairs(aura_env.herbs) do local hX, hY, cd = aura_env.herbs[k]["X"], aura_env.herbs[k]["Y"], aura_env.herbs[k]["CD"]
local hX, hY, cd = aura_env.herbs[k]["X"], aura_env.herbs[k]["Y"], aura_env.herbs[k]["CD"] if cd == 0 then
if cd == 0 then local X, Y = pX - hX, pY - hY
local X, Y = pX - hX, pY - hY local hyp = math.sqrt((math.abs(X ^ 2)) + (math.abs(Y ^ 2)))
local hyp = math.sqrt((math.abs(X^2)) + (math.abs(Y^2))) if hyp < aura_env.minID["D"] then
if hyp < aura_env.minID["D"] then aura_env.minID["X"] = hX
aura_env.minID["X"] = hX aura_env.minID["Y"] = hY
aura_env.minID["Y"] = hY aura_env.minID["D"] = hyp
aura_env.minID["D"] = hyp aura_env.minID["ID"] = k
aura_env.minID["ID"] = k end
end end
end end
end return aura_env.minID["ID"]
return aura_env.minID["ID"]
end end

View File

@@ -1,124 +1,103 @@
aura_env.herbs = aura_env.herbs = {
{ [1] = {
[1] =
{
["X"] = 51.58, ["X"] = 51.58,
["Y"] = 43.53, ["Y"] = 43.53,
["CD"] = 0 ["CD"] = 0,
}, },
[2] = [2] = {
{
["X"] = 51.71, ["X"] = 51.71,
["Y"] = 43.97, ["Y"] = 43.97,
["CD"] = 0 ["CD"] = 0,
}, },
[3] = [3] = {
{
["X"] = 52.19, ["X"] = 52.19,
["Y"] = 43.75, ["Y"] = 43.75,
["CD"] = 0 ["CD"] = 0,
}, },
[4] = [4] = {
{
["X"] = 53.1, ["X"] = 53.1,
["Y"] = 43.07, ["Y"] = 43.07,
["CD"] = 0 ["CD"] = 0,
}, },
[5] = [5] = {
{
["X"] = 53.56, ["X"] = 53.56,
["Y"] = 43.28, ["Y"] = 43.28,
["CD"] = 0 ["CD"] = 0,
}, },
[6] = [6] = {
{
["X"] = 54.06, ["X"] = 54.06,
["Y"] = 43.34, ["Y"] = 43.34,
["CD"] = 0 ["CD"] = 0,
}, },
[7] = [7] = {
{
["X"] = 54.63, ["X"] = 54.63,
["Y"] = 43.33, ["Y"] = 43.33,
["CD"] = 0 ["CD"] = 0,
}, },
[8] = [8] = {
{
["X"] = 54.84, ["X"] = 54.84,
["Y"] = 42.4, ["Y"] = 42.4,
["CD"] = 0 ["CD"] = 0,
}, },
[9] = [9] = {
{
["X"] = 54.89, ["X"] = 54.89,
["Y"] = 41.74, ["Y"] = 41.74,
["CD"] = 0 ["CD"] = 0,
}, },
[10] = [10] = {
{
["X"] = 54.53, ["X"] = 54.53,
["Y"] = 41.47, ["Y"] = 41.47,
["CD"] = 0 ["CD"] = 0,
}, },
[11] = [11] = {
{
["X"] = 54.27, ["X"] = 54.27,
["Y"] = 41.65, ["Y"] = 41.65,
["CD"] = 0 ["CD"] = 0,
}, },
[12] = [12] = {
{
["X"] = 53.86, ["X"] = 53.86,
["Y"] = 41.66, ["Y"] = 41.66,
["CD"] = 0 ["CD"] = 0,
}, },
[13] = [13] = {
{
["X"] = 53.74, ["X"] = 53.74,
["Y"] = 40.67, ["Y"] = 40.67,
["CD"] = 0 ["CD"] = 0,
}, },
[14] = [14] = {
{
["X"] = 52.95, ["X"] = 52.95,
["Y"] = 40.72, ["Y"] = 40.72,
["CD"] = 0 ["CD"] = 0,
}, },
[15] = [15] = {
{
["X"] = 52.78, ["X"] = 52.78,
["Y"] = 40.24, ["Y"] = 40.24,
["CD"] = 0 ["CD"] = 0,
}, },
[16] = [16] = {
{
["X"] = 47.99, ["X"] = 47.99,
["Y"] = 45.57, ["Y"] = 45.57,
["CD"] = 0 ["CD"] = 0,
}, },
[17] = [17] = {
{
["X"] = 47.57, ["X"] = 47.57,
["Y"] = 45.29, ["Y"] = 45.29,
["CD"] = 0 ["CD"] = 0,
}, },
[18] = [18] = {
{
["X"] = 47.57, ["X"] = 47.57,
["Y"] = 45.38, ["Y"] = 45.38,
["CD"] = 0 ["CD"] = 0,
}, },
[19] = [19] = {
{
["X"] = 48.18, ["X"] = 48.18,
["Y"] = 46.31, ["Y"] = 46.31,
["CD"] = 0 ["CD"] = 0,
}, },
[20] = [20] = {
{
["X"] = 47.05, ["X"] = 47.05,
["Y"] = 46.63, ["Y"] = 46.63,
["CD"] = 0 ["CD"] = 0,
}, },
} }
aura_env.cooldown = 120 aura_env.cooldown = 120
@@ -126,28 +105,27 @@ aura_env.wipeDistance = 15
aura_env.angle = 0 aura_env.angle = 0
aura_env.hyp = 0 aura_env.hyp = 0
aura_env.GetClosestHerb = function() aura_env.GetClosestHerb = function()
aura_env.minID = aura_env.minID = {
{ ["X"] = 0,
["X"] = 0, ["Y"] = 0,
["Y"] = 0, ["D"] = 1000,
["D"] = 1000, ["ID"] = 0,
["ID"] = 0 }
} local pX = GetPlayerMapPosition("player") or 0
local pX = GetPlayerMapPosition("player") or 0 local pY = select(2, GetPlayerMapPosition("player")) or 0
local pY = select(2, GetPlayerMapPosition("player")) or 0 pX, pY = pX * 100, pY * 100
pX, pY = pX * 100, pY * 100 for k, v in ipairs(aura_env.herbs) do
for k,v in ipairs(aura_env.herbs) do local hX, hY, cd = aura_env.herbs[k]["X"], aura_env.herbs[k]["Y"], aura_env.herbs[k]["CD"]
local hX, hY, cd = aura_env.herbs[k]["X"], aura_env.herbs[k]["Y"], aura_env.herbs[k]["CD"] if cd == 0 then
if cd == 0 then local X, Y = pX - hX, pY - hY
local X, Y = pX - hX, pY - hY local hyp = math.sqrt((math.abs(X ^ 2)) + (math.abs(Y ^ 2)))
local hyp = math.sqrt((math.abs(X^2)) + (math.abs(Y^2))) if hyp < aura_env.minID["D"] then
if hyp < aura_env.minID["D"] then aura_env.minID["X"] = hX
aura_env.minID["X"] = hX aura_env.minID["Y"] = hY
aura_env.minID["Y"] = hY aura_env.minID["D"] = hyp
aura_env.minID["D"] = hyp aura_env.minID["ID"] = k
aura_env.minID["ID"] = k end
end end
end end
end return aura_env.minID["ID"]
return aura_env.minID["ID"]
end end

View File

@@ -1,124 +1,103 @@
aura_env.herbs = aura_env.herbs = {
{ [1] = {
[1] =
{
["X"] = 47.45, ["X"] = 47.45,
["Y"] = 45.25, ["Y"] = 45.25,
["CD"] = 0 ["CD"] = 0,
}, },
[2] = [2] = {
{
["X"] = 47.1, ["X"] = 47.1,
["Y"] = 45.39, ["Y"] = 45.39,
["CD"] = 0 ["CD"] = 0,
}, },
[3] = [3] = {
{
["X"] = 46.85, ["X"] = 46.85,
["Y"] = 45.64, ["Y"] = 45.64,
["CD"] = 0 ["CD"] = 0,
}, },
[4] = [4] = {
{
["X"] = 47.26, ["X"] = 47.26,
["Y"] = 46.21, ["Y"] = 46.21,
["CD"] = 0 ["CD"] = 0,
}, },
[5] = [5] = {
{
["X"] = 46.37, ["X"] = 46.37,
["Y"] = 46.44, ["Y"] = 46.44,
["CD"] = 0 ["CD"] = 0,
}, },
[6] = [6] = {
{
["X"] = 46.23, ["X"] = 46.23,
["Y"] = 47.2, ["Y"] = 47.2,
["CD"] = 0 ["CD"] = 0,
}, },
[7] = [7] = {
{
["X"] = 46.35, ["X"] = 46.35,
["Y"] = 48, ["Y"] = 48,
["CD"] = 0 ["CD"] = 0,
}, },
[8] = [8] = {
{
["X"] = 46.92, ["X"] = 46.92,
["Y"] = 48.29, ["Y"] = 48.29,
["CD"] = 0 ["CD"] = 0,
}, },
[9] = [9] = {
{
["X"] = 47.02, ["X"] = 47.02,
["Y"] = 47.71, ["Y"] = 47.71,
["CD"] = 0 ["CD"] = 0,
}, },
[10] = [10] = {
{
["X"] = 47.28, ["X"] = 47.28,
["Y"] = 47.65, ["Y"] = 47.65,
["CD"] = 0 ["CD"] = 0,
}, },
[11] = [11] = {
{
["X"] = 47.45, ["X"] = 47.45,
["Y"] = 47.47, ["Y"] = 47.47,
["CD"] = 0 ["CD"] = 0,
}, },
[12] = [12] = {
{
["X"] = 47.55, ["X"] = 47.55,
["Y"] = 47.42, ["Y"] = 47.42,
["CD"] = 0 ["CD"] = 0,
}, },
[13] = [13] = {
{
["X"] = 47.84, ["X"] = 47.84,
["Y"] = 46.89, ["Y"] = 46.89,
["CD"] = 0 ["CD"] = 0,
}, },
[14] = [14] = {
{
["X"] = 48.13, ["X"] = 48.13,
["Y"] = 46.47, ["Y"] = 46.47,
["CD"] = 0 ["CD"] = 0,
}, },
[15] = [15] = {
{
["X"] = 48.24, ["X"] = 48.24,
["Y"] = 45.63, ["Y"] = 45.63,
["CD"] = 0 ["CD"] = 0,
}, },
[16] = [16] = {
{
["X"] = 47.99, ["X"] = 47.99,
["Y"] = 45.57, ["Y"] = 45.57,
["CD"] = 0 ["CD"] = 0,
}, },
[17] = [17] = {
{
["X"] = 47.57, ["X"] = 47.57,
["Y"] = 45.29, ["Y"] = 45.29,
["CD"] = 0 ["CD"] = 0,
}, },
[18] = [18] = {
{
["X"] = 47.57, ["X"] = 47.57,
["Y"] = 45.38, ["Y"] = 45.38,
["CD"] = 0 ["CD"] = 0,
}, },
[19] = [19] = {
{
["X"] = 48.18, ["X"] = 48.18,
["Y"] = 46.31, ["Y"] = 46.31,
["CD"] = 0 ["CD"] = 0,
}, },
[20] = [20] = {
{
["X"] = 47.05, ["X"] = 47.05,
["Y"] = 46.63, ["Y"] = 46.63,
["CD"] = 0 ["CD"] = 0,
}, },
} }
aura_env.cooldown = 120 aura_env.cooldown = 120
@@ -126,28 +105,27 @@ aura_env.wipeDistance = 15
aura_env.angle = 0 aura_env.angle = 0
aura_env.hyp = 0 aura_env.hyp = 0
aura_env.GetClosestHerb = function() aura_env.GetClosestHerb = function()
aura_env.minID = aura_env.minID = {
{ ["X"] = 0,
["X"] = 0, ["Y"] = 0,
["Y"] = 0, ["D"] = 1000,
["D"] = 1000, ["ID"] = 0,
["ID"] = 0 }
} local pX = GetPlayerMapPosition("player") or 0
local pX = GetPlayerMapPosition("player") or 0 local pY = select(2, GetPlayerMapPosition("player")) or 0
local pY = select(2, GetPlayerMapPosition("player")) or 0 pX, pY = pX * 100, pY * 100
pX, pY = pX * 100, pY * 100 for k, v in ipairs(aura_env.herbs) do
for k,v in ipairs(aura_env.herbs) do local hX, hY, cd = aura_env.herbs[k]["X"], aura_env.herbs[k]["Y"], aura_env.herbs[k]["CD"]
local hX, hY, cd = aura_env.herbs[k]["X"], aura_env.herbs[k]["Y"], aura_env.herbs[k]["CD"] if cd == 0 then
if cd == 0 then local X, Y = pX - hX, pY - hY
local X, Y = pX - hX, pY - hY local hyp = math.sqrt((math.abs(X ^ 2)) + (math.abs(Y ^ 2)))
local hyp = math.sqrt((math.abs(X^2)) + (math.abs(Y^2))) if hyp < aura_env.minID["D"] then
if hyp < aura_env.minID["D"] then aura_env.minID["X"] = hX
aura_env.minID["X"] = hX aura_env.minID["Y"] = hY
aura_env.minID["Y"] = hY aura_env.minID["D"] = hyp
aura_env.minID["D"] = hyp aura_env.minID["ID"] = k
aura_env.minID["ID"] = k end
end end
end end
end return aura_env.minID["ID"]
return aura_env.minID["ID"]
end end

View File

@@ -1,124 +1,103 @@
aura_env.herbs = aura_env.herbs = {
{ [1] = {
[1] =
{
["X"] = 47.58, ["X"] = 47.58,
["Y"] = 61.98, ["Y"] = 61.98,
["CD"] = 0 ["CD"] = 0,
}, },
[2] = [2] = {
{
["X"] = 47.75, ["X"] = 47.75,
["Y"] = 61.61, ["Y"] = 61.61,
["CD"] = 0 ["CD"] = 0,
}, },
[3] = [3] = {
{
["X"] = 49.39, ["X"] = 49.39,
["Y"] = 61.5, ["Y"] = 61.5,
["CD"] = 0 ["CD"] = 0,
}, },
[4] = [4] = {
{
["X"] = 48.9, ["X"] = 48.9,
["Y"] = 60.63, ["Y"] = 60.63,
["CD"] = 0 ["CD"] = 0,
}, },
[5] = [5] = {
{
["X"] = 49.1, ["X"] = 49.1,
["Y"] = 59.96, ["Y"] = 59.96,
["CD"] = 0 ["CD"] = 0,
}, },
[6] = [6] = {
{
["X"] = 49.51, ["X"] = 49.51,
["Y"] = 60.13, ["Y"] = 60.13,
["CD"] = 0 ["CD"] = 0,
}, },
[7] = [7] = {
{
["X"] = 49.15, ["X"] = 49.15,
["Y"] = 58.8, ["Y"] = 58.8,
["CD"] = 0 ["CD"] = 0,
}, },
[8] = [8] = {
{
["X"] = 49.67, ["X"] = 49.67,
["Y"] = 58.14, ["Y"] = 58.14,
["CD"] = 0 ["CD"] = 0,
}, },
[9] = [9] = {
{
["X"] = 48.5, ["X"] = 48.5,
["Y"] = 58.18, ["Y"] = 58.18,
["CD"] = 0 ["CD"] = 0,
}, },
[10] = [10] = {
{
["X"] = 48.18, ["X"] = 48.18,
["Y"] = 58.23, ["Y"] = 58.23,
["CD"] = 0 ["CD"] = 0,
}, },
[11] = [11] = {
{
["X"] = 48.13, ["X"] = 48.13,
["Y"] = 58.66, ["Y"] = 58.66,
["CD"] = 0 ["CD"] = 0,
}, },
[12] = [12] = {
{
["X"] = 47.72, ["X"] = 47.72,
["Y"] = 58.57, ["Y"] = 58.57,
["CD"] = 0 ["CD"] = 0,
}, },
[13] = [13] = {
{
["X"] = 47.55, ["X"] = 47.55,
["Y"] = 59.51, ["Y"] = 59.51,
["CD"] = 0 ["CD"] = 0,
}, },
[14] = [14] = {
{
["X"] = 47.97, ["X"] = 47.97,
["Y"] = 60.7, ["Y"] = 60.7,
["CD"] = 0 ["CD"] = 0,
}, },
[15] = [15] = {
{
["X"] = 47.95, ["X"] = 47.95,
["Y"] = 60.92, ["Y"] = 60.92,
["CD"] = 0 ["CD"] = 0,
}, },
[16] = [16] = {
{
["X"] = 47.99, ["X"] = 47.99,
["Y"] = 45.57, ["Y"] = 45.57,
["CD"] = 0 ["CD"] = 0,
}, },
[17] = [17] = {
{
["X"] = 47.57, ["X"] = 47.57,
["Y"] = 45.29, ["Y"] = 45.29,
["CD"] = 0 ["CD"] = 0,
}, },
[18] = [18] = {
{
["X"] = 47.57, ["X"] = 47.57,
["Y"] = 45.38, ["Y"] = 45.38,
["CD"] = 0 ["CD"] = 0,
}, },
[19] = [19] = {
{
["X"] = 48.18, ["X"] = 48.18,
["Y"] = 46.31, ["Y"] = 46.31,
["CD"] = 0 ["CD"] = 0,
}, },
[20] = [20] = {
{
["X"] = 47.05, ["X"] = 47.05,
["Y"] = 46.63, ["Y"] = 46.63,
["CD"] = 0 ["CD"] = 0,
}, },
} }
aura_env.cooldown = 120 aura_env.cooldown = 120
@@ -126,28 +105,27 @@ aura_env.wipeDistance = 15
aura_env.angle = 0 aura_env.angle = 0
aura_env.hyp = 0 aura_env.hyp = 0
aura_env.GetClosestHerb = function() aura_env.GetClosestHerb = function()
aura_env.minID = aura_env.minID = {
{ ["X"] = 0,
["X"] = 0, ["Y"] = 0,
["Y"] = 0, ["D"] = 1000,
["D"] = 1000, ["ID"] = 0,
["ID"] = 0 }
} local pX = GetPlayerMapPosition("player") or 0
local pX = GetPlayerMapPosition("player") or 0 local pY = select(2, GetPlayerMapPosition("player")) or 0
local pY = select(2, GetPlayerMapPosition("player")) or 0 pX, pY = pX * 100, pY * 100
pX, pY = pX * 100, pY * 100 for k, v in ipairs(aura_env.herbs) do
for k,v in ipairs(aura_env.herbs) do local hX, hY, cd = aura_env.herbs[k]["X"], aura_env.herbs[k]["Y"], aura_env.herbs[k]["CD"]
local hX, hY, cd = aura_env.herbs[k]["X"], aura_env.herbs[k]["Y"], aura_env.herbs[k]["CD"] if cd == 0 then
if cd == 0 then local X, Y = pX - hX, pY - hY
local X, Y = pX - hX, pY - hY local hyp = math.sqrt((math.abs(X ^ 2)) + (math.abs(Y ^ 2)))
local hyp = math.sqrt((math.abs(X^2)) + (math.abs(Y^2))) if hyp < aura_env.minID["D"] then
if hyp < aura_env.minID["D"] then aura_env.minID["X"] = hX
aura_env.minID["X"] = hX aura_env.minID["Y"] = hY
aura_env.minID["Y"] = hY aura_env.minID["D"] = hyp
aura_env.minID["D"] = hyp aura_env.minID["ID"] = k
aura_env.minID["ID"] = k end
end end
end end
end return aura_env.minID["ID"]
return aura_env.minID["ID"]
end end

View File

@@ -1,124 +1,103 @@
aura_env.herbs = aura_env.herbs = {
{ [1] = {
[1] =
{
["X"] = 62.88, ["X"] = 62.88,
["Y"] = 54.49, ["Y"] = 54.49,
["CD"] = 0 ["CD"] = 0,
}, },
[2] = [2] = {
{
["X"] = 62.75, ["X"] = 62.75,
["Y"] = 54, ["Y"] = 54,
["CD"] = 0 ["CD"] = 0,
}, },
[3] = [3] = {
{
["X"] = 62.88, ["X"] = 62.88,
["Y"] = 53.13, ["Y"] = 53.13,
["CD"] = 0 ["CD"] = 0,
}, },
[4] = [4] = {
{
["X"] = 62.88, ["X"] = 62.88,
["Y"] = 51.82, ["Y"] = 51.82,
["CD"] = 0 ["CD"] = 0,
}, },
[5] = [5] = {
{
["X"] = 62.78, ["X"] = 62.78,
["Y"] = 51.54, ["Y"] = 51.54,
["CD"] = 0 ["CD"] = 0,
}, },
[6] = [6] = {
{
["X"] = 62.44, ["X"] = 62.44,
["Y"] = 50.9, ["Y"] = 50.9,
["CD"] = 0 ["CD"] = 0,
}, },
[7] = [7] = {
{
["X"] = 61.85, ["X"] = 61.85,
["Y"] = 50.94, ["Y"] = 50.94,
["CD"] = 0 ["CD"] = 0,
}, },
[8] = [8] = {
{
["X"] = 61.45, ["X"] = 61.45,
["Y"] = 51.58, ["Y"] = 51.58,
["CD"] = 0 ["CD"] = 0,
}, },
[9] = [9] = {
{
["X"] = 61.14, ["X"] = 61.14,
["Y"] = 51.67, ["Y"] = 51.67,
["CD"] = 0 ["CD"] = 0,
}, },
[10] = [10] = {
{
["X"] = 61.08, ["X"] = 61.08,
["Y"] = 52.31, ["Y"] = 52.31,
["CD"] = 0 ["CD"] = 0,
}, },
[11] = [11] = {
{
["X"] = 60.35, ["X"] = 60.35,
["Y"] = 51.69, ["Y"] = 51.69,
["CD"] = 0 ["CD"] = 0,
}, },
[12] = [12] = {
{
["X"] = 60.05, ["X"] = 60.05,
["Y"] = 51.23, ["Y"] = 51.23,
["CD"] = 0 ["CD"] = 0,
}, },
[13] = [13] = {
{
["X"] = 60.05, ["X"] = 60.05,
["Y"] = 52.29, ["Y"] = 52.29,
["CD"] = 0 ["CD"] = 0,
}, },
[14] = [14] = {
{
["X"] = 59.53, ["X"] = 59.53,
["Y"] = 52.96, ["Y"] = 52.96,
["CD"] = 0 ["CD"] = 0,
}, },
[15] = [15] = {
{
["X"] = 59.53, ["X"] = 59.53,
["Y"] = 53.51, ["Y"] = 53.51,
["CD"] = 0 ["CD"] = 0,
}, },
[16] = [16] = {
{
["X"] = 47.99, ["X"] = 47.99,
["Y"] = 45.57, ["Y"] = 45.57,
["CD"] = 0 ["CD"] = 0,
}, },
[17] = [17] = {
{
["X"] = 47.57, ["X"] = 47.57,
["Y"] = 45.29, ["Y"] = 45.29,
["CD"] = 0 ["CD"] = 0,
}, },
[18] = [18] = {
{
["X"] = 47.57, ["X"] = 47.57,
["Y"] = 45.38, ["Y"] = 45.38,
["CD"] = 0 ["CD"] = 0,
}, },
[19] = [19] = {
{
["X"] = 48.18, ["X"] = 48.18,
["Y"] = 46.31, ["Y"] = 46.31,
["CD"] = 0 ["CD"] = 0,
}, },
[20] = [20] = {
{
["X"] = 47.05, ["X"] = 47.05,
["Y"] = 46.63, ["Y"] = 46.63,
["CD"] = 0 ["CD"] = 0,
}, },
} }
aura_env.cooldown = 120 aura_env.cooldown = 120
@@ -126,28 +105,27 @@ aura_env.wipeDistance = 15
aura_env.angle = 0 aura_env.angle = 0
aura_env.hyp = 0 aura_env.hyp = 0
aura_env.GetClosestHerb = function() aura_env.GetClosestHerb = function()
aura_env.minID = aura_env.minID = {
{ ["X"] = 0,
["X"] = 0, ["Y"] = 0,
["Y"] = 0, ["D"] = 1000,
["D"] = 1000, ["ID"] = 0,
["ID"] = 0 }
} local pX = GetPlayerMapPosition("player") or 0
local pX = GetPlayerMapPosition("player") or 0 local pY = select(2, GetPlayerMapPosition("player")) or 0
local pY = select(2, GetPlayerMapPosition("player")) or 0 pX, pY = pX * 100, pY * 100
pX, pY = pX * 100, pY * 100 for k, v in ipairs(aura_env.herbs) do
for k,v in ipairs(aura_env.herbs) do local hX, hY, cd = aura_env.herbs[k]["X"], aura_env.herbs[k]["Y"], aura_env.herbs[k]["CD"]
local hX, hY, cd = aura_env.herbs[k]["X"], aura_env.herbs[k]["Y"], aura_env.herbs[k]["CD"] if cd == 0 then
if cd == 0 then local X, Y = pX - hX, pY - hY
local X, Y = pX - hX, pY - hY local hyp = math.sqrt((math.abs(X ^ 2)) + (math.abs(Y ^ 2)))
local hyp = math.sqrt((math.abs(X^2)) + (math.abs(Y^2))) if hyp < aura_env.minID["D"] then
if hyp < aura_env.minID["D"] then aura_env.minID["X"] = hX
aura_env.minID["X"] = hX aura_env.minID["Y"] = hY
aura_env.minID["Y"] = hY aura_env.minID["D"] = hyp
aura_env.minID["D"] = hyp aura_env.minID["ID"] = k
aura_env.minID["ID"] = k end
end end
end end
end return aura_env.minID["ID"]
return aura_env.minID["ID"]
end end

View File

@@ -1,279 +1,236 @@
aura_env.herbs = aura_env.herbs = {
{ [1] = {
[1] = ["X"] = 57.62,
{ ["Y"] = 72.45,
["X"] = 57.62, ["CD"] = 0,
["Y"] = 72.45,
["CD"] = 0
}, },
[2] = [2] = {
{ ["X"] = 57.57,
["X"] = 57.57, ["Y"] = 72.49,
["Y"] = 72.49, ["CD"] = 0,
["CD"] = 0
}, },
[3] = [3] = {
{ ["X"] = 60.72,
["X"] = 60.72, ["Y"] = 70.21,
["Y"] = 70.21, ["CD"] = 0,
["CD"] = 0
}, },
[4] = [4] = {
{ ["X"] = 57.63,
["X"] = 57.63, ["Y"] = 72.53,
["Y"] = 72.53, ["CD"] = 0,
["CD"] = 0
}, },
[5] = [5] = {
{ ["X"] = 57.74,
["X"] = 57.74, ["Y"] = 72.2,
["Y"] = 72.2, ["CD"] = 0,
["CD"] = 0
}, },
[6] = [6] = {
{ ["X"] = 60.67,
["X"] = 60.67, ["Y"] = 70.3,
["Y"] = 70.3, ["CD"] = 0,
["CD"] = 0
}, },
[7] = [7] = {
{ ["X"] = 57.84,
["X"] = 57.84, ["Y"] = 72.45,
["Y"] = 72.45, ["CD"] = 0,
["CD"] = 0
}, },
[8] = [8] = {
{ ["X"] = 60.66,
["X"] = 60.66, ["Y"] = 70.92,
["Y"] = 70.92, ["CD"] = 0,
["CD"] = 0
}, },
[9] = [9] = {
{ ["X"] = 60.71,
["X"] = 60.71, ["Y"] = 70.26,
["Y"] = 70.26, ["CD"] = 0,
["CD"] = 0
}, },
[10] = [10] = {
{ ["X"] = 60.67,
["X"] = 60.67, ["Y"] = 70.19,
["Y"] = 70.19, ["CD"] = 0,
["CD"] = 0
}, },
[11] = [11] = {
{ ["X"] = 60.71,
["X"] = 60.71, ["Y"] = 70.31,
["Y"] = 70.31, ["CD"] = 0,
["CD"] = 0
}, },
[12] = [12] = {
{ ["X"] = 60.64,
["X"] = 60.64, ["Y"] = 70.15,
["Y"] = 70.15, ["CD"] = 0,
["CD"] = 0
}, },
[13] = [13] = {
{ ["X"] = 60.73,
["X"] = 60.73, ["Y"] = 70.37,
["Y"] = 70.37, ["CD"] = 0,
["CD"] = 0
}, },
[14] = [14] = {
{ ["X"] = 60.14,
["X"] = 60.14, ["Y"] = 70.54,
["Y"] = 70.54, ["CD"] = 0,
["CD"] = 0
}, },
[15] = [15] = {
{ ["X"] = 71.7,
["X"] = 71.7, ["Y"] = 70.48,
["Y"] = 70.48, ["CD"] = 0,
["CD"] = 0
}, },
[16] = [16] = {
{ ["X"] = 72.11,
["X"] = 72.11, ["Y"] = 71.16,
["Y"] = 71.16, ["CD"] = 0,
["CD"] = 0
}, },
[17] = [17] = {
{ ["X"] = 71.94,
["X"] = 71.94, ["Y"] = 70.56,
["Y"] = 70.56, ["CD"] = 0,
["CD"] = 0
}, },
[18] = [18] = {
{ ["X"] = 72.01,
["X"] = 72.01, ["Y"] = 70.35,
["Y"] = 70.35, ["CD"] = 0,
["CD"] = 0
}, },
[19] = [19] = {
{ ["X"] = 66.58,
["X"] = 66.58, ["Y"] = 69.36,
["Y"] = 69.36, ["CD"] = 0,
["CD"] = 0
}, },
[20] = [20] = {
{ ["X"] = 72.16,
["X"] = 72.16, ["Y"] = 70.51,
["Y"] = 70.51, ["CD"] = 0,
["CD"] = 0
}, },
[21] = [21] = {
{ ["X"] = 66.99,
["X"] = 66.99, ["Y"] = 68.62,
["Y"] = 68.62, ["CD"] = 0,
["CD"] = 0
}, },
[22] = [22] = {
{ ["X"] = 65.63,
["X"] = 65.63, ["Y"] = 69.87,
["Y"] = 69.87, ["CD"] = 0,
["CD"] = 0
}, },
[23] = [23] = {
{ ["X"] = 57.32,
["X"] = 57.32, ["Y"] = 76.15,
["Y"] = 76.15, ["CD"] = 0,
["CD"] = 0
}, },
[24] = [24] = {
{ ["X"] = 65.54,
["X"] = 65.54, ["Y"] = 69.99,
["Y"] = 69.99, ["CD"] = 0,
["CD"] = 0
}, },
[25] = [25] = {
{ ["X"] = 65.66,
["X"] = 65.66, ["Y"] = 69.51,
["Y"] = 69.51, ["CD"] = 0,
["CD"] = 0
}, },
[26] = [26] = {
{ ["X"] = 57.68,
["X"] = 57.68, ["Y"] = 72.53,
["Y"] = 72.53, ["CD"] = 0,
["CD"] = 0
}, },
[27] = [27] = {
{ ["X"] = 56.46,
["X"] = 56.46, ["Y"] = 73.39,
["Y"] = 73.39, ["CD"] = 0,
["CD"] = 0
}, },
[28] = [28] = {
{ ["X"] = 64.03,
["X"] = 64.03, ["Y"] = 73.84,
["Y"] = 73.84, ["CD"] = 0,
["CD"] = 0
}, },
[29] = [29] = {
{ ["X"] = 71.66,
["X"] = 71.66, ["Y"] = 70.86,
["Y"] = 70.86, ["CD"] = 0,
["CD"] = 0
}, },
[30] = [30] = {
{ ["X"] = 56.82,
["X"] = 56.82, ["Y"] = 75.45,
["Y"] = 75.45, ["CD"] = 0,
["CD"] = 0
}, },
[31] = [31] = {
{ ["X"] = 56.21,
["X"] = 56.21, ["Y"] = 76.01,
["Y"] = 76.01, ["CD"] = 0,
["CD"] = 0
}, },
[32] = [32] = {
{ ["X"] = 48.26,
["X"] = 48.26, ["Y"] = 79.27,
["Y"] = 79.27, ["CD"] = 0,
["CD"] = 0
}, },
[33] = [33] = {
{ ["X"] = 55.4,
["X"] = 55.4, ["Y"] = 73.17,
["Y"] = 73.17, ["CD"] = 0,
["CD"] = 0
}, },
[34] = [34] = {
{ ["X"] = 56.71,
["X"] = 56.71, ["Y"] = 78.07,
["Y"] = 78.07, ["CD"] = 0,
["CD"] = 0
}, },
[35] = [35] = {
{ ["X"] = 56.45,
["X"] = 56.45, ["Y"] = 76.92,
["Y"] = 76.92, ["CD"] = 0,
["CD"] = 0
}, },
[36] = [36] = {
{ ["X"] = 50.67,
["X"] = 50.67, ["Y"] = 80.17,
["Y"] = 80.17, ["CD"] = 0,
["CD"] = 0
}, },
[37] = [37] = {
{ ["X"] = 55.33,
["X"] = 55.33, ["Y"] = 76.05,
["Y"] = 76.05, ["CD"] = 0,
["CD"] = 0
}, },
[38] = [38] = {
{ ["X"] = 49.13,
["X"] = 49.13, ["Y"] = 78.84,
["Y"] = 78.84, ["CD"] = 0,
["CD"] = 0
}, },
[39] = [39] = {
{ ["X"] = 50.61,
["X"] = 50.61, ["Y"] = 78.54,
["Y"] = 78.54, ["CD"] = 0,
["CD"] = 0
}, },
[40] = [40] = {
{ ["X"] = 46.32,
["X"] = 46.32, ["Y"] = 78.96,
["Y"] = 78.96, ["CD"] = 0,
["CD"] = 0 },
[41] = {
["X"] = 47.29,
["Y"] = 79.19,
["CD"] = 0,
}, },
[41] =
{
["X"] = 47.29,
["Y"] = 79.19,
["CD"] = 0
}
} }
aura_env.cooldown = 91 aura_env.cooldown = 91
aura_env.wipeDistance = 15 aura_env.wipeDistance = 15
aura_env.angle = 0 aura_env.angle = 0
aura_env.hyp = 0 aura_env.hyp = 0
aura_env.GetClosestHerb = function() aura_env.GetClosestHerb = function()
aura_env.minID = aura_env.minID = {
{ ["X"] = 0,
["X"] = 0, ["Y"] = 0,
["Y"] = 0, ["D"] = 1000,
["D"] = 1000, ["ID"] = 0,
["ID"] = 0 }
} local pX = GetPlayerMapPosition("player") or 0
local pX = GetPlayerMapPosition("player") or 0 local pY = select(2, GetPlayerMapPosition("player")) or 0
local pY = select(2, GetPlayerMapPosition("player")) or 0 pX, pY = pX * 100, pY * 100
pX, pY = pX * 100, pY * 100 for k, v in ipairs(aura_env.herbs) do
for k,v in ipairs(aura_env.herbs) do local hX, hY, cd = aura_env.herbs[k]["X"], aura_env.herbs[k]["Y"], aura_env.herbs[k]["CD"]
local hX, hY, cd = aura_env.herbs[k]["X"], aura_env.herbs[k]["Y"], aura_env.herbs[k]["CD"] if cd == 0 then
if cd == 0 then local X, Y = pX - hX, pY - hY
local X, Y = pX - hX, pY - hY local hyp = math.sqrt((math.abs(X ^ 2)) + (math.abs(Y ^ 2)))
local hyp = math.sqrt((math.abs(X^2)) + (math.abs(Y^2))) if hyp < aura_env.minID["D"] then
if hyp < aura_env.minID["D"] then aura_env.minID["X"] = hX
aura_env.minID["X"] = hX aura_env.minID["Y"] = hY
aura_env.minID["Y"] = hY aura_env.minID["D"] = hyp
aura_env.minID["D"] = hyp aura_env.minID["ID"] = k
aura_env.minID["ID"] = k end
end end
end end
end return aura_env.minID["ID"]
return aura_env.minID["ID"]
end end

View File

@@ -8,12 +8,12 @@ aura_env.Colorer = {
colors = { colors = {
{ r = 0.62, g = 0.62, b = 0.62 }, -- Grey { r = 0.62, g = 0.62, b = 0.62 }, -- Grey
-- { r = 1, g = 1, b = 1 }, -- White -- { r = 1, g = 1, b = 1 }, -- White
{ r = 0.12, g = 1, b = 0 }, -- Green { r = 0.12, g = 1, b = 0 }, -- Green
{ r = 0, g = 0.44, b = 0.87 }, -- Blue { r = 0, g = 0.44, b = 0.87 }, -- Blue
{ r = 0.64, g = 0.21, b = 0.93 }, -- Purple { r = 0.64, g = 0.21, b = 0.93 }, -- Purple
{ r = 1, g = 0.5, b = 0 }, -- Orange { r = 1, g = 0.5, b = 0 }, -- Orange
{ r = 0.9, g = 0.8, b = 0.5 }, -- Light Gold { r = 0.9, g = 0.8, b = 0.5 }, -- Light Gold
{ r = 0, g = 0.8, b = 1.0 }, -- Blizzard Blue { r = 0, g = 0.8, b = 1.0 }, -- Blizzard Blue
}, },
breakpoints = { 0.0, 0.2, 0.4, 0.6, 0.8, 1.0, 1000.0 }, breakpoints = { 0.0, 0.2, 0.4, 0.6, 0.8, 1.0, 1000.0 },
@@ -37,9 +37,7 @@ aura_env.Colorer = {
---@type Color ---@type Color
local endColor = aura_env.Colorer.colors[bracket[2][1]] local endColor = aura_env.Colorer.colors[bracket[2][1]]
if startColor == nil or endColor == nil then if startColor == nil or endColor == nil then return color, "Color not found" end
return color, "Color not found"
end
local fraction = (value - bracket[1][2]) / (bracket[2][2] - bracket[1][2]) local fraction = (value - bracket[1][2]) / (bracket[2][2] - bracket[1][2])
@@ -54,9 +52,7 @@ aura_env.Colorer = {
---@param b number ---@param b number
---@param t number ---@param t number
---@return number ---@return number
lerp = function(a, b, t) lerp = function(a, b, t) return a * (1 - t) + b * t end,
return a * (1 - t) + b * t
end
} }
setmetatable(aura_env.Colorer, { __index = aura_env.Colorer }) setmetatable(aura_env.Colorer, { __index = aura_env.Colorer })
@@ -69,7 +65,7 @@ aura_env.ShieldBuffer = {
---@return ShieldBuffer ---@return ShieldBuffer
new = function(recordsToKeep) new = function(recordsToKeep)
local self = setmetatable({}, { local self = setmetatable({}, {
__index = aura_env.ShieldBuffer __index = aura_env.ShieldBuffer,
}) })
self.recordsToKeep = recordsToKeep self.recordsToKeep = recordsToKeep
self.records = {} self.records = {}
@@ -92,9 +88,7 @@ aura_env.ShieldBuffer = {
GetMax = function(self) GetMax = function(self)
local max = 0 local max = 0
for _, value in pairs(self.records) do for _, value in pairs(self.records) do
if value > max then if value > max then max = value end
max = value
end
end end
if max == nil then return 0 end if max == nil then return 0 end
return max return max
@@ -105,7 +99,7 @@ aura_env.ShieldBuffer = {
local val = self.records[(self.pointer + self.recordsToKeep - 2) % self.recordsToKeep + 1] local val = self.records[(self.pointer + self.recordsToKeep - 2) % self.recordsToKeep + 1]
if val == nil then return 0 end if val == nil then return 0 end
return val return val
end end,
} }
---@class Shield ---@class Shield
@@ -117,7 +111,7 @@ aura_env.Shield = {
---@return Shield ---@return Shield
new = function(name) new = function(name)
local self = setmetatable({}, { local self = setmetatable({}, {
__index = aura_env.Shield __index = aura_env.Shield,
}) })
self.name = name self.name = name
self.value = 0 self.value = 0
@@ -135,7 +129,7 @@ aura_env.Shield = {
self.value = 0 self.value = 0
end end
self.buffer:Append(self.value) self.buffer:Append(self.value)
end end,
} }
---@class ShieldManager ---@class ShieldManager
@@ -177,7 +171,7 @@ aura_env.ShieldManager = {
return string.format("%.1fM", current / 1e6), string.format("%.1fM", max / 1e6), current, max return string.format("%.1fM", current / 1e6), string.format("%.1fM", max / 1e6), current, max
end end
return string.format("%.0fk", current / 1000), string.format("%.0fk", max / 1000), current, max return string.format("%.0fk", current / 1000), string.format("%.0fk", max / 1000), current, max
end end,
} }
---@class Display ---@class Display
@@ -202,7 +196,7 @@ aura_env.Display = {
aura_env.Display.ofHp = string.format("%.0f%%", aura_env.Display.ofHpRaw) aura_env.Display.ofHp = string.format("%.0f%%", aura_env.Display.ofHpRaw)
aura_env.Display.color = aura_env.Colorer.Interpolate(aura_env.Display.ofHpRawFraction) aura_env.Display.color = aura_env.Colorer.Interpolate(aura_env.Display.ofHpRawFraction)
return nil return nil
end end,
} }
---@type table<Shield> ---@type table<Shield>

View File

@@ -1,15 +1,13 @@
---@param table table ---@param table table
---@param depth number? ---@param depth number?
function DumpTable(table, depth) function DumpTable(table, depth)
if depth == nil then if depth == nil then depth = 0 end
depth = 0 if depth > 200 then
end
if (depth > 200) then
print("Error: Depth > 200 in dumpTable()") print("Error: Depth > 200 in dumpTable()")
return return
end end
for k, v in pairs(table) do for k, v in pairs(table) do
if (type(v) == "table") then if type(v) == "table" then
print(string.rep(" ", depth) .. k .. ":") print(string.rep(" ", depth) .. k .. ":")
DumpTable(v, depth + 1) DumpTable(v, depth + 1)
else else
@@ -18,7 +16,6 @@ function DumpTable(table, depth)
end end
end end
local colorer = Colorer.new() local colorer = Colorer.new()
local value = 1.21 local value = 1.21

View File

@@ -9,10 +9,8 @@
if not WeakAurasSaved.Cyka then WeakAurasSaved.Cyka = {} end if not WeakAurasSaved.Cyka then WeakAurasSaved.Cyka = {} end
if not WeakAurasSaved.Cyka.AchievementSniffer then WeakAurasSaved.Cyka.AchievementSniffer = {} end if not WeakAurasSaved.Cyka.AchievementSniffer then WeakAurasSaved.Cyka.AchievementSniffer = {} end
if not WeakAurasSaved.Cyka.AchievementSniffer2 then WeakAurasSaved.Cyka.AchievementSniffer2 = {} end if not WeakAurasSaved.Cyka.AchievementSniffer2 then WeakAurasSaved.Cyka.AchievementSniffer2 = {} end
for k,v in pairs(WeakAurasSaved.Cyka.AchievementSniffer2) do for k, v in pairs(WeakAurasSaved.Cyka.AchievementSniffer2) do
if WeakAurasSaved.Cyka.AchievementSniffer[k] then if WeakAurasSaved.Cyka.AchievementSniffer[k] then WeakAurasSaved.Cyka.AchievementSniffer[k] = nil end
WeakAurasSaved.Cyka.AchievementSniffer[k] = nil
end
end end
aura_env.achievements = { aura_env.achievements = {
@@ -196,9 +194,7 @@ aura_env.TryInspect = function()
if not should then return end if not should then return end
local canInspect = CheckInteractDistance("target", 1) local canInspect = CheckInteractDistance("target", 1)
if canInspect then if canInspect then SetAchievementComparisonUnit("target") end
SetAchievementComparisonUnit("target")
end
end end
---@param playerName string ---@param playerName string

View File

@@ -2,8 +2,6 @@ local year = 20
local month = 7 local month = 7
local day = 12 local day = 12
if year < 100 then if year < 100 then year = "20" .. year end
year = "20" .. year
end
print(string.format("%4d-%02d-%02d", year, month, day)) print(string.format("%4d-%02d-%02d", year, month, day))

View File

@@ -2,5 +2,5 @@ aura_env.KickTime = 0
aura_env.AfkSince = 0 aura_env.AfkSince = 0
WeakAurasSaved.Cyka.LoginInfo = { WeakAurasSaved.Cyka.LoginInfo = {
[Today] = WeakAurasSaved.Cyka.LoginInfo[Today] or {} [Today] = WeakAurasSaved.Cyka.LoginInfo[Today] or {},
} }

View File

@@ -5,44 +5,42 @@ local iconDisplayDuration = 3
---@param msg string ---@param msg string
---@return CItemInfo, string | nil ---@return CItemInfo, string | nil
GetItemInfo = function(msg) GetItemInfo = function(msg)
local itemInfo = {name = "", icon = 134400, quantity = 0, color = ""} local itemInfo = { name = "", icon = 134400, quantity = 0, color = "" }
local name = msg:match("h%[(.+)%]") local name = msg:match("h%[(.+)%]")
if not name then return itemInfo, "No item name found" end if not name then return itemInfo, "No item name found" end
local quantity = msg:match("x(%d+)") or 1 local quantity = msg:match("x(%d+)") or 1
itemInfo.name = name itemInfo.name = name
itemInfo.quantity = quantity itemInfo.quantity = quantity
if WeakAurasSaved.Cyka.ItemCache[name] then if WeakAurasSaved.Cyka.ItemCache[name] then itemInfo.icon = WeakAurasSaved.Cyka.ItemCache[name].icon end
itemInfo.icon = WeakAurasSaved.Cyka.ItemCache[name].icon local color = msg:match("cff(%w%w%w%w%w%w)") or "ffffff"
end itemInfo.color = color
local color = msg:match("cff(%w%w%w%w%w%w)") or "ffffff"
itemInfo.color = color
return itemInfo, nil return itemInfo, nil
end end
---@param msg string ---@param msg string
---@param allstates allstates ---@param allstates allstates
DrawIcon = function(msg, allstates) DrawIcon = function(msg, allstates)
local info, err = GetItemInfo(msg) local info, err = GetItemInfo(msg)
if err then if err then
print(err) print(err)
return return
end end
local formattedName = "\124cff" .. info.color .. "[" .. info.name .. "]\124r x" .. info.quantity local formattedName = "\124cff" .. info.color .. "[" .. info.name .. "]\124r x" .. info.quantity
allstates[#aura_env.allstates + 1] = { allstates[#aura_env.allstates + 1] = {
show = true, show = true,
changed = true, changed = true,
index = GetTime(), index = GetTime(),
resort = true, resort = true,
icon = info.icon, icon = info.icon,
name = formattedName, name = formattedName,
progressType = "timed", progressType = "timed",
expirationTime = GetTime() + iconDisplayDuration, expirationTime = GetTime() + iconDisplayDuration,
duration = iconDisplayDuration, duration = iconDisplayDuration,
autoHide = true, autoHide = true,
} }
end end

File diff suppressed because it is too large Load Diff

View File

@@ -5,262 +5,255 @@ local iconDisplayDuration = 3
---@param slot number ---@param slot number
---@return string, string|nil ---@return string, string|nil
local function getItemLink(container, slot) local function getItemLink(container, slot)
if container == nil then return "", string.format("Container is nil") end if container == nil then return "", string.format("Container is nil") end
if slot == nil then return "", string.format("Slot is nil") end if slot == nil then return "", string.format("Slot is nil") end
local link = select(7, GetContainerItemInfo(container, slot)) local link = select(7, GetContainerItemInfo(container, slot))
if link == nil then return "", string.format("GetContainerItemInfo returned nil for link (arg 7)") end if link == nil then return "", string.format("GetContainerItemInfo returned nil for link (arg 7)") end
return link return link
end end
---@param container number ---@param container number
---@param slot number ---@param slot number
---@return string, string|nil ---@return string, string|nil
local function getItemQuantity(container, slot) local function getItemQuantity(container, slot)
if container == nil then return "", string.format("Container is nil") end if container == nil then return "", string.format("Container is nil") end
if slot == nil then return "", string.format("Slot is nil") end if slot == nil then return "", string.format("Slot is nil") end
local quantity = select(2, GetContainerItemInfo(container, slot)) local quantity = select(2, GetContainerItemInfo(container, slot))
if quantity == nil then if quantity == nil then return "", string.format("GetContainerItemInfo returned nil for quantity (arg 2)") end
return "", return quantity
string.format("GetContainerItemInfo returned nil for quantity (arg 2)")
end
return quantity
end end
---@param container number ---@param container number
---@param slot number ---@param slot number
---@return string, string|nil ---@return string, string|nil
local function getItemName(container, slot) local function getItemName(container, slot)
if container == nil then return "", string.format("Container is nil") end if container == nil then return "", string.format("Container is nil") end
if slot == nil then return "", string.format("Slot is nil") end if slot == nil then return "", string.format("Slot is nil") end
local name = select(1, GetItemInfo(getItemLink(container, slot))) local name = select(1, GetItemInfo(getItemLink(container, slot)))
if name == nil then return "", string.format("GetItemInfo returned nil for name (arg 1)") end if name == nil then return "", string.format("GetItemInfo returned nil for name (arg 1)") end
return name return name
end end
---@param container number ---@param container number
---@param slot number ---@param slot number
---@return string, string|nil ---@return string, string|nil
local function getItemType(container, slot) local function getItemType(container, slot)
if container == nil then return "", string.format("Container is nil") end if container == nil then return "", string.format("Container is nil") end
if slot == nil then return "", string.format("Slot is nil") end if slot == nil then return "", string.format("Slot is nil") end
local type = select(6, GetItemInfo(getItemLink(container, slot))) local type = select(6, GetItemInfo(getItemLink(container, slot)))
if type == nil then return "", string.format("GetItemInfo returned nil for type (arg 6)") end if type == nil then return "", string.format("GetItemInfo returned nil for type (arg 6)") end
return type return type
end end
---@param container number ---@param container number
---@param slot number ---@param slot number
---@return string, string|nil ---@return string, string|nil
local function getItemSubtype(container, slot) local function getItemSubtype(container, slot)
if container == nil then return "", string.format("Container is nil") end if container == nil then return "", string.format("Container is nil") end
if slot == nil then return "", string.format("Slot is nil") end if slot == nil then return "", string.format("Slot is nil") end
local subtype = select(7, GetItemInfo(getItemLink(container, slot))) local subtype = select(7, GetItemInfo(getItemLink(container, slot)))
if subtype == nil then return "", string.format("GetItemInfo returned nil for subtype (arg 7)") end if subtype == nil then return "", string.format("GetItemInfo returned nil for subtype (arg 7)") end
return subtype return subtype
end end
---@param container number ---@param container number
---@param slot number ---@param slot number
---@return string, string|nil ---@return string, string|nil
local function getItemLevel(container, slot) local function getItemLevel(container, slot)
if container == nil then return "", string.format("Container is nil") end if container == nil then return "", string.format("Container is nil") end
if slot == nil then return "", string.format("Slot is nil") end if slot == nil then return "", string.format("Slot is nil") end
local level = select(4, GetItemInfo(getItemLink(container, slot))) local level = select(4, GetItemInfo(getItemLink(container, slot)))
if level == nil then return "", string.format("GetItemInfo returned nil for level (arg 4)") end if level == nil then return "", string.format("GetItemInfo returned nil for level (arg 4)") end
return level return level
end end
---@param container number ---@param container number
---@param slot number ---@param slot number
---@return string, string|nil ---@return string, string|nil
local function getItemValue(container, slot) local function getItemValue(container, slot)
if container == nil then return "", string.format("Container is nil") end if container == nil then return "", string.format("Container is nil") end
if slot == nil then return "", string.format("Slot is nil") end if slot == nil then return "", string.format("Slot is nil") end
local value = select(11, GetItemInfo(getItemLink(container, slot))) local value = select(11, GetItemInfo(getItemLink(container, slot)))
if value == nil then return "", string.format("GetItemInfo returned nil for value (arg 11)") end if value == nil then return "", string.format("GetItemInfo returned nil for value (arg 11)") end
return value return value
end end
---@param container number ---@param container number
---@param slot number ---@param slot number
---@return string, string|nil ---@return string, string|nil
local function getItemQuality(container, slot) local function getItemQuality(container, slot)
if container == nil then return "", string.format("Container is nil") end if container == nil then return "", string.format("Container is nil") end
if slot == nil then return "", string.format("Slot is nil") end if slot == nil then return "", string.format("Slot is nil") end
local quality = select(3, GetItemInfo(getItemLink(container, slot))) local quality = select(3, GetItemInfo(getItemLink(container, slot)))
if quality == nil then return "", string.format("GetItemInfo returned nil for quality (arg 3)") end if quality == nil then return "", string.format("GetItemInfo returned nil for quality (arg 3)") end
return quality return quality
end end
---@param container number ---@param container number
---@param slot number ---@param slot number
---@return string, string|nil ---@return string, string|nil
local function getItemEquipLocation(container, slot) local function getItemEquipLocation(container, slot)
if container == nil then return "", string.format("Container is nil") end if container == nil then return "", string.format("Container is nil") end
if slot == nil then return "", string.format("Slot is nil") end if slot == nil then return "", string.format("Slot is nil") end
local equipLoc = select(9, GetItemInfo(getItemLink(container, slot))) local equipLoc = select(9, GetItemInfo(getItemLink(container, slot)))
if equipLoc == nil then return "", string.format("GetItemInfo returned nil for equipLoc (arg 9)") end if equipLoc == nil then return "", string.format("GetItemInfo returned nil for equipLoc (arg 9)") end
return equipLoc return equipLoc
end end
---@param container number ---@param container number
---@param slot number ---@param slot number
---@return string, string|nil ---@return string, string|nil
local function getItemIcon(container, slot) local function getItemIcon(container, slot)
if container == nil then return "", string.format("Container is nil") end if container == nil then return "", string.format("Container is nil") end
if slot == nil then return "", string.format("Slot is nil") end if slot == nil then return "", string.format("Slot is nil") end
local icon = select(10, GetItemInfo(getItemLink(container, slot))) local icon = select(10, GetItemInfo(getItemLink(container, slot)))
if icon == nil then return "", string.format("GetItemInfo returned nil for icon (arg 10)") end if icon == nil then return "", string.format("GetItemInfo returned nil for icon (arg 10)") end
return icon return icon
end end
---@param container number ---@param container number
---@param slot number ---@param slot number
---@return string, string|nil ---@return string, string|nil
local function getBindType(container, slot) local function getBindType(container, slot)
if container == nil then return "", string.format("Container is nil") end if container == nil then return "", string.format("Container is nil") end
if slot == nil then return "", string.format("Slot is nil") end if slot == nil then return "", string.format("Slot is nil") end
local bindType = select(14, GetItemInfo(getItemLink(container, slot))) local bindType = select(14, GetItemInfo(getItemLink(container, slot)))
if bindType == nil then return "", string.format("GetItemInfo returned nil for bindType (arg 14)") end if bindType == nil then return "", string.format("GetItemInfo returned nil for bindType (arg 14)") end
return bindType return bindType
end end
---@class Filter ---@class Filter
---@field requires table<string, fun(container:number, slot: number): string|number|boolean> | nil ---@field requires table<string, fun(container:number, slot: number): string|number|boolean> | nil
---@field filter fun(container: number, slot: number, provided: table<string, string|number|boolean>): boolean ---@field filter fun(container: number, slot: number, provided: table<string, string|number|boolean>): boolean
Filter = { Filter = {
---@param requires table<string, fun(container:number, slot: number): string|number|boolean> | nil ---@param requires table<string, fun(container:number, slot: number): string|number|boolean> | nil
---@param filter fun(container: number, slot: number, provided: table<string, string|number|boolean>): boolean ---@param filter fun(container: number, slot: number, provided: table<string, string|number|boolean>): boolean
---@return Filter ---@return Filter
new = function(requires, filter) new = function(requires, filter)
local self = setmetatable({}, { local self = setmetatable({}, {
__index = Filter __index = Filter,
}) })
self.requires = requires self.requires = requires
self.filter = filter self.filter = filter
return self return self
end, end,
---@param self Filter ---@param self Filter
---@param container number ---@param container number
---@param slot number ---@param slot number
---@return boolean, string|nil ---@return boolean, string|nil
Run = function(self, container, slot) Run = function(self, container, slot)
---@type table<string, string|number|boolean> ---@type table<string, string|number|boolean>
local provided = {} local provided = {}
if self.requires then if self.requires then
for k, v in pairs(self.requires) do for k, v in pairs(self.requires) do
local res, err = v(container, slot) local res, err = v(container, slot)
if err then if err then
if debug then print(err) end if debug then print(err) end
return false, err return false, err
end end
provided[k] = res provided[k] = res
end end
end end
local res, err = self.filter(container, slot, provided) local res, err = self.filter(container, slot, provided)
if err then if err then
if debug then print(err) end if debug then print(err) end
end end
return res, nil return res, nil
end end,
} }
local grayFilter = Filter.new({ local grayFilter = Filter.new({
["quality"] = getItemQuality ["quality"] = getItemQuality,
}, }, function(container, slot, provided)
function(container, slot, provided) if not aura_env.config.grayFilter then return false end
if not aura_env.config.grayFilter then return false end if provided.quality == 0 then return true end
if provided.quality == 0 then return false
return true end)
end
return false
end)
local gearFilter = Filter.new({ local gearFilter = Filter.new({
["ilvl"] = getItemLevel, ["ilvl"] = getItemLevel,
["bindType"] = getBindType, ["bindType"] = getBindType,
["type"] = getItemType, ["type"] = getItemType,
["equipLoc"] = getItemEquipLocation ["equipLoc"] = getItemEquipLocation,
}, }, function(container, slot, provided)
function(container, slot, provided) if not aura_env.config.gearFilter then return false end
if not aura_env.config.gearFilter then return false end local ilvlThreshold = aura_env.config.gearFilterIlvlFilterThreshold
local ilvlThreshold = aura_env.config.gearFilterIlvlFilterThreshold local sellBoe = aura_env.config.gearFilterSellBoe
local sellBoe = aura_env.config.gearFilterSellBoe
if provided.type == "Armor" if
or provided.type == "Weapon" provided.type == "Armor"
or provided.equipLoc == "INVTYPE_FINGER" or provided.type == "Weapon"
or provided.equipLoc == "INVTYPE_TRINKET" or provided.equipLoc == "INVTYPE_FINGER"
or provided.equipLoc == "INVTYPE_CLOAK" or provided.equipLoc == "INVTYPE_TRINKET"
or provided.equipLoc == "INVTYPE_NECK" then or provided.equipLoc == "INVTYPE_CLOAK"
if provided.ilvl < ilvlThreshold and (provided.bindType == 1 or sellBoe) then or provided.equipLoc == "INVTYPE_NECK"
return true then
end if provided.ilvl < ilvlThreshold and (provided.bindType == 1 or sellBoe) then return true end
end end
return false return false
end) end)
---@param container number ---@param container number
---@param slot number ---@param slot number
---@return nil, string|nil ---@return nil, string|nil
local function doSell(container, slot) local function doSell(container, slot)
local itemIcon, err = getItemIcon(container, slot) local itemIcon, err = getItemIcon(container, slot)
if err then return nil, string.format("Error getting item icon: %s", err) end if err then return nil, string.format("Error getting item icon: %s", err) end
local itemName, err = getItemName(container, slot) local itemName, err = getItemName(container, slot)
if err then return nil, string.format("Error getting item name: %s", err) end if err then return nil, string.format("Error getting item name: %s", err) end
local itemQuantity, err = getItemQuantity(container, slot) local itemQuantity, err = getItemQuantity(container, slot)
if err then return nil, string.format("Error getting item quantity: %s", err) end if err then return nil, string.format("Error getting item quantity: %s", err) end
local itemQuality, err = getItemQuality(container, slot) local itemQuality, err = getItemQuality(container, slot)
if err then return nil, string.format("Error getting item quality: %s", err) end if err then return nil, string.format("Error getting item quality: %s", err) end
local nameWithColor = string.format("%s[%s]\124r", aura_env.qualityColors[itemQuality + 1], itemName) local nameWithColor = string.format("%s[%s]\124r", aura_env.qualityColors[itemQuality + 1], itemName)
local nameWithQuantity = string.format("%s x%s", nameWithColor, itemQuantity) local nameWithQuantity = string.format("%s x%s", nameWithColor, itemQuantity)
aura_env.allstates[#aura_env.allstates + 1] = { aura_env.allstates[#aura_env.allstates + 1] = {
show = true, show = true,
changed = true, changed = true,
index = GetTime(), index = GetTime(),
resort = true, resort = true,
icon = itemIcon, icon = itemIcon,
name = nameWithQuantity, name = nameWithQuantity,
amount = itemQuantity, amount = itemQuantity,
progressType = "timed", progressType = "timed",
expirationTime = GetTime() + iconDisplayDuration, expirationTime = GetTime() + iconDisplayDuration,
duration = iconDisplayDuration, duration = iconDisplayDuration,
autoHide = true, autoHide = true,
} }
UseContainerItem(container, slot) UseContainerItem(container, slot)
return nil, nil return nil, nil
end end
---@type table<Filter> ---@type table<Filter>
local filters = { local filters = {
grayFilter, grayFilter,
gearFilter gearFilter,
} }
---@class FilterService ---@class FilterService
aura_env.FilterService = { aura_env.FilterService = {
---@param container number ---@param container number
---@param slot number ---@param slot number
---@return nil, nil ---@return nil, nil
Run = function(container, slot) Run = function(container, slot)
local itemLink, err = getItemLink(container, slot) local itemLink, err = getItemLink(container, slot)
if err then return nil, string.format("Err: slot empty (%d-%d) - %s", container, slot, err) end if err then return nil, string.format("Err: slot empty (%d-%d) - %s", container, slot, err) end
for k, filter in pairs(filters) do for k, filter in pairs(filters) do
local res, err = filter:Run(container, slot) local res, err = filter:Run(container, slot)
if err then if err then
if debug then print(err) end if debug then print(err) end
else else
if res then if res then
doSell(container, slot) doSell(container, slot)
return return
end end
end end
end end
end, end,
} }
aura_env.qualityColors = { aura_env.qualityColors = {
"\124cff9d9d9d", -- Poor "\124cff9d9d9d", -- Poor
"\124cffffffff", -- Common "\124cffffffff", -- Common
"\124cff1eff00", -- Uncommon "\124cff1eff00", -- Uncommon
"\124cff0070dd", -- Rare "\124cff0070dd", -- Rare
"\124cffa335ee", -- Epic "\124cffa335ee", -- Epic
"\124cffff8000", -- Legendary "\124cffff8000", -- Legendary
"\124cffe6cc80", -- Artifact "\124cffe6cc80", -- Artifact
"\124cff00ccff", -- Heirloom "\124cff00ccff", -- Heirloom
} }

View File

@@ -57,7 +57,7 @@ end
---@field currentDayOnlineTimeMilliseconds number ---@field currentDayOnlineTimeMilliseconds number
BattlepassInfo = { BattlepassInfo = {
PingApi = function() PingApi = function()
SendAddonMessage('UIMSG_TO_SERVER', "UIMSG_GET_ONLINETIME_DAY" .. "\t", 'WHISPER', UnitName('player')) SendAddonMessage("UIMSG_TO_SERVER", "UIMSG_GET_ONLINETIME_DAY" .. "\t", "WHISPER", UnitName("player"))
end, end,
ParseApi = function(msg) ParseApi = function(msg)
local packets = aura_env.Split(msg, ":") local packets = aura_env.Split(msg, ":")
@@ -71,24 +71,22 @@ BattlepassInfo = {
BattlepassInfo.cost = tonumber(packets[7]) BattlepassInfo.cost = tonumber(packets[7])
BattlepassInfo.currentDayOnlineTimeMinutes = math.floor(BattlepassInfo.currentDayOnlineTimeMilliseconds / 60000) BattlepassInfo.currentDayOnlineTimeMinutes = math.floor(BattlepassInfo.currentDayOnlineTimeMilliseconds / 60000)
WeakAurasSaved.Cyka.LoginInfo[Today][UnitName("player")].onlineTimeInMinutes = BattlepassInfo WeakAurasSaved.Cyka.LoginInfo[Today][UnitName("player")].onlineTimeInMinutes =
.currentDayOnlineTimeMinutes BattlepassInfo.currentDayOnlineTimeMinutes
WeakAurasSaved.Cyka.LoginInfo[Today][UnitName("player")].claimed = BattlepassInfo.dayRewardComplete WeakAurasSaved.Cyka.LoginInfo[Today][UnitName("player")].claimed = BattlepassInfo.dayRewardComplete
if BattlepassInfo.dayRewardComplete == 0 and BattlepassInfo.currentDayOnlineTimeMinutes >= 120 then if BattlepassInfo.dayRewardComplete == 0 and BattlepassInfo.currentDayOnlineTimeMinutes >= 120 then
BattlepassInfo.DoClaim() BattlepassInfo.DoClaim()
C_Timer.After(0.2, function() C_Timer.After(0.2, function() BattlepassInfo.PingApi() end)
BattlepassInfo.PingApi()
end)
end end
UpdateAccountInfo() UpdateAccountInfo()
end, end,
DoClaim = function() DoClaim = function()
SendAddonMessage('UIMSG_TO_SERVER', "UIMSG_WEEKLY_REW_GET" .. "\t", 'WHISPER', UnitName('player')) SendAddonMessage("UIMSG_TO_SERVER", "UIMSG_WEEKLY_REW_GET" .. "\t", "WHISPER", UnitName("player"))
WeakAuras.ScanEvents("PLAY_SOUND", "Interface\\Sounds\\quack.ogg") WeakAuras.ScanEvents("PLAY_SOUND", "Interface\\Sounds\\quack.ogg")
SendChatMessage("YEEE", "WHISPER", nil, UnitName("player")) SendChatMessage("YEEE", "WHISPER", nil, UnitName("player"))
end end,
} }
setmetatable(BattlepassInfo, { setmetatable(BattlepassInfo, {
__call = BattlepassInfo.PingApi, __call = BattlepassInfo.PingApi,
@@ -99,16 +97,13 @@ setmetatable(BattlepassInfo, {
table.insert(ret, k .. ": " .. tostring(v)) table.insert(ret, k .. ": " .. tostring(v))
end end
return table.concat(ret, "\n") return table.concat(ret, "\n")
end end,
}) })
for k, v in pairs(BattlepassInfo) do for k, v in pairs(BattlepassInfo) do
if type(v) == "number" then if type(v) == "number" then BattlepassInfo[k] = 0 end
BattlepassInfo[k] = 0
end
end end
BattlepassInfo() BattlepassInfo()
-- Claiming rewards works fine -- Claiming rewards works fine
-- But the bar does not hide once rewards are claimed -- But the bar does not hide once rewards are claimed

View File

@@ -1,10 +1,10 @@
local function varargToString(...) local function varargToString(...)
local output = {} local output = {}
for i = 1, select("#", ...) do for i = 1, select("#", ...) do
local value = select(i, ...) local value = select(i, ...)
output[#output + 1] = "\"" .. tostring(value) .. "\"" output[#output + 1] = '"' .. tostring(value) .. '"'
end end
return table.concat(output, ",") return table.concat(output, ",")
end end
if not WeakAurasSaved then WeakAurasSaved = {} end if not WeakAurasSaved then WeakAurasSaved = {} end
@@ -16,7 +16,7 @@ if not WeakAurasSaved.Cyka.CombatLog then WeakAurasSaved.Cyka.CombatLog = {} end
---@param ... any ---@param ... any
aura_env.LogSpell = function(subevent, ...) aura_env.LogSpell = function(subevent, ...)
print(varargToString(subevent, ...)) print(varargToString(subevent, ...))
table.insert(WeakAurasSaved.Cyka.CombatLog, varargToString(subevent, ...)) table.insert(WeakAurasSaved.Cyka.CombatLog, varargToString(subevent, ...))
end end
-- /dump WeakAurasSaved.Cyka.CombatLog -- /dump WeakAurasSaved.Cyka.CombatLog
-- /run WeakAurasSaved.Cyka.CombatLog = {} -- /run WeakAurasSaved.Cyka.CombatLog = {}

View File

@@ -20,9 +20,9 @@ aura_env.tick:onChange(function(ticks)
if ticks == aura_env.totalTicks - 1 then if ticks == aura_env.totalTicks - 1 then
-- WeakAuras.ScanEvents("PLAY_SOUND", "Interface\\AddOns\\WeakAuras\\Media\\Sounds\\RobotBlip.ogg") -- WeakAuras.ScanEvents("PLAY_SOUND", "Interface\\AddOns\\WeakAuras\\Media\\Sounds\\RobotBlip.ogg")
PlaySoundFile("Interface\\AddOns\\WeakAuras\\Media\\Sounds\\RobotBlip.ogg", "Master") PlaySoundFile("Interface\\AddOns\\WeakAuras\\Media\\Sounds\\RobotBlip.ogg", "Master")
-- elseif ticks == aura_env.totalTicks - 2 then -- elseif ticks == aura_env.totalTicks - 2 then
-- -- WeakAuras.ScanEvents("PLAY_SOUND", "Interface\\AddOns\\WeakAuras\\Media\\Sounds\\WaterDrop.ogg") -- -- WeakAuras.ScanEvents("PLAY_SOUND", "Interface\\AddOns\\WeakAuras\\Media\\Sounds\\WaterDrop.ogg")
-- PlaySoundFile("Interface\\AddOns\\WeakAuras\\Media\\Sounds\\WaterDrop.ogg", "Master") -- PlaySoundFile("Interface\\AddOns\\WeakAuras\\Media\\Sounds\\WaterDrop.ogg", "Master")
end end
end end
end) end)

View File

@@ -52,9 +52,7 @@ aura_env.JoinChannels = function()
for i, channelName in ipairs(channelNames) do for i, channelName in ipairs(channelNames) do
channelName = strtrim(channelName) channelName = strtrim(channelName)
local password = nil local password = nil
if i <= #channelPasswords then if i <= #channelPasswords then password = strtrim(channelPasswords[i]) end
password = strtrim(channelPasswords[i])
end
JoinPermanentChannel(channelName, password) JoinPermanentChannel(channelName, password)
end end
end end

View File

@@ -6,13 +6,13 @@ aura_env.Colorer = {
---@type table<number, Color> ---@type table<number, Color>
colors = { colors = {
{ r = 0.62, g = 0.62, b = 0.62 }, -- Grey { r = 0.62, g = 0.62, b = 0.62 }, -- Grey
{ r = 1, g = 1, b = 1 }, -- White { r = 1, g = 1, b = 1 }, -- White
{ r = 0.12, g = 1, b = 0 }, -- Green { r = 0.12, g = 1, b = 0 }, -- Green
{ r = 0, g = 0.44, b = 0.87 }, -- Blue { r = 0, g = 0.44, b = 0.87 }, -- Blue
{ r = 0.64, g = 0.21, b = 0.93 }, -- Purple { r = 0.64, g = 0.21, b = 0.93 }, -- Purple
{ r = 1, g = 0.5, b = 0 }, -- Orange { r = 1, g = 0.5, b = 0 }, -- Orange
{ r = 1, g = 0.2, b = 0.23 }, { r = 1, g = 0.2, b = 0.23 },
{ r = 0, g = 0.8, b = 1.0 }, -- Blizzard Blue { r = 0, g = 0.8, b = 1.0 }, -- Blizzard Blue
}, },
breakpoints = { -999, -10, -5, -2, 2, 5, 10, 999 }, breakpoints = { -999, -10, -5, -2, 2, 5, 10, 999 },
@@ -49,9 +49,7 @@ aura_env.Colorer = {
---@param b number ---@param b number
---@param t number ---@param t number
---@return number ---@return number
lerp = function(a, b, t) lerp = function(a, b, t) return a * (1 - t) + b * t end,
return a * (1 - t) + b * t
end
} }
setmetatable(aura_env.Colorer, { __index = aura_env.Colorer }) setmetatable(aura_env.Colorer, { __index = aura_env.Colorer })
@@ -70,5 +68,5 @@ aura_env.KeystoneIdMap = {
[227] = "Return to Karazhan: Lower", [227] = "Return to Karazhan: Lower",
[233] = "Cathedral of Eternal Night", [233] = "Cathedral of Eternal Night",
[234] = "Return to Karazhan: Upper", [234] = "Return to Karazhan: Upper",
[239] = "Seat of the Triumvirate" [239] = "Seat of the Triumvirate",
} }

File diff suppressed because one or more lines are too long

1
FreshShit/Incoming/sct Normal file

File diff suppressed because one or more lines are too long

View File

@@ -14,7 +14,7 @@ aura_env.BaseCooldown = {
---@return BaseCooldown ---@return BaseCooldown
new = function(id, name, playbackSpeed) new = function(id, name, playbackSpeed)
local self = setmetatable({}, { local self = setmetatable({}, {
__index = aura_env.BaseCooldown __index = aura_env.BaseCooldown,
}) })
self.id = id self.id = id
self.name = name self.name = name
@@ -58,8 +58,7 @@ aura_env.BaseCooldown = {
playComplete = function(self) playComplete = function(self)
local soundFile = string.format("Interface\\Sounds\\alerts\\%s.ogg", self.filename) local soundFile = string.format("Interface\\Sounds\\alerts\\%s.ogg", self.filename)
if aura_env.debug then if aura_env.debug then
print(string.format("%s is off cooldown, playing sound file at %s", self.filename, print(string.format("%s is off cooldown, playing sound file at %s", self.filename, soundFile))
soundFile))
end end
WeakAuras.ScanEvents("PLAY_SOUND", soundFile) WeakAuras.ScanEvents("PLAY_SOUND", soundFile)
end, end,
@@ -68,11 +67,10 @@ aura_env.BaseCooldown = {
playSoon = function(self) playSoon = function(self)
local soundFile = string.format("Interface\\Sounds\\alerts\\%s_soon.ogg", self.filename) local soundFile = string.format("Interface\\Sounds\\alerts\\%s_soon.ogg", self.filename)
if aura_env.debug then if aura_env.debug then
print(string.format("%s is almost off cooldown, playing sound file at %s", self.filename, print(string.format("%s is almost off cooldown, playing sound file at %s", self.filename, soundFile))
soundFile))
end end
WeakAuras.ScanEvents("PLAY_SOUND", soundFile) WeakAuras.ScanEvents("PLAY_SOUND", soundFile)
end end,
} }
---@class Spell:BaseCooldown ---@class Spell:BaseCooldown
@@ -85,15 +83,13 @@ aura_env.Spell = {
local obj = aura_env.BaseCooldown.new(id, name, playbackSpeed) local obj = aura_env.BaseCooldown.new(id, name, playbackSpeed)
---@cast obj Spell ---@cast obj Spell
setmetatable(obj, { setmetatable(obj, {
__index = aura_env.Spell __index = aura_env.Spell,
}) })
return obj return obj
end, end,
Update = function(self) Update = function(self) aura_env.BaseCooldown.Update(self, GetSpellCooldown) end,
aura_env.BaseCooldown.Update(self, GetSpellCooldown)
end,
playComplete = aura_env.BaseCooldown.playComplete, playComplete = aura_env.BaseCooldown.playComplete,
playSoon = aura_env.BaseCooldown.playSoon playSoon = aura_env.BaseCooldown.playSoon,
} }
---@class Item:BaseCooldown ---@class Item:BaseCooldown
aura_env.Item = { aura_env.Item = {
@@ -105,15 +101,13 @@ aura_env.Item = {
local obj = aura_env.BaseCooldown.new(id, name, playbackSpeed) local obj = aura_env.BaseCooldown.new(id, name, playbackSpeed)
---@cast obj Item ---@cast obj Item
setmetatable(obj, { setmetatable(obj, {
__index = aura_env.Item __index = aura_env.Item,
}) })
return obj return obj
end, end,
Update = function(self) Update = function(self) aura_env.BaseCooldown.Update(self, GetItemCooldown) end,
aura_env.BaseCooldown.Update(self, GetItemCooldown)
end,
playComplete = aura_env.BaseCooldown.playComplete, playComplete = aura_env.BaseCooldown.playComplete,
playSoon = aura_env.BaseCooldown.playSoon playSoon = aura_env.BaseCooldown.playSoon,
} }
---@class Buff:BaseCooldown ---@class Buff:BaseCooldown
---@field isActive boolean ---@field isActive boolean
@@ -126,7 +120,7 @@ aura_env.Buff = {
local obj = aura_env.BaseCooldown.new(id, name, playbackSpeed) local obj = aura_env.BaseCooldown.new(id, name, playbackSpeed)
---@cast obj Buff ---@cast obj Buff
setmetatable(obj, { setmetatable(obj, {
__index = aura_env.Buff __index = aura_env.Buff,
}) })
obj.isActive = false obj.isActive = false
return obj return obj
@@ -156,15 +150,19 @@ aura_env.Buff = {
---@param self Buff ---@param self Buff
playComplete = function(self) playComplete = function(self)
local soundFile = string.format("Interface\\Sounds\\alerts\\%s_expired.ogg", self.filename) local soundFile = string.format("Interface\\Sounds\\alerts\\%s_expired.ogg", self.filename)
if aura_env.debug then print(string.format("%s expired, playing sound file at %s", self.filename, soundFile)) end if aura_env.debug then
print(string.format("%s expired, playing sound file at %s", self.filename, soundFile))
end
WeakAuras.ScanEvents("PLAY_SOUND", soundFile) WeakAuras.ScanEvents("PLAY_SOUND", soundFile)
end, end,
---@param self Buff ---@param self Buff
playSoon = function(self) playSoon = function(self)
local soundFile = string.format("Interface\\Sounds\\alerts\\%s_expiring.ogg", self.filename) local soundFile = string.format("Interface\\Sounds\\alerts\\%s_expiring.ogg", self.filename)
if aura_env.debug then print(string.format("%s expiring, playing sound file at %s", self.filename, soundFile)) end if aura_env.debug then
print(string.format("%s expiring, playing sound file at %s", self.filename, soundFile))
end
WeakAuras.ScanEvents("PLAY_SOUND", soundFile) WeakAuras.ScanEvents("PLAY_SOUND", soundFile)
end end,
} }
---@type table<BaseCooldown>|nil ---@type table<BaseCooldown>|nil
@@ -185,5 +183,5 @@ aura_env.Cooldowns = {
aura_env.Spell.new(196098, "Soul Harvest", 1.6), aura_env.Spell.new(196098, "Soul Harvest", 1.6),
aura_env.Item.new(5512, "Healthstone", 1.6), aura_env.Item.new(5512, "Healthstone", 1.6),
aura_env.Buff.new(0, "Deadwind Harvester", 1.6), aura_env.Buff.new(0, "Deadwind Harvester", 1.6),
} },
} }

View File

@@ -13,13 +13,13 @@ aura_env.ScoreColorer = {
---@type table<number, Color> ---@type table<number, Color>
colors = { colors = {
{ r = 0.62, g = 0.62, b = 0.62 }, -- Grey { r = 0.62, g = 0.62, b = 0.62 }, -- Grey
{ r = 1, g = 1, b = 1 }, -- White { r = 1, g = 1, b = 1 }, -- White
{ r = 0.12, g = 1, b = 0 }, -- Green { r = 0.12, g = 1, b = 0 }, -- Green
{ r = 0, g = 0.44, b = 0.87 }, -- Blue { r = 0, g = 0.44, b = 0.87 }, -- Blue
{ r = 0.64, g = 0.21, b = 0.93 }, -- Purple { r = 0.64, g = 0.21, b = 0.93 }, -- Purple
{ r = 1, g = 0.5, b = 0 }, -- Orange { r = 1, g = 0.5, b = 0 }, -- Orange
{ r = 1, g = 0.2, b = 0.23 }, { r = 1, g = 0.2, b = 0.23 },
{ r = 0, g = 0.8, b = 1.0 }, -- Blizzard Blue { r = 0, g = 0.8, b = 1.0 }, -- Blizzard Blue
}, },
breakpoints = { 0, 100, 200, 300, 400, 550, 750, 9999 }, breakpoints = { 0, 100, 200, 300, 400, 550, 750, 9999 },
@@ -56,9 +56,7 @@ aura_env.ScoreColorer = {
---@param b number ---@param b number
---@param t number ---@param t number
---@return number ---@return number
lerp = function(a, b, t) lerp = function(a, b, t) return a * (1 - t) + b * t end,
return a * (1 - t) + b * t
end
} }
---@class KeyLevel ---@class KeyLevel
---@field colors table<number, Color> ---@field colors table<number, Color>
@@ -68,13 +66,13 @@ aura_env.KeyLevel = {
---@type table<number, Color> ---@type table<number, Color>
colors = { colors = {
{ r = 0.62, g = 0.62, b = 0.62 }, -- Grey { r = 0.62, g = 0.62, b = 0.62 }, -- Grey
{ r = 1, g = 1, b = 1 }, -- White { r = 1, g = 1, b = 1 }, -- White
{ r = 0.12, g = 1, b = 0 }, -- Green { r = 0.12, g = 1, b = 0 }, -- Green
{ r = 0, g = 0.44, b = 0.87 }, -- Blue { r = 0, g = 0.44, b = 0.87 }, -- Blue
{ r = 0.64, g = 0.21, b = 0.93 }, -- Purple { r = 0.64, g = 0.21, b = 0.93 }, -- Purple
{ r = 1, g = 0.5, b = 0 }, -- Orange { r = 1, g = 0.5, b = 0 }, -- Orange
{ r = 1, g = 0.2, b = 0.23 }, { r = 1, g = 0.2, b = 0.23 },
{ r = 0, g = 0.8, b = 1.0 }, -- Blizzard Blue { r = 0, g = 0.8, b = 1.0 }, -- Blizzard Blue
}, },
breakpoints = { 1, 10, 15, 20, 25, 29, 33, 9999 }, breakpoints = { 1, 10, 15, 20, 25, 29, 33, 9999 },
@@ -111,9 +109,7 @@ aura_env.KeyLevel = {
---@param b number ---@param b number
---@param t number ---@param t number
---@return number ---@return number
lerp = function(a, b, t) lerp = function(a, b, t) return a * (1 - t) + b * t end,
return a * (1 - t) + b * t
end
} }
---@class Key ---@class Key
@@ -138,18 +134,27 @@ Key = {
local formattedScore, err = aura_env.ScoreColorer.Interpolate(self.score) local formattedScore, err = aura_env.ScoreColorer.Interpolate(self.score)
if not err then if not err then
score = string.format("|cff%02x%02x%02x%d|r", formattedScore.r * 255, formattedScore.g * 255, score = string.format(
formattedScore.b * 255, self.score) "|cff%02x%02x%02x%d|r",
formattedScore.r * 255,
formattedScore.g * 255,
formattedScore.b * 255,
self.score
)
end end
local formattedLevel, err = aura_env.KeyLevel.Interpolate(keyLevel) local formattedLevel, err = aura_env.KeyLevel.Interpolate(keyLevel)
if not err then if not err then
level = string.format("|cff%02x%02x%02x%s|r", formattedLevel.r * 255, formattedLevel.g * 255, level = string.format(
formattedLevel.b * 255, self.level) "|cff%02x%02x%02x%s|r",
formattedLevel.r * 255,
formattedLevel.g * 255,
formattedLevel.b * 255,
self.level
)
end end
return string.format("%-30s %-10s %-10s %-10s %-10s", self.name, self.role, level, self.time, return string.format("%-30s %-10s %-10s %-10s %-10s", self.name, self.role, level, self.time, score)
score)
end, end,
}) })
self.name = name self.name = name
@@ -160,9 +165,7 @@ Key = {
return self return self
end, end,
---@return string ---@return string
hash = function(self) hash = function(self) return table.concat({ self.name, self.role, self.level, self.time, self.score }, "/") end,
return table.concat({ self.name, self.role, self.level, self.time, self.score }, "/")
end,
---@param self Key ---@param self Key
---@param other Key ---@param other Key
@@ -170,9 +173,7 @@ Key = {
compareTo = function(self, other) compareTo = function(self, other)
if not self then return true end if not self then return true end
if not other then return false end if not other then return false end
if self.name <= other.name then if self.name <= other.name then return true end
return true
end
return false return false
end, end,
---@param self Key ---@param self Key
@@ -180,7 +181,7 @@ Key = {
if not WeakAurasSaved.Cyka then WeakAurasSaved.Cyka = {} end if not WeakAurasSaved.Cyka then WeakAurasSaved.Cyka = {} end
if not WeakAurasSaved.Cyka.MData then WeakAurasSaved.Cyka.MData = {} end if not WeakAurasSaved.Cyka.MData then WeakAurasSaved.Cyka.MData = {} end
WeakAurasSaved.Cyka.MData[self:hash()] = self WeakAurasSaved.Cyka.MData[self:hash()] = self
end end,
} }
---@param keys Key[] ---@param keys Key[]
@@ -207,9 +208,7 @@ function aura_env.Process()
local keyObj = Key.new(key, role, level, time, score) local keyObj = Key.new(key, role, level, time, score)
keyObj:register() keyObj:register()
if key then if key then keys[#keys + 1] = keyObj end
keys[#keys + 1] = keyObj
end
end end
table.sort(keys, Key.compareTo) table.sort(keys, Key.compareTo)
render(keys) render(keys)

View File

@@ -147,7 +147,7 @@ local function GetCastInfoForGuid(guid)
name = "", name = "",
startms = 0, startms = 0,
endms = 0, endms = 0,
spellid = 0 spellid = 0,
} }
local unit, err = GetUnitFromGuid(guid) local unit, err = GetUnitFromGuid(guid)
@@ -179,7 +179,7 @@ aura_env.Alert = {
---@return Alert ---@return Alert
new = function(id, name, events, instruction, afflictedInstruction) new = function(id, name, events, instruction, afflictedInstruction)
local self = setmetatable({}, { local self = setmetatable({}, {
__index = aura_env.Alert __index = aura_env.Alert,
}) })
self.id = id self.id = id
name = string.gsub(name, " ", "_") name = string.gsub(name, " ", "_")
@@ -234,9 +234,7 @@ aura_env.Alert = {
end end
local displayText = self.instruction local displayText = self.instruction
if err == nil and targetInfo.target == PlayerName then if err == nil and targetInfo.target == PlayerName then displayText = self.afflictedInstruction end
displayText = self.afflictedInstruction
end
local castEnd = math.max(GetTime() + 5, castInfo.endms / 1000) local castEnd = math.max(GetTime() + 5, castInfo.endms / 1000)
local castDuration = math.max(5, (castInfo.endms - castInfo.startms) / 1000) local castDuration = math.max(5, (castInfo.endms - castInfo.startms) / 1000)
@@ -259,7 +257,7 @@ aura_env.Alert = {
allstates[string.format("%d-%d", self.id, self.iterator)] = state allstates[string.format("%d-%d", self.id, self.iterator)] = state
self.iterator = self.iterator + 1 self.iterator = self.iterator + 1
return nil return nil
end end,
} }
local alerts = { local alerts = {
@@ -274,7 +272,13 @@ local alerts = {
-- Felhounds -- Felhounds
aura_env.Alert.new(244086, "Molten Touch", { "SPELL_CAST_SUCCESS" }, "", "Run away"), aura_env.Alert.new(244086, "Molten Touch", { "SPELL_CAST_SUCCESS" }, "", "Run away"),
aura_env.Alert.new(244768, "Desolate Gaze", { "SPELL_AURA_APPLIED" }, "", "Move away"), aura_env.Alert.new(244768, "Desolate Gaze", { "SPELL_AURA_APPLIED" }, "", "Move away"),
aura_env.Alert.new(244057, "Enflame Corruption", { "SPELL_CAST_START", "SPELL_AURA_APPLIED" }, "Spread", "Spread!!"), aura_env.Alert.new(
244057,
"Enflame Corruption",
{ "SPELL_CAST_START", "SPELL_AURA_APPLIED" },
"Spread",
"Spread!!"
),
aura_env.Alert.new(244131, "Consuming Sphere", { "SPELL_AURA_APPLIED" }, "Move", ""), aura_env.Alert.new(244131, "Consuming Sphere", { "SPELL_AURA_APPLIED" }, "Move", ""),
aura_env.Alert.new(244056, "Siphon Corruption", { "SPELL_CAST_START", "SPELL_AURA_APPLIED" }, "Stack", "Stack!!"), aura_env.Alert.new(244056, "Siphon Corruption", { "SPELL_CAST_START", "SPELL_AURA_APPLIED" }, "Stack", "Stack!!"),
-- Antoran High Command -- Antoran High Command
@@ -288,7 +292,7 @@ local alerts = {
-- aura_env.Alert.new(247552, "Sleep Canister"), -- Need more info -- aura_env.Alert.new(247552, "Sleep Canister"), -- Need more info
aura_env.Alert.new(247367, "Shock Lance", { "SPELL_CAST_SUCCESS" }, "", ""), aura_env.Alert.new(247367, "Shock Lance", { "SPELL_CAST_SUCCESS" }, "", ""),
aura_env.Alert.new(248068, "Empowered Pulse Grenade", { "SPELL_CAST_SUCCESS" }, "", ""), -- Need more info aura_env.Alert.new(248068, "Empowered Pulse Grenade", { "SPELL_CAST_SUCCESS" }, "", ""), -- Need more info
aura_env.Alert.new(247376, "Pulse Grenade", { "SPELL_CAST_SUCCESS" }, "", ""), -- Need more info aura_env.Alert.new(247376, "Pulse Grenade", { "SPELL_CAST_SUCCESS" }, "", ""), -- Need more info
aura_env.Alert.new(247716, "Charged Blasts", { "SPELL_AURA_APPLIED" }, "", "Move!!"), aura_env.Alert.new(247716, "Charged Blasts", { "SPELL_AURA_APPLIED" }, "", "Move!!"),
aura_env.Alert.new(247687, "Sever", { "SPELL_CAST_SUCCESS" }, "", ""), aura_env.Alert.new(247687, "Sever", { "SPELL_CAST_SUCCESS" }, "", ""),
aura_env.Alert.new(248070, "Empowered Shrapnel Blast", { "SPELL_CAST_START" }, "Mines", ""), aura_env.Alert.new(248070, "Empowered Shrapnel Blast", { "SPELL_CAST_START" }, "Mines", ""),
@@ -504,9 +508,7 @@ local alerts = {
aura_env.EventMap = {} aura_env.EventMap = {}
for _, alert in ipairs(alerts) do for _, alert in ipairs(alerts) do
for event, _ in pairs(alert.events) do for event, _ in pairs(alert.events) do
if not aura_env.EventMap[event] then if not aura_env.EventMap[event] then aura_env.EventMap[event] = {} end
aura_env.EventMap[event] = {}
end
aura_env.EventMap[event][alert.id] = alert aura_env.EventMap[event][alert.id] = alert
end end
end end

View File

@@ -6,7 +6,7 @@ aura_env.Stack = {
---@return Stack ---@return Stack
new = function(maxSize) new = function(maxSize)
local self = setmetatable({}, { local self = setmetatable({}, {
__index = aura_env.Stack __index = aura_env.Stack,
}) })
self.maxSize = maxSize self.maxSize = maxSize
self.values = {} self.values = {}
@@ -16,9 +16,7 @@ aura_env.Stack = {
---@param value number ---@param value number
Push = function(self, value) Push = function(self, value)
table.insert(self.values, 0, value) table.insert(self.values, 0, value)
if #self.values > self.maxSize then if #self.values > self.maxSize then table.remove(self.values, #self.values) end
table.remove(self.values, #self.values)
end
end, end,
---@param self Stack ---@param self Stack
---@return number ---@return number
@@ -26,9 +24,7 @@ aura_env.Stack = {
local first = self.values[#self.values] local first = self.values[#self.values]
local last = time() local last = time()
if first and last then if first and last then return #self.values / (math.max(last - first, 1)) end
return #self.values / (math.max(last - first, 1))
end
return 0 return 0
end, end,
---@param self Stack ---@param self Stack
@@ -37,9 +33,7 @@ aura_env.Stack = {
local timeThresh = time() - (threshold or aura_env.config.combatMemoryTime) local timeThresh = time() - (threshold or aura_env.config.combatMemoryTime)
-- print(string.format("Clean %d %d", #self.values, timeThresh)) -- print(string.format("Clean %d %d", #self.values, timeThresh))
for i = #self.values, 1, -1 do for i = #self.values, 1, -1 do
if self.values[i] < timeThresh then if self.values[i] < timeThresh then table.remove(self.values, i) end
table.remove(self.values, i)
end
end end
-- print(string.format("Clean after %d", #self.values)) -- print(string.format("Clean after %d", #self.values))
end, end,

View File

@@ -8,27 +8,27 @@ aura_env.messageQueue = {}
---@type table<string, string> ---@type table<string, string>
aura_env.raceMap = { aura_env.raceMap = {
["Orc"] = "Horde", ["Orc"] = "Horde",
["Undead"] = "Horde", ["Undead"] = "Horde",
["Tauren"] = "Horde", ["Tauren"] = "Horde",
["Troll"] = "Horde", ["Troll"] = "Horde",
["Blood Elf"] = "Horde", ["Blood Elf"] = "Horde",
["Goblin"] = "Horde", ["Goblin"] = "Horde",
["Human"] = "Alliance", ["Human"] = "Alliance",
["Dwarf"] = "Alliance", ["Dwarf"] = "Alliance",
["Night Elf"] = "Alliance", ["Night Elf"] = "Alliance",
["Gnome"] = "Alliance", ["Gnome"] = "Alliance",
["Draenei"] = "Alliance", ["Draenei"] = "Alliance",
["Worgen"] = "Alliance", ["Worgen"] = "Alliance",
["Vulpera"] = "Horde", ["Vulpera"] = "Horde",
["Nightborne"] = "Horde", ["Nightborne"] = "Horde",
["Zandalari Troll"] = "Horde", ["Zandalari Troll"] = "Horde",
["Kul Tiran"] = "Alliance", ["Kul Tiran"] = "Alliance",
["Dark Iron Dwarf"] = "Alliance", ["Dark Iron Dwarf"] = "Alliance",
["Void Elf"] = "Alliance", ["Void Elf"] = "Alliance",
["Lightforged Draenei"] = "Alliance", ["Lightforged Draenei"] = "Alliance",
["Mechagnome"] = "Alliance", ["Mechagnome"] = "Alliance",
["Mag'har Orc"] = "Horde" ["Mag'har Orc"] = "Horde",
} }
local throttleTimer = aura_env.config.throttle or 10 local throttleTimer = aura_env.config.throttle or 10
@@ -40,20 +40,16 @@ local throttleMap = {}
aura_env.NotifySpotted = function(playerName, race) aura_env.NotifySpotted = function(playerName, race)
local now = GetTime() local now = GetTime()
local throttleTime = throttleMap[playerName] or 0 local throttleTime = throttleMap[playerName] or 0
if now - throttleTime < throttleTimer then if now - throttleTime < throttleTimer then return end
return
end
throttleMap[playerName] = now throttleMap[playerName] = now
local zone = aura_env.config.zone local zone = aura_env.config.zone
if not zone or zone == "" then if not zone or zone == "" then zone = GetZoneText() .. " " .. GetSubZoneText() end
zone = GetZoneText() .. " " .. GetSubZoneText()
end
local message = { local message = {
channel = "CHANNEL", channel = "CHANNEL",
data = aura_env.config.channel, data = aura_env.config.channel,
message = string.format("I see %s at %s!", playerName, zone) message = string.format("I see %s at %s!", playerName, zone),
} }
table.insert(WeakAurasSaved.Cyka.MessageQueue, message) table.insert(WeakAurasSaved.Cyka.MessageQueue, message)
end end

View File

@@ -26,7 +26,7 @@ Player = {
---@return Player ---@return Player
new = function(name) new = function(name)
local self = setmetatable({}, { local self = setmetatable({}, {
__index = Player __index = Player,
}) })
self.name = name self.name = name
self.whoQueued = false self.whoQueued = false
@@ -41,21 +41,19 @@ Player = {
QueryWho = function(self) QueryWho = function(self)
if aura_env.whoQueued then if aura_env.whoQueued then
print(string.format("There is already a who query queued, waiting for player %s", self.name)) print(string.format("There is already a who query queued, waiting for player %s", self.name))
C_Timer.After(0.5, function() C_Timer.After(0.5, function() self:QueryWho() end)
self:QueryWho()
end)
return return
end end
if self.whoQueued then if self.whoQueued then
print(string.format("Player %s is already queued", self.name)) print(string.format("Player %s is already queued", self.name))
return return
end end
local query = string.format("n-\"%s\"", self.name) local query = string.format('n-"%s"', self.name)
print(string.format("Queueing who query for player %s: %s", self.name, query)) print(string.format("Queueing who query for player %s: %s", self.name, query))
self.whoQueued = true self.whoQueued = true
aura_env.whoQueued = true aura_env.whoQueued = true
SendWho(query) SendWho(query)
end end,
} }
--[09:01 PM] Dump: value=GetChannelList() --[09:01 PM] Dump: value=GetChannelList()

View File

@@ -1,22 +1,21 @@
aura_env.challengeNameMap = { aura_env.challengeNameMap = {
[165] = "Graimrail Depot", [165] = "Graimrail Depot",
[166] = "Shadowmoon Burial Grounds", [166] = "Shadowmoon Burial Grounds",
[197] = "Eye of Azshara", [197] = "Eye of Azshara",
[198] = "Darkheart Thicket", [198] = "Darkheart Thicket",
[199] = "Black Rook Hold", [199] = "Black Rook Hold",
[200] = "Halls of Valor", [200] = "Halls of Valor",
[206] = "Neltharion's Lair", [206] = "Neltharion's Lair",
[207] = "Vault of the Wardens", [207] = "Vault of the Wardens",
[208] = "Maw of Souls", [208] = "Maw of Souls",
[209] = "The Arcway", [209] = "The Arcway",
[210] = "Court of Stars", [210] = "Court of Stars",
[227] = "Return to Karazhan: Lower", [227] = "Return to Karazhan: Lower",
[233] = "Cathedral of Eternal Night", [233] = "Cathedral of Eternal Night",
[234] = "Return to Karazhan: Upper", [234] = "Return to Karazhan: Upper",
[239] = "Seat of the Triumvirate" [239] = "Seat of the Triumvirate",
} }
---@class Key ---@class Key
---@field name string ---@field name string
---@field role string ---@field role string
@@ -39,18 +38,27 @@ aura_env.Key = {
local formattedScore, err = aura_env.ScoreColorer.Interpolate(self.score) local formattedScore, err = aura_env.ScoreColorer.Interpolate(self.score)
if not err then if not err then
score = string.format("|cff%02x%02x%02x%d|r", formattedScore.r * 255, formattedScore.g * 255, score = string.format(
formattedScore.b * 255, self.score) "|cff%02x%02x%02x%d|r",
formattedScore.r * 255,
formattedScore.g * 255,
formattedScore.b * 255,
self.score
)
end end
local formattedLevel, err = aura_env.KeyLevel.Interpolate(keyLevel) local formattedLevel, err = aura_env.KeyLevel.Interpolate(keyLevel)
if not err then if not err then
level = string.format("|cff%02x%02x%02x%s|r", formattedLevel.r * 255, formattedLevel.g * 255, level = string.format(
formattedLevel.b * 255, self.level) "|cff%02x%02x%02x%s|r",
formattedLevel.r * 255,
formattedLevel.g * 255,
formattedLevel.b * 255,
self.level
)
end end
return string.format("%-30s %-8s %-8s %-10s %-10s", self.name, self.role, level, self.time, return string.format("%-30s %-8s %-8s %-10s %-10s", self.name, self.role, level, self.time, score)
score)
end, end,
}) })
self.name = name self.name = name
@@ -61,9 +69,7 @@ aura_env.Key = {
return self return self
end, end,
---@return string ---@return string
hash = function(self) hash = function(self) return table.concat({ self.name, self.role, self.level, self.time, self.score }, "/") end,
return table.concat({ self.name, self.role, self.level, self.time, self.score }, "/")
end,
---@param self Key ---@param self Key
---@param other Key ---@param other Key
@@ -71,9 +77,7 @@ aura_env.Key = {
compareTo = function(self, other) compareTo = function(self, other)
if not self then return true end if not self then return true end
if not other then return false end if not other then return false end
if self.name <= other.name then if self.name <= other.name then return true end
return true
end
return false return false
end, end,
---@param self Key ---@param self Key
@@ -81,5 +85,5 @@ aura_env.Key = {
if not WeakAurasSaved.Cyka then WeakAurasSaved.Cyka = {} end if not WeakAurasSaved.Cyka then WeakAurasSaved.Cyka = {} end
if not WeakAurasSaved.Cyka.MData then WeakAurasSaved.Cyka.MData = {} end if not WeakAurasSaved.Cyka.MData then WeakAurasSaved.Cyka.MData = {} end
WeakAurasSaved.Cyka.MData[self:hash()] = self WeakAurasSaved.Cyka.MData[self:hash()] = self
end end,
} }

View File

@@ -16,12 +16,8 @@ aura_env.Units = {
aura_env.HasDispellableDebuff = function(unit) aura_env.HasDispellableDebuff = function(unit)
for i = 1, 20 do for i = 1, 20 do
local debuff, _, _, _, type = UnitDebuff(unit, i) local debuff, _, _, _, type = UnitDebuff(unit, i)
if debuff == nil then if debuff == nil then return false, nil end
return false, nil if type == "Magic" then return true, nil end
end
if type == "Magic" then
return true, nil
end
end end
return false, nil return false, nil
@@ -30,33 +26,23 @@ end
---@param frame Frame ---@param frame Frame
---@return string, nil|string ---@return string, nil|string
aura_env.GetNameFromFrame = function(frame) aura_env.GetNameFromFrame = function(frame)
if frame == nil then if frame == nil then return "", "Frame is nil" end
return "", "Frame is nil"
end
---@diagnostic disable-next-line: undefined-field ---@diagnostic disable-next-line: undefined-field
if frame.Name == nil then if frame.Name == nil then return "", "Frame.Name is nil" end
return "", "Frame.Name is nil"
end
---@diagnostic disable-next-line: undefined-field ---@diagnostic disable-next-line: undefined-field
local name = frame.Name:GetText() local name = frame.Name:GetText()
if name == nil then if name == nil then return "", "Frame.Name.GetText is nil" end
return "", "Frame.Name.GetText is nil"
end
return name, nil return name, nil
end end
---@param name string ---@param name string
---@return Frame|nil ---@return Frame|nil
aura_env.GetFrameFromName = function(name) aura_env.GetFrameFromName = function(name) return aura_env.PartyCache[name] end
return aura_env.PartyCache[name]
end
---@param name string ---@param name string
---@return string ---@return string
---@return number ---@return number
aura_env.RemoveNamePadding = function(name) aura_env.RemoveNamePadding = function(name) return string.gsub(name, "|c%w%w%w%w%w%w%w%w", "", 1) end
return string.gsub(name, "|c%w%w%w%w%w%w%w%w", "", 1)
end
aura_env.MakeFrameGlow = function(frame) aura_env.MakeFrameGlow = function(frame)
local frameName = frame:GetName() local frameName = frame:GetName()

View File

@@ -1,11 +1,7 @@
if not WeakAurasSaved.Cyka then if not WeakAurasSaved.Cyka then WeakAurasSaved.Cyka = {} end
WeakAurasSaved.Cyka = {} if not WeakAurasSaved.Cyka.WhoSniffer then WeakAurasSaved.Cyka.WhoSniffer = {} end
end
if not WeakAurasSaved.Cyka.WhoSniffer then
WeakAurasSaved.Cyka.WhoSniffer = {}
end
aura_env.ignored = {"Maritza", "Goodbones"} aura_env.ignored = { "Maritza", "Goodbones" }
---@class aura_env ---@class aura_env
---@field raceMap table<string, string> ---@field raceMap table<string, string>
@@ -23,80 +19,72 @@ aura_env.ignored = {"Maritza", "Goodbones"}
---@param input string ---@param input string
---@return number ---@return number
local function utf8len(input) local function utf8len(input)
if not input then if not input then return 0 end
return 0 local len = 0
end local i = 1
local len = 0 local n = #input
local i = 1 while i <= n do
local n = #input local c = input:byte(i)
while i <= n do if c >= 0 and c <= 127 then
local c = input:byte(i) i = i + 1
if c >= 0 and c <= 127 then elseif c >= 194 and c <= 223 then
i = i + 1 i = i + 2
elseif c >= 194 and c <= 223 then elseif c >= 224 and c <= 239 then
i = i + 2 i = i + 3
elseif c >= 224 and c <= 239 then elseif c >= 240 and c <= 244 then
i = i + 3 i = i + 4
elseif c >= 240 and c <= 244 then else
i = i + 4 i = i + 1
else end
i = i + 1 len = len + 1
end end
len = len + 1 return len
end
return len
end end
---@param input string ---@param input string
---@param targetLength number ---@param targetLength number
---@param left boolean ---@param left boolean
---@return string ---@return string
local function padString(input, targetLength, left) local function padString(input, targetLength, left)
left = left or false left = left or false
local len = utf8len(input) local len = utf8len(input)
if len < targetLength then if len < targetLength then
if left then if left then
input = input .. string.rep(" ", targetLength - len) input = input .. string.rep(" ", targetLength - len)
else else
input = string.rep(" ", targetLength - len) .. input input = string.rep(" ", targetLength - len) .. input
end end
end end
return input return input
end end
---@class WHOQuery ---@class WHOQuery
---@field query string ---@field query string
---@field filters WHOFilter[] ---@field filters WHOFilter[]
WHOQuery = { WHOQuery = {
---@param query string ---@param query string
---@param filters WHOFilter[] ---@param filters WHOFilter[]
---@return WHOQuery ---@return WHOQuery
new = function(query, filters) new = function(query, filters)
local self = setmetatable({}, { local self = setmetatable({}, {
__index = WHOQuery __index = WHOQuery,
}) })
self.query = query self.query = query
self.filters = filters self.filters = filters
return self return self
end end,
} }
---@alias WHOFilter fun(name: string, guild: string, level: number, race: string, class: string, zone: string): boolean ---@alias WHOFilter fun(name: string, guild: string, level: number, race: string, class: string, zone: string): boolean
---@type WHOFilter ---@type WHOFilter
local NotSiegeOfOrgrimmarFilter = function(name, guild, level, race, class, zone) local NotSiegeOfOrgrimmarFilter = function(name, guild, level, race, class, zone)
if not zone then if not zone then return false end
return false return zone ~= "Siege of Orgrimmar"
end
return zone ~= "Siege of Orgrimmar"
end end
---@type WHOFilter ---@type WHOFilter
local AllianceFilter = function(name, guild, level, race, class, zone) local AllianceFilter = function(name, guild, level, race, class, zone)
if not race then if not race then return false end
return false if not aura_env.raceMap[race] then return false end
end return aura_env.raceMap[race] == "Alliance"
if not aura_env.raceMap[race] then
return false
end
return aura_env.raceMap[race] == "Alliance"
end end
---@class Message ---@class Message
@@ -104,25 +92,27 @@ end
---@field channel string ---@field channel string
---@field data string ---@field data string
if not WeakAurasSaved.Cyka.MessageQueue then if not WeakAurasSaved.Cyka.MessageQueue then WeakAurasSaved.Cyka.MessageQueue = {} end
WeakAurasSaved.Cyka.MessageQueue = {}
end
aura_env.whoQueryIdx = 1 aura_env.whoQueryIdx = 1
---@type table<number, WHOQuery> ---@type table<number, WHOQuery>
aura_env.whoQueries = {} aura_env.whoQueries = {}
aura_env.whoQueries[1] = WHOQuery.new("g-\"БеспредеЛ\"", {}) aura_env.whoQueries[1] = WHOQuery.new('g-"БеспредеЛ"', {})
aura_env.whoQueries[2] = WHOQuery.new( aura_env.whoQueries[2] = WHOQuery.new(
"z-\"Orgrimmar\" z-\"Durotar\" z-\"Valley of Trials\" z-\"Echo Isles\" r-\"Human\" r-\"Dwarf\" r-\"Night Elf\"", 'z-"Orgrimmar" z-"Durotar" z-"Valley of Trials" z-"Echo Isles" r-"Human" r-"Dwarf" r-"Night Elf"',
{NotSiegeOfOrgrimmarFilter, AllianceFilter}) { NotSiegeOfOrgrimmarFilter, AllianceFilter }
)
aura_env.whoQueries[3] = WHOQuery.new( aura_env.whoQueries[3] = WHOQuery.new(
"z-\"Orgrimmar\" z-\"Durotar\" z-\"Valley of Trials\" z-\"Echo Isles\" r-\"Gnome\" r-\"Draenei\" r-\"Worgen\"", 'z-"Orgrimmar" z-"Durotar" z-"Valley of Trials" z-"Echo Isles" r-"Gnome" r-"Draenei" r-"Worgen"',
{NotSiegeOfOrgrimmarFilter, AllianceFilter}) { NotSiegeOfOrgrimmarFilter, AllianceFilter }
)
aura_env.whoQueries[4] = WHOQuery.new( aura_env.whoQueries[4] = WHOQuery.new(
"z-\"Orgrimmar\" z-\"Durotar\" z-\"Valley of Trials\" z-\"Echo Isles\" r-\"Kul Tiran\" r-\"Dark Iron Dwarf\" r-\"Void Elf\"", 'z-"Orgrimmar" z-"Durotar" z-"Valley of Trials" z-"Echo Isles" r-"Kul Tiran" r-"Dark Iron Dwarf" r-"Void Elf"',
{NotSiegeOfOrgrimmarFilter, AllianceFilter}) { NotSiegeOfOrgrimmarFilter, AllianceFilter }
)
aura_env.whoQueries[5] = WHOQuery.new( aura_env.whoQueries[5] = WHOQuery.new(
"z-\"Orgrimmar\" z-\"Durotar\" z-\"Valley of Trials\" z-\"Echo Isles\" r-\"Lightforged Draenei\" r-\"Mechagnome\"", 'z-"Orgrimmar" z-"Durotar" z-"Valley of Trials" z-"Echo Isles" r-"Lightforged Draenei" r-"Mechagnome"',
{NotSiegeOfOrgrimmarFilter, AllianceFilter}) { NotSiegeOfOrgrimmarFilter, AllianceFilter }
)
aura_env.whoQueries[6] = WHOQuery.new("Kekv Demonboo Dotmada Firobot Verminal", {}) aura_env.whoQueries[6] = WHOQuery.new("Kekv Demonboo Dotmada Firobot Verminal", {})
aura_env.queryPending = false aura_env.queryPending = false
aura_env.ttl = #aura_env.whoQueries * 2 aura_env.ttl = #aura_env.whoQueries * 2
@@ -130,27 +120,27 @@ aura_env.lastQuery = nil
---@type table<string, string> ---@type table<string, string>
aura_env.raceMap = { aura_env.raceMap = {
["Orc"] = "Horde", ["Orc"] = "Horde",
["Undead"] = "Horde", ["Undead"] = "Horde",
["Tauren"] = "Horde", ["Tauren"] = "Horde",
["Troll"] = "Horde", ["Troll"] = "Horde",
["Blood Elf"] = "Horde", ["Blood Elf"] = "Horde",
["Goblin"] = "Horde", ["Goblin"] = "Horde",
["Human"] = "Alliance", ["Human"] = "Alliance",
["Dwarf"] = "Alliance", ["Dwarf"] = "Alliance",
["Night Elf"] = "Alliance", ["Night Elf"] = "Alliance",
["Gnome"] = "Alliance", ["Gnome"] = "Alliance",
["Draenei"] = "Alliance", ["Draenei"] = "Alliance",
["Worgen"] = "Alliance", ["Worgen"] = "Alliance",
["Vulpera"] = "Horde", ["Vulpera"] = "Horde",
["Nightborne"] = "Horde", ["Nightborne"] = "Horde",
["Zandalari Troll"] = "Horde", ["Zandalari Troll"] = "Horde",
["Kul Tiran"] = "Alliance", ["Kul Tiran"] = "Alliance",
["Dark Iron Dwarf"] = "Alliance", ["Dark Iron Dwarf"] = "Alliance",
["Void Elf"] = "Alliance", ["Void Elf"] = "Alliance",
["Lightforged Draenei"] = "Alliance", ["Lightforged Draenei"] = "Alliance",
["Mechagnome"] = "Alliance", ["Mechagnome"] = "Alliance",
["Mag'har Orc"] = "Horde" ["Mag'har Orc"] = "Horde",
} }
---@type table<string, Player> ---@type table<string, Player>
@@ -167,167 +157,169 @@ aura_env.stinkies = {}
---@field firstSeen string ---@field firstSeen string
---@field seenCount number ---@field seenCount number
Player = { Player = {
---@param name string ---@param name string
---@param guild string ---@param guild string
---@param race string ---@param race string
---@param class string ---@param class string
---@param zone string ---@param zone string
---@return Player ---@return Player
new = function(name, guild, race, class, zone) new = function(name, guild, race, class, zone)
local self = setmetatable({}, { local self = setmetatable({}, {
__index = Player __index = Player,
}) })
self.name = name self.name = name
self.guild = guild self.guild = guild
self.race = race self.race = race
self.class = class self.class = class
self.zone = zone self.zone = zone
self.lastSeenInternal = GetTime() self.lastSeenInternal = GetTime()
self.lastSeen = "never" self.lastSeen = "never"
self.firstSeen = "never" self.firstSeen = "never"
self.seenCount = 0 self.seenCount = 0
return self return self
end, end,
ToString = function(self) ToString = function(self)
local out = string.format("%s %s %s\nFirst: %s Last: %s Seen: %3d", padString(self.name, 16, true), local out = string.format(
padString(self.guild, 26, false), padString(self.zone, 26, false), padString(self.firstSeen, 10, true), "%s %s %s\nFirst: %s Last: %s Seen: %3d",
padString(self.lastSeen, 10, true), self.seenCount) padString(self.name, 16, true),
return string.format("|cFF%s%s|r", aura_env.classColors[self.class], out) padString(self.guild, 26, false),
end padString(self.zone, 26, false),
padString(self.firstSeen, 10, true),
padString(self.lastSeen, 10, true),
self.seenCount
)
return string.format("|cFF%s%s|r", aura_env.classColors[self.class], out)
end,
} }
---@type table<string, string> ---@type table<string, string>
aura_env.classColors = { aura_env.classColors = {
["Warrior"] = "C69B6D", ["Warrior"] = "C69B6D",
["Paladin"] = "F48CBA", ["Paladin"] = "F48CBA",
["Hunter"] = "AAD372", ["Hunter"] = "AAD372",
["Rogue"] = "FFF468", ["Rogue"] = "FFF468",
["Priest"] = "FFFFFF", ["Priest"] = "FFFFFF",
["Death Knight"] = "C41E3A", ["Death Knight"] = "C41E3A",
["Shaman"] = "0070DD", ["Shaman"] = "0070DD",
["Mage"] = "3FC7EB", ["Mage"] = "3FC7EB",
["Warlock"] = "8788EE", ["Warlock"] = "8788EE",
["Monk"] = "00FF98", ["Monk"] = "00FF98",
["Druid"] = "FF7C0A", ["Druid"] = "FF7C0A",
["Demon Hunter"] = "A330C9" ["Demon Hunter"] = "A330C9",
} }
---@param input string ---@param input string
---@param deliminer string ---@param deliminer string
---@return string[], string|nil ---@return string[], string|nil
local function StrSplit(input, deliminer) local function StrSplit(input, deliminer)
if not deliminer then if not deliminer then return {}, "deliminer is nil" end
return {}, "deliminer is nil" if not input then return {}, "input is nil" end
end local parts = {}
if not input then for part in string.gmatch(input, "([^" .. deliminer .. "]+)") do
return {}, "input is nil" table.insert(parts, strtrim(part))
end end
local parts = {} return parts, nil
for part in string.gmatch(input, "([^" .. deliminer .. "]+)") do
table.insert(parts, strtrim(part))
end
return parts, nil
end end
---@type string[] ---@type string[]
local toNotify = StrSplit(aura_env.config.notify, ",") local toNotify = StrSplit(aura_env.config.notify, ",")
for i, part in ipairs(toNotify) do for i, part in ipairs(toNotify) do
toNotify[i] = strtrim(part) toNotify[i] = strtrim(part)
end end
---@type table<string, boolean> ---@type table<string, boolean>
local notifyFor = {} local notifyFor = {}
local notifyForD = StrSplit(aura_env.config.notifyFor, ",") local notifyForD = StrSplit(aura_env.config.notifyFor, ",")
for i, part in ipairs(notifyForD) do for i, part in ipairs(notifyForD) do
notifyFor[part] = true notifyFor[part] = true
end end
---@param player Player ---@param player Player
---@return string ---@return string
aura_env.MakeNotifyMessage = function(player) aura_env.MakeNotifyMessage = function(player)
return string.format("%s of class %s and guild %s in %s, first seen: %s, last seen: %s, times seen: %d", return string.format(
player.name, player.class, player.guild, player.zone, player.firstSeen, player.lastSeen, player.seenCount) "%s of class %s and guild %s in %s, first seen: %s, last seen: %s, times seen: %d",
player.name,
player.class,
player.guild,
player.zone,
player.firstSeen,
player.lastSeen,
player.seenCount
)
end end
---@param msg string ---@param msg string
local NotifyAll = function(msg) local NotifyAll = function(msg)
for _, rec in ipairs(toNotify) do for _, rec in ipairs(toNotify) do
---@type Message ---@type Message
local message = { local message = {
channel = "WHISPER", channel = "WHISPER",
data = rec, data = rec,
message = msg message = msg,
} }
table.insert(WeakAurasSaved.Cyka.MessageQueue, message) table.insert(WeakAurasSaved.Cyka.MessageQueue, message)
end end
end end
---@param msg string ---@param msg string
local NotifyChannel = function(msg) local NotifyChannel = function(msg)
local message = { local message = {
channel = "CHANNEL", channel = "CHANNEL",
data = aura_env.config.channel, data = aura_env.config.channel,
message = msg message = msg,
} }
table.insert(WeakAurasSaved.Cyka.MessageQueue, message) table.insert(WeakAurasSaved.Cyka.MessageQueue, message)
end end
---@param player Player ---@param player Player
---@return nil ---@return nil
aura_env.Notify = function(player) aura_env.Notify = function(player)
if not notifyFor[player.zone] then if not notifyFor[player.zone] then return end
return local msg = aura_env.MakeNotifyMessage(player)
end NotifyAll(msg)
local msg = aura_env.MakeNotifyMessage(player) aura_env.NotifyChannel(player)
NotifyAll(msg)
aura_env.NotifyChannel(player)
end end
---@param player Player ---@param player Player
---@param newzone string ---@param newzone string
---@return nil ---@return nil
aura_env.NotifyZoneChanged = function(player, newzone) aura_env.NotifyZoneChanged = function(player, newzone)
if not notifyFor[newzone] then if not notifyFor[newzone] then return end
return local msg =
end string.format("%s of class %s and guild %s moved to %s", player.name, player.class, player.guild, newzone)
local msg = string.format("%s of class %s and guild %s moved to %s", player.name, player.class, player.guild, NotifyAll(msg)
newzone) NotifyChannel(msg)
NotifyAll(msg)
NotifyChannel(msg)
end end
---@param player Player ---@param player Player
---@return nil ---@return nil
aura_env.NotifyGone = function(player) aura_env.NotifyGone = function(player)
if not notifyFor[player.zone] then if not notifyFor[player.zone] then return end
return local msg =
end string.format("%s of class %s and guild %s left %s", player.name, player.class, player.guild, player.zone)
local msg = string.format("%s of class %s and guild %s left %s", player.name, player.class, player.guild, NotifyAll(msg)
player.zone) aura_env.NotifyChannelGone(player)
NotifyAll(msg)
aura_env.NotifyChannelGone(player)
end end
---@param player Player ---@param player Player
---@return nil ---@return nil
aura_env.NotifyChannel = function(player) aura_env.NotifyChannel = function(player)
local msg = aura_env.MakeNotifyMessage(player) local msg = aura_env.MakeNotifyMessage(player)
NotifyChannel(msg) NotifyChannel(msg)
end end
---@param player Player ---@param player Player
---@return nil ---@return nil
aura_env.NotifyChannelGone = function(player) aura_env.NotifyChannelGone = function(player)
local msg = string.format("%s of class %s and guild %s left %s", player.name, player.class, player.guild, local msg =
player.zone) string.format("%s of class %s and guild %s left %s", player.name, player.class, player.guild, player.zone)
NotifyChannel(msg) NotifyChannel(msg)
end end
aura_env.GetChannelName= function(channelId) aura_env.GetChannelName = function(channelId)
local channels = {GetChannelList()} local channels = { GetChannelList() }
for i = 1, #channels, 2 do for i = 1, #channels, 2 do
local id = channels[i] local id = channels[i]
local name = channels[i + 1] local name = channels[i + 1]
if id == channelId then if id == channelId then return name end
return name end
end return nil
end
return nil
end end

View File

@@ -6,7 +6,7 @@ JoinPermanentChannel("foo")
LeaveChannelByName("foo") LeaveChannelByName("foo")
--For existing channels see: --For existing channels see:
local foo = {GetChannelList()} local foo = { GetChannelList() }
--There is also: --There is also:
GetChannelName(0) GetChannelName(0)

View File

@@ -7,13 +7,13 @@ Colorer = {
---@type table<number, Color> ---@type table<number, Color>
colors = { colors = {
{ r = 0.62, g = 0.62, b = 0.62 }, -- Grey { r = 0.62, g = 0.62, b = 0.62 }, -- Grey
{ r = 1, g = 1, b = 1 }, -- White { r = 1, g = 1, b = 1 }, -- White
{ r = 0.12, g = 1, b = 0 }, -- Green { r = 0.12, g = 1, b = 0 }, -- Green
{ r = 0, g = 0.44, b = 0.87 }, -- Blue { r = 0, g = 0.44, b = 0.87 }, -- Blue
{ r = 0.64, g = 0.21, b = 0.93 }, -- Purple { r = 0.64, g = 0.21, b = 0.93 }, -- Purple
{ r = 1, g = 0.5, b = 0 }, -- Orange { r = 1, g = 0.5, b = 0 }, -- Orange
{ r = 0.9, g = 0.8, b = 0.5 }, -- Light Gold { r = 0.9, g = 0.8, b = 0.5 }, -- Light Gold
{ r = 0, g = 0.8, b = 1.0 }, -- Blizzard Blue { r = 0, g = 0.8, b = 1.0 }, -- Blizzard Blue
}, },
breakpoints = { -999, -10, -5, -2, 2, 5, 10, 999 }, breakpoints = { -999, -10, -5, -2, 2, 5, 10, 999 },
@@ -59,8 +59,6 @@ Colorer = {
---@param b number ---@param b number
---@param t number ---@param t number
---@return number ---@return number
lerp = function(a, b, t) lerp = function(a, b, t) return a * (1 - t) + b * t end,
return a * (1 - t) + b * t
end
} }
setmetatable(Colorer, { __index = Colorer }) setmetatable(Colorer, { __index = Colorer })

View File

@@ -1,49 +1,55 @@
aura_env.keybind = "" aura_env.keybind = ""
aura_env.scanned = false aura_env.scanned = false
aura_env.bars = { aura_env.bars = {
"ElvUI_Bar1", "ElvUI_Bar2", "ElvUI_Bar3", "ElvUI_Bar4", "ElvUI_Bar5", "ElvUI_Bar1",
"ElvUI_Bar6", "ElvUI_Bar7", "ElvUI_Bar8", "ElvUI_Bar9", "ElvUI_Bar10" "ElvUI_Bar2",
"ElvUI_Bar3",
"ElvUI_Bar4",
"ElvUI_Bar5",
"ElvUI_Bar6",
"ElvUI_Bar7",
"ElvUI_Bar8",
"ElvUI_Bar9",
"ElvUI_Bar10",
} }
aura_env.lookup = function() aura_env.lookup = function()
local spellid = 0 local spellid = 0
if not aura_env.states or aura_env.states == nil then if not aura_env.states or aura_env.states == nil then
print("No states") print("No states")
return return
end end
local triggerInfo = aura_env.states[2] local triggerInfo = aura_env.states[2]
if not triggerInfo then if not triggerInfo then triggerInfo = aura_env.states[1] end
triggerInfo = aura_env.states[1] if triggerInfo then spellid = triggerInfo.trigger.spellName end
end if spellid == 0 then return end
if triggerInfo then spellid = triggerInfo.trigger.spellName end
if spellid == 0 then return end
for _, bar in pairs(aura_env.bars) do for _, bar in pairs(aura_env.bars) do
for i = 1, 12 do for i = 1, 12 do
local button = _G[bar .. "Button" .. i] local button = _G[bar .. "Button" .. i]
local slot = button:GetAttribute("action") local slot = button:GetAttribute("action")
if slot then if slot then
local type, _, _, id = GetActionInfo(slot) local type, _, _, id = GetActionInfo(slot)
if type == "spell" then if type == "spell" then
if id == spellid then if id == spellid then
local bindid = button.keyBoundTarget local bindid = button.keyBoundTarget
local keybind = GetBindingKey(bindid) local keybind = GetBindingKey(bindid)
aura_env.keybind = keybind aura_env.keybind = keybind
break break
end end
end end
end end
end end
end end
if aura_env.keybind then if aura_env.keybind then
aura_env.keybind = string.gsub(aura_env.keybind, "BUTTON", "B") aura_env.keybind = string.gsub(aura_env.keybind, "BUTTON", "B")
aura_env.keybind = string.gsub(aura_env.keybind, "SHIFT%-", "S") aura_env.keybind = string.gsub(aura_env.keybind, "SHIFT%-", "S")
aura_env.keybind = string.gsub(aura_env.keybind, "CTRL%-", "C") aura_env.keybind = string.gsub(aura_env.keybind, "CTRL%-", "C")
aura_env.keybind = string.gsub(aura_env.keybind, "ALT%-", "A") aura_env.keybind = string.gsub(aura_env.keybind, "ALT%-", "A")
aura_env.keybind = string.gsub(aura_env.keybind, "SPACE", "Spb") aura_env.keybind = string.gsub(aura_env.keybind, "SPACE", "Spb")
end end
aura_env.scanned = true aura_env.scanned = true
end end

View File

@@ -1,21 +1,21 @@
if not _G.tooltipItemInfoHooked then if not _G.tooltipItemInfoHooked then
local function iteminfo(self, bag, slot) local function iteminfo(self, bag, slot)
local itemLink = GetContainerItemLink(bag, slot) local itemLink = GetContainerItemLink(bag, slot)
if itemLink then if itemLink then
local _, _, _, ilvl, reqLevel, class, subclass, maxStack, equipSlot = GetItemInfo(itemLink) local _, _, _, ilvl, reqLevel, class, subclass, maxStack, equipSlot = GetItemInfo(itemLink)
self:AddLine("") self:AddLine("")
self:AddLine("Req Level: " .. reqLevel) self:AddLine("Req Level: " .. reqLevel)
self:AddLine("Item Level: " .. ilvl) self:AddLine("Item Level: " .. ilvl)
self:AddLine("Class: " .. class) self:AddLine("Class: " .. class)
self:AddLine("Subclass: " .. subclass) self:AddLine("Subclass: " .. subclass)
self:AddLine("Max Stack: " .. maxStack) self:AddLine("Max Stack: " .. maxStack)
self:AddLine("Equip Slot: " .. equipSlot) self:AddLine("Equip Slot: " .. equipSlot)
end end
self:Show() self:Show()
end end
-- hooksecurefunc(GameTooltip, "SetInventoryItem", iteminfo) -- hooksecurefunc(GameTooltip, "SetInventoryItem", iteminfo)
hooksecurefunc(GameTooltip, "SetBagItem", iteminfo) hooksecurefunc(GameTooltip, "SetBagItem", iteminfo)
_G.tooltipItemInfoHooked = true _G.tooltipItemInfoHooked = true
end end

2
NewAge

Submodule NewAge updated: 37df5a0610...3fa9e6c087

View File

@@ -1,6 +1,60 @@
local cc = local cc = {
{ "Gnaw",
"Gnaw", "Hungering Cold", "Bash", "Cyclone", "Entangling Roots", "Hibernate", "Maim", "Pounce", "Entrapment", "Freezing Trap", "Pin", "Scare Beast", "Scatter Shot", "Intimidation", "Ravage", "Sonic Blast", "Wyvern Sting", "Deep Freeze", "Dragon's Breath", "Frost Nova", "Polymorph", "Shattered Barrier", "Slow", "Frostbolt", "Hammer of Justice", "Holy Wrath", "Repentance", "Seal of Justice", "Turn Evil", "Mind Control", "Psychic Horror", "Psychic Scream", "Shackle Undead", "Holy Word: Chastise", "Sin and Punishment", "Blind", "Cheap Shot", "Gouge", "Kidney Shot", "Sap", "Earthbind Totem", "Stoneclaw Totem", "Hex", "Banish", "Death Coil", "Fear", "Howl of Terror", "Intercept", "Seduction", "Shadowfury", "Charge", "Concussion Blow", "Hamstring", "Improved Hamstring", "Intimidating Shout", "Shockwave" "Hungering Cold",
"Bash",
"Cyclone",
"Entangling Roots",
"Hibernate",
"Maim",
"Pounce",
"Entrapment",
"Freezing Trap",
"Pin",
"Scare Beast",
"Scatter Shot",
"Intimidation",
"Ravage",
"Sonic Blast",
"Wyvern Sting",
"Deep Freeze",
"Dragon's Breath",
"Frost Nova",
"Polymorph",
"Shattered Barrier",
"Slow",
"Frostbolt",
"Hammer of Justice",
"Holy Wrath",
"Repentance",
"Seal of Justice",
"Turn Evil",
"Mind Control",
"Psychic Horror",
"Psychic Scream",
"Shackle Undead",
"Holy Word: Chastise",
"Sin and Punishment",
"Blind",
"Cheap Shot",
"Gouge",
"Kidney Shot",
"Sap",
"Earthbind Totem",
"Stoneclaw Totem",
"Hex",
"Banish",
"Death Coil",
"Fear",
"Howl of Terror",
"Intercept",
"Seduction",
"Shadowfury",
"Charge",
"Concussion Blow",
"Hamstring",
"Improved Hamstring",
"Intimidating Shout",
"Shockwave",
} }
local hashtable = {} local hashtable = {}
local spellarray = {} local spellarray = {}
@@ -78,7 +132,7 @@ end
local function findcollision(hash_table, array) local function findcollision(hash_table, array)
local collisions = 0 local collisions = 0
for k,v in ipairs(hash_table) do for k, v in ipairs(hash_table) do
for i = 1, table.getn(hash_table) do for i = 1, table.getn(hash_table) do
if i ~= k then if i ~= k then
if hash_table[i] == hash_table[k] then if hash_table[i] == hash_table[k] then
@@ -109,7 +163,7 @@ local function checkbase(spell)
if spellarray[tohash(spell)] == spell then return 1 end if spellarray[tohash(spell)] == spell then return 1 end
end end
for k,v in ipairs(cc) do for k, v in ipairs(cc) do
local hash = tohash(v) local hash = tohash(v)
hashtable[#hashtable] = hash hashtable[#hashtable] = hash
spellarray[hash] = v spellarray[hash] = v

View File

@@ -1,51 +1,46 @@
-- TODO: Make this not suck -- TODO: Make this not suck
function TomTom:AddWaypoint(x, y, desc, persistent, minimap, world, silent) function TomTom:AddWaypoint(x, y, desc, persistent, minimap, world, silent)
local c,z = GetCurrentMapContinent(), GetCurrentMapZone() local c, z = GetCurrentMapContinent(), GetCurrentMapZone()
if not c or not z or c < 1 then if not c or not z or c < 1 then
--self:Print("Cannot find a valid zone to place the coordinates") --self:Print("Cannot find a valid zone to place the coordinates")
return return
end end
return self:AddZWaypoint(c, z, x, y, desc, persistent, minimap, world, nil, silent) return self:AddZWaypoint(c, z, x, y, desc, persistent, minimap, world, nil, silent)
end end
function TomTom:AddZWaypoint(c, z, x, y, desc, persistent, minimap, world, callbacks, silent, crazy) function TomTom:AddZWaypoint(c, z, x, y, desc, persistent, minimap, world, callbacks, silent, crazy)
-- Convert the c,z,x,y tuple to m,f,x,y and pass the work off to AddMFWaypoint() -- Convert the c,z,x,y tuple to m,f,x,y and pass the work off to AddMFWaypoint()
local mapId, floor = hbd:GetMapIDFromCZ(c, z) local mapId, floor = hbd:GetMapIDFromCZ(c, z)
if not mapId then if not mapId then return end
return
end
return self:AddMFWaypoint(mapId, floor, x/100, y/100, { return self:AddMFWaypoint(mapId, floor, x / 100, y / 100, {
title = desc, title = desc,
persistent = persistent, persistent = persistent,
minimap = minimap, minimap = minimap,
world = world, world = world,
callbacks = callbacks, callbacks = callbacks,
silent = silent, silent = silent,
crazy = crazy, crazy = crazy,
}) })
end end
function TomTom:AddWaypointToCurrentZone(x, y, desc) function TomTom:AddWaypointToCurrentZone(x, y, desc)
local m, f = TomTom:GetCurrentPlayerPosition() local m, f = TomTom:GetCurrentPlayerPosition()
if not m then if not m then return end
return
end
return self:AddMFWaypoint(m, f, x/100, y/100, { return self:AddMFWaypoint(m, f, x / 100, y / 100, {
title = desc, title = desc,
}) })
end end
function TomTom:SetCustomWaypoint(c,z,x,y,callback,minimap,world,silent) function TomTom:SetCustomWaypoint(c, z, x, y, callback, minimap, world, silent)
return self:AddZWaypoint(c, z, x, y, nil, false, minimap, world, callback, silent) return self:AddZWaypoint(c, z, x, y, nil, false, minimap, world, callback, silent)
end end
function TomTom:SetCustomMFWaypoint(m, f, x, y, opts) function TomTom:SetCustomMFWaypoint(m, f, x, y, opts)
opts.persistent = false opts.persistent = false
return self:AddMFWaypoint(m, f, x, y, opts) return self:AddMFWaypoint(m, f, x, y, opts)
end end

View File

@@ -2,67 +2,57 @@ function TomTom:AddMFWaypoint(m, f, x, y, opts)
opts = opts or {} opts = opts or {}
-- Default values -- Default values
if opts.persistent == nil then opts.persistent = self.profile.persistence.savewaypoints end if opts.persistent == nil then opts.persistent = self.profile.persistence.savewaypoints end
if opts.minimap == nil then opts.minimap = self.profile.minimap.enable end if opts.minimap == nil then opts.minimap = self.profile.minimap.enable end
if opts.world == nil then opts.world = self.profile.worldmap.enable end if opts.world == nil then opts.world = self.profile.worldmap.enable end
if opts.crazy == nil then opts.crazy = self.profile.arrow.autoqueue end if opts.crazy == nil then opts.crazy = self.profile.arrow.autoqueue end
if opts.cleardistance == nil then opts.cleardistance = self.profile.persistence.cleardistance end if opts.cleardistance == nil then opts.cleardistance = self.profile.persistence.cleardistance end
if opts.arrivaldistance == nil then opts.arrivaldistance = self.profile.arrow.arrival end if opts.arrivaldistance == nil then opts.arrivaldistance = self.profile.arrow.arrival end
if not opts.callbacks then if not opts.callbacks then opts.callbacks = TomTom:DefaultCallbacks(opts) end
opts.callbacks = TomTom:DefaultCallbacks(opts)
local zoneName = hbd:GetLocalizedMap(m)
-- Get the default map floor, if necessary
if not f then
local floors = hbd:GetNumFloors(m)
f = floors == 0 and 0 or 1
end end
local zoneName = hbd:GetLocalizedMap(m) -- Ensure there isn't already a waypoint at this location
local key = self:GetKey({ m, f, x, y, title = opts.title })
if waypoints[m] and waypoints[m][key] then return waypoints[m][key] end
-- Get the default map floor, if necessary -- uid is the 'new waypoint' called this for historical reasons
if not f then local uid = { m, f, x, y, title = opts.title }
local floors = hbd:GetNumFloors(m)
f = floors == 0 and 0 or 1
end
-- Ensure there isn't already a waypoint at this location -- Copy over any options, so we have em
local key = self:GetKey({m, f, x, y, title = opts.title}) for k, v in pairs(opts) do
if waypoints[m] and waypoints[m][key] then if not uid[k] then uid[k] = v end
return waypoints[m][key] end
end
-- uid is the 'new waypoint' called this for historical reasons -- No need to convert x and y because they're already 0-1 instead of 0-100
local uid = {m, f, x, y, title = opts.title} self:SetWaypoint(uid, opts.callbacks, opts.minimap, opts.world)
if opts.crazy then self:SetCrazyArrow(uid, opts.arrivaldistance, opts.title) end
-- Copy over any options, so we have em waypoints[m] = waypoints[m] or {}
for k,v in pairs(opts) do waypoints[m][key] = uid
if not uid[k] then
uid[k] = v
end
end
-- No need to convert x and y because they're already 0-1 instead of 0-100 -- If this is a persistent waypoint, then add it to the waypoints table
self:SetWaypoint(uid, opts.callbacks, opts.minimap, opts.world) if opts.persistent then self.waypointprofile[m][key] = uid end
if opts.crazy then
self:SetCrazyArrow(uid, opts.arrivaldistance, opts.title)
end
waypoints[m] = waypoints[m] or {} if not opts.silent and self.profile.general.announce then
waypoints[m][key] = uid local ctxt = RoundCoords(x, y, 2)
local desc = opts.title and opts.title or ""
-- If this is a persistent waypoint, then add it to the waypoints table local sep = opts.title and " - " or ""
if opts.persistent then local msg = string.format(L["|cffffff78TomTom:|r Added a waypoint (%s%s%s) in %s"], desc, sep, ctxt, zoneName)
self.waypointprofile[m][key] = uid ChatFrame1:AddMessage(msg)
end end
return uid
if not opts.silent and self.profile.general.announce then
local ctxt = RoundCoords(x, y, 2)
local desc = opts.title and opts.title or ""
local sep = opts.title and " - " or ""
local msg = string.format(L["|cffffff78TomTom:|r Added a waypoint (%s%s%s) in %s"], desc, sep, ctxt, zoneName)
ChatFrame1:AddMessage(msg)
end
return uid
end end
local coord_fmt = "%%.%df, %%.%df" local coord_fmt = "%%.%df, %%.%df"
function RoundCoords(x,y,prec) function RoundCoords(x, y, prec)
local fmt = coord_fmt:format(prec, prec) local fmt = coord_fmt:format(prec, prec)
return fmt:format(x*100, y*100) return fmt:format(x * 100, y * 100)
end end

File diff suppressed because it is too large Load Diff

View File

@@ -1,19 +1,19 @@
local array = {13, 14, 52, 63, 764, 12342, 143, 2, 54, 63, 25, 15} local array = { 13, 14, 52, 63, 764, 12342, 143, 2, 54, 63, 25, 15 }
local sortedarray = {0} local sortedarray = { 0 }
for ka, va in ipairs(array) do for ka, va in ipairs(array) do
for j = 1, #sortedarray do for j = 1, #sortedarray do
if va > sortedarray[j] then if va > sortedarray[j] then
if sortedarray[j] > 0 then if sortedarray[j] > 0 then
for i = #sortedarray, j, -1 do for i = #sortedarray, j, -1 do
sortedarray[i + 1] = sortedarray[i] sortedarray[i + 1] = sortedarray[i]
end end
end end
sortedarray[j] = va sortedarray[j] = va
end end
end end
end end
for k, v in ipairs(sortedarray) do for k, v in ipairs(sortedarray) do
print(k, v) print(k, v)
end end

View File

@@ -1,10 +1,9 @@
aura_env.addtostring = function(s, ...) aura_env.addtostring = function(s, ...)
local i = 1 local i = 1
while select(i, ...) do while select(i, ...) do
s = s .. select(i, ...) .. " " s = s .. select(i, ...) .. " "
i = i + 1 i = i + 1
end end
s = s .. "\n" s = s .. "\n"
return s return s
end end

View File

@@ -1,5 +1,5 @@
local plate = C_NamePlate.GetNamePlateForUnit("target") local plate = C_NamePlate.GetNamePlateForUnit("target")
if plate then if plate then
aura_env.region:ClearAllPoints() aura_env.region:ClearAllPoints()
aura_env.region:SetPoint("BOTTOM", plate, "BOTTOM", 0, 0) aura_env.region:SetPoint("BOTTOM", plate, "BOTTOM", 0, 0)
end end

View File

@@ -1,48 +1,90 @@
aura_env.classColor = function(class) aura_env.classColor = function(class)
if class == 6 then return "\124cFFC41F3B" elseif if class == 6 then
class == 12 then return "\124cFFA330C9" elseif return "\124cFFC41F3B"
class == 11 then return "\124cFFFF7D0A" elseif elseif class == 12 then
class == 3 then return "\124cFFABD473" elseif return "\124cFFA330C9"
class == 8 then return "\124cFF40C7EB" elseif elseif class == 11 then
class == 10 then return "\124cFF00FF96" elseif return "\124cFFFF7D0A"
class == 2 then return "\124cFFF58CBA" elseif elseif class == 3 then
class == 5 then return "\124cFFFFFFFF" elseif return "\124cFFABD473"
class == 4 then return "\124cFFFFF569" elseif elseif class == 8 then
class == 7 then return "\124cFF0070DE" elseif return "\124cFF40C7EB"
class == 9 then return "\124cFF8787ED" elseif elseif class == 10 then
class == 1 then return "\124cFFC79C6E" else return "\124cFF00FF96"
return "\124cFFFFFFFF" end 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 end
aura_env.classColor = function(name) aura_env.classColor = function(name)
local class = UnitClass(name) or "" local class = UnitClass(name) or ""
if class == "Death Knight" then return 0.77, 0.12, 0.23, 1 elseif if class == "Death Knight" then
class == "Demon Hunter" then return 0.64, 0.19, 0.79, 1 elseif return 0.77, 0.12, 0.23, 1
class == "Druid" then return 1, 0.49, 0.04, 1 elseif elseif class == "Demon Hunter" then
class == "Hunter" then return 0.67, 0.83, 0.45, 1 elseif return 0.64, 0.19, 0.79, 1
class == "Mage" then return 0.25, 0.78, 0.92, 1 elseif elseif class == "Druid" then
class == "Monk" then return 0, 1, 0.59, 1 elseif return 1, 0.49, 0.04, 1
class == "Paladin" then return 0.96, 0.55, 0.73, 1 elseif elseif class == "Hunter" then
class == "Priest" then return 1, 1, 1, 1 elseif return 0.67, 0.83, 0.45, 1
class == "Rogue" then return 1, 0.96, 0.41, 1 elseif elseif class == "Mage" then
class == "Shaman" then return 0, 0.44, 0.87, 1 elseif return 0.25, 0.78, 0.92, 1
class == "Warlock" then return 0.53, 0.53, 0.93, 1 elseif elseif class == "Monk" then
class == "Warrior" then return 0.78, 0.61, 0.43, 1 else return 0, 1, 0.59, 1
return 0, 0, 0, 0 end 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 end
aura_env.classColor = function(class) aura_env.classColor = function(class)
if class == 1 then return 0.78, 0.61, 0.43, 1 elseif if class == 1 then
class == 2 then return 0.96, 0.55, 0.73, 1 elseif return 0.78, 0.61, 0.43, 1
class == 3 then return 0.67, 0.83, 0.45, 1 elseif elseif class == 2 then
class == 4 then return 1, 0.96, 0.41, 1 elseif return 0.96, 0.55, 0.73, 1
class == 5 then return 1, 1, 1, 1 elseif elseif class == 3 then
class == 6 then return 0.77, 0.12, 0.23, 1 elseif return 0.67, 0.83, 0.45, 1
class == 7 then return 0, 0.44, 0.87, 1 elseif elseif class == 4 then
class == 8 then return 0.25, 0.78, 0.92, 1 elseif return 1, 0.96, 0.41, 1
class == 9 then return 0.53, 0.53, 0.93, 1 elseif elseif class == 5 then
class == 10 then return 0, 1, 0.59, 1 elseif return 1, 1, 1, 1
class == 11 then return 1, 0.49, 0.04, 1 elseif elseif class == 6 then
class == 12 then return 0.64, 0.19, 0.79, 1 else return 0.77, 0.12, 0.23, 1
return 1, 1, 1, 1 end 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 end

View File

@@ -1,60 +1,59 @@
aura_env.grad = function(c) aura_env.grad = function(c)
--c expected as [0, 1] --c expected as [0, 1]
if c > 0.5 then if c > 0.5 then
c = 1 - (2 * (c - 0.5)) c = 1 - (2 * (c - 0.5))
return c, 1, 0, 1 return c, 1, 0, 1
else else
c = c * 2 c = c * 2
return 1, c, 0, 1 return 1, c, 0, 1
end end
end end
local function hexgrad(val, min, max) local function hexgrad(val, min, max)
local function tohex(input) local function tohex(input)
local output = string.format("%x", input * 255) local output = string.format("%x", input * 255)
return output return output
end end
local function grad(c, min, max) local function grad(c, min, max)
c = (((max - c) / (max - min)) * 1) c = (((max - c) / (max - min)) * 1)
if c > 0.5 then if c > 0.5 then
c = 1 - (2 * (c - 0.5)) c = 1 - (2 * (c - 0.5))
return c, 1, 0, 1 return c, 1, 0, 1
else else
c = c * 2 c = c * 2
return 1, c, 0, 1 return 1, c, 0, 1
end end
end end
local color1, color2, color3, color4 = 0, 0, 0, 0 local color1, color2, color3, color4 = 0, 0, 0, 0
color1, color2, color3, color4 = grad(val, min, max) color1, color2, color3, color4 = grad(val, min, max)
color1, color2, color3, color4 = tohex(color1), tohex(color2), tohex(color3), tohex(color4) color1, color2, color3, color4 = tohex(color1), tohex(color2), tohex(color3), tohex(color4)
color1, color2, color3, color4 = tostring(color1), tostring(color2), tostring(color3), tostring(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(color1) == 1 then color1 = "0" .. color1 end
if string.len(color2) == 1 then color2 = "0" .. color2 end if string.len(color2) == 1 then color2 = "0" .. color2 end
if string.len(color3) == 1 then color3 = "0" .. color3 end if string.len(color3) == 1 then color3 = "0" .. color3 end
if string.len(color4) == 1 then color4 = "0" .. color4 end if string.len(color4) == 1 then color4 = "0" .. color4 end
local color = "\124c" .. color4 .. color1 .. color2 .. color3 local color = "\124c" .. color4 .. color1 .. color2 .. color3
return color return color
end end
local function RGBtoHex(rgb) local function RGBtoHex(rgb)
local hexadecimal = 'FF' local hexadecimal = "FF"
for key, value in pairs(rgb) do for key, value in pairs(rgb) do
local hex = '' local hex = ""
while(value > 0)do while value > 0 do
local index = math.fmod(value, 16) + 1 local index = math.fmod(value, 16) + 1
value = math.floor(value / 16) value = math.floor(value / 16)
hex = string.sub('0123456789ABCDEF', index, index) .. hex hex = string.sub("0123456789ABCDEF", index, index) .. hex
end end
if(string.len(hex) == 0)then if string.len(hex) == 0 then
hex = '00' hex = "00"
elseif string.len(hex) == 1 then
hex = "0" .. hex
end
elseif(string.len(hex) == 1)then hexadecimal = hexadecimal .. hex
hex = '0' .. hex end
end return hexadecimal
hexadecimal = hexadecimal .. hex
end
return hexadecimal
end end

View File

@@ -4,12 +4,8 @@ aura_env.getDate = function()
local month = date:match("(%d%d)") --(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 local day = date:match("%d%d%/(%d%d)") --01/(07)/19 14:36:42
--Remove first place zeros --Remove first place zeros
if day:find("0") == 1 then if day:find("0") == 1 then day = day:gsub("0", "") end
day = day:gsub("0", "") if month:find("0") == 1 then month = month:gsub("0", "") end
end
if month:find("0") == 1 then
month = month:gsub("0", "")
end
local localdate = day .. "." .. month .. "." .. year local localdate = day .. "." .. month .. "." .. year
return localdate return localdate
end end
@@ -26,12 +22,8 @@ local function getDate()
local month = date:match("(%d%d)") --(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 local day = date:match("%d%d%/(%d%d)") --01/(07)/19 14:36:42
--Remove first place zeros --Remove first place zeros
if day:find("0") == 1 then if day:find("0") == 1 then day = day:gsub("0", "") end
day = day:gsub("0", "") if month:find("0") == 1 then month = month:gsub("0", "") end
end
if month:find("0") == 1 then
month = month:gsub("0", "")
end
local localdate = day .. "." .. month .. "." .. year local localdate = day .. "." .. month .. "." .. year
return localdate return localdate
end end

View File

@@ -1,6 +1,6 @@
aura_env.stackDef = function(def1, def2) aura_env.stackDef = function(def1, def2)
local x = 1 - def1 local x = 1 - def1
local y = 1 - def2 local y = 1 - def2
local var = x * y local var = x * y
return 1 - var return 1 - var
end end

View File

@@ -2,9 +2,7 @@ aura_env.auraID = function(spell)
for i = 1, 40 do for i = 1, 40 do
local name = UnitBuff("player", i) local name = UnitBuff("player", i)
if name then if name then
if name == spell then if name == spell then return i end
return i
end
else else
break break
end end

View File

@@ -5,9 +5,7 @@ local function formatTime(time)
res = res - 60 res = res - 60
end end
s = res s = res
if s < 10 then if s < 10 then s = string.format("0%d", s) end
s = string.format("0%d", s)
end
if type(s) ~= "string" then tostring(s) end if type(s) ~= "string" then tostring(s) end
return string.format("%d:%s", m, s) return string.format("%d:%s", m, s)
end end

View File

@@ -1,5 +1,3 @@
local function name(arguments) local function name(arguments) end
end
aura_env.name = function(arguments) aura_env.name = function(arguments) end
end

View File

@@ -1,5 +1,4 @@
for itemLink in msg:gmatch("|%x+|Hitem:.-|h.-|h|r") do for itemLink in msg:gmatch("|%x+|Hitem:.-|h.-|h|r") do
itemID = itemLink:match("item:(%d+):") itemID = itemLink:match("item:(%d+):")
icon = select(10, GetItemInfo(itemLink)) icon = select(10, GetItemInfo(itemLink))
end end

View File

@@ -4,16 +4,14 @@ while true do
local spellName, spellSubName = GetSpellBookItemName(i, BOOKTYPE_SPELL) local spellName, spellSubName = GetSpellBookItemName(i, BOOKTYPE_SPELL)
local type, ID = GetSpellBookItemInfo(i, BOOKTYPE_SPELL) local type, ID = GetSpellBookItemInfo(i, BOOKTYPE_SPELL)
if not spellName then if not spellName then
do break end do
break
end
end end
if spellName:match("Mastery:") then if spellName:match("Mastery:") then break end
break
end
if spellName ~= "Revive Battle Pets" and spellName ~= "Mobile Banking" then if spellName ~= "Revive Battle Pets" and spellName ~= "Mobile Banking" then
if (GetSpellBaseCooldown(ID) or 0) > 20000 then if (GetSpellBaseCooldown(ID) or 0) > 20000 then print(spellName, ID, GetSpellBaseCooldown(ID) / 1000) end
print(spellName, ID, GetSpellBaseCooldown(ID) / 1000)
end
end end
i = i + 1 i = i + 1
@@ -23,9 +21,7 @@ for row = 1, 7 do
for column = 1, 3 do for column = 1, 3 do
local ID = select(6, GetTalentInfo(row, column, 1)) local ID = select(6, GetTalentInfo(row, column, 1))
local spellName = select(2, GetTalentInfo(row, column, 1)) local spellName = select(2, GetTalentInfo(row, column, 1))
if GetSpellBaseCooldown(ID) > 20000 then if GetSpellBaseCooldown(ID) > 20000 then print(spellName, ID, GetSpellBaseCooldown(ID) / 1000) end
print(spellName, ID, GetSpellBaseCooldown(ID) / 1000)
end
end end
end end
for row = 1, 7 do for row = 1, 7 do
@@ -33,9 +29,7 @@ for row = 1, 7 do
local ID = select(6, GetPvpTalentInfo(row, column, 1)) local ID = select(6, GetPvpTalentInfo(row, column, 1))
if ID then if ID then
local spellName = select(2, GetPvpTalentInfo(row, column, 1)) local spellName = select(2, GetPvpTalentInfo(row, column, 1))
if GetSpellBaseCooldown(ID) > 20000 then if GetSpellBaseCooldown(ID) > 20000 then print(spellName, ID, GetSpellBaseCooldown(ID) / 1000) end
print(spellName, ID, GetSpellBaseCooldown(ID) / 1000)
end
end end
end end
end end

View File

@@ -71,7 +71,7 @@ local function tonum(cchar)
end end
local function findcollision(hash_table, array) local function findcollision(hash_table, array)
local collisions = 0 local collisions = 0
for k,v in ipairs(hash_table) do for k, v in ipairs(hash_table) do
for i = 1, table.getn(hash_table) do for i = 1, table.getn(hash_table) do
if i ~= k then if i ~= k then
if hash_table[i] == hash_table[k] then if hash_table[i] == hash_table[k] then
@@ -83,7 +83,7 @@ local function findcollision(hash_table, array)
end end
return collisions return collisions
end end
aura_env.tohash = function(tempvar) aura_env.tohash = function(tempvar)
local charTable = {} local charTable = {}
local hash = 0 local hash = 0
for char in tempvar:gmatch("%a") do for char in tempvar:gmatch("%a") do

View File

@@ -1,3 +1 @@
hooksecurefunc( "JumpOrAscendStart", function() hooksecurefunc("JumpOrAscendStart", function() DEFAULT_CHAT_FRAME:AddMessage("Jump") end)
DEFAULT_CHAT_FRAME:AddMessage( "Jump" );
end );

View File

@@ -1,8 +1,8 @@
aura_env.glow = function(unit, s) aura_env.glow = function(unit, s)
local nameplate = C_NamePlate.GetNamePlateForUnit(unit) local nameplate = C_NamePlate.GetNamePlateForUnit(unit)
if nameplate and s == 1 then if nameplate and s == 1 then
ActionButton_ShowOverlayGlow(nameplate.UnitFrame.HealthBar) ActionButton_ShowOverlayGlow(nameplate.UnitFrame.HealthBar)
else else
ActionButton_HideOverlayGlow(nameplate.UnitFrame.HealthBar) ActionButton_HideOverlayGlow(nameplate.UnitFrame.HealthBar)
end end
end end

View File

@@ -1,7 +1,7 @@
--INIT --INIT
if not aura_env.region.texture then if not aura_env.region.texture then
local texture = aura_env.region:CreateTexture(nil, "OVERLAY") local texture = aura_env.region:CreateTexture(nil, "OVERLAY")
aura_env.region.texture = texture aura_env.region.texture = texture
end end
aura_env.region:SetHeight(128) aura_env.region:SetHeight(128)
aura_env.region:SetWidth(128) aura_env.region:SetWidth(128)
@@ -12,6 +12,6 @@ aura_env.region.texture:SetAllPoints(aura_env.region)
aura_env.region.texture:Show() aura_env.region.texture:Show()
local plate = C_NamePlate.GetNamePlateForUnit("target") local plate = C_NamePlate.GetNamePlateForUnit("target")
if plate then if plate then
aura_env.region.texture:ClearAllPoints() aura_env.region.texture:ClearAllPoints()
aura_env.region.texture:SetPoint("BOTTOM", plate, "BOTTOM", 0, 0) aura_env.region.texture:SetPoint("BOTTOM", plate, "BOTTOM", 0, 0)
end end

View File

@@ -1,6 +1,6 @@
local function printTable(table, n) local function printTable(table, n)
if not n then n = 0 end if not n then n = 0 end
for k,v in pairs(table) do for k, v in pairs(table) do
local printText = "" local printText = ""
for i = 1, n do for i = 1, n do
printText = printText .. " " printText = printText .. " "

View File

@@ -58,7 +58,7 @@ for i = 1, 10 do
print(registers.lifo.push(i)) print(registers.lifo.push(i))
end end
print("") print("")
for k,v in ipairs(registers.lifostack) do for k, v in ipairs(registers.lifostack) do
print(v) print(v)
end end
print("") print("")
@@ -74,7 +74,7 @@ for i = 1, 4 do
print(registers.lilo.push(i)) print(registers.lilo.push(i))
end end
print("") print("")
for k,v in ipairs(registers.lilostack) do for k, v in ipairs(registers.lilostack) do
print(v) print(v)
end end
print("") print("")

View File

@@ -1,5 +1,5 @@
aura_env.round = function(var, n) aura_env.round = function(var, n)
if (n) then if n then
var = math.floor((var * 10 ^ n) + 0.5) / (10 ^ n) var = math.floor((var * 10 ^ n) + 0.5) / (10 ^ n)
else else
var = math.floor(var + 0.5) var = math.floor(var + 0.5)

View File

@@ -1,20 +1,20 @@
aura_env.shorten = function(val) aura_env.shorten = function(val)
local function round(var, n) local function round(var, n)
if (n) then if n then
var = math.floor((var * 10 ^ n) + 0.5) / (10 ^ n) var = math.floor((var * 10 ^ n) + 0.5) / (10 ^ n)
else else
var = math.floor(var + 0.5) var = math.floor(var + 0.5)
end end
return var return var
end end
local n = 2 local n = 2
if val < 1e3 then if val < 1e3 then
return round(val, n) return round(val, n)
elseif val > 1e3 and val < 1e6 then elseif val > 1e3 and val < 1e6 then
return round(val / 1e3, n) .. "k" return round(val / 1e3, n) .. "k"
elseif val > 1e6 and val < 1e9 then elseif val > 1e6 and val < 1e9 then
return round(val / 1e6, n) .. "M" return round(val / 1e6, n) .. "M"
elseif val > 1e9 then elseif val > 1e9 then
return round(val / 1e9, n) .. "G" return round(val / 1e9, n) .. "G"
end end
end end

View File

@@ -1,22 +1,22 @@
local function sortArray(array) local function sortArray(array)
local lastMax = 1000 local lastMax = 1000
local maxv, maxk = 0, 0 local maxv, maxk = 0, 0
local temparray = {} local temparray = {}
for k, v in ipairs(array) do for k, v in ipairs(array) do
temparray[k] = v temparray[k] = v
end end
local sorted = {} local sorted = {}
for k, v in ipairs(array) do for k, v in ipairs(array) do
maxv, maxk = 0, 0 maxv, maxk = 0, 0
for k2, v2 in ipairs(temparray) do for k2, v2 in ipairs(temparray) do
if lastMax and v2 > maxv and v2 <= lastMax then if lastMax and v2 > maxv and v2 <= lastMax then
maxv = v2 maxv = v2
maxk = k2 maxk = k2
end end
end end
sorted[k] = maxv sorted[k] = maxv
table.remove(temparray, maxk) table.remove(temparray, maxk)
lastMax = maxv lastMax = maxv
end end
return sorted return sorted
end end

View File

@@ -1,12 +1,10 @@
aura_env.CUnitBuff = function(spell) aura_env.CUnitBuff = function(spell)
for i = 1, 40 do for i = 1, 40 do
local name = UnitBuff("player", i) local name = UnitBuff("player", i)
if name then if name then
if name == spell then if name == spell then return UnitBuff("player", i) end
return UnitBuff("player", i) else
end break
else end
break end
end
end
end end

View File

@@ -1,25 +1,20 @@
aura_env.UnitDebuffC = function(unit, spell) aura_env.UnitDebuffC = function(unit, spell)
for i = 1, 40 do for i = 1, 40 do
local name = UnitDebuff(unit, i) local name = UnitDebuff(unit, i)
if name then if name then
if name == spell then if name == spell then return UnitDebuff(unit, i) end
return UnitDebuff(unit, i) else
end return nil
else end
return nil end
end
end
end end
aura_env.UnitBuffC = function(unit, spell) aura_env.UnitBuffC = function(unit, spell)
for i = 1, 40 do for i = 1, 40 do
local name = UnitBuff(unit, i) local name = UnitBuff(unit, i)
if name then if name then
if name == spell then if name == spell then return UnitBuff(unit, i) end
return UnitBuff(unit, i) else
end return nil
else end
return nil end
end
end
end end

File diff suppressed because it is too large Load Diff

View File

@@ -19,9 +19,12 @@ frenzyRegenFrame:SetSize(100, 26)
frenzyRegenFrame:ClearAllPoints() frenzyRegenFrame:ClearAllPoints()
frenzyRegenFrame:SetPoint("CENTER", UIParent) frenzyRegenFrame:SetPoint("CENTER", UIParent)
frenzyRegenFrame:SetBackdrop({ frenzyRegenFrame:SetBackdrop({
bgFile = "Interface\\Tooltips\\UI-Tooltip-Background", tile = true, tileSize = 16, bgFile = "Interface\\Tooltips\\UI-Tooltip-Background",
edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border", edgeSize = 12, tile = true,
insets = {left = 3, right = 3, top = 3, bottom = 3, }, tileSize = 16,
edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border",
edgeSize = 12,
insets = { left = 3, right = 3, top = 3, bottom = 3 },
}) })
frenzyRegenFrame:SetBackdropColor(0, 0, 0, 0.4) frenzyRegenFrame:SetBackdropColor(0, 0, 0, 0.4)
frenzyRegenFrame:SetBackdropBorderColor(0, 0, 0, 1) frenzyRegenFrame:SetBackdropBorderColor(0, 0, 0, 1)
@@ -30,7 +33,7 @@ frenzyRegenFrame:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED")
frenzyRegenFrame:RegisterEvent("ADDON_LOADED") frenzyRegenFrame:RegisterEvent("ADDON_LOADED")
frenzyRegenFrame:RegisterEvent("ACTIVE_TALENT_GROUP_CHANGED") frenzyRegenFrame:RegisterEvent("ACTIVE_TALENT_GROUP_CHANGED")
frenzyRegenFrame:RegisterEvent("UPDATE_SHAPESHIFT_FORM") frenzyRegenFrame:RegisterEvent("UPDATE_SHAPESHIFT_FORM")
frenzyRegenFrame:RegisterEvent("PLAYER_REGEN_DISABLED"); frenzyRegenFrame:RegisterEvent("PLAYER_REGEN_DISABLED")
frenzyRegenFrame:RegisterEvent("PLAYER_REGEN_ENABLED") frenzyRegenFrame:RegisterEvent("PLAYER_REGEN_ENABLED")
frenzyRegenFrame:RegisterEvent("ARTIFACT_UPDATE") frenzyRegenFrame:RegisterEvent("ARTIFACT_UPDATE")
frenzyRegenFrame:RegisterEvent("PET_BATTLE_CLOSE") frenzyRegenFrame:RegisterEvent("PET_BATTLE_CLOSE")
@@ -41,9 +44,9 @@ frenzyRegenFrame:SetMovable(true)
frenzyRegenFrame:RegisterForDrag("LeftButton") frenzyRegenFrame:RegisterForDrag("LeftButton")
frenzyRegenFrame:SetScript("OnDragStart", frenzyRegenFrame.StartMoving) frenzyRegenFrame:SetScript("OnDragStart", frenzyRegenFrame.StartMoving)
frenzyRegenFrame:SetScript("OnDragStop", function(self) frenzyRegenFrame:SetScript("OnDragStop", function(self)
self:StopMovingOrSizing() self:StopMovingOrSizing()
settingsFR.XPos = self:GetLeft() settingsFR.XPos = self:GetLeft()
settingsFR.YPos = self:GetBottom() settingsFR.YPos = self:GetBottom()
end) end)
frenzyRegenFrame.damageTakenBar = CreateFrame("StatusBar", nil, frenzyRegenFrame) frenzyRegenFrame.damageTakenBar = CreateFrame("StatusBar", nil, frenzyRegenFrame)
@@ -69,500 +72,493 @@ frenzyRegenFrame.damageTakenBar.value:SetShadowOffset(1, -1)
frenzyRegenFrame.damageTakenBar.value:SetTextColor(0, 1, 0) frenzyRegenFrame.damageTakenBar.value:SetTextColor(0, 1, 0)
function frenzyRegenFrame:getShortNumber(num) function frenzyRegenFrame:getShortNumber(num)
if settingsFR.shortNumFlag then if settingsFR.shortNumFlag then
if not num then if not num then
return 0 return 0
elseif num >= 1e6 then elseif num >= 1e6 then
return format("%.1fM", num / 1e6) return format("%.1fM", num / 1e6)
elseif num >= 1e3 then elseif num >= 1e3 then
return format("%.1fK", num / 1e3) return format("%.1fK", num / 1e3)
else else
return format("%d", num) return format("%d", num)
end end
else else
return format("%d", num) return format("%d", num)
end end
end end
function frenzyRegenFrame:countHealing() function frenzyRegenFrame:countHealing()
maxHP = UnitHealthMax("player") maxHP = UnitHealthMax("player")
versatilityBonus = GetCombatRatingBonus(CR_VERSATILITY_DAMAGE_DONE) + GetVersatilityBonus(CR_VERSATILITY_DAMAGE_DONE) versatilityBonus = GetCombatRatingBonus(CR_VERSATILITY_DAMAGE_DONE)
expectedHealing = math.max(maxHP * 0.05, damageTP5S * 0.5) * (1 + versatilityBonus / 100) + GetVersatilityBonus(CR_VERSATILITY_DAMAGE_DONE)
legendaryHealing = 0 expectedHealing = math.max(maxHP * 0.05, damageTP5S * 0.5) * (1 + versatilityBonus / 100)
legendaryHealing = 0
if IsEquippedItem(137025) and settingsFR.legendaryFlag then -- Skysec's Hold if IsEquippedItem(137025) and settingsFR.legendaryFlag then -- Skysec's Hold
legendaryHealing = maxHP * 0.12 * (1 + versatilityBonus / 100) legendaryHealing = maxHP * 0.12 * (1 + versatilityBonus / 100)
end end
local t18set = {124246, 124255, 124261, 124267, 124272} local t18set = { 124246, 124255, 124261, 124267, 124272 }
local t18items = 0 local t18items = 0
for i = 1, 5, 1 do for i = 1, 5, 1 do
if IsEquippedItem(t18set[i]) then if IsEquippedItem(t18set[i]) then t18items = t18items + 1 end
t18items = t18items + 1 end
end isT18eq = t18items > 1
end
isT18eq = t18items > 1
local idx = 1 local idx = 1
repeat repeat
local name, _, _, _, _, _, _, _, _, _, spellID = UnitAura("player", idx, nil, "PLAYER|HELPFUL|CANCELABLE") local name, _, _, _, _, _, _, _, _, _, spellID = UnitAura("player", idx, nil, "PLAYER|HELPFUL|CANCELABLE")
if spellID and spellID == 213680 then -- Guardian of Elune if spellID and spellID == 213680 then -- Guardian of Elune
expectedHealing = expectedHealing * 1.2 expectedHealing = expectedHealing * 1.2
elseif isT18eq and spellID and spellID == 192081 then -- Ironfur id elseif isT18eq and spellID and spellID == 192081 then -- Ironfur id
expectedHealing = expectedHealing * 1.2 expectedHealing = expectedHealing * 1.2
elseif spellID and spellID == 47788 then -- Guardian Spirit elseif spellID and spellID == 47788 then -- Guardian Spirit
expectedHealing = expectedHealing * 1.4 expectedHealing = expectedHealing * 1.4
elseif spellID and spellID == 64844 then -- Divine Hymn elseif spellID and spellID == 64844 then -- Divine Hymn
expectedHealing = expectedHealing * 1.1 expectedHealing = expectedHealing * 1.1
elseif spellID and spellID == 116849 then -- Life Cocoon elseif spellID and spellID == 116849 then -- Life Cocoon
expectedHealing = expectedHealing * 1.5 expectedHealing = expectedHealing * 1.5
elseif spellID and spellID == 199368 then -- Legacy of the Ravencrest elseif spellID and spellID == 199368 then -- Legacy of the Ravencrest
expectedHealing = expectedHealing * 4 expectedHealing = expectedHealing * 4
end end
idx = idx + 1 idx = idx + 1
until name == nil until name == nil
if IsEquippedItem(128821) then if IsEquippedItem(128821) then expectedHealing = expectedHealing * (1 + settingsFR.artifactBonus) end
expectedHealing = expectedHealing * (1 + settingsFR.artifactBonus)
end
ratioHP = (expectedHealing + legendaryHealing) / maxHP * 100 ratioHP = (expectedHealing + legendaryHealing) / maxHP * 100
anouncedHealing = format("Self healing %d%% over 3 sec", ratioHP) anouncedHealing = format("Self healing %d%% over 3 sec", ratioHP)
charges, maxcharges = GetSpellCharges(idFR) charges, maxcharges = GetSpellCharges(idFR)
if settingsFR.statusTypeFlag == 1 then if settingsFR.statusTypeFlag == 1 then
frenzyRegenFrame.damageTakenBar:SetValue(charges * 100 / maxcharges) frenzyRegenFrame.damageTakenBar:SetValue(charges * 100 / maxcharges)
else else
frenzyRegenFrame.damageTakenBar:SetValue(ratioHP) frenzyRegenFrame.damageTakenBar:SetValue(ratioHP)
end end
if settingsFR.displayFlag == 0 then if settingsFR.displayFlag == 0 then
frenzyRegenFrame.damageTakenBar.value:SetText(self:getShortNumber(expectedHealing + legendaryHealing)) frenzyRegenFrame.damageTakenBar.value:SetText(self:getShortNumber(expectedHealing + legendaryHealing))
anouncedHealing = format("Self healing %s over 3 sec", self:getShortNumber(expectedHealing + legendaryHealing)) anouncedHealing = format("Self healing %s over 3 sec", self:getShortNumber(expectedHealing + legendaryHealing))
elseif settingsFR.displayFlag == 1 then elseif settingsFR.displayFlag == 1 then
frenzyRegenFrame.damageTakenBar.value:SetText(self:getShortNumber(expectedHealing / 6)) frenzyRegenFrame.damageTakenBar.value:SetText(self:getShortNumber(expectedHealing / 6))
else if settingsFR.displayFlag == 2 then else
frenzyRegenFrame.damageTakenBar.value:SetText(format("%d%%", ratioHP)) if settingsFR.displayFlag == 2 then frenzyRegenFrame.damageTakenBar.value:SetText(format("%d%%", ratioHP)) end
end end
end
if settingsFR.showValueOnlyFlag then if settingsFR.showValueOnlyFlag then
transparency = 0 transparency = 0
frenzyRegenFrame:SetBackdropColor(0, 0, 0, 0) frenzyRegenFrame:SetBackdropColor(0, 0, 0, 0)
frenzyRegenFrame:SetBackdropBorderColor(0, 0, 0, 0) frenzyRegenFrame:SetBackdropBorderColor(0, 0, 0, 0)
else else
transparency = settingsFR.transparencyFlag transparency = settingsFR.transparencyFlag
frenzyRegenFrame:SetBackdropColor(0, 0, 0, 0.4) frenzyRegenFrame:SetBackdropColor(0, 0, 0, 0.4)
frenzyRegenFrame:SetBackdropBorderColor(0, 0, 0, 1) frenzyRegenFrame:SetBackdropBorderColor(0, 0, 0, 1)
end end
start = GetSpellCooldown(idFR) start = GetSpellCooldown(idFR)
if start ~= 0 and settingsFR.greyOutFlag then if start ~= 0 and settingsFR.greyOutFlag then
frenzyRegenFrame.damageTakenBar:SetStatusBarColor(0.212, 0.212, 0.212, transparency) frenzyRegenFrame.damageTakenBar:SetStatusBarColor(0.212, 0.212, 0.212, transparency)
frenzyRegenFrame.damageTakenBar.bg:SetVertexColor(0.1, 0.1, 0.1, transparency) frenzyRegenFrame.damageTakenBar.bg:SetVertexColor(0.1, 0.1, 0.1, transparency)
frenzyRegenFrame.damageTakenBar.value:SetTextColor(0.5, 0.5, 0.5, settingsFR.transparencyFlag) frenzyRegenFrame.damageTakenBar.value:SetTextColor(0.5, 0.5, 0.5, settingsFR.transparencyFlag)
else else
frenzyRegenFrame.damageTakenBar:SetStatusBarColor(0, 0.65, 0, transparency / 1.5) frenzyRegenFrame.damageTakenBar:SetStatusBarColor(0, 0.65, 0, transparency / 1.5)
if charges < maxcharges and settingsFR.statusTypeFlag == 1 then if charges < maxcharges and settingsFR.statusTypeFlag == 1 then
frenzyRegenFrame.damageTakenBar:SetStatusBarColor(0.6, 0.65, 0, transparency / 1.5) frenzyRegenFrame.damageTakenBar:SetStatusBarColor(0.6, 0.65, 0, transparency / 1.5)
end end
frenzyRegenFrame.damageTakenBar.bg:SetVertexColor(0, 0.35, 0, transparency) frenzyRegenFrame.damageTakenBar.bg:SetVertexColor(0, 0.35, 0, transparency)
frenzyRegenFrame.damageTakenBar.value:SetTextColor(0, 1, 0, settingsFR.transparencyFlag) frenzyRegenFrame.damageTakenBar.value:SetTextColor(0, 1, 0, settingsFR.transparencyFlag)
end end
end end
function frenzyRegenFrame:updateVisibility() function frenzyRegenFrame:updateVisibility()
if IsPlayerSpell(idFR) then if IsPlayerSpell(idFR) then
self:Show() self:Show()
else else
self:Hide() self:Hide()
return return
end end
if C_PetBattles.IsInBattle() then if C_PetBattles.IsInBattle() then
self:Hide() self:Hide()
return return
else else
self:Show() self:Show()
end end
if settingsFR.hideOutOfBearFlag then if settingsFR.hideOutOfBearFlag then
if GetShapeshiftFormID() == 5 then if GetShapeshiftFormID() == 5 then
self:Show() self:Show()
else else
self:Hide() self:Hide()
return return
end end
end end
if settingsFR.hideOutOfCombatFlag then if settingsFR.hideOutOfCombatFlag then
if UnitAffectingCombat("player") then if UnitAffectingCombat("player") then
self:Show() self:Show()
else else
self:Hide() self:Hide()
end end
end end
if settingsFR.ignoreMouseFlag and UnitAffectingCombat("player") then if settingsFR.ignoreMouseFlag and UnitAffectingCombat("player") then
frenzyRegenFrame:EnableMouse(false) frenzyRegenFrame:EnableMouse(false)
else else
frenzyRegenFrame:EnableMouse(true) frenzyRegenFrame:EnableMouse(true)
end end
end end
function frenzyRegenFrame:initFlags() function frenzyRegenFrame:initFlags()
if settingsFR.displayFlag == nil then if settingsFR.displayFlag == nil then settingsFR.displayFlag = 0 end
settingsFR.displayFlag = 0; if settingsFR.greyOutFlag == nil then settingsFR.greyOutFlag = true end
end if settingsFR.movableFlag == nil then settingsFR.movableFlag = true end
if settingsFR.greyOutFlag == nil then if settingsFR.shortNumFlag == nil then settingsFR.shortNumFlag = true end
settingsFR.greyOutFlag = true; if settingsFR.hideOutOfCombatFlag == nil then settingsFR.hideOutOfCombatFlag = false end
end if settingsFR.hideOutOfBearFlag == nil then settingsFR.hideOutOfBearFlag = false end
if settingsFR.movableFlag == nil then if settingsFR.legendaryFlag == nil then settingsFR.legendaryFlag = false end
settingsFR.movableFlag = true; if settingsFR.artifactBonus == nil then settingsFR.artifactBonus = 0 end
end if settingsFR.transparencyFlag == nil then settingsFR.transparencyFlag = 1 end
if settingsFR.shortNumFlag == nil then if settingsFR.ignoreMouseFlag == nil then settingsFR.ignoreMouseFlag = false end
settingsFR.shortNumFlag = true; if settingsFR.announceFlag == nil then settingsFR.announceFlag = false end
end if settingsFR.announceChannel == nil then settingsFR.announceChannel = "SAY" end
if settingsFR.hideOutOfCombatFlag == nil then if settingsFR.statusTypeFlag == nil then settingsFR.statusTypeFlag = 0 end
settingsFR.hideOutOfCombatFlag = false; if settingsFR.showValueOnlyFlag == nil then settingsFR.showValueOnlyFlag = false end
end
if settingsFR.hideOutOfBearFlag == nil then
settingsFR.hideOutOfBearFlag = false;
end
if settingsFR.legendaryFlag == nil then
settingsFR.legendaryFlag = false;
end
if settingsFR.artifactBonus == nil then
settingsFR.artifactBonus = 0;
end
if settingsFR.transparencyFlag == nil then
settingsFR.transparencyFlag = 1;
end
if settingsFR.ignoreMouseFlag == nil then
settingsFR.ignoreMouseFlag = false;
end
if settingsFR.announceFlag == nil then
settingsFR.announceFlag = false;
end
if settingsFR.announceChannel == nil then
settingsFR.announceChannel = "SAY";
end
if settingsFR.statusTypeFlag == nil then
settingsFR.statusTypeFlag = 0;
end
if settingsFR.showValueOnlyFlag == nil then
settingsFR.showValueOnlyFlag = false;
end
end end
function frenzyRegenFrame:updateArtifactBonus() function frenzyRegenFrame:updateArtifactBonus()
if IsEquippedItem(128821) then if IsEquippedItem(128821) then
local powers = C_ArtifactUI.GetPowers() local powers = C_ArtifactUI.GetPowers()
if powers ~= nil then if powers ~= nil then
for i = 1, #powers do for i = 1, #powers do
local id, _, rank = C_ArtifactUI.GetPowerInfo(powers[i]) local id, _, rank = C_ArtifactUI.GetPowerInfo(powers[i])
if id == 200400 then -- Wildflesh id if id == 200400 then -- Wildflesh id
settingsFR.artifactBonus = rank * 0.05 settingsFR.artifactBonus = rank * 0.05
end end
end end
end end
end end
end end
frenzyRegenFrame:SetScript("OnEvent", frenzyRegenFrame:SetScript("OnEvent", function(self, event, ...)
function(self, event, ...) if event == "ADDON_LOADED" then
if event == "ADDON_LOADED" then playerGUID = UnitGUID("player")
playerGUID = UnitGUID("player") if settingsFR.XPos then
if settingsFR.XPos then frenzyRegenFrame:ClearAllPoints()
frenzyRegenFrame:ClearAllPoints() frenzyRegenFrame:SetPoint("BOTTOMLEFT", settingsFR.XPos, settingsFR.YPos)
frenzyRegenFrame:SetPoint("BOTTOMLEFT", settingsFR.XPos, settingsFR.YPos) end
end frenzyRegenFrame:initFlags()
frenzyRegenFrame:initFlags() if not settingsFR.movableFlag then frenzyRegenFrame:SetMovable(false) end
if not settingsFR.movableFlag then frenzyRegenFrame:updateVisibility()
frenzyRegenFrame:SetMovable(false) elseif self:IsShown() and event == "COMBAT_LOG_EVENT_UNFILTERED" then
end local _, eventType, _, sourceGUID, _, _, _, destGUID = ...
frenzyRegenFrame:updateVisibility() if settingsFR.announceFlag and sourceGUID == playerGUID and eventType == "SPELL_CAST_SUCCESS" then
elseif self:IsShown() and event == "COMBAT_LOG_EVENT_UNFILTERED" then local spellId = select(12, ...)
if spellId == idFR then -- Frenzied Regeneration
SendChatMessage(anouncedHealing, settingsFR.announceChannel, "Common")
end
end
if destGUID == playerGUID then
eventIndex = eventIndex + 1
if eventType == "SWING_DAMAGE" then
local _, _, _, _, _, _, _, _, _, _, _, amount, _, _, _, _, absorbed = ...
if absorbed == nil then absorbed = 0 end
damageTable[eventIndex] = { time(), amount + absorbed }
elseif
eventType == "SPELL_DAMAGE"
or eventType == "SPELL_PERIODIC_DAMAGE"
or eventType == "RANGE_DAMAGE"
then
local _, _, _, _, _, _, _, _, _, _, _, _, _, _, amount, _, _, _, _, absorbed = ...
if absorbed == nil then absorbed = 0 end
damageTable[eventIndex] = { time(), amount + absorbed }
end
end
elseif
event == "ACTIVE_TALENT_GROUP_CHANGED"
or event == "UPDATE_SHAPESHIFT_FORM"
or event == "PLAYER_REGEN_DISABLED"
or event == "PLAYER_REGEN_ENABLED"
or event == "PET_BATTLE_CLOSE"
or event == "PET_BATTLE_OPENING_START"
then
frenzyRegenFrame:updateVisibility()
elseif event == "ARTIFACT_UPDATE" then
frenzyRegenFrame:updateArtifactBonus()
end
end)
local _, eventType, _, sourceGUID, _, _, _, destGUID = ... frenzyRegenFrame:SetScript("OnUpdate", function(self, elapsed)
if settingsFR.announceFlag and sourceGUID == playerGUID and eventType == "SPELL_CAST_SUCCESS" then timeElapsed = timeElapsed + elapsed
local spellId = select(12, ...) if timeElapsed >= updateInterval then
if spellId == idFR then -- Frenzied Regeneration local t = time() - 5
SendChatMessage(anouncedHealing, settingsFR.announceChannel, "Common") for k, v in pairs(damageTable) do
end if v[1] <= t then
end damageTable[k] = nil
if destGUID == playerGUID then else
eventIndex = eventIndex + 1 damageTP5S = damageTP5S + v[2]
if eventType == "SWING_DAMAGE" then end
local _, _, _, _, _, _, _, _, _, _, _, amount, _, _, _, _, absorbed = ... end
if absorbed == nil then self:countHealing()
absorbed = 0; damageTP5S = 0
end timeElapsed = 0
damageTable[eventIndex] = {time(), amount + absorbed} end
elseif eventType == "SPELL_DAMAGE" or eventType == "SPELL_PERIODIC_DAMAGE" or eventType == "RANGE_DAMAGE" then end)
local _, _, _, _, _, _, _, _, _, _, _, _, _, _, amount, _, _, _, _, absorbed = ...
if absorbed == nil then
absorbed = 0;
end
damageTable[eventIndex] = {time(), amount + absorbed}
end
end
elseif event == "ACTIVE_TALENT_GROUP_CHANGED" or event == "UPDATE_SHAPESHIFT_FORM" or event == "PLAYER_REGEN_DISABLED" or event == "PLAYER_REGEN_ENABLED" or
event == "PET_BATTLE_CLOSE" or event == "PET_BATTLE_OPENING_START" then
frenzyRegenFrame:updateVisibility()
elseif event == "ARTIFACT_UPDATE" then
frenzyRegenFrame:updateArtifactBonus()
end
end)
frenzyRegenFrame:SetScript("OnUpdate", function(self, elapsed) local dropDown = CreateFrame("Frame", "FRContextMenu", frenzyRegenFrame, "UIDropDownMenuTemplate")
timeElapsed = timeElapsed + elapsed UIDropDownMenu_Initialize(dropDown, function(self, level, menuList)
if timeElapsed >= updateInterval then local info = UIDropDownMenu_CreateInfo()
local t = time() - 5 if (level or 1) == 1 then
for k, v in pairs(damageTable) do info.text = " Frame settings"
if v[1] <= t then info.notCheckable = true
damageTable[k] = nil info.hasArrow = true
else info.value = "position_submenu"
damageTP5S = damageTP5S + v[2] UIDropDownMenu_AddButton(info)
end info.text = " Transparency"
end info.value = "position_submenu2"
self:countHealing() UIDropDownMenu_AddButton(info)
damageTP5S = 0 info.text = " Status bar shows..."
timeElapsed = 0 info.value = "position_submenu3"
end UIDropDownMenu_AddButton(info)
end) info.text = " Announce healing..."
info.value = "position_submenu4"
UIDropDownMenu_AddButton(info)
info.hasArrow = false
info.isTitle = true
info.icon = "Interface\\Common\\UI-TooltipDivider-Transparent"
info.tSizeX = 0
info.tSizeY = 8
info.text = ""
info.iconOnly = true
info.iconInfo = { tFitDropDownSizeX = true }
UIDropDownMenu_AddButton(info)
info = UIDropDownMenu_CreateInfo()
info.notCheckable = false
info.hasArrow = false
info.text = "Show total heal"
info.func = function() settingsFR.displayFlag = 0 end
info.checked = function() return settingsFR.displayFlag == 0 end
UIDropDownMenu_AddButton(info)
info.text = "Show heal per tick"
info.func = function() settingsFR.displayFlag = 1 end
info.checked = function() return settingsFR.displayFlag == 1 end
UIDropDownMenu_AddButton(info)
info.text = "Show % of HP"
info.func = function() settingsFR.displayFlag = 2 end
info.checked = function() return settingsFR.displayFlag == 2 end
UIDropDownMenu_AddButton(info)
elseif level == 2 then
if UIDROPDOWNMENU_MENU_VALUE == "position_submenu" then
info.text = "Block position"
info.func = function()
frenzyRegenFrame:SetMovable(not frenzyRegenFrame:IsMovable())
settingsFR.movableFlag = frenzyRegenFrame:IsMovable()
end
info.checked = function() return not frenzyRegenFrame:IsMovable() end
info.isNotRadio = true
UIDropDownMenu_AddButton(info, level)
end
if UIDROPDOWNMENU_MENU_VALUE == "position_submenu" then
info.text = "Ignore clicks in combat"
info.func = function()
settingsFR.ignoreMouseFlag = not settingsFR.ignoreMouseFlag
frenzyRegenFrame:updateVisibility()
end
info.checked = function() return settingsFR.ignoreMouseFlag end
UIDropDownMenu_AddButton(info, level)
end
if UIDROPDOWNMENU_MENU_VALUE == "position_submenu" then
info.hasArrow = false
info.isTitle = true
info.notCheckable = true
info.icon = "Interface\\Common\\UI-TooltipDivider-Transparent"
info.tSizeX = 0
info.tSizeY = 8
info.text = ""
info.iconOnly = true
info.iconInfo = { tFitDropDownSizeX = true }
UIDropDownMenu_AddButton(info, level)
end
if UIDROPDOWNMENU_MENU_VALUE == "position_submenu" then
info = UIDropDownMenu_CreateInfo()
info.notCheckable = false
info.isNotRadio = true
info.text = "Grey-out if FR's on cd"
info.func = function() settingsFR.greyOutFlag = not settingsFR.greyOutFlag end
info.checked = function() return settingsFR.greyOutFlag end
UIDropDownMenu_AddButton(info, level)
end
if UIDROPDOWNMENU_MENU_VALUE == "position_submenu" then
info.text = "Short numbers format"
info.func = function() settingsFR.shortNumFlag = not settingsFR.shortNumFlag end
info.checked = function() return settingsFR.shortNumFlag end
UIDropDownMenu_AddButton(info, level)
end
if UIDROPDOWNMENU_MENU_VALUE == "position_submenu" then
info.hasArrow = false
info.isTitle = true
info.notCheckable = true
info.icon = "Interface\\Common\\UI-TooltipDivider-Transparent"
info.tSizeX = 0
info.tSizeY = 8
info.text = ""
info.iconOnly = true
info.iconInfo = { tFitDropDownSizeX = true }
UIDropDownMenu_AddButton(info, level)
end
if UIDROPDOWNMENU_MENU_VALUE == "position_submenu" then
info = UIDropDownMenu_CreateInfo()
info.notCheckable = false
info.isNotRadio = true
info.text = "Include Skysec's Hold"
info.func = function() settingsFR.legendaryFlag = not settingsFR.legendaryFlag end
info.checked = function() return settingsFR.legendaryFlag end
UIDropDownMenu_AddButton(info, level)
end
if UIDROPDOWNMENU_MENU_VALUE == "position_submenu" then
info.hasArrow = false
info.isTitle = true
info.notCheckable = true
info.icon = "Interface\\Common\\UI-TooltipDivider-Transparent"
info.tSizeX = 0
info.tSizeY = 8
info.text = ""
info.iconOnly = true
info.iconInfo = { tFitDropDownSizeX = true }
UIDropDownMenu_AddButton(info, level)
end
if UIDROPDOWNMENU_MENU_VALUE == "position_submenu" then
info = UIDropDownMenu_CreateInfo()
info.notCheckable = false
info.text = "Hide when not in Bear form"
info.func = function()
settingsFR.hideOutOfBearFlag = not settingsFR.hideOutOfBearFlag
frenzyRegenFrame:updateVisibility()
print("To turn off this setting type '/frshow bear'")
end
info.checked = function() return settingsFR.hideOutOfBearFlag end
info.isNotRadio = true
UIDropDownMenu_AddButton(info, level)
end
if UIDROPDOWNMENU_MENU_VALUE == "position_submenu" then
info.text = "Hide when out of combat"
info.func = function()
settingsFR.hideOutOfCombatFlag = not settingsFR.hideOutOfCombatFlag
frenzyRegenFrame:updateVisibility()
print("To turn off this setting type '/frshow combat'")
end
info.checked = function() return settingsFR.hideOutOfCombatFlag end
UIDropDownMenu_AddButton(info, level)
end
if UIDROPDOWNMENU_MENU_VALUE == "position_submenu2" then
info.text = "Show value only"
info.func = function() settingsFR.showValueOnlyFlag = not settingsFR.showValueOnlyFlag end
info.checked = function() return settingsFR.showValueOnlyFlag end
info.isNotRadio = true
UIDropDownMenu_AddButton(info, level)
end
if UIDROPDOWNMENU_MENU_VALUE == "position_submenu2" then
info.hasArrow = false
info.isTitle = true
info.notCheckable = true
info.icon = "Interface\\Common\\UI-TooltipDivider-Transparent"
info.tSizeX = 0
info.tSizeY = 8
info.text = ""
info.iconOnly = true
info.iconInfo = { tFitDropDownSizeX = true }
UIDropDownMenu_AddButton(info, level)
end
if UIDROPDOWNMENU_MENU_VALUE == "position_submenu2" then
info = UIDropDownMenu_CreateInfo()
info.text = "OFF"
info.notCheckable = false
info.func = function() settingsFR.transparencyFlag = 1 end
info.checked = function() return settingsFR.transparencyFlag == 1 end
info.isNotRadio = false
UIDropDownMenu_AddButton(info, level)
end
if UIDROPDOWNMENU_MENU_VALUE == "position_submenu2" then
info.text = "Low"
info.func = function() settingsFR.transparencyFlag = lowTransparency end
info.checked = function() return settingsFR.transparencyFlag == lowTransparency end
UIDropDownMenu_AddButton(info, level)
end
if UIDROPDOWNMENU_MENU_VALUE == "position_submenu2" then
info.text = "Medium"
info.func = function() settingsFR.transparencyFlag = mediumTransparency end
info.checked = function() return settingsFR.transparencyFlag == mediumTransparency end
UIDropDownMenu_AddButton(info, level)
end
if UIDROPDOWNMENU_MENU_VALUE == "position_submenu2" then
info.text = "High"
info.func = function() settingsFR.transparencyFlag = highTransparency end
info.checked = function() return settingsFR.transparencyFlag == highTransparency end
UIDropDownMenu_AddButton(info, level)
end
if UIDROPDOWNMENU_MENU_VALUE == "position_submenu3" then
info.text = "% of HP"
info.func = function() settingsFR.statusTypeFlag = 0 end
info.checked = function() return settingsFR.statusTypeFlag == 0 end
UIDropDownMenu_AddButton(info, level)
end
if UIDROPDOWNMENU_MENU_VALUE == "position_submenu3" then
info.text = "Number of charges"
info.func = function() settingsFR.statusTypeFlag = 1 end
info.checked = function() return settingsFR.statusTypeFlag == 1 end
UIDropDownMenu_AddButton(info, level)
end
if UIDROPDOWNMENU_MENU_VALUE == "position_submenu4" then
info.text = "OFF"
info.func = function() settingsFR.announceFlag = false end
info.checked = function() return not settingsFR.announceFlag end
UIDropDownMenu_AddButton(info, level)
end
if UIDROPDOWNMENU_MENU_VALUE == "position_submenu4" then
info.text = "/Say"
info.func = function()
settingsFR.announceChannel = "SAY"
settingsFR.announceFlag = true
end
info.checked = function() return settingsFR.announceFlag and settingsFR.announceChannel == "SAY" end
UIDropDownMenu_AddButton(info, level)
end
if UIDROPDOWNMENU_MENU_VALUE == "position_submenu4" then
info.text = "/Yell"
info.func = function()
settingsFR.announceChannel = "YELL"
settingsFR.announceFlag = true
end
info.checked = function() return settingsFR.announceFlag and settingsFR.announceChannel == "YELL" end
UIDropDownMenu_AddButton(info, level)
end
if UIDROPDOWNMENU_MENU_VALUE == "position_submenu4" then
info.text = "/Party"
info.func = function()
settingsFR.announceChannel = "PARTY"
settingsFR.announceFlag = true
end
info.checked = function() return settingsFR.announceFlag and settingsFR.announceChannel == "PARTY" end
UIDropDownMenu_AddButton(info, level)
end
if UIDROPDOWNMENU_MENU_VALUE == "position_submenu4" then
info.text = "/Raid"
info.func = function()
settingsFR.announceChannel = "RAID"
settingsFR.announceFlag = true
end
info.checked = function() return settingsFR.announceFlag and settingsFR.announceChannel == "RAID" end
UIDropDownMenu_AddButton(info, level)
end
end
end)
local dropDown = CreateFrame("Frame", "FRContextMenu", frenzyRegenFrame, "UIDropDownMenuTemplate") frenzyRegenFrame:SetScript("OnMouseDown", function(self, button)
UIDropDownMenu_Initialize(dropDown, function(self, level, menuList) if button == "RightButton" then ToggleDropDownMenu(1, nil, dropDown, "cursor", 3, -3) end
local info = UIDropDownMenu_CreateInfo() end)
if (level or 1) == 1 then
info.text = " Frame settings"
info.notCheckable = true
info.hasArrow = true
info.value = "position_submenu"
UIDropDownMenu_AddButton(info)
info.text = " Transparency"
info.value = "position_submenu2"
UIDropDownMenu_AddButton(info)
info.text = " Status bar shows..."
info.value = "position_submenu3"
UIDropDownMenu_AddButton(info)
info.text = " Announce healing..."
info.value = "position_submenu4"
UIDropDownMenu_AddButton(info)
info.hasArrow = false
info.isTitle = true
info.icon = "Interface\\Common\\UI-TooltipDivider-Transparent"
info.tSizeX = 0
info.tSizeY = 8
info.text = ""
info.iconOnly = true
info.iconInfo = {tFitDropDownSizeX = true}
UIDropDownMenu_AddButton(info)
info = UIDropDownMenu_CreateInfo()
info.notCheckable = false
info.hasArrow = false
info.text = "Show total heal"
info.func = function() settingsFR.displayFlag = 0 end
info.checked = function() return settingsFR.displayFlag == 0 end
UIDropDownMenu_AddButton(info)
info.text = "Show heal per tick"
info.func = function() settingsFR.displayFlag = 1 end
info.checked = function() return settingsFR.displayFlag == 1 end
UIDropDownMenu_AddButton(info)
info.text = "Show % of HP"
info.func = function() settingsFR.displayFlag = 2 end
info.checked = function() return settingsFR.displayFlag == 2 end
UIDropDownMenu_AddButton(info)
elseif level == 2 then
if UIDROPDOWNMENU_MENU_VALUE == "position_submenu" then
info.text = "Block position"
info.func = function() frenzyRegenFrame:SetMovable(not frenzyRegenFrame:IsMovable()) settingsFR.movableFlag = frenzyRegenFrame:IsMovable() end
info.checked = function() return not frenzyRegenFrame:IsMovable() end
info.isNotRadio = true
UIDropDownMenu_AddButton(info, level)
end
if UIDROPDOWNMENU_MENU_VALUE == "position_submenu" then
info.text = "Ignore clicks in combat"
info.func = function() settingsFR.ignoreMouseFlag = not settingsFR.ignoreMouseFlag frenzyRegenFrame:updateVisibility() end
info.checked = function() return settingsFR.ignoreMouseFlag end
UIDropDownMenu_AddButton(info, level)
end
if UIDROPDOWNMENU_MENU_VALUE == "position_submenu" then
info.hasArrow = false
info.isTitle = true
info.notCheckable = true
info.icon = "Interface\\Common\\UI-TooltipDivider-Transparent"
info.tSizeX = 0
info.tSizeY = 8
info.text = ""
info.iconOnly = true
info.iconInfo = {tFitDropDownSizeX = true}
UIDropDownMenu_AddButton(info, level)
end
if UIDROPDOWNMENU_MENU_VALUE == "position_submenu" then
info = UIDropDownMenu_CreateInfo()
info.notCheckable = false
info.isNotRadio = true
info.text = "Grey-out if FR's on cd"
info.func = function() settingsFR.greyOutFlag = not settingsFR.greyOutFlag end
info.checked = function() return settingsFR.greyOutFlag end
UIDropDownMenu_AddButton(info, level)
end
if UIDROPDOWNMENU_MENU_VALUE == "position_submenu" then
info.text = "Short numbers format"
info.func = function() settingsFR.shortNumFlag = not settingsFR.shortNumFlag end
info.checked = function() return settingsFR.shortNumFlag end
UIDropDownMenu_AddButton(info, level)
end
if UIDROPDOWNMENU_MENU_VALUE == "position_submenu" then
info.hasArrow = false
info.isTitle = true
info.notCheckable = true
info.icon = "Interface\\Common\\UI-TooltipDivider-Transparent"
info.tSizeX = 0
info.tSizeY = 8
info.text = ""
info.iconOnly = true
info.iconInfo = {tFitDropDownSizeX = true}
UIDropDownMenu_AddButton(info, level)
end
if UIDROPDOWNMENU_MENU_VALUE == "position_submenu" then
info = UIDropDownMenu_CreateInfo()
info.notCheckable = false
info.isNotRadio = true
info.text = "Include Skysec's Hold"
info.func = function() settingsFR.legendaryFlag = not settingsFR.legendaryFlag end
info.checked = function() return settingsFR.legendaryFlag end
UIDropDownMenu_AddButton(info, level)
end
if UIDROPDOWNMENU_MENU_VALUE == "position_submenu" then
info.hasArrow = false
info.isTitle = true
info.notCheckable = true
info.icon = "Interface\\Common\\UI-TooltipDivider-Transparent"
info.tSizeX = 0
info.tSizeY = 8
info.text = ""
info.iconOnly = true
info.iconInfo = {tFitDropDownSizeX = true}
UIDropDownMenu_AddButton(info, level)
end
if UIDROPDOWNMENU_MENU_VALUE == "position_submenu" then
info = UIDropDownMenu_CreateInfo()
info.notCheckable = false
info.text = "Hide when not in Bear form"
info.func = function() settingsFR.hideOutOfBearFlag = not settingsFR.hideOutOfBearFlag frenzyRegenFrame:updateVisibility() print("To turn off this setting type '/frshow bear'") end
info.checked = function() return settingsFR.hideOutOfBearFlag end
info.isNotRadio = true
UIDropDownMenu_AddButton(info, level)
end
if UIDROPDOWNMENU_MENU_VALUE == "position_submenu" then
info.text = "Hide when out of combat"
info.func = function() settingsFR.hideOutOfCombatFlag = not settingsFR.hideOutOfCombatFlag frenzyRegenFrame:updateVisibility() print("To turn off this setting type '/frshow combat'") end
info.checked = function() return settingsFR.hideOutOfCombatFlag end
UIDropDownMenu_AddButton(info, level)
end
if UIDROPDOWNMENU_MENU_VALUE == "position_submenu2" then
info.text = "Show value only"
info.func = function() settingsFR.showValueOnlyFlag = not settingsFR.showValueOnlyFlag end
info.checked = function() return settingsFR.showValueOnlyFlag end
info.isNotRadio = true
UIDropDownMenu_AddButton(info, level)
end
if UIDROPDOWNMENU_MENU_VALUE == "position_submenu2" then
info.hasArrow = false
info.isTitle = true
info.notCheckable = true
info.icon = "Interface\\Common\\UI-TooltipDivider-Transparent"
info.tSizeX = 0
info.tSizeY = 8
info.text = ""
info.iconOnly = true
info.iconInfo = {tFitDropDownSizeX = true}
UIDropDownMenu_AddButton(info, level)
end
if UIDROPDOWNMENU_MENU_VALUE == "position_submenu2" then
info = UIDropDownMenu_CreateInfo()
info.text = "OFF"
info.notCheckable = false
info.func = function() settingsFR.transparencyFlag = 1 end
info.checked = function() return settingsFR.transparencyFlag == 1 end
info.isNotRadio = false
UIDropDownMenu_AddButton(info, level)
end
if UIDROPDOWNMENU_MENU_VALUE == "position_submenu2" then
info.text = "Low"
info.func = function() settingsFR.transparencyFlag = lowTransparency end
info.checked = function() return settingsFR.transparencyFlag == lowTransparency end
UIDropDownMenu_AddButton(info, level)
end
if UIDROPDOWNMENU_MENU_VALUE == "position_submenu2" then
info.text = "Medium"
info.func = function() settingsFR.transparencyFlag = mediumTransparency end
info.checked = function() return settingsFR.transparencyFlag == mediumTransparency end
UIDropDownMenu_AddButton(info, level)
end
if UIDROPDOWNMENU_MENU_VALUE == "position_submenu2" then
info.text = "High"
info.func = function() settingsFR.transparencyFlag = highTransparency end
info.checked = function() return settingsFR.transparencyFlag == highTransparency end
UIDropDownMenu_AddButton(info, level)
end
if UIDROPDOWNMENU_MENU_VALUE == "position_submenu3" then
info.text = "% of HP"
info.func = function() settingsFR.statusTypeFlag = 0 end
info.checked = function() return settingsFR.statusTypeFlag == 0 end
UIDropDownMenu_AddButton(info, level)
end
if UIDROPDOWNMENU_MENU_VALUE == "position_submenu3" then
info.text = "Number of charges"
info.func = function() settingsFR.statusTypeFlag = 1 end
info.checked = function() return settingsFR.statusTypeFlag == 1 end
UIDropDownMenu_AddButton(info, level)
end
if UIDROPDOWNMENU_MENU_VALUE == "position_submenu4" then
info.text = "OFF"
info.func = function() settingsFR.announceFlag = false end
info.checked = function() return not settingsFR.announceFlag end
UIDropDownMenu_AddButton(info, level)
end
if UIDROPDOWNMENU_MENU_VALUE == "position_submenu4" then
info.text = "/Say"
info.func = function() settingsFR.announceChannel = "SAY" settingsFR.announceFlag = true end
info.checked = function() return settingsFR.announceFlag and settingsFR.announceChannel == "SAY" end
UIDropDownMenu_AddButton(info, level)
end
if UIDROPDOWNMENU_MENU_VALUE == "position_submenu4" then
info.text = "/Yell"
info.func = function() settingsFR.announceChannel = "YELL" settingsFR.announceFlag = true end
info.checked = function() return settingsFR.announceFlag and settingsFR.announceChannel == "YELL" end
UIDropDownMenu_AddButton(info, level)
end
if UIDROPDOWNMENU_MENU_VALUE == "position_submenu4" then
info.text = "/Party"
info.func = function() settingsFR.announceChannel = "PARTY" settingsFR.announceFlag = true end
info.checked = function() return settingsFR.announceFlag and settingsFR.announceChannel == "PARTY" end
UIDropDownMenu_AddButton(info, level)
end
if UIDROPDOWNMENU_MENU_VALUE == "position_submenu4" then
info.text = "/Raid"
info.func = function() settingsFR.announceChannel = "RAID" settingsFR.announceFlag = true end
info.checked = function() return settingsFR.announceFlag and settingsFR.announceChannel == "RAID" end
UIDropDownMenu_AddButton(info, level)
end
end
end)
frenzyRegenFrame:SetScript("OnMouseDown", function(self, button)
if button == "RightButton" then
ToggleDropDownMenu(1, nil, dropDown, "cursor", 3, -3)
end
end)
SLASH_FRENZYREGEN1 = "/frshow";
function SlashCmdList.FRENZYREGEN(msg, editbox)
if msg == "bear" then
settingsFR.hideOutOfBearFlag = not settingsFR.hideOutOfBearFlag
elseif msg == "combat" then
settingsFR.hideOutOfCombatFlag = not settingsFR.hideOutOfCombatFlag
end
frenzyRegenFrame:updateVisibility()
end
SLASH_FRENZYREGEN1 = "/frshow"
function SlashCmdList.FRENZYREGEN(msg, editbox)
if msg == "bear" then
settingsFR.hideOutOfBearFlag = not settingsFR.hideOutOfBearFlag
elseif msg == "combat" then
settingsFR.hideOutOfCombatFlag = not settingsFR.hideOutOfCombatFlag
end
frenzyRegenFrame:updateVisibility()
end