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
max_line_length = 150
exclude_files = { "Meta/" }

View File

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

View File

@@ -4,52 +4,55 @@
--Look at tolerances as well
local dataSet2s = {
[1]=540390408.9506,
[2]=540392394.9163,
[3]=540394398.5326,
[4]=540396409.5288,
[5]=540398396.6414,
[6]=540400397.0754,
[7]=540402384.8113,
[8]=540404385.3304,
[9]=540406398.99,
[10]=540408386.472,
[11]=540410386.9851,
[12]=540412374.8497,
[13]=540414375.1427,
[14]=540416373.0995,
[15]=540418376.9931,
[16]=540420390.6971
[1] = 540390408.9506,
[2] = 540392394.9163,
[3] = 540394398.5326,
[4] = 540396409.5288,
[5] = 540398396.6414,
[6] = 540400397.0754,
[7] = 540402384.8113,
[8] = 540404385.3304,
[9] = 540406398.99,
[10] = 540408386.472,
[11] = 540410386.9851,
[12] = 540412374.8497,
[13] = 540414375.1427,
[14] = 540416373.0995,
[15] = 540418376.9931,
[16] = 540420390.6971,
}
local dataSet1p5s = {
[1]=541651364.1916,
[2]=541652857.9058,
[3]=541654365.8491,
[4]=541655858.3292,
[5]=541657352.4962,
[6]=541658846.2963,
[7]=541660354.015,
[8]=541661847.0112,
[9]=541663340.6759,
[10]=541664861.3772,
[11]=541666354.9449,
[12]=541667848.8308,
[13]=541669343.2332,
[14]=541670849.9777,
[15]=541672344.0613,
[16]=541673851.2346
[1] = 541651364.1916,
[2] = 541652857.9058,
[3] = 541654365.8491,
[4] = 541655858.3292,
[5] = 541657352.4962,
[6] = 541658846.2963,
[7] = 541660354.015,
[8] = 541661847.0112,
[9] = 541663340.6759,
[10] = 541664861.3772,
[11] = 541666354.9449,
[12] = 541667848.8308,
[13] = 541669343.2332,
[14] = 541670849.9777,
[15] = 541672344.0613,
[16] = 541673851.2346,
}
local tolerance = 50
local tempAverages = {}
-- 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
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
tempAverages[tempAvg] = tempAverages[tempAvg] + 1
end
end
for k,v in pairs(tempAverages) do
print(k,v)
end
for k, v in pairs(tempAverages) do
print(k, v)
end

View File

@@ -1,7 +1,7 @@
if not aura_env.region.text then
local text = aura_env.region:CreateFontString(nil, aura_env.region)
aura_env.region.text = text
print("ok!")
local text = aura_env.region:CreateFontString(nil, aura_env.region)
aura_env.region.text = text
print("ok!")
end
aura_env.region.text:SetFont("Fonts\\FRIZQT__.TTF", 10, "OUTLINE, MONOCHROME")
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 typeAttributeMap = {
quest = {"id", "questId", "questID"},
item = {info = {"id"}}
quest = { "id", "questId", "questID" },
item = { info = { "id" } },
}
local function ShowUrlPopup(id, type)
if not (id or type) then return end
local url = baseUrl .. type .. "=" .. id
StaticPopup_Show("WowheadQuestLinkUrl", type:sub(1, 1):upper() .. type:sub(2), _, url)
if not (id or type) then return end
local url = baseUrl .. type .. "=" .. id
StaticPopup_Show("WowheadQuestLinkUrl", type:sub(1, 1):upper() .. type:sub(2), _, url)
end
local function getIdAndType(focus)
local function loop(focus, keys)
if not focus then return end
for key, value in pairs(keys) do
if type(value) == "table" then
return loop(focus[key], value)
end
local id = focus[value]
if id then
return id
end
end
end
if not focus then return end
for type, keys in pairs(typeAttributeMap) do
local id = loop(focus, keys)
if id then
return id, type
end
end
return getIdAndType(focus:GetParent())
local function loop(focus, keys)
if not focus then return end
for key, value in pairs(keys) do
if type(value) == "table" then return loop(focus[key], value) end
local id = focus[value]
if id then return id end
end
end
if not focus then return end
for type, keys in pairs(typeAttributeMap) do
local id = loop(focus, keys)
if id then return id, type end
end
return getIdAndType(focus:GetParent())
end
local function run()
local focus = GetMouseFocus()
local id, type = getIdAndType(focus)
ShowUrlPopup(id, type)
local focus = GetMouseFocus()
local id, type = getIdAndType(focus)
ShowUrlPopup(id, type)
end
StaticPopupDialogs["WowheadQuestLinkUrl"] = {
text = popupText,
button1 = "Close",
OnShow = function(self, data)
local function HidePopup(self) self:GetParent():Hide() end
self.editBox:SetScript("OnEscapePressed", HidePopup)
self.editBox:SetScript("OnEnterPressed", HidePopup)
self.editBox:SetMaxLetters(0)
self.editBox:SetText(data)
self.editBox:HighlightText(0, self.editBox:GetNumLetters())
end,
hasEditBox = true,
editBoxWidth = 233,
timeout = 0,
whileDead = true,
hideOnEscape = true,
preferredIndex = 3,
text = popupText,
button1 = "Close",
OnShow = function(self, data)
local function HidePopup(self) self:GetParent():Hide() end
self.editBox:SetScript("OnEscapePressed", HidePopup)
self.editBox:SetScript("OnEnterPressed", HidePopup)
self.editBox:SetMaxLetters(0)
self.editBox:SetText(data)
self.editBox:HighlightText(0, self.editBox:GetNumLetters())
end,
hasEditBox = true,
editBoxWidth = 233,
timeout = 0,
whileDead = true,
hideOnEscape = true,
preferredIndex = 3,
}
local btn = CreateFrame("BUTTON", "KeybindBtn")
SetBindingClick(keybind, btn:GetName())
btn:SetScript("OnClick", run)

View File

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

View File

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

View File

@@ -1,82 +1,85 @@
aura_env.herbs = {
[1] = {
["X"] = 49.38,
["Y"] = 77.73,
["CD"] = 0,
},
[2] = {
["X"] = 48.13,
["Y"] = 85.04,
["CD"] = 0,
},
[3] = {
["X"] = 47.99,
["Y"] = 73.48,
["CD"] = 0,
},
[4] = {
["X"] = 55.28,
["Y"] = 61.71,
["CD"] = 0,
},
[5] = {
["X"] = 58.67,
["Y"] = 59.56,
["CD"] = 0,
},
[6] = {
["X"] = 57.57,
["Y"] = 57.4,
["CD"] = 0,
},
[7] = {
["X"] = 57.13,
["Y"] = 60.08,
["CD"] = 0,
},
[8] = {
["X"] = 55.73,
["Y"] = 51.76,
["CD"] = 0,
},
[9] = {
["X"] = 56.14,
["Y"] = 51.59,
["CD"] = 0,
},
[10] = {
["X"] = 41.07,
["Y"] = 73.8,
["CD"] = 0,
},
[1] = {
["X"] = 49.38,
["Y"] = 77.73,
["CD"] = 0,
},
[2] = {
["X"] = 48.13,
["Y"] = 85.04,
["CD"] = 0,
},
[3] = {
["X"] = 47.99,
["Y"] = 73.48,
["CD"] = 0,
},
[4] = {
["X"] = 55.28,
["Y"] = 61.71,
["CD"] = 0,
},
[5] = {
["X"] = 58.67,
["Y"] = 59.56,
["CD"] = 0,
},
[6] = {
["X"] = 57.57,
["Y"] = 57.4,
["CD"] = 0,
},
[7] = {
["X"] = 57.13,
["Y"] = 60.08,
["CD"] = 0,
},
[8] = {
["X"] = 55.73,
["Y"] = 51.76,
["CD"] = 0,
},
[9] = {
["X"] = 56.14,
["Y"] = 51.59,
["CD"] = 0,
},
[10] = {
["X"] = 41.07,
["Y"] = 73.8,
["CD"] = 0,
},
}
aura_env.cooldown = 600
aura_env.wipeDistance = 50
aura_env.angle = 0
aura_env.hyp = 0
aura_env.GetClosestHerb = function()
aura_env.minID = {
["X"] = 0,
["Y"] = 0,
["D"] = 1000,
["ID"] = -1
}
local pX = GetPlayerMapPosition("player") or 0
local pY = select(2, GetPlayerMapPosition("player")) or 0
pX, pY = pX * 100, pY * 100
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
if cd == 0 then
local X, Y = pX - hX, pY - hY
local hyp = math.sqrt((math.abs(X ^ 2)) + (math.abs(Y ^ 2)))
if hyp < aura_env.minID.D then
aura_env.minID.X = hX
aura_env.minID.Y = hY
aura_env.minID.D = hyp
aura_env.minID.ID = k
end
end
end
return aura_env.minID.ID
aura_env.minID = {
["X"] = 0,
["Y"] = 0,
["D"] = 1000,
["ID"] = -1,
}
local pX = GetPlayerMapPosition("player") or 0
local pY = select(2, GetPlayerMapPosition("player")) or 0
pX, pY = pX * 100, pY * 100
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
if cd == 0 then
local X, Y = pX - hX, pY - hY
local hyp = math.sqrt((math.abs(X ^ 2)) + (math.abs(Y ^ 2)))
if hyp < aura_env.minID.D then
aura_env.minID.X = hX
aura_env.minID.Y = hY
aura_env.minID.D = hyp
aura_env.minID.ID = k
end
end
end
return aura_env.minID.ID
end
if WeakAuras.IsOptionsOpen() then
WeakAurasSaved.HerbSniffer.CD = 0
WeakAurasSaved.HerbSniffer.NoCD = #aura_env.herbs
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 = {
[1] = {
["X"] = 58.54,
["Y"] = 51.33,
["CD"] = 0,
},
[2] = {
["X"] = 55.51,
["Y"] = 55.97,
["CD"] = 0,
},
[3] = {
["X"] = 49.55,
["Y"] = 58.43,
["CD"] = 0,
},
[4] = {
["X"] = 55.87,
["Y"] = 79,
["CD"] = 0,
},
[5] = {
["X"] = 56.32,
["Y"] = 77.94,
["CD"] = 0,
},
[6] = {
["X"] = 57.65,
["Y"] = 72.89,
["CD"] = 0,
},
[7] = {
["X"] = 52.06,
["Y"] = 22.41,
["CD"] = 0,
},
[8] = {
["X"] = 49.8,
["Y"] = 14.15,
["CD"] = 0,
},
[9] = {
["X"] = 42.4,
["Y"] = 71.35,
["CD"] = 0,
},
[10] = {
["X"] = 66.74,
["Y"] = 37.04,
["CD"] = 0,
},
[11] = {
["X"] = 71.61,
["Y"] = 34.02,
["CD"] = 0,
},
[12] = {
["X"] = 43.66,
["Y"] = 42.8,
["CD"] = 0,
},
[13] = {
["X"] = 51.79,
["Y"] = 70.39,
["CD"] = 0,
},
[14] = {
["X"] = 45.17,
["Y"] = 53.13,
["CD"] = 0,
},
[15] = {
["X"] = 71.88,
["Y"] = 27.85,
["CD"] = 0,
},
[1] = {
["X"] = 58.54,
["Y"] = 51.33,
["CD"] = 0,
},
[2] = {
["X"] = 55.51,
["Y"] = 55.97,
["CD"] = 0,
},
[3] = {
["X"] = 49.55,
["Y"] = 58.43,
["CD"] = 0,
},
[4] = {
["X"] = 55.87,
["Y"] = 79,
["CD"] = 0,
},
[5] = {
["X"] = 56.32,
["Y"] = 77.94,
["CD"] = 0,
},
[6] = {
["X"] = 57.65,
["Y"] = 72.89,
["CD"] = 0,
},
[7] = {
["X"] = 52.06,
["Y"] = 22.41,
["CD"] = 0,
},
[8] = {
["X"] = 49.8,
["Y"] = 14.15,
["CD"] = 0,
},
[9] = {
["X"] = 42.4,
["Y"] = 71.35,
["CD"] = 0,
},
[10] = {
["X"] = 66.74,
["Y"] = 37.04,
["CD"] = 0,
},
[11] = {
["X"] = 71.61,
["Y"] = 34.02,
["CD"] = 0,
},
[12] = {
["X"] = 43.66,
["Y"] = 42.8,
["CD"] = 0,
},
[13] = {
["X"] = 51.79,
["Y"] = 70.39,
["CD"] = 0,
},
[14] = {
["X"] = 45.17,
["Y"] = 53.13,
["CD"] = 0,
},
[15] = {
["X"] = 71.88,
["Y"] = 27.85,
["CD"] = 0,
},
}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -2,4 +2,4 @@
--- Deprecated in favor of Heimdall.AchievementSniffer
--function(allstates)
-- aura_env.TryInspect()
--end
--end

View File

@@ -13,4 +13,4 @@
-- if not should then return end
--
-- aura_env.Scan(targetName)
--end
--end

View File

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

View File

@@ -2,8 +2,6 @@ local year = 20
local month = 7
local day = 12
if year < 100 then
year = "20" .. year
end
if year < 100 then 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
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
---@return CItemInfo, string | nil
GetItemInfo = function(msg)
local itemInfo = {name = "", icon = 134400, quantity = 0, color = ""}
local name = msg:match("h%[(.+)%]")
if not name then return itemInfo, "No item name found" end
local quantity = msg:match("x(%d+)") or 1
itemInfo.name = name
itemInfo.quantity = quantity
local itemInfo = { name = "", icon = 134400, quantity = 0, color = "" }
local name = msg:match("h%[(.+)%]")
if not name then return itemInfo, "No item name found" end
local quantity = msg:match("x(%d+)") or 1
itemInfo.name = name
itemInfo.quantity = quantity
if WeakAurasSaved.Cyka.ItemCache[name] then
itemInfo.icon = WeakAurasSaved.Cyka.ItemCache[name].icon
end
local color = msg:match("cff(%w%w%w%w%w%w)") or "ffffff"
itemInfo.color = color
if WeakAurasSaved.Cyka.ItemCache[name] then itemInfo.icon = WeakAurasSaved.Cyka.ItemCache[name].icon end
local color = msg:match("cff(%w%w%w%w%w%w)") or "ffffff"
itemInfo.color = color
return itemInfo, nil
return itemInfo, nil
end
---@param msg string
---@param allstates allstates
DrawIcon = function(msg, allstates)
local info, err = GetItemInfo(msg)
if err then
print(err)
return
end
local info, err = GetItemInfo(msg)
if err then
print(err)
return
end
local formattedName = "\124cff" .. info.color .. "[" .. info.name .. "]\124r x" .. info.quantity
allstates[#aura_env.allstates + 1] = {
show = true,
changed = true,
index = GetTime(),
resort = true,
local formattedName = "\124cff" .. info.color .. "[" .. info.name .. "]\124r x" .. info.quantity
allstates[#aura_env.allstates + 1] = {
show = true,
changed = true,
index = GetTime(),
resort = true,
icon = info.icon,
name = formattedName,
icon = info.icon,
name = formattedName,
progressType = "timed",
expirationTime = GetTime() + iconDisplayDuration,
duration = iconDisplayDuration,
autoHide = true,
}
end
progressType = "timed",
expirationTime = GetTime() + iconDisplayDuration,
duration = iconDisplayDuration,
autoHide = true,
}
end

File diff suppressed because it is too large Load Diff

View File

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

View File

@@ -26,14 +26,14 @@ local function UpdateAccountInfo()
BattlepassAccountInfo = table.concat(ret, "\n")
end
-- [02:37 PM] Bluepotato
-- [02:37 PM] onlineTimeInMinutes=120,
-- [02:37 PM] claimed=1
-- [02:37 PM] Smolpotato
-- [02:37 PM] onlineTimeInMinutes=120,
-- [02:37 PM] claimed=1
-- [02:37 PM] Thiccpotato
-- [02:37 PM] onlineTimeInMinutes=57,
-- [02:37 PM] Bluepotato
-- [02:37 PM] onlineTimeInMinutes=120,
-- [02:37 PM] claimed=1
-- [02:37 PM] Smolpotato
-- [02:37 PM] onlineTimeInMinutes=120,
-- [02:37 PM] claimed=1
-- [02:37 PM] Thiccpotato
-- [02:37 PM] onlineTimeInMinutes=57,
-- [02:37 PM] claimed=0
---@param input string
@@ -57,7 +57,7 @@ end
---@field currentDayOnlineTimeMilliseconds number
BattlepassInfo = {
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,
ParseApi = function(msg)
local packets = aura_env.Split(msg, ":")
@@ -71,24 +71,22 @@ BattlepassInfo = {
BattlepassInfo.cost = tonumber(packets[7])
BattlepassInfo.currentDayOnlineTimeMinutes = math.floor(BattlepassInfo.currentDayOnlineTimeMilliseconds / 60000)
WeakAurasSaved.Cyka.LoginInfo[Today][UnitName("player")].onlineTimeInMinutes = BattlepassInfo
.currentDayOnlineTimeMinutes
WeakAurasSaved.Cyka.LoginInfo[Today][UnitName("player")].onlineTimeInMinutes =
BattlepassInfo.currentDayOnlineTimeMinutes
WeakAurasSaved.Cyka.LoginInfo[Today][UnitName("player")].claimed = BattlepassInfo.dayRewardComplete
if BattlepassInfo.dayRewardComplete == 0 and BattlepassInfo.currentDayOnlineTimeMinutes >= 120 then
BattlepassInfo.DoClaim()
C_Timer.After(0.2, function()
BattlepassInfo.PingApi()
end)
C_Timer.After(0.2, function() BattlepassInfo.PingApi() end)
end
UpdateAccountInfo()
end,
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")
SendChatMessage("YEEE", "WHISPER", nil, UnitName("player"))
end
end,
}
setmetatable(BattlepassInfo, {
__call = BattlepassInfo.PingApi,
@@ -99,16 +97,13 @@ setmetatable(BattlepassInfo, {
table.insert(ret, k .. ": " .. tostring(v))
end
return table.concat(ret, "\n")
end
end,
})
for k, v in pairs(BattlepassInfo) do
if type(v) == "number" then
BattlepassInfo[k] = 0
end
if type(v) == "number" then BattlepassInfo[k] = 0 end
end
BattlepassInfo()
-- 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 output = {}
for i = 1, select("#", ...) do
local value = select(i, ...)
output[#output + 1] = "\"" .. tostring(value) .. "\""
end
return table.concat(output, ",")
local output = {}
for i = 1, select("#", ...) do
local value = select(i, ...)
output[#output + 1] = '"' .. tostring(value) .. '"'
end
return table.concat(output, ",")
end
if not WeakAurasSaved then WeakAurasSaved = {} end
@@ -16,7 +16,7 @@ if not WeakAurasSaved.Cyka.CombatLog then WeakAurasSaved.Cyka.CombatLog = {} end
---@param ... any
aura_env.LogSpell = function(subevent, ...)
print(varargToString(subevent, ...))
table.insert(WeakAurasSaved.Cyka.CombatLog, varargToString(subevent, ...))
table.insert(WeakAurasSaved.Cyka.CombatLog, varargToString(subevent, ...))
end
-- /dump 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
-- WeakAuras.ScanEvents("PLAY_SOUND", "Interface\\AddOns\\WeakAuras\\Media\\Sounds\\RobotBlip.ogg")
PlaySoundFile("Interface\\AddOns\\WeakAuras\\Media\\Sounds\\RobotBlip.ogg", "Master")
-- elseif ticks == aura_env.totalTicks - 2 then
-- -- WeakAuras.ScanEvents("PLAY_SOUND", "Interface\\AddOns\\WeakAuras\\Media\\Sounds\\WaterDrop.ogg")
-- PlaySoundFile("Interface\\AddOns\\WeakAuras\\Media\\Sounds\\WaterDrop.ogg", "Master")
-- elseif ticks == aura_env.totalTicks - 2 then
-- -- WeakAuras.ScanEvents("PLAY_SOUND", "Interface\\AddOns\\WeakAuras\\Media\\Sounds\\WaterDrop.ogg")
-- PlaySoundFile("Interface\\AddOns\\WeakAuras\\Media\\Sounds\\WaterDrop.ogg", "Master")
end
end
end)

View File

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

View File

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

View File

@@ -11,7 +11,7 @@ local function StrSplit(input, deliminer)
return parts, nil
end
aura_env.whitelist = {}
aura_env.whitelist = {}
local swhitelist = StrSplit(aura_env.config.whitelist, ",")
for _, name in ipairs(swhitelist) do
aura_env.whitelist[name] = true

View File

@@ -15,4 +15,4 @@ aura_env.FileFriends = function()
})
end
WeakAurasSaved.Cyka.Friends[now] = info
end
end

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

View File

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

View File

@@ -147,7 +147,7 @@ local function GetCastInfoForGuid(guid)
name = "",
startms = 0,
endms = 0,
spellid = 0
spellid = 0,
}
local unit, err = GetUnitFromGuid(guid)
@@ -179,7 +179,7 @@ aura_env.Alert = {
---@return Alert
new = function(id, name, events, instruction, afflictedInstruction)
local self = setmetatable({}, {
__index = aura_env.Alert
__index = aura_env.Alert,
})
self.id = id
name = string.gsub(name, " ", "_")
@@ -234,9 +234,7 @@ aura_env.Alert = {
end
local displayText = self.instruction
if err == nil and targetInfo.target == PlayerName then
displayText = self.afflictedInstruction
end
if err == nil and targetInfo.target == PlayerName then displayText = self.afflictedInstruction end
local castEnd = math.max(GetTime() + 5, castInfo.endms / 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
self.iterator = self.iterator + 1
return nil
end
end,
}
local alerts = {
@@ -274,7 +272,13 @@ local alerts = {
-- Felhounds
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(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(244056, "Siphon Corruption", { "SPELL_CAST_START", "SPELL_AURA_APPLIED" }, "Stack", "Stack!!"),
-- Antoran High Command
@@ -288,7 +292,7 @@ local alerts = {
-- aura_env.Alert.new(247552, "Sleep Canister"), -- Need more info
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(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(247687, "Sever", { "SPELL_CAST_SUCCESS" }, "", ""),
aura_env.Alert.new(248070, "Empowered Shrapnel Blast", { "SPELL_CAST_START" }, "Mines", ""),
@@ -504,9 +508,7 @@ local alerts = {
aura_env.EventMap = {}
for _, alert in ipairs(alerts) do
for event, _ in pairs(alert.events) do
if not aura_env.EventMap[event] then
aura_env.EventMap[event] = {}
end
if not aura_env.EventMap[event] then aura_env.EventMap[event] = {} end
aura_env.EventMap[event][alert.id] = alert
end
end

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -19,4 +19,4 @@
---@field remaining number Only used with paused, gives WA the info needed to show paused progress at the current point.
state = {}
---@alias allstates table<number, state>
---@alias allstates table<number, state>

View File

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

View File

@@ -1,12 +1,12 @@
--Integrate into a channel instead of whispers
--But probably also keep whispers, do both
--So for channel see
--So for channel see
JoinPermanentChannel("foo")
LeaveChannelByName("foo")
--For existing channels see:
local foo = {GetChannelList()}
local foo = { GetChannelList() }
--There is also:
GetChannelName(0)
@@ -35,4 +35,4 @@ ChannelUnmoderator("foobar", "Succpotato")
--/pass foobar secret
--Wiki:
--You can only be in ten chat channels at any given time. This does not include other chat types such as say, yell, party, raid, guild, officer, or whisper which are not considered channels.
--You can only be in ten chat channels at any given time. This does not include other chat types such as say, yell, party, raid, guild, officer, or whisper which are not considered channels.

View File

@@ -7,13 +7,13 @@ Colorer = {
---@type table<number, Color>
colors = {
{ r = 0.62, g = 0.62, b = 0.62 }, -- Grey
{ r = 1, g = 1, b = 1 }, -- White
{ r = 0.12, g = 1, b = 0 }, -- Green
{ r = 0, g = 0.44, b = 0.87 }, -- Blue
{ r = 1, g = 1, b = 1 }, -- White
{ r = 0.12, g = 1, b = 0 }, -- Green
{ r = 0, g = 0.44, b = 0.87 }, -- Blue
{ r = 0.64, g = 0.21, b = 0.93 }, -- Purple
{ r = 1, g = 0.5, b = 0 }, -- Orange
{ r = 0.9, g = 0.8, b = 0.5 }, -- Light Gold
{ r = 0, g = 0.8, b = 1.0 }, -- Blizzard Blue
{ r = 1, g = 0.5, b = 0 }, -- Orange
{ r = 0.9, g = 0.8, b = 0.5 }, -- Light Gold
{ r = 0, g = 0.8, b = 1.0 }, -- Blizzard Blue
},
breakpoints = { -999, -10, -5, -2, 2, 5, 10, 999 },
@@ -59,8 +59,6 @@ Colorer = {
---@param b number
---@param t number
---@return number
lerp = function(a, b, t)
return a * (1 - t) + b * t
end
lerp = function(a, b, t) 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.scanned = false
aura_env.bars = {
"ElvUI_Bar1", "ElvUI_Bar2", "ElvUI_Bar3", "ElvUI_Bar4", "ElvUI_Bar5",
"ElvUI_Bar6", "ElvUI_Bar7", "ElvUI_Bar8", "ElvUI_Bar9", "ElvUI_Bar10"
"ElvUI_Bar1",
"ElvUI_Bar2",
"ElvUI_Bar3",
"ElvUI_Bar4",
"ElvUI_Bar5",
"ElvUI_Bar6",
"ElvUI_Bar7",
"ElvUI_Bar8",
"ElvUI_Bar9",
"ElvUI_Bar10",
}
aura_env.lookup = function()
local spellid = 0
if not aura_env.states or aura_env.states == nil then
print("No states")
return
end
local spellid = 0
if not aura_env.states or aura_env.states == nil then
print("No states")
return
end
local triggerInfo = aura_env.states[2]
if not triggerInfo then
triggerInfo = aura_env.states[1]
end
if triggerInfo then spellid = triggerInfo.trigger.spellName end
if spellid == 0 then return end
local triggerInfo = aura_env.states[2]
if not triggerInfo then triggerInfo = aura_env.states[1] end
if triggerInfo then spellid = triggerInfo.trigger.spellName end
if spellid == 0 then return end
for _, bar in pairs(aura_env.bars) do
for i = 1, 12 do
local button = _G[bar .. "Button" .. i]
local slot = button:GetAttribute("action")
if slot then
local type, _, _, id = GetActionInfo(slot)
if type == "spell" then
if id == spellid then
local bindid = button.keyBoundTarget
local keybind = GetBindingKey(bindid)
aura_env.keybind = keybind
break
end
end
end
end
end
for _, bar in pairs(aura_env.bars) do
for i = 1, 12 do
local button = _G[bar .. "Button" .. i]
local slot = button:GetAttribute("action")
if slot then
local type, _, _, id = GetActionInfo(slot)
if type == "spell" then
if id == spellid then
local bindid = button.keyBoundTarget
local keybind = GetBindingKey(bindid)
aura_env.keybind = keybind
break
end
end
end
end
end
if aura_env.keybind then
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, "CTRL%-", "C")
aura_env.keybind = string.gsub(aura_env.keybind, "ALT%-", "A")
aura_env.keybind = string.gsub(aura_env.keybind, "SPACE", "Spb")
end
if aura_env.keybind then
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, "CTRL%-", "C")
aura_env.keybind = string.gsub(aura_env.keybind, "ALT%-", "A")
aura_env.keybind = string.gsub(aura_env.keybind, "SPACE", "Spb")
end
aura_env.scanned = true
aura_env.scanned = true
end

View File

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

View File

@@ -1,2 +1,2 @@
aura_env.alive = false
aura_env.totem = aura_env.config.totem or "Tremor Totem"
aura_env.totem = aura_env.config.totem or "Tremor Totem"

2
NewAge

Submodule NewAge updated: 37df5a0610...3fa9e6c087

View File

@@ -1,6 +1,60 @@
local cc =
{
"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"
local cc = {
"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",
}
local hashtable = {}
local spellarray = {}
@@ -78,7 +132,7 @@ end
local function findcollision(hash_table, array)
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
if i ~= k then
if hash_table[i] == hash_table[k] then
@@ -98,7 +152,7 @@ local function tohash(tempvar)
charTable[#charTable + 1] = char
hash = hash + tonum(char)
hash = hash / table.getn(charTable)
end
end
hash = math.floor(hash * 10000)
return hash
--print(spellarray[hash], hash)
@@ -109,9 +163,9 @@ local function checkbase(spell)
if spellarray[tohash(spell)] == spell then return 1 end
end
for k,v in ipairs(cc) do
for k, v in ipairs(cc) do
local hash = tohash(v)
hashtable[#hashtable] = hash
spellarray[hash] = v
end
findcollision(hashtable, cc)
findcollision(hashtable, cc)

View File

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

View File

@@ -2,67 +2,57 @@ function TomTom:AddMFWaypoint(m, f, x, y, opts)
opts = opts or {}
-- Default values
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.world == nil then opts.world = self.profile.worldmap.enable end
if opts.crazy == nil then opts.crazy = self.profile.arrow.autoqueue 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.world == nil then opts.world = self.profile.worldmap.enable 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.arrivaldistance == nil then opts.arrivaldistance = self.profile.arrow.arrival end
if not opts.callbacks then
opts.callbacks = TomTom:DefaultCallbacks(opts)
if not opts.callbacks then opts.callbacks = TomTom:DefaultCallbacks(opts) end
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
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
if not f then
local floors = hbd:GetNumFloors(m)
f = floors == 0 and 0 or 1
end
-- uid is the 'new waypoint' called this for historical reasons
local uid = { m, f, x, y, title = opts.title }
-- 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
-- Copy over any options, so we have em
for k, v in pairs(opts) do
if not uid[k] then uid[k] = v end
end
-- uid is the 'new waypoint' called this for historical reasons
local uid = {m, f, x, y, title = opts.title}
-- No need to convert x and y because they're already 0-1 instead of 0-100
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
for k,v in pairs(opts) do
if not uid[k] then
uid[k] = v
end
end
waypoints[m] = waypoints[m] or {}
waypoints[m][key] = uid
-- No need to convert x and y because they're already 0-1 instead of 0-100
self:SetWaypoint(uid, opts.callbacks, opts.minimap, opts.world)
if opts.crazy then
self:SetCrazyArrow(uid, opts.arrivaldistance, opts.title)
end
-- If this is a persistent waypoint, then add it to the waypoints table
if opts.persistent then self.waypointprofile[m][key] = uid end
waypoints[m] = waypoints[m] or {}
waypoints[m][key] = uid
-- If this is a persistent waypoint, then add it to the waypoints table
if opts.persistent then
self.waypointprofile[m][key] = uid
end
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
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
local coord_fmt = "%%.%df, %%.%df"
function RoundCoords(x,y,prec)
local fmt = coord_fmt:format(prec, prec)
return fmt:format(x*100, y*100)
end
function RoundCoords(x, y, prec)
local fmt = coord_fmt:format(prec, prec)
return fmt:format(x * 100, y * 100)
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 sortedarray = {0}
local array = { 13, 14, 52, 63, 764, 12342, 143, 2, 54, 63, 25, 15 }
local sortedarray = { 0 }
for ka, va in ipairs(array) do
for j = 1, #sortedarray do
if va > sortedarray[j] then
if sortedarray[j] > 0 then
for i = #sortedarray, j, -1 do
sortedarray[i + 1] = sortedarray[i]
end
end
sortedarray[j] = va
end
end
for j = 1, #sortedarray do
if va > sortedarray[j] then
if sortedarray[j] > 0 then
for i = #sortedarray, j, -1 do
sortedarray[i + 1] = sortedarray[i]
end
end
sortedarray[j] = va
end
end
end
for k, v in ipairs(sortedarray) do
print(k, v)
print(k, v)
end

View File

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

View File

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

View File

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

View File

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

View File

@@ -4,12 +4,8 @@ aura_env.getDate = function()
local month = date:match("(%d%d)") --(01)/07/19 14:36:42
local day = date:match("%d%d%/(%d%d)") --01/(07)/19 14:36:42
--Remove first place zeros
if day:find("0") == 1 then
day = day:gsub("0", "")
end
if month:find("0") == 1 then
month = month:gsub("0", "")
end
if day:find("0") == 1 then day = day:gsub("0", "") end
if month:find("0") == 1 then month = month:gsub("0", "") end
local localdate = day .. "." .. month .. "." .. year
return localdate
end
@@ -26,12 +22,8 @@ local function getDate()
local month = date:match("(%d%d)") --(01)/07/19 14:36:42
local day = date:match("%d%d%/(%d%d)") --01/(07)/19 14:36:42
--Remove first place zeros
if day:find("0") == 1 then
day = day:gsub("0", "")
end
if month:find("0") == 1 then
month = month:gsub("0", "")
end
if day:find("0") == 1 then day = day:gsub("0", "") end
if month:find("0") == 1 then month = month:gsub("0", "") end
local localdate = day .. "." .. month .. "." .. year
return localdate
end
@@ -40,4 +32,4 @@ local function getTime()
local date = date()
local localtime = date:match("%d%d%/%d%d%/%d%d%s(%d%d%p%d%d%p%d%d)")
return localtime
end
end

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -71,7 +71,7 @@ local function tonum(cchar)
end
local function findcollision(hash_table, array)
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
if i ~= k then
if hash_table[i] == hash_table[k] then
@@ -83,14 +83,14 @@ local function findcollision(hash_table, array)
end
return collisions
end
aura_env.tohash = function(tempvar)
aura_env.tohash = function(tempvar)
local charTable = {}
local hash = 0
for char in tempvar:gmatch("%a") do
charTable[#charTable + 1] = char
hash = hash + tonum(char)
hash = hash / table.getn(charTable)
end
end
hash = math.floor(hash * 10000)
return hash
--print(aura_env.spellarray[hash], hash)
@@ -98,4 +98,4 @@ end
aura_env.checkbase = function(spell)
if aura_env.spellarray[aura_env.tohash(spell)] == nil then return 0 end
if aura_env.spellarray[aura_env.tohash(spell)] == spell then return 1 end
end
end

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -1,4 +1,4 @@
aura_env.range = function(val, min, max, max2)
val = 1 - (((max - val) / (max - min)) * max2)
return val
end
end

Some files were not shown because too many files have changed in this diff Show More