Advertisement
Guest User

broadcast

a guest
Nov 24th, 2014
144
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.35 KB | None | 0 0
  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7. rednet.open("top")
  8. print("ENTER MESSAGE")
  9.  
  10. local function receive ()
  11.  
  12.     sleep(0.5)
  13.     local a = read()
  14.     print("END WITH CTRL+T")
  15.   while true do
  16.       sleep(1)
  17.       rednet.broadcast(a)
  18.   end
  19.  
  20.  
  21. end
  22.  
  23. local function send ()
  24.   sleep(5)
  25.   rednet.broadcast("TRANSMISSION END")
  26. end
  27.  
  28. parallel.waitForAll(receive ,send)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement