Posted 09 November 2015 - 06:09 PM
Hi everyone.
I was wondering if any of you could help me with this farming turtle program that I'm trying to make.
Basically what I want my turtle to do is be able to farm 64 wheat in one go. Unfortunately that means that the bone meal in slot 9 will run out before the seeds in slot 1 so I'm trying to get my turtle to switch from slot 9 to slot 10 when the bone meal in slot 9 runs out. I've spent hours on this with looking up lots of topics and made this code (probably not the best project for a complete newb ha ha but hey ho :)/>).
Anyway, so basically when my bone meal runs out, it doesn't change to slot 10 but instead it replaces slot nine with wheat… is there anyway to make it ignore slot 9 when it become empty and keep putting wheat in the same slot as before?
Help appreciated
I was wondering if any of you could help me with this farming turtle program that I'm trying to make.
Basically what I want my turtle to do is be able to farm 64 wheat in one go. Unfortunately that means that the bone meal in slot 9 will run out before the seeds in slot 1 so I'm trying to get my turtle to switch from slot 9 to slot 10 when the bone meal in slot 9 runs out. I've spent hours on this with looking up lots of topics and made this code (probably not the best project for a complete newb ha ha but hey ho :)/>).
Anyway, so basically when my bone meal runs out, it doesn't change to slot 10 but instead it replaces slot nine with wheat… is there anyway to make it ignore slot 9 when it become empty and keep putting wheat in the same slot as before?
Help appreciated
function check()
while true do
for i=9,14 do
if turtle.getItemCount(i) > 0 then
return turtle.select(i)
end
end
printError("No more bonemeal")
os.pullEvent("key")
end
end
local amount = 64
for DoNotChangeThis=1,amount do
turtle.select(1)
turtle.place()
check()
turtle.place()
turtle.place()
turtle.place()
turtle.dig()
end
Edited on 09 November 2015 - 07:21 PM