local tArgs = { ... }
local depth = 0
local maxdepth = tArgs[1]
local fuel = turtle.getFuelLevel()
local function qry()
turtle.digDown()
turtle.down()
turtle.dig()
turtle.turnLeft()
turtle.dig()
turtle.turnLeft()
turtle.dig()
turtle.turnLeft()
turtle.dig()
turtle.turnLeft()
end
local function dropoff()
for i = 1, 16 do
turtle.select(i)
turtle.dropUp()
i = i+1
end
end
term.clear()
term.setCursorPos(1,1)
print("I will try to go down ",maxdepth," blocks")
print(maxdepth)
while depth ~= maxdepth do
qry()
depth = depth+1
print(depth)
end
for i = 1, depth do
turtle.up()
end
dropoff()
When I run the program it just keeps going after reaching the specified depth. Some of the things in the program are my debug attempts. Help is appreciated!
Thanks!











