xFlyDr

rubber

May 23rd, 2019
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.96 KB | None | 0 0
  1. function vor()
  2.     if turtle.detect() then
  3.         turtle.dig()
  4.     end
  5.     turtle.forward()
  6. end
  7.  
  8.  
  9.  
  10. function runter()
  11.     if turtle.detectDown() then
  12.         turtle.digDown()
  13.     end
  14.     turtle.down()
  15. end
  16.  
  17.  
  18.  
  19.  
  20.  
  21. function chests()
  22.  
  23.     turtle.turnLeft()
  24.  
  25. if turtle.detectUp() then
  26.         turtle.digUp()
  27.     end
  28.     turtle.up()
  29. if turtle.detectUp() then
  30.         turtle.digUp()
  31.     end
  32.     turtle.up()
  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.             turtle.turnLeft()
  124.        
  125.             for i=1, 3 do
  126.                 vor()
  127.             end
  128.  
  129.             turtle.turnLeft()
  130.  
  131.             for i=1, 5 do
  132.                 vor()
  133.             end
  134.  
  135.             turtle.turnLeft()
  136.             turtle.turnLeft()
  137.            
  138.  
  139.  
  140.     turtle.down()
  141. end
  142.  
  143.  
  144.  
  145. function fellen()
  146.  
  147.     runter()
  148.     vor()
  149.  
  150.     for i=1, 9 do
  151.         if turtle.detectUp() then
  152.         turtle.digUp()
  153.     end
  154.     turtle.up()
  155.     end
  156.     for i=1, 9 do
  157.         runter()
  158.     end
  159.     turtle.turnRight()
  160.     turtle.turnRight()
  161.     vor()
  162.     turtle.turnRight()
  163.     turtle.turnRight()
  164. end
  165.  
  166.  
  167. while 1==1 do
  168.     chests()
  169.     check()
  170.     os.sleep(6)
  171. end
Add Comment
Please, Sign In to add comment