Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local r = require('robot')
- local comp = require('computer')
- local term = require('term')
- local com = require('component')
- local inv = require('component').inventory_controller
- local crafting = require('component').crafting
- --======= С П И С О К Д Л Я У П А К О В К И ========--
- small = {}
- small['IC2:itemDustSmall'] = true
- small['IC2:itemPlutoniumSmall'] = true
- --=================== М У С О Р ==========================--
- trash = {}
- trash['IC2:itemDust'] = false
- while true do
- allSlot = inv.getInventorySize(3)
- for slot = 1,allSlot do
- if inv.getStackInSlot(3,slot) ~= nil then
- if small[inv.getStackInSlot(3,slot).name] == true then
- if inv.getStackInSlot(3,slot).size >= 9 then
- kol = inv.getStackInSlot(3,slot).size
- size = kol - (kol)%9
- r.select(4)
- inv.suckFromSlot(3,slot,size)
- kol = r.count(4)
- for i=1,11 do
- if i%4 ~= 0 then
- r.transferTo(i,kol/9)
- end
- end
- os.sleep(1)
- r.select(8)
- os.sleep(1)
- crafting.craft()
- os.sleep(1)
- r.drop()
- r.select(4)
- end
- elseif trash[inv.getStackInSlot(3,slot).name] == false then
- inv.suckFromSlot(3,slot)
- r.dropDown()
- end
- end
- end
- if inv.getStackInSlot(3,allSlot-8) ~= nil then
- while r.suck() do end
- end
- for i = 1 , r.inventorySize() do
- if r.count(i) > 0 then
- r.select(i)
- if small[inv.getStackInInternalSlot(i).name] == true then
- r.drop()
- else
- r.dropDown()
- end
- end
- end
- r.select(4)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement