View difference between Paste ID: 9kzwFZd4 and Cpkx8MHT
SHOW: | | - or go back to the newest paste.
1-
function farmCanes()
1+
local function checkFuel()
2
    local fuel = turtle.getFuelLevel()
3
    if (fuel < 200) then
4
        turtle.select(16)
5
        turtle.refuel(2)
6
        turtle.select(1)
7
    end
8
end
9
10
local function farmCanes()
11
    turtle.up()
12-
    turtle.suck()
12+
13
    turtle.turnLeft()
14-
function goChest()
14+
15
    turtle.turnLeft()
16
    turtle.dig()
17
    turtle.turnLeft()
18
    turtle.dig()
19
    turtle.turnLeft()
20
    turtle.down()
21-
farmCanes()
21+
22-
goChest()
22+
23-
sleep(1088)
23+
local function goChest()
24
    turtle.up()
25
    turtle.up()
26-
    shell.run("sugarcanefarm")
26+
    turtle.select(1)
27
    turtle.dropUp()
28
    turtle.down()
29
    turtle.down()
30
end
31
32
while true do
33
    checkFuel()
34
    farmCanes()
35
    goChest()
36
    sleep(1088)
37
end