Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- os.pullEvent = os.pullEventRaw
- term.setBackgroundColor(colors.lightGray)
- term.setTextColor(colors.lime)
- term.clear()
- local material1
- local material2
- local material3
- term.setCursorPos(1,1)
- print("by Colhaydutu")
- term.setCursorPos(1,3)
- print("Place items in the chest to craft")
- print("Press a key on the keyboard to select a recipe")
- term.setCursorPos(1,6)
- print("Select an item for inscriber")
- print("q - Printed Logic Circuit")
- print("w - Printed Silicon")
- print("e - Printed Calculation Circuit")
- print("r - Printed Engineering Circuit")
- print("t - Logic Processor ")
- print("y - Calculation Processor ")
- print("u - Engineering Processor ")
- local event, key, isHeld = os.pullEvent("key")
- if key == keys.q then
- term.clear()
- term.setCursorPos(1,1)
- print("Selected item is Printed Logic Circuit")
- material1 = "ae2:logic_processor_press"
- material2 = "minecraft:gold_ingot"
- material3 = "minecraft:air"
- m1slot = 1
- m2slot = 3
- m3slot = 2
- elseif key == keys.w then
- term.clear()
- term.setCursorPos(1,1)
- print("Selected item is Printed Silicon")
- material1 = "ae2:silicon_press"
- material2 = "ae2:silicon"
- material3 = "minecraft:air"
- m1slot = 1
- m2slot = 3
- m3slot = 2
- elseif key == keys.e then
- term.clear()
- term.setCursorPos(1,1)
- print("Selected item is Printed Calculation Circuit")
- material1 = "ae2:calculation_processor_press"
- material2 = "ae2:certus_quartz_crystal"
- material3 = "minecraft:air"
- m1slot = 1
- m2slot = 3
- m3slot = 2
- elseif key == keys.r then
- term.clear()
- term.setCursorPos(1,1)
- print("Selected item is Printed Engineering Circuit")
- material1 = "ae2:engineering_processor_press"
- material2 = "minecraft:diamond"
- material3 = "minecraft:air"
- m1slot = 1
- m2slot = 3
- m3slot = 2
- elseif key == keys.t then
- term.clear()
- term.setCursorPos(1,1)
- print("Selected item is Logic Processor")
- material1 = "ae2:printed_logic_processor"
- material2 = "minecraft:redstone"
- material3 = "ae2:printed_silicon"
- m1slot = 1
- m2slot = 3
- m3slot = 2
- elseif key == keys.y then
- term.clear()
- term.setCursorPos(1,1)
- print("Selected item is Calculation Processor")
- material1 = "ae2:printed_calculation_processor"
- material2 = "minecraft:redstone"
- material3 = "ae2:printed_silicon"
- m1slot = 1
- m2slot = 3
- m3slot = 2
- elseif key == keys.u then
- term.clear()
- term.setCursorPos(1,1)
- print("Selected item is Calculation Processor")
- material1 = "ae2:printed_engineering_processor"
- material2 = "minecraft:redstone"
- material3 = "ae2:printed_silicon"
- m1slot = 1
- m2slot = 3
- m3slot = 2
- else
- shell.run("startup.lua")
- term.clear()
- end
- local modem = peripheral.wrap("back")
- modem.open(1)
- local chests = {}
- local inscribers = {}
- for _, name in ipairs(peripheral.getNames()) do
- if string.find(name, "sophisticatedstorage:chest_") then
- table.insert(chests, peripheral.wrap(name))
- elseif string.find(name, "ae2:inscriber_") then
- table.insert(inscribers, peripheral.wrap(name))
- end
- end
- for _, inscriber in ipairs(inscribers) do
- local inscriberItems = inscriber.list() -- Tüm slotları alıyoruz
- for i = 1, 3 do
- local item = inscriberItems[i]
- if item then
- for _, chest in ipairs(chests) do
- -- Item varsa, chest'e aktar
- inscriber.pushItems(peripheral.getName(chest), i, item.count)
- end
- end
- end
- end
- while true do
- for _, chest in ipairs(chests) do
- for _, inscriber in ipairs(inscribers) do
- for slot, item in pairs(chest.list()) do
- if item.name == material1 then
- chest.pushItems(peripheral.getName(inscriber), slot, item.count, m1slot)
- elseif item.name == material2 then
- chest.pushItems(peripheral.getName(inscriber), slot, item.count, m2slot)
- elseif item.name == material3 then
- chest.pushItems(peripheral.getName(inscriber), slot, item.count, m3slot)
- end
- end
- local inscriberItems = inscriber.list()
- if inscriberItems[4] then
- local item = inscriberItems[4]
- for _, chest in ipairs(chests) do
- inscriber.pushItems(peripheral.getName(chest), 4, item.count)
- end
- end
- end
- end
- sleep(1)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement