Advertisement
Permafrost97

Untitled

Jul 21st, 2019
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.11 KB | None | 0 0
  1. a = x+1
  2. b = y
  3.  
  4. function Move(forw)
  5. repeat
  6. turtle.forward()
  7. forw=forw-1
  8. until forw==0
  9. end
  10.  
  11. function TurnL(turnw)
  12. repeat
  13. turtle.turnLeft()
  14. turnw=turnw-1
  15. until turnw == 0
  16. end
  17.  
  18. function TurnR(turnw)
  19. repeat
  20. turtle.turnRight()
  21. turnw=turnw-1
  22. until turnw == 0
  23. end
  24.  
  25. function StartUp()
  26. Move(4)
  27. TurnR(1)
  28. Move(3)
  29. TurnR(2)
  30. turtle.down()
  31. end
  32.  
  33. function GoFarm()
  34. while b>0 do
  35. while a>0 do
  36. turtle.digDown()
  37. turtle.suckDown()
  38. turtle.placeDown()
  39. Move(1)
  40. a=a-1
  41. end
  42. TurnR(2)
  43. Move(x+1)
  44. TurnL(1)
  45. Move(1)
  46. TurnL(1)
  47. a=x+1
  48. b=b-1
  49. end
  50. end
  51.  
  52. function Return()
  53. turtle.up()
  54. TurnL(1)
  55. Move(y)
  56. TurnR(1)
  57. Move(3)
  58. TurnL(1)
  59. Move(4)
  60. TurnL(2)
  61. end
  62.  
  63. function Empty()
  64. slot=2
  65. repeat
  66. turtle.select(slot)
  67. turtle.dropDown()
  68. slot=slot+1
  69. until slot > 14
  70. turtle.select(1)
  71. end
  72.  
  73. function GoDrop()
  74. Empty()
  75. CurSlot = turtle.getItemCount(1)
  76. turtle.dropDown(CurSlot-2)
  77. Empty()
  78. end
  79.  
  80. StartUp()
  81. GoFarm()
  82. Return()
  83. GoDrop()
  84. shell.run("loop")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement