Advertisement
Guest User

quarry

a guest
Feb 24th, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.00 KB | None | 0 0
  1. depth = 60
  2. length = 7
  3. width = 9
  4.  
  5. depthi = depth + 1
  6. lengthi = length
  7. widthi = width
  8. turn_dir = "left"
  9.  
  10. turtle.refuel()
  11. while depthi > 0 do
  12.   depthi = depthi - 1
  13.  
  14.   while widthi > 0 do
  15.     widthi = widthi - 1
  16.    
  17.     while lengthi > 0 do
  18.       while turtle.getItemSpace(16) == 63 do
  19.         os.sleep(1)
  20.       end
  21.      
  22.       while turtle.getFuelLevel() == 1 do
  23.         os.sleep(1)
  24.       end
  25.      
  26.       lengthi = lengthi - 1
  27.       turtle.dig()
  28.       turtle.forward()
  29.     end
  30.    
  31.     if widthi == 1 then
  32.       turtle.digDown()
  33.       turtle.down()
  34.       turtle.turnRight()
  35.       turtle.turnRight()
  36.     elseif turn_dir == "left" then
  37.       turtle.turnLeft()
  38.       turtle.dig()
  39.       turtle.forward()
  40.       turtle.turnLeft()
  41.       turn_dir = "right"
  42.     elseif turn_dir == "right" then
  43.       turtle.turnRight()
  44.       turtle.dig()
  45.       turtle.forward()
  46.       turtle.turnRight()
  47.       turn_dir = "left"
  48.     end
  49.    
  50.     lengthi = length - 1
  51.   end
  52.   widthi = width
  53. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement