Advertisement
Guest User

startup

a guest
Feb 20th, 2017
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.50 KB | None | 0 0
  1. local modem = peripheral.wrap("left")
  2. modem.open(3)
  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.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement