Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local slotCount = 16
- function init()
- if lookForChest() == false then return end
- while true do
- getItems()
- -- should have full inv of tiny dry rubber
- turnAround()
- arrangeItems()
- turtle.craft()
- turtle.select(1)
- local count = turtle.getItemCount()
- turtle.drop(count)
- turnAround()
- end
- end
- function lookForChest()
- local success, item = turtle.inspect()
- local turns = 0
- while item == nil or item.name ~= 'quark:custom_chest' do
- if turns >= 4 then
- print('no chest around turtle')
- return false
- end
- print(turns)
- turtle.turnLeft()
- turns = turns + 1
- end
- return true
- end
- function getItems() while (checkForAllFullStacks() == false) do turtle.suck() end end
- function arrangeItems()
- turtle.select(4)
- turtle.transferTo(10)
- turtle.select(8)
- turtle.transferTo(11)
- end
- function turnAround()
- turtle.turnLeft()
- turtle.turnLeft()
- end
- function checkForAllFullStacks()
- local full = true
- for slot = 1, 9, 1 do
- local count = turtle.getItemCount(slot)
- if count < 64 then full = false end
- end
- return full
- end
- init()
Add Comment
Please, Sign In to add comment