Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local tArgs = { ... }
- local nCount = tArgs[1]
- if not nCount then
- print("Usage: dig <count>")
- return
- end
- if nCount==0 then
- print("Arg 1, <count> must be greater than zero!")
- return
- end
- while nCount do
- if not turtle.detect() then
- turtle.forward()
- nCount = nCount - 1
- else
- turtle.dig()
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment