View difference between Paste ID: FqBSVwcN and EDj6zGG9
SHOW: | | - or go back to the newest paste.
1
local args = {...}
2
length = args[1]
3
	
4
function dig()
5
		while turtle.detect() do
6
			turtle.dig()
7
			os.sleep(0.5)
8
		end
9
end
10-
function digUp()
10+
11-
		while turtle.detectUp() do
11+
12-
			turtle.digUp()
12+
13
		dig()
14
	end
15
end
16
17
function row()
18
	for m=1,length,1 do
19
		turtle.digDown()
20
		forward()
21
		turtle.digDown()
22
	end
23
end
24-
	digUp()
24+
 row()