Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local chest = peripheral.wrap("top")
- local input = peripheral.wrap("bottom")
- local disposal = peripheral.wrap("left")
- local serums = {}
- term.clear()
- term.setCursorPos(1,1)
- print("Serum Sorter v1.1 by apemanzilla")
- print("Reading data...")
- for i = 0, chest.getSizeInventory() - 1 do
- local data = chest.getStackInSlot(i)
- if data then
- serums[data.name] = i
- end
- sleep(.05)
- end
- term.setCursorPos(1,1)
- term.clearLine()
- print("Waiting for serums!")
- while true do
- for i = 0, input.getSizeInventory() - 1 do
- local data = input.getStackInSlot(i)
- if data then
- if serums[data.name] then
- --Move serum to furnace
- input.push("up",i,1)
- disposal.pull("south",0,1)
- sleep(1)
- else
- --Move serum to chest
- input.push("up",i,1)
- chest.pull("down",0,1)
- sleep(0.5)
- write("Added: "..temp.name)
- print()
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment