– Functions
function paint()
turtle.select(1)
turtle.craft(1)
turtle.place()
end
function upanddown()
repeat
repeat
turtle.craft(1)
paint()
turtle.up()
until turtle.place() == false
turtle.craft(1)
until turtle.up() == false
repeat
repeat
turtle.craft(1)
paint()
turtle.down()
until turtle.place() == false
turtle.craft(1)
until turtle.down() == false
turtle.turnRight()
turtle.forward()
turtle.turnLeft()
end
– Script
repeat
upanddown()
until
turtle.getFuelLevel() == 0
eof = 1
Now I'm no programmer so this script might seem silly. It's a bit messy and repetitive because I was testing for the source of the problem. The turtle was painting every other block so I decided to make it go back down once it hits the ceiling in order to paint the whole column of Construction Foam blocks. I don't mind wasting the extra fuel, but the big problem is in the turtle.craft() portion. To craft a white painter, you need 1 bonemeal and 1 uncolored painter. I put them both in the turtle, one painter and a few stacks of bonemeal. Sometimes the crafty turtle actually crafts the white painter, but other times it skips that step for whatever reason. The times that it does craft the white painter, when it has to craft it again later after the 32 uses of the painter are used up, it skips that step again.
Any ideas on what's causing this?