Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- os.loadAPI("tmnt")
- function tunnel(count)
- for i=1,count do
- tmnt.forceForward()
- tmnt.tryDigUp()
- end
- end
- function linkPrevious()
- tunnel(2)
- tmnt.turn180()
- turtle.forward()
- turtle.forward()
- turtle.forward()
- tunnel(3)
- end
- function mine()
- turtle.turnLeft()
- tunnel(9)
- turtle.turnLeft()
- linkPrevious()
- turtle.turnRight()
- tunnel(9)
- turtle.turnRight()
- linkPrevious()
- end
- local repetition = 1
- local argv = { ... }
- if #argv == 1 then
- repetition = tonumber(argv[1])
- elseif #argv > 1 then
- error("Usage: mine [length=1]")
- end
- tmnt.checkFuel()
- for i = 1, repetition do
- mine()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement