View difference between Paste ID: gCLaUykg and JRgEmMsF
SHOW: | | - or go back to the newest paste.
1
function select()
2
	while not turtle.select(slot) do
3
	slot = slot + 1 
4
	end
5
end
6
7
function placeDown()
8
	select()
9
	turtle.placeDown()
10
end
11
12
function move()
13
	if forward then
14
		turtle.forward()
15
		posX = posX + 1
16
	end
17
18
	if backward then
19-
		turtle.backward()
19+
		turtle.back()
20
		posX = posX - 1
21
	end
22
23
end
24
25
function newline()
26
	turtle.turnLeft()
27
	turtle.forward()
28
	turtle.turnRight()
29
30-
	if forward () then
30+
31
		forward = false 
32
		backward = true
33
	end
34
35-
	if backward () then
35+
	if backward  then
36
		forward = ture
37
		backeward = false
38
	end	
39
40
end
41
42
slot = 2
43
forward = true
44
blockcount = 0
45
 
46
posX = 0
47
posZ = 0 
48
49
print("Starting to work")
50
turtle.select(1)
51
52
if turtle.refuel() then
53
54
	turtle.forward()
55
	turtle.turnRight() 
56
57
	for posZ = 0, 22, 1 do
58
59
		for posY = 0, 22, 1 do 
60
			blockcount = blockcount + 1
61
			if blockcount ~= 5 then
62
				placeDown()
63
		end
64
		
65
			if blockcount == 5  then
66
				blockcount = 1
67
			end
68
69
		move()
70
		end
71
72
		newline()
73
74
	end
75-
	print("No Fuel found")
75+
76
print("Done!")
77
else 
78
	print("No fuel found")
79
end