Advertisement
Guest User

wither

a guest
May 30th, 2015
229
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.52 KB | None | 0 0
  1. function TurnAround()
  2. turtle.turnRight()
  3. turtle.turnRight()
  4. end
  5.  
  6. while true do
  7. fuel = turtle.getFuelLevel()
  8. if fuel < 10000 then
  9. TurnAround()
  10.  
  11. turtle.select(16)
  12. turtle.suck()
  13. turtle.refuel()
  14.  
  15. TurnAround()
  16. else
  17.  
  18.  
  19.  
  20. turtle.select(1)
  21. turtle.dropDown()
  22. turtle.suckDown(20)
  23. turtle.select(2)
  24. turtle.dropUp()
  25. turtle.suckUp(15)
  26.  
  27. slot1 = turtle.getItemCount(1)
  28. slot2 = turtle.getItemCount(2)
  29.  
  30.  print(slot1)
  31.  print(slot2)
  32.  
  33. if slot1 == 20 and slot2 == 15 then
  34.  
  35. turtle.select(3)
  36. turtle.dig()
  37. turtle.forward()
  38. turtle.digDown()
  39. a = 1
  40. while a<6 do
  41.  
  42. turtle.forward()
  43.  
  44.  a = a + 1
  45. end
  46.  
  47. turtle.down()
  48. turtle.select(1)
  49. turtle.turnRight()
  50. turtle.turnRight()
  51.  
  52. b = 1
  53. while b<6 do
  54.  
  55. turtle.turnLeft()
  56. turtle.place()
  57. turtle.turnRight()
  58. turtle.turnRight()
  59. turtle.place()
  60. turtle.turnLeft()
  61. turtle.placeDown()
  62. turtle.forward()
  63. b = b+1
  64. end
  65.  
  66. c = 1
  67.  
  68. turtle.turnRight()
  69. turtle.turnRight()
  70.  
  71. while c<6 do
  72. turtle.forward()
  73. c = c + 1
  74. end
  75.  
  76. turtle.up()
  77. turtle.turnRight()
  78. turtle.turnRight()
  79. turtle.select(2)
  80.  
  81. d = 1
  82.  
  83. while d<6 do
  84. turtle.turnLeft()
  85. turtle.place()
  86. turtle.turnRight()
  87. turtle.turnRight()
  88. turtle.place()
  89. turtle.select(1)
  90. turtle.placeDown()
  91. turtle.select(2)
  92. turtle.turnLeft()
  93. turtle.forward()
  94. turtle.turnRight()
  95. turtle.turnRight()
  96. turtle.place()
  97. turtle.turnLeft()
  98. turtle.turnLeft()
  99.  
  100.  d = d + 1
  101. end
  102.  
  103. turtle.select(3)
  104. turtle.placeDown()
  105. turtle.forward()
  106. turtle.turnRight()
  107. turtle.turnRight()
  108. turtle.place()
  109.  
  110. sleep(10)
  111.  
  112.  
  113. else
  114. print("More materials needed")
  115.  
  116. end
  117. end
  118. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement