Code: Select all
Slot
71
72
74
75
76
77Code: Select all
function checkSlots()
local lines = {}
local filename = getExecutionPath() .. "/logs/"..player.Name..".txt"
local file, err = io.open(filename, "r");
if( not file ) then
print("File not found");
else
-- read the lines in table 'lines'
for line in io.lines(filename) do
table.insert(lines, line)
end
table.concat(lines, "\n")
for k,v in pairs(lines) do
local number = file:read(k, "*n")
print(number);
end
file:close()
end
endCode: Select all
Command> checkSlots()
Sl
ot
72
75
77
nilCode: Select all
for k,v in pairs(lines) do
local number = file:read(k, "*n")
if type(number) == "number" then
item = inventory.BagSlot[number]
if not (item.Id == 208679 or item.Id == 208682 or item.Id == 0) and item.Quality < 3 then
print(item.Name)
end
end
end