guitarplayer616

CC StreamData Slave

Jun 11th, 2015
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.38 KB | None | 0 0
  1. --Slave--
  2. local tArgs = { ... }
  3. local sides = {"top","bottom","left","right","front","back"}
  4. for _,v in ipairs(sides) do
  5.   if peripheral.getType( v ) == "modem" then
  6.     rednet.open( v )
  7.   end
  8. end
  9.  
  10. term.clear()
  11. term.setCursorPos(1,1)
  12. function slave()
  13.   while true do
  14.     r = {rednet.receive("sm")}
  15.     if r and r[2] then
  16.       loadstring(r[2])()
  17.     end
  18.   end
  19. end
  20. slave()
Add Comment
Please, Sign In to add comment