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
Comments