Advertisement
SwellzD

tur.lua

Jul 29th, 2022 (edited)
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.11 KB | None | 0 0
  1. print("x: ")
  2. local x = read()
  3. print("y: ")
  4. local y = read()
  5. print("z: ")
  6. local z = read()
  7.  
  8. z = math.ceil(z/2)
  9.  
  10. local ix = 0
  11. local iy = 0
  12. local iz = 0
  13. local ii = 0
  14.  
  15. local block = turtle.inspectDown()
  16. print(block)
  17.  
  18. turtle.refuel()
  19.  
  20. for iz = 0, z - 1  do
  21.     for ix = 0, x - 1 do
  22.         turtle.digUp()
  23.         turtle.dig()
  24.         turtle.forward()
  25.     end
  26.     ix = 0
  27.     for iy = 0, y - 2 do
  28.         turtle.refuel()
  29.         turtle.getFuelLevel()
  30.         if ii % 2 == 0 then
  31.             turtle.turnRight()
  32.             turtle.digUp()
  33.             turtle.dig()
  34.             turtle.forward()
  35.             turtle.turnRight()
  36.         else
  37.             turtle.turnLeft()
  38.             turtle.digUp()
  39.             turtle.dig()
  40.             turtle.forward()
  41.             turtle.turnLeft()
  42.         end
  43.         ii = ii + 1
  44.         for ix = 0, x - 1 do
  45.             turtle.digUp()
  46.             turtle.dig()
  47.             turtle.forward()
  48.         end
  49.         ix = 0
  50.     end
  51.     iy = 0
  52.     turtle.up()
  53.     turtle.digUp()
  54.     turtle.up()
  55.     turtle.turnRight()
  56.     turtle.turnRight()
  57. end
  58. block = turtle.inspectDown()
  59. while not(block) do
  60.     block = turtle.inspectDown()
  61.     turtle.down()
  62. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement