I want to program a bot for buying arcanium stats and read those items for its stats.
i got this code here, for reading the Items in the whole Bagpack
Code: Select all
for i = 1,180 do
local SlotID,_,ItemName = GetBagItemInfo(i)
if ItemName ~= "" then
local _, Data = ParseHyperlink(GetBagItemLink(SlotID,false))
local List = {}
for Number in Data:gmatch("%x+") do
table.insert(List,tostring(Number))
end
DEFAULT_CHAT_FRAME:AddMessage("Suche nach Stats auf "..ItemName,0,1,0)
for j = 4,6 do
if #List[j] == 4 then
DEFAULT_CHAT_FRAME:AddMessage("\t"..TEXT("Sys"..tonumber("7"..List[j],16).."_name"),1,1,0)
elseif #List[j] == 8 then
for k = 1,2 do
local v = List[j]:sub((k-1)*4+1,k*4)
DEFAULT_CHAT_FRAME:AddMessage("\t"..TEXT("Sys"..tonumber("7"..v,16).."_name"),1,1,0)
end
end
end
end
end
Can someone help me at this Point?
Thanks for all answers
Greetings
Buh