guusvanwalstijn

FTB tree cutter 2X2 tree

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