Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Wrapping the peripherals
- top = peripheral.wrap("top")
- right = peripheral.wrap("right")
- back = peripheral.wrap("back")
- -- Function to move items
- function moveItems()
- -- Move all items that fit from top to right (in slot 1)
- top.pushItems("right", 1)
- -- Move all items from right slot 5 into back
- right.pushItems("back", 5)
- -- Move all except 5 items from top to back
- top.pushItems("back", 1, 59) -- 64 - 5 = 59
- end
- -- Run the function every 5 seconds
- while true do
- moveItems()
- os.sleep(5)
- end
Advertisement
Add Comment
Please, Sign In to add comment