Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local function detectAndPlace()
- if turtle.detect() == false then
- turtle.select(1)
- turtle.place(1)
- end
- end
- local function checkSides()
- detectAndPlace()
- turtle.turnLeft()
- detectAndPlace()
- turtle.turnLeft()
- detectAndPlace()
- turtle.turnLeft()
- detectAndPlace()
- turtle.turnLeft()
- end
- local function placeLadder()
- if turtle.detect() then
- turtle.dig()
- turtle.select(16)
- turtle.place(1)
- end
- end
- local times = 0
- term.write("How deep:")
- times = read()
- for j = 1, times do
- turtle.digDown()
- turtle.down()
- checkSides()
- end
- for k = 1, times do
- placeLadder()
- turtle.up()
- end
Add Comment
Please, Sign In to add comment