Skip to content

Instantly share code, notes, and snippets.

@FederAndInk
Created March 18, 2022 18:59
Show Gist options
  • Save FederAndInk/d937025ebb40c17e5b37410adbcf3459 to your computer and use it in GitHub Desktop.
Save FederAndInk/d937025ebb40c17e5b37410adbcf3459 to your computer and use it in GitHub Desktop.
---select the first non empty slot
---@return boolean
local function first_resource()
local i = 1
while i <= 16 and turtle.getItemCount(i) == 0 do
i = i + 1
end
if i <= 16 then
turtle.select(i)
end
return i <= 16
end
while true do
first_resource()
turtle.dropDown(3)
sleep(40)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment