Advertisement
Guest User

high_tunnel.lua

a guest
Dec 14th, 2018
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.53 KB | None | 0 0
  1. print("how high")
  2. y = tonumber(read())
  3.  
  4.  
  5. print("how long")
  6. z = tonumber(read())
  7.  
  8. Y = 1
  9.  
  10. Z = 0
  11.  
  12. while Z <= z do
  13.     turtle.dig()
  14.     turtle.forward()
  15.     while Y <= y do
  16.         turtle.turnLeft()
  17.         turtle.dig()
  18.         turtle.turnRight()
  19.         turtle.turnRight()
  20.         turtle.dig()
  21.         turtle.turnLeft()
  22.         if Y ~= y-1 then
  23.             turtle.digUp()
  24.             turtle.up()
  25.         end
  26.         Y = Y+1
  27.     end
  28.     while Y ~= 1 do
  29.         turtle.down()
  30.         Y = Y-1
  31.     end
  32.     Z = Z+1
  33. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement