Advertisement
Guest User

Untitled

a guest
Jan 17th, 2019
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. local modemWireless = peripheral.wrap("front")
  2. local modemWired = peripheral.wrap("back")
  3.  
  4. modemWireless.open(rednet.CHANNEL_BROADCAST)
  5. modemWired.open(rednet.CHANNEL_BROADCAST)
  6.  
  7. while true do
  8. local ev,side,chan,replyChan,msg,dist = os.pullEvent("modem_message")
  9. local otherModem = modemWired
  10. if side == "right" then otherModem = modemWireless end
  11. otherModem.transmit(chan,replyChan,msg)
  12. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement