Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- args = {...}
- tunnelDistance = args[1]
- function dig()
- if turtle.detect() then
- turtle.dig()
- end
- end
- function digUp()
- if turtle.detectUp() then
- turtle.digUp()
- end
- end
- function digDown()
- if turtle.detectDown() then
- turtle.digDown()
- end
- end
- function DigHole(count)
- for n=0,count do
- turtle.turnLeft()
- turtle.forward()
- turtle.turnRight()
- dig()
- turtle.up()
- dig()
- turtle.up()
- dig()
- turtle.turnRight()
- turtle.forward()
- turtle.turnLeft()
- dig()
- turtle.down()
- dig()
- turtle.down()
- dig()
- turtle.turnRight()
- turtle.forward()
- turtle.turnLeft()
- dig()
- turtle.up()
- dig()
- turtle.up()
- dig()
- turtle.down()
- turtle.down()
- turtle.turnLeft()
- turtle.forward()
- turtle.turnRight()
- turtle.forward()
- turtle.turnLeft()
- turtle.forward()
- dig()
- turtle.select(2)
- turtle.place()
- turtle.up()
- dig()
- turtle.place()
- turtle.up()
- dig()
- turtle.place()
- turtle.select(4)
- digUp()
- turtle.placeUp()
- turtle.turnLeft()
- turtle.turnLeft()
- turtle.forward()
- digUp()
- turtle.placeUp()
- turtle.forward()
- digUp()
- turtle.placeUp()
- turtle.select(2)
- dig()
- turtle.place()
- turtle.down()
- dig()
- turtle.place()
- turtle.down()
- dig()
- turtle.place()
- turtle.turnLeft()
- turtle.turnLeft()
- turtle.select(3)
- digDown()
- turtle.select(3)
- turtle.placeDown()
- turtle.forward()
- digDown()
- turtle.placeDown()
- turtle.forward()
- digDown()
- turtle.placeDown()
- turtle.turnLeft()
- turtle.turnLeft()
- turtle.forward()
- turtle.turnLeft()
- end
- end
- print("----------")
- print("slot1: fuel")
- print("slot2: side blocks")
- print("slot3: floor blocks")
- print("slot4: ceiling blocks")
- print("----------")
- print()
- print("press any key to start...")
- os.pullEvent("key")
- turtle.select(1)
- turtle.refuel()
- DigHole(tunnelDistance - 1)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement