Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- write("Please enter depth/2")
- depth=read()
- function dig()
- while not turtle.forward() do
- turtle.dig()
- end
- end
- function cycle()
- dig()
- turtle.digDown()
- turtle.down()
- if not turtle.detectDown() then
- turtle.placeDown() end
- turtle.up()
- end
- turtle.up()
- counter=0
- for i=0, depth do
- cycle()
- turtle.turnRight()
- cycle()
- if counter==3 then
- turtle.turnRight()
- turtle.select(9)
- turtle.place()
- turtle.select(1)
- turtle.turnLeft()
- counter=0
- end
- turtle.turnLeft()
- cycle()
- turtle.turnLeft()
- cycle()
- turtle.turnRight()
- counter=counter+1
- end
- turtle.turnRight()
- turtle.turnRight()
- for i=0, depth*2 do
- turtle.forward()
- end
Add Comment
Please, Sign In to add comment