-- variable 'selection' = current slot -- ^ is not made in this script ^ -- slot 16 is where the enderchest is -- Note: This needs the ender storage mod -- to work properly, not the implemented -- ender chests! function checkInvSpace() for i = 1,15 do if turtle.getItemSpace(i) > 0 then turtle.select(i) return true end end if turtle.getItemSpace < 1 then return false end end if turtle.getItemSpace(selection) < 1 then if not checkInvSpace() then turtle.select(16) turtle.placeUp() for j = 1,15 do turtle.select(j) turtle.dropUp() end turtle.select(16) turtle.digUp() turtle.select(1) end end