3nd0fw0r1d

Untitled

Dec 1st, 2019
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.33 KB | None | 0 0
  1. local modem = peripheral.wrap("top")
  2. modem.open(42)
  3.  
  4. while true do
  5.   local event, peripheral_name, channel, replyChannel, message, distance = os.pullEvent("modem_message")
  6.   print("Received a message on channel", channel, "at", distance, "blocks away.")
  7.   print("The message: ", message)
  8.   modem.transmit(43, 42, distance)
  9. end
Add Comment
Please, Sign In to add comment