Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- perilist=peripheral.getNames()
- a=peripheral.wrap("front")
- cw=peripheral.find("gold")
- c="top"
- t="back"
- aspects=nil
- slots=nil
- local function scan()
- for i = 2, #perilist do
- if string.find(peripheral.getType(perilist[i]),"tt_aspectContainer") then
- aspects[peripheral.call(perilist[i], "getAspects")[1]]=peripheral.call(perilist[i], "getAspectCount")
- end
- end
- end
- local function sort()
- for i=1,50 do
- if cw.getStackInSlot(i)~=nil then
- a.pullItem(c,i)
- slots[a.getAspects()[1]]=i
- end
- end
- end
- local function push(aspect, amount)
- amount=amount-(amount%2)
- give=amount%2
- cw.pushItem(t,slots[aspect],give)
- end
- sort()
- while true do
- scan()
- for aspect, amount in ipairs(aspects) do
- if amount<63 then
- push(aspect, 64-amount)
- sleep(((64-amount)*3)+2)
- end
- end
- sleep(25)
- end
Advertisement
Add Comment
Please, Sign In to add comment