Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- tArgs = {...}
- length = tArgs[1]
- if #tArgs ~= 1 then
- print("Usage: branch <length>")
- end
- local function forward()
- while not turtle.forward() do
- turtle.digDown()
- turtle.dig()
- turtle.digUp()
- turtle.attack()
- end
- end
- local function tunnel()
- forward()
- if not turtle.detectDown() then
- turtle.select(1)
- turtle.placeDown()
- end
- end
- for i = 1,length do
- tunnel()
- end
- turtle.digUp()
- turtle.digDown()
- for i = 1,length do
- turtle.back()
- end
Advertisement
Add Comment
Please, Sign In to add comment