so i'm working on my own turtle hopper, that will take loot from a chest above it, and drop it in a hopper below. the basic process is it scans its inventory for items. if its inventory is empty it should fill it up, then try to drop the items below it. if it can't drop the items then the turtle will sleep for a few moments before trying again. basically a loop of checking its inventory, filling its inventory, and trying to drop its inventory below it. here's what i'm working with:
local function drop()
for x=1,16 do
if turtle.getItemCount(x) > 0 then
turtle.select(x)
turtle.dropDown()
else
sleep(3)
end
local function grab()
for x=1,16 do
if turtle.getItemCount(x) > 64 then
turtle.select(x)
turtle.suckUp()
else
sleep(3)
end
grab()
drop()
i'm a beginner at this stuff so i may require a little bit more explanation of why this isn't working. thanks for your time!