Advertisement
Jyzarc

JyNetRepeater

Dec 30th, 2013
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.39 KB | None | 0 0
  1. local i,message,id,freq,side
  2.  
  3. local function startup()
  4.     term.clear()
  5.     term.setCursorPos(1,1)
  6.     print("Running JyNet Repeater")
  7.     os.loadAPI("JyNet")
  8.     JyNet.openAll()
  9.     JyNet.addAll()
  10. end
  11.  
  12. startup()
  13.  
  14. while true do
  15.     message,id,freq,side = JyNet.recieve()
  16.     for i = 1,6 do
  17.         if rs.getSides()[i] ~= side then
  18.             JyNet.send(message,freq,rs.getSides()[i],id)
  19.         end
  20.     end
  21.     sleep(.01)
  22. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement