Posted 23 December 2014 - 11:14 PM
i wrote my first program that is a automated tree cutter and replanter. But the while loop to place bonemeal on the saplings gets skipped.
here is the program that i wrote. the while loop is at line 15. Any help would be most appreciated. thanks
here is the program that i wrote. the while loop is at line 15. Any help would be most appreciated. thanks
height = 0
turtle.select(3)
turtle.forward()
turtle.place()
turtle.turnLeft()
turtle.forward()
turtle.turnRight()
turtle.place()
turtle.turnLeft()
turtle.back()
turtle.place()
turtle.turnRight()
turtle.back()
turtle.place()
while not turtle.compare() do
turtle.select(4)
turtle.place()
turtle.select(2)
end
turtle.select(5)
turtle.dig()
turtle.forward()
while turtle.detectUp() do
turtle.dig()
turtle.digUp()
turtle.up()
height = height + 1
end
turtle.turnLeft()
turtle.dig()
turtle.forward()
turtle.turnRight()
for i = 1 , height do
turtle.dig()
turtle.digDown()
turtle.down()
end
turtle.select(2)
turtle.transferTo(16,63)
turtle.dig()
turtle.back()
turtle.turnRight()
turtle.forward()
turtle.turnRight()
turtle.select(5)
turtle.drop()
turtle.select(6)
turtle.drop()
turtle.select(7)
turtle.drop()
turtle.select(8)
turtle.drop()
turtle.select(9)
turtle.drop()
turtle.select(10)
turtle.drop()
turtle.select(11)
turtle.drop()
turtle.select(12)
turtle.drop()
turtle.select(13)
turtle.drop()
turtle.select(14)
turtle.drop()
turtle.select(15)
turtle.drop()
turtle.select(16)
turtle.drop()
if turtle.getFuelLevel() < 150 then
turtle.select(1)
turtle.refuel(5)
print "Refueled"
end
turtle.turnRight()
turtle.turnRight()