Advertisement
appleguy1999

Vacuum

May 4th, 2014
245
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.89 KB | None | 0 0
  1. rednet.open("left")
  2.  
  3. local function move()
  4. if turtle.detect() then
  5. turtle.up()
  6. turtle.forward()
  7. else
  8. if turtle.detectDown() then
  9. else
  10. turtle.down()
  11. end
  12. turtle.suck()
  13. turtle.forward()
  14. end
  15. end
  16.  
  17. local function turnRight()
  18. turtle.turnRight()
  19. turtle.forward()
  20. turtle.turnRight()
  21. end
  22.  
  23. local function turnLeft()
  24. turtle.turnLeft()
  25. turtle.forward()
  26. turtle.turnLeft()
  27. end
  28.  
  29. local function row8()
  30. i = 9
  31. repeat
  32. move()
  33. i = i - 1
  34. until i < 1
  35. end
  36.  
  37.  
  38. repeat
  39.  
  40. local senderId, message, distance = rednet.receive()
  41. print("Beginning in 2 min")
  42. sleep(120)
  43. row8()
  44. turnRight()
  45. row8()
  46. turnLeft()
  47. row8()
  48. turnRight()
  49. row8()
  50. turnLeft()
  51. row8()
  52. turnRight()
  53. row8()
  54. turnLeft()
  55. row8()
  56. turnRight()
  57. row8()
  58. turnLeft()
  59. row8()
  60. turnRight()
  61. sleep(120)
  62.  
  63. until redstone.getInput("right")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement