Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- remember to change monitor and chest (just change left/right)
- --]]
- chest = peripheral.wrap('right')
- monitor = peripheral.wrap('left')
- lastTime = os.time()
- lastItem = "nothing"
- function clear_monitor()
- monitor.clear()
- end
- function send_monitor(line, text)
- monitor.setCursorPos(1, line)
- monitor.write(text)
- end
- while true do
- itemInFirstSlot = chest.getStackInSlot(1)
- if itemInFirstSlot ~= nil then
- lastTime = os.time()
- lastItem = itemInFirstSlot.name
- end
- lastUpdate = os.time() - lastTime
- clear_monitor()
- send_monitor(1, itemInFirstSlot.name)
- send_monitor(2, lastUpdate .. "s ago")
- sleep(1)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement