Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --pastebin get ertL1i4Y startup
- local function isFull()
- local bFull = true
- local nTotalItems = 0
- for n=1,16 do
- local nCount = turtle.getItemCount(n)
- if nCount == 0 then
- bFull = false
- end
- nTotalItems = nTotalItems + nCount
- end
- if bFull then
- print( "No empty slots left." )
- return true
- end
- return false
- end
- local function unload()
- print( "Unloading items..." )
- --turtle.turnRight()
- --turtle.turnRight()
- for n=1,16 do
- --unloaded = unloaded + turtle.getItemCount(n)
- turtle.select(n)
- turtle.dropUp()
- end
- --collected = 0
- turtle.select(1)
- --turtle.turnRight()
- --turtle.turnRight()
- end
- print( "Picking Up..." )
- while true do
- turtle.suck()
- if isFull() then
- unload()
- end
- sleep(5)
- end
Advertisement
Add Comment
Please, Sign In to add comment