Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --pastebin get 7BNdqE96 startup
- local function isEmpty()
- 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 nCount == 0 then
- print( "No more Items to drop." )
- return true
- end
- return false
- end
- local function unload()
- print( "Unloading items..." )
- for n=1,16 do
- --unloaded = unloaded + turtle.getItemCount(n)
- if (turtle.getItemCount(n) > 0) then
- turtle.select(n)
- turtle.drop()
- sleep(60)
- end
- end
- end
- local function load()
- print( "Loading items..." )
- for n=1,16 do
- --unloaded = unloaded + turtle.getItemCount(n)
- if (turtle.getItemCount(n) == 0) then
- turtle.select(n)
- res = turtle.suckUp()
- if res == false then
- print( "No more Items to get." )
- return false
- end
- sleep(60)
- end
- end
- return true
- end
- print( "Dropping Down..." )
- while true do
- if not isEmpty() then
- --turtle.turnRight()
- unload()
- --turtle.turnLeft()
- end
- if not load() then
- sleep(55)
- end
- sleep(5)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement