Posted 19 December 2012 - 02:20 PM
I'm making a lumberjack program and the turtle does not stop
Please post possible fixes
All help would be much appreciated
Here's my code!
Please post possible fixes
All help would be much appreciated
Here's my code!
H = 7
local function checkFuel()
if turtle.getFuelLevel() < 20 then
turtle.select(1)
turtle.refuel(1)
end
end
while H == 7 do
checkFuel()
turtle.dig()
turtle.forward()
H = H-1
end
while H < 7 do
checkFuel()
turtle.digUp()
turtle.up()
H = H - 1
end
while H == 0 do
checkFuel()
turtle.down()
turtle.down()
turtle.down()
turtle.down()
turtle.down()
turtle.down()
checkFuel()
turtle.turnRight()
turtle.turnRight()
turtle.forward()
turtle.select(4)
turtle.drop()
checkFuel()
turtle.turnRight()
turtle.turnRight()
turtle.select(2)
turtle.place()
turtle.select(3)
turtle.place()
H = H + 7
end