Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function turn()
- turtle.turnRight()
- end
- function TestGraSa()
- while turtle.detect(gravel) == true do
- turtle.dig()
- end
- while turtle.detect(sand) == true do
- turtle.dig()
- end
- end
- function TestFront()
- if turtle.detect() == false then
- os.exit()
- end
- end
- function Stair()
- for i = 1,3 do
- turtle.dig()
- TestGraSa()
- turtle.digDown()
- turtle.down()
- turtle.dig()
- TestGraSa()
- turtle.forward()
- TestFront()
- end
- turn()
- Torch()
- end
- function Torch()
- turtle.select(16)
- turtle.placeUp()
- turtle.select(1)
- end
- print("Depth: ")
- local k = read()
- for i = 1,k do
- Stair()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement