Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- inputChest = peripheral.wrap("top")
- outputChest = peripheral.wrap("right")
- orb = peripheral.wrap("left")
- while(true)
- do
- starterItem = inputChest.getItemDetail(1)
- orbOutput = orb.getItemDetail(1)
- size = inputChest.size()
- if(orbOutput ~= nil)
- then
- outputChest.pullItems(peripheral.getName(orb), 1)
- elseif(orb.getItemDetail(2) ~= nil)
- then
- elseif(starterItem == nil)
- then
- for i = 1, size, 1
- do
- slot = inputChest.getItemDetail(i)
- if slot ~= nil
- then
- inputChest.pushItems(peripheral.getName(inputChest), i,slot.count,1)
- break
- end
- end
- elseif(starterItem ~= nil)
- then
- if(starterItem.displayName == "Iron Ingot" or starterItem.displayName == "Gold Ingot")
- then
- if(orb.getItemDetail(2) == nil or (orb.getItemDetail(2).count < 1 and orb.getItemDetail(3).count < 1))
- then
- secondSlot = inputChest.getItemDetail(2)
- if(secondSlot ~= nil)
- then
- orb.pullItems(peripheral.getName(inputChest), 1, 1)
- orb.pullItems(peripheral.getName(inputChest), 2, 1)
- end
- end
- elseif(starterItem.displayName == "Diamond")
- then
- if(orb.getItemDetail(2) == nil or orb.getItemDetail(2).count < 1)
- then
- orb.pullItems(peripheral.getName(inputChest), 1, 1)
- end
- elseif(starterItem.displayName == "Diamond")
- then
- if(orb.getItemDetail(2) == nil or orb.getItemDetail(2).count < 1)
- then
- orb.pullItems(peripheral.getName(inputChest), 1, 1)
- end
- elseif(starterItem.displayName == "Emerald")
- then
- if(orb.getItemDetail(2) == nil or orb.getItemDetail(2).count < 1)
- then
- orb.pullItems(peripheral.getName(inputChest), 1, 1)
- end
- elseif(starterItem.displayName == "Blaze Rod")
- then
- if(orb.getItemDetail(2) == nil or orb.getItemDetail(2).count < 1)
- then
- orb.pullItems(peripheral.getName(inputChest), 1, 1)
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment