Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local inputSide = "back"
- local outputSide = "left"
- local function output(line,str)
- term.setCursorPos(1,line)
- term.clearLine()
- term.write(str)
- end
- local function hasItem()
- return rs.getInput(inputSide)
- end
- local _blink = true
- local function blink()
- rs.setOutput(outputSide,_blink)
- _blink = not _blink
- end
- output(string.format(1,"#%d - %s",
- os.getComputerID(),
- os.getComputerLabel))
- sleep(1)
- while true do
- rs.setOutput(outputSide,false)
- if hasItem() then os.queueEvent("redstone") end
- os.pullEvent("redstone")
- while hasItem() do
- blink()
- output(2, hasItem() and "Has item" or "No item")
- sleep(.1)
- end
- sleep(.2)
- end
Advertisement
Add Comment
Please, Sign In to add comment