Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local source = [[
- for i = 1, p.getInventorySize() do
- print(i)
- for k, v in pairs(p.getStackInSlot(i)) do
- if type(v) ~= "table" then
- print(" - "..k.." : "..v)
- else
- print(" - "..k.." : "..tostring(v))
- end
- end
- end
- ]]
- peripheral.wrap("bottom").setTextScale(1)
- peripheral.wrap("bottom").clear()
- peripheral.wrap("bottom").setCursorPos(1,1)
- local currentHeight = 1
- local src = loadstring(source)
- local env = getfenv(1)
- env["print"] = function(...)
- peripheral.wrap("bottom").write(table.concat({...}, " "))
- currentHeight = currentHeight + 1
- peripheral.wrap("bottom").setCursorPos(1,currentHeight)
- end
- env["p"] = peripheral.wrap("top")
- setfenv(src, env)
- src()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement