Fern_Silverthorn

Untitled

Jan 28th, 2015
217
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.58 KB | None | 0 0
  1. function repeat_nodes(side, route_ch)
  2.   local modem = peripheral.wrap(side)
  3.   modem.open(route_ch)
  4.   while true do
  5.     local message, senderChannel = os.event("modem_message")
  6.     if senderChannel = route_ch then
  7.       local repeat_channel = message
  8.       modem.open(repeatchannel)
  9.       while true do
  10.         local message, senderChannel = os.event("modem_message")
  11.         if senderChannel = repeat_channel then
  12.           modem.transmit(repeat_channel, repeat_channel, message)
  13.           modem.close(repeat_channel)
  14.           break
  15.         end
  16.       end
  17.     end
  18.   end
  19. end
Advertisement
Add Comment
Please, Sign In to add comment