Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local modem = peripheral.wrap("top")
- modem.open(42)
- while true do
- local event, peripheral_name, channel, replyChannel, message, distance = os.pullEvent("modem_message")
- print("Received a message on channel", channel, "at", distance, "blocks away.")
- print("The message: ", message)
- modem.transmit(43, 42, distance)
- end
Add Comment
Please, Sign In to add comment