Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- redstoneSide = "top"
- peripheralName = "peripheral_0"
- searedTanks = 3
- tank = peripheral.wrap(peripheralName)
- loopCounter = 0
- function startupClear()
- f = fs.open("startup", "w")
- f.write("shell.run('smeltery')")
- f.close()
- end
- local function readCommand()
- local command = read()
- return command
- end
- function looper(counter)
- counter = math.floor(counter/9)
- counter = math.floor(counter/searedTanks)
- print("Starting to loop "..counter.." times")
- for int=1,counter,1 do
- inter = int + 1
- rs.setOutput(redstoneSide, true)
- sleep(1)
- rs.setOutput(redstoneSide, false)
- amount = 0
- while amount < 1296 do
- tableInfo = tank.getInfo()
- contents = tableInfo.contents
- currentAmount = contents.amount
- amount = currentAmount
- sleep(0.1)
- end
- print("[UPDATE] "..int.."/"..counter.." outputed.")
- sleep(4)
- end
- toggle()
- end
- function toggle()
- term.clear()
- term.setCursorPos(1, 1)
- term.setTextColor(colors.cyan)
- print("How many ingots do you want to excrete?")
- write("> ")
- local command = readCommand()
- looper(command)
- end
- startupClear()
- toggle()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement