c:\Users\migy3\Downloads\startup.lua.lua

 avatar
unknown
lua
a year ago
1.0 kB
4
Indexable
x = 0
 
while true do
 
 
function check_G()
 
local sucess, data = turtle.inspect()
 
if sucess == true then
    if data.state.age == 8 then
        turtle.dig()
        turtle.place()
        print("Ready to Harvest")
    else
        print("Not Ready to Harvest")
    end
end
    end
 
 
function home()
 
turtle.turnLeft()
 
    for homeP = 1,5 do
        turtle.forward()
    end
        turtle.turnRight()
        x = x+1
        print(x)
end
 
 
function path()
 
    for line = 1,6 do
 
        check_G()
        turtle.select(1)
        turtle.turnRight()
        turtle.forward()
        turtle.turnLeft()
    end
end
 
        path()
        home()
    
    if x == 1 or 2 then
        turtle.up()
        turtle.up()
        
        if x == 3 then
            turtle.down()
            turtle.down()
            turtle.down()
            turtle.down()
            turtle.down()
            x = 0
        end
        
    end
end
Editor is loading...