Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local m = component.proxy(component.list("modem")()) -- get primary modem component
- local rs = component.proxy(component.list("redstone")())
- m.setWakeMessage("on")
- m.open(123)
- -- Send some message.
- -- Wait for a message from another network card.
- while true do
- local name, receiver, sender, port, distance, color, state, side, on = computer.pullSignal()
- if name == "modem_message" then
- computer.beep(500, 1.5)
- if(on == "OFF") then
- computer.shutdown(false)
- else
- rs.setBundledOutput(side, {[color] = state})
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment