Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local idChannel = 125
- function close()
- rs.setOutput("top", true)
- end
- function open()
- rs.setOutput("top", false)
- end
- modem = peripheral.wrap("right")
- open()
- sleep(0.1)
- close()
- while true do
- modem.open(idChannel)
- event, modemSide, senderChannel, replyChannel, text, senderDistance = os.pullEvent("modem_message")
- if text == "open" then
- open()
- elseif text == "close" then
- close()
- end
- modem.close(idChannel)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement