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