Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local length = 0
- print("How long do you want the tunnel?")
- length = io.read()
- length = tonumber(length)
- for i=0, length do
- if (turtle.detect() and i < length) then
- turtle.dig()
- end
- if turtle.detectUp() then
- turtle.digUp()
- end
- if turtle.detectDown() then
- turtle.digDown()
- end
- if (i%10==0) then
- turtle.select(2)
- turtle.placeDown()
- turtle.select(1)
- end
- if (turtle.detect() == false) then
- turtle.forward()
- end
- if (turtle.getFuelLevel() <= 1) then
- turtle.refuel(1)
- end
- end
- turtle.turnLeft()
- turtle.turnLeft()
- for i=0, length-1 do
- if turtle.detect() then
- turtle.dig()
- end
- turtle.forward()
- sleep(1)
- end
Add Comment
Please, Sign In to add comment