chand1012

Wireless Computercraft Test

Jul 18th, 2016
90
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local modem = peripheral.wrap("left")
  2. modem.open(3)  -- Open channel 3 so that we can listen on it
  3. local event, modemSide, senderChannel,
  4.   replyChannel, message, senderDistance = os.pullEvent("modem_message")
  5.  
  6. print("I just received a message on channel: "..senderChannel)
  7. print("I should apparently reply on channel: "..replyChannel)
  8. print("The modem receiving this is located on my "..modemSide.." side")
  9. print("The message was: "..message)
  10. print("The sender is: "..(senderDistance or "an unknown number of").." blocks away from me.")
RAW Paste Data