Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local args = { ... }
- local drawer = peripheral.wrap("front")
- local function readCount()
- if args[1] ~= nil then
- local success, count = pcall(tonumber, args[1])
- if success then
- return count
- end
- end
- return 64
- end
- local count = readCount()
- local condition = count * 8
- local function suckSlot(slot)
- turtle.select(slot)
- turtle.suck(count)
- end
- while true do
- local list = drawer.list()
- if list[1] ~= nil and list[1].count >= condition then
- for r=0,2 do
- for c=0,2 do
- if r ~= 1 or c ~= 1 then
- local i = r * 4 + c
- suckSlot(i + 1)
- end
- end
- end
- turtle.craft()
- while not turtle.dropUp() do
- sleep(5)
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement