bigtwisty

CellProvider

Jul 5th, 2013
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. local version = "1.0a"
  2.  
  3. local sorter = peripheral.wrap("top")
  4.  
  5. local chestDir = 2
  6. local turtleDir = 0
  7.  
  8. local function doScreen(str)
  9. term.clear()
  10. term.setCursorPos(1,1)
  11. write("Cell Provider Turtle - v")
  12. print(version)
  13. print("------------------------------")
  14. print()
  15. print(str)
  16. end
  17.  
  18. while true do
  19. turtle.select(1)
  20. if turtle.suckUp() then
  21. doScreen("Incoming cell detected. Swapping...")
  22. turtle.select(2)
  23. turtle.dig()
  24. turtle.dropUp()
  25. turtle.select(1)
  26. turtle.place()
  27. os.sleep(10)
  28. end
  29. doScreen("Waiting for incoming cell...")
  30. os.sleep(1)
  31. end
Advertisement
Add Comment
Please, Sign In to add comment