Advertisement
Semior001

ooo

Jan 8th, 2020
343
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.94 KB | None | 0 0
  1. length = 5
  2. width = 6
  3. height = 5
  4.  
  5. -- getting the neccessary amount of fuel
  6. success = turtle.refuel(math.ceil(length * height * width / 160) + math.ceil(width * height / 160))
  7. if not success then
  8.     print("place the fuel to the active slot")
  9.     exit()
  10. end
  11.  
  12. for h=0,height-1,1 do
  13.     for w=1,width,1 do
  14.         for l=1,length-1,1 do
  15.             turtle.dig()
  16.             turtle.forward()
  17.         end
  18.  
  19.         if (w % 2 ~= 0) and (w ~= width) then
  20.             turtle.turnLeft()
  21.             turtle.dig()
  22.             turtle.forward()
  23.             turtle.turnLeft()
  24.         elseif (w ~= width) then
  25.             turtle.turnRight()
  26.             turtle.dig()
  27.             turtle.forward()
  28.             turtle.turnRight()
  29.         end
  30.     end
  31.     -- returning to the start point
  32.     turtle.turnLeft()
  33.     for w=1,width-1,1 do
  34.         turtle.forward()
  35.     end
  36.     turtle.turnLeft()
  37.     -- digging down
  38.     turtle.digDown()
  39.     turtle.down()
  40. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement