Advertisement
wolfdale276

1TreeChopper

Apr 17th, 2015
242
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.60 KB | None | 0 0
  1. local function checkFuel()
  2.     if turtle.getFuelLevel() == 0 then
  3.         turtle.select(16)
  4.                 turtle.refuel(1)
  5.     end --if turtle.getFuelLevel() == 0
  6. end --local function checkFuel()
  7.  
  8.  
  9. function start()
  10.     while true do
  11.         checkFuel()
  12.    
  13.             while turtle.detect() do
  14.                 turtle.dig()
  15.                 turtle.forward()
  16.             end
  17.             while turtle.detectUp() do
  18.                 turtle.digUp()
  19.                 turtle.up()
  20.             end
  21.             while turtle.down() do
  22.             end
  23.             turtle.turnRight()
  24.             turtle.turnRight()
  25.             turtle.forward()
  26.             turtle.turnRight()
  27.             turtle.turnRight()
  28.             turtle.select(15)
  29.             turtle.place()
  30.     end
  31. end
  32.  
  33. start()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement