Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- send = function()
- while not redstone.getInput("top") do
- os.queueEvent("randomEvent")
- os.pullEvent()
- end
- end
- recieve = function()
- while not redstone.getInput("right") do
- os.queueEvent("randomEvent")
- os.pullEvent()
- end
- end
- sleep = function()
- os.sleep(7)
- end
- signal = function()
- while not redstone.getInput("top") do
- os.queueEvent("randomEvent")
- os.pullEvent()
- end
- end
- while true do
- yes = parallel.waitForAny(send, recieve)
- redstone.setOutput("right", false)
- if yes == 1 then
- redstone.setOutput("right", true)
- os.sleep(1)
- redstone.setOutput("right", false)
- while yes == 1 do
- yes = parallel.waitForAny(signal, sleep)
- end
- else
- redstone.setOutput("left", true)
- os.sleep(3)
- yes = 1
- while yes == 1 do
- yes = parallel.waitForAny(signal, sleep)
- end
- redstone.setOutput("left", false)
- end
- end
Add Comment
Please, Sign In to add comment