View difference between Paste ID: xivUhVjb and rJnA3A6b
SHOW: | | - or go back to the newest paste.
1-
local time = 0
1+
function ClearScreen()
2-
term.write("How long do you want it to run??")
2+
  term.clear()
3-
time = read()
3+
  term.setCursorPos(1,1)
4-
for i = 0, time do
4+
end
5-
turtle.forward()
5+
6-
turtle.turnRight()
6+
function CheckFuel()
7-
turtle.place()
7+
  while turtle.getFuelLevel() < 10 do
8-
turtle.turnLeft()
8+
    ClearScreen()
9-
turtle.turnLeft()
9+
    print("Out of fuel!")
10-
turtle.place()
10+
  end
11-
turtle.turnRight()
11+
end
12-
turtle.up()
12+
function CheckInv()
13-
turtle.turnLeft()
13+
  for x = 1,16 do
14-
turtle.place()
14+
        itemCount = itemCount + turtle.getItemCount(x)
15-
turtle.turnRight()
15+
  end
16-
turtle.turnRight()
16+
  while itemCount < 8 do
17-
turtle.place()
17+
        ClearScreen()
18-
turtle.turnLeft()
18+
        print("Out of blocks!")
19-
turtle.placeUp()
19+
  end
20-
turtle.down()
20+
end
21
22
local cycles = 0
23
24
print("How long do you want it to run??")
25
cycles = read()
26
for i = 0, cycles do
27
  CheckFuel()
28
  CheckInv()
29
  turtle.forward()
30
  turtle.turnRight()
31
  turtle.place()
32
  turtle.turnLeft()
33
  turtle.turnLeft()
34
  turtle.place()
35
  turtle.turnRight()
36
  turtle.up()
37
  turtle.turnLeft()
38
  turtle.place()
39
  turtle.turnRight()
40
  turtle.turnRight()
41
  turtle.place()
42
  turtle.turnLeft()
43
  turtle.placeUp()
44
  turtle.down()
45
end