Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- rednet.open("right")
- local tmp = false
- while true do
- event, id, text = os.pullEvent()
- if event == "redstone" then
- if redstone.getInput("bottom") and tmp == false then
- tmp = true
- redstone.setOutput("left", true)
- rednet.send(24, "alarm-on")
- elseif redstone.getInput("back") then
- rednet.send(24, "ready-button")
- end
- elseif event == "rednet_message" then
- if id == 24 and text == "alarm-off" and tmp == true then
- redstone.setOutput("left", false)
- tmp = false
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment