Guest User

lava_mover

a guest
Jan 6th, 2024
225
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. -- Wrapping the peripherals
  2. top = peripheral.wrap("top")
  3. right = peripheral.wrap("right")
  4. back = peripheral.wrap("back")
  5.  
  6. -- Function to move items
  7. function moveItems()
  8. -- Move all items that fit from top to right (in slot 1)
  9. top.pushItems("right", 1)
  10.  
  11. -- Move all items from right slot 5 into back
  12. right.pushItems("back", 5)
  13.  
  14. -- Move all except 5 items from top to back
  15. top.pushItems("back", 1, 59) -- 64 - 5 = 59
  16. end
  17.  
  18. -- Run the function every 5 seconds
  19. while true do
  20. moveItems()
  21. os.sleep(5)
  22. end
Advertisement
Add Comment
Please, Sign In to add comment