Advertisement
jarno1227

Untitled

Jan 17th, 2020
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.34 KB | None | 0 0
  1. turtle.select(1)
  2. turtle.refuel(1)
  3. local counter = 0
  4. local counter2 = 0
  5. local counter3 = 0
  6. local counter4 = 0
  7.  
  8.  
  9. while counter3 ~= 9 do
  10. local seedAmount = turtle.getItemCount(2)
  11. local fuelAmount = turtle.getFuelLevel()
  12. local success = turtle.inspectDown()
  13.  
  14. if seedAmount > 0 then
  15. turtle.select(2)
  16. else
  17. turtle.select(3)
  18. end
  19.  
  20. if fuelAmount < 20 then
  21. turtle.select(1)
  22. turtle.refuel(1)
  23. end
  24.  
  25. if success ~= true then
  26. turtle.digDown()
  27. turtle.placeDown()
  28. end
  29.  
  30. turtle.forward();
  31. counter = counter + 1
  32.  
  33. if counter == 8 then
  34. if counter2 == 0 then
  35. if seedAmount > 0 then
  36. turtle.select(2)
  37. else
  38. turtle.select(3)
  39. end
  40.  
  41. if counter3 ~= 8 then
  42. turtle.turnLeft()
  43. if success ~= true then
  44. turtle.digDown()
  45. turtle.placeDown()
  46. end
  47. turtle.forward()
  48. turtle.turnLeft()
  49. counter2 = 1
  50. else
  51. if success ~= true then
  52. turtle.digDown()
  53. turtle.placeDown()
  54. end
  55. turtle.turnLeft()
  56. turtle.turnLeft()
  57. counter4 = 1
  58. end
  59.  
  60.  
  61. elseif counter2 == 1 then
  62. if seedAmount > 0 then
  63. turtle.select(2)
  64. else
  65. turtle.select(3)
  66. end
  67.  
  68. turtle.turnRight()
  69. if success ~= true then
  70. turtle.digDown()
  71. turtle.placeDown()
  72. end
  73. turtle.forward()
  74. turtle.turnRight()
  75. counter2 = 0
  76. end
  77. counter3 = counter3 + 1
  78. counter = 0
  79. end
  80. end
  81.  
  82. counter = 0
  83. counter2 = 0
  84. counter3 = 0
  85.  
  86. while counter4 == 1 do
  87. local fuelAmount = turtle.getFuelLevel()
  88. local success2, data = turtle.inspectDown()
  89. if fuelAmount < 20 then
  90. turtle.select(1)
  91. turtle.refuel(1)
  92. end
  93. if data.metadata == 7 then
  94. turtle.digDown()
  95. turtle.suckDown()
  96. end
  97. turtle.forward();
  98. counter = counter + 1
  99.  
  100. if counter == 8 then
  101. if counter2 == 0 then
  102. if counter3 ~= 8 then
  103. turtle.turnLeft()
  104. if data.metadata == 7 then
  105. turtle.digDown()
  106. turtle.suckDown()
  107. end
  108. turtle.forward()
  109. turtle.turnLeft()
  110. counter2 = 1
  111. else
  112. turtle.turnLeft()
  113. turtle.turnLeft()
  114. counter4 = 1
  115. end
  116.  
  117.  
  118. elseif counter2 == 1 then
  119. turtle.turnRight()
  120. if data.metadata == 7 then
  121. turtle.digDown()
  122. turtle.suckDown()
  123. end
  124. turtle.forward()
  125. turtle.turnRight()
  126. counter2 = 0
  127. end
  128. counter3 = counter3 + 1
  129. counter = 0
  130. end
  131. end
  132.  
  133. counter = 0
  134. counter2 = 0
  135. counter3 = 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement