SirSheepe

asd

Jan 23rd, 2018
87
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. local source = [[
  3. for i = 1, p.getInventorySize() do
  4.     print(i)
  5.     for k, v in pairs(p.getStackInSlot(i)) do
  6.         if type(v) ~= "table" then
  7.             print("  - "..k.." : "..v)
  8.         else
  9.             print("  - "..k.." : "..tostring(v))
  10.         end
  11.     end
  12. end
  13. ]]
  14. peripheral.wrap("bottom").setTextScale(1)
  15. peripheral.wrap("bottom").clear()
  16. peripheral.wrap("bottom").setCursorPos(1,1)
  17. local currentHeight = 1
  18.  
  19. local src = loadstring(source)
  20. local env = getfenv(1)
  21. env["print"] = function(...)
  22.     peripheral.wrap("bottom").write(table.concat({...}, "   "))
  23.     currentHeight = currentHeight + 1
  24.     peripheral.wrap("bottom").setCursorPos(1,currentHeight)
  25. end
  26. env["p"] = peripheral.wrap("top")
  27. setfenv(src, env)
  28. src()
RAW Paste Data