Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local tArgs = { ... }
- if #tArgs ~= 1 then
- print( "Usage: digtunnel <length>" )
- return
- end
- -- mine just enough for a person
- local size = tonumber( tArgs[1] )
- local pos = -1
- -- its -1 to fix the position... it will technically mine one too far
- turtle.up()
- while pos < size do
- turtle.dig()
- turtle.digDown()
- turtle.forward()
- pos = pos + 1
- end
- -- return
- while pos > 0 do
- turtle.back()
- pos = pos - 1
- end
Add Comment
Please, Sign In to add comment