33 lines
704 B
Lua
33 lines
704 B
Lua
PLAYER_TARGET_CHANGED
|
|
function()
|
|
local legCount = 0
|
|
local slot = {0, 0}
|
|
local link = {"", ""}
|
|
if CheckInteractDistance("target", 1) and UnitIsPlayer("target") then
|
|
for i = 1, 15 do
|
|
local quality = GetInventoryItemQuality("target", i)
|
|
if quality == 5 then
|
|
legCount = legCount + 1
|
|
slot[legCount] = i
|
|
link[legCount] = GetInventoryItemLink("target", i)
|
|
end
|
|
end
|
|
local querry = 2
|
|
aura_env.texture = select(10, GetItemInfo(link[querry]))
|
|
if link[querry] == "" then
|
|
aura_env.trigger = 0
|
|
end
|
|
print(link[querry])
|
|
return true
|
|
end
|
|
end
|
|
|
|
function()
|
|
if UnitExists("target") and UnitIsPlayer("target") then
|
|
return true
|
|
else
|
|
return false
|
|
end
|
|
end
|
|
|
|
aura_env.texture = "" |