xFlyDr

resr

May 23rd, 2019
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.92 KB | None | 0 0
  1. local function vor()
  2. if turtle.detect() then
  3. turtle.dig()
  4. end
  5. turtle.forward()
  6. end
  7.  
  8. local function hoch()
  9. if turtle.detectUp() then
  10. turtle.digUp()
  11. end
  12. repeat until turtle.up()
  13. end
  14.  
  15. local function runter()
  16. if turtle.detectDown() then
  17. turtle.digDown()
  18. end
  19. turtle.down()
  20. end
  21.  
  22.  
  23.  
  24.  
  25.  
  26. function chests()
  27.  
  28. turtle.turnLeft()
  29.  
  30.  
  31. hoch()
  32. hoch()
  33.  
  34. --entleerren
  35.  
  36. for i=1, 14 do
  37. turtle.select(i)
  38. turtle.drop(64)
  39. end
  40.  
  41. --neue Kohle
  42.  
  43. runter()
  44.  
  45. turtle.select(15)
  46.  
  47. turtle.suck(1)
  48.  
  49. turtle.refuel(1)
  50.  
  51. --neue setzlinge
  52.  
  53. runter()
  54.  
  55. turtle.select(16)
  56.  
  57. turtle.suck(9)
  58.  
  59. turtle.turnRight()
  60.  
  61. end
  62.  
  63.  
  64.  
  65.  
  66. function check()
  67.  
  68.  
  69. if turtle.detectUp() then
  70. turtle.digUp()
  71. end
  72. turtle.up()
  73.  
  74. for i=1, 6 do
  75. vor()
  76. end
  77.  
  78. turtle.turnLeft()
  79.  
  80. local success, data = turtle.inspect()
  81. if data.name=="ic2:rubber_wood" then
  82. fellen()
  83. turtle.select(16)
  84.  
  85. turtle.place()
  86. end
  87.  
  88.  
  89. turtle.turnRight()
  90. turtle.turnRight()
  91.  
  92. local success, data = turtle.inspect()
  93. if data.name=="ic2:rubber_wood" then
  94. fellen()
  95.  
  96. turtle.select(16)
  97.  
  98. turtle.place()
  99. end
  100.  
  101. -- turtle.turnRight()
  102.  
  103. --vor()
  104.  
  105. turtle.turnLeft()
  106.  
  107.  
  108.  
  109. for i=1, 3 do
  110. vor()
  111. end
  112.  
  113. turtle.turnLeft()
  114.  
  115. local success, data = turtle.inspect()
  116. if data.name=="ic2:rubber_wood" then
  117. fellen()
  118. turtle.select(16)
  119.  
  120. turtle.place()
  121. end
  122.  
  123.  
  124. turtle.turnLeft()
  125.  
  126. for i=1, 3 do
  127. vor()
  128. end
  129.  
  130. turtle.turnLeft()
  131.  
  132. for i=1, 5 do
  133. vor()
  134. end
  135.  
  136. turtle.turnLeft()
  137. turtle.turnLeft()
  138.  
  139.  
  140.  
  141. turtle.down()
  142. end
  143.  
  144.  
  145.  
  146. function fellen()
  147.  
  148. runter()
  149. vor()
  150.  
  151. for i=1, 9 do
  152. hoch()
  153. end
  154. for i=1, 9 do
  155. runter()
  156. end
  157. turtle.turnRight()
  158. turtle.turnRight()
  159. vor()
  160. turtle.turnRight()
  161. turtle.turnRight()
  162. end
  163.  
  164.  
  165. while 1==1 do
  166. chests()
  167. check()
  168. os.sleep(100)
  169. end
Advertisement
Add Comment
Please, Sign In to add comment