Advertisement
Guest User

broadcaster

a guest
Jun 27th, 2016
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.68 KB | None | 0 0
  1. rednet.open("back")
  2. while true do
  3.   local s,msg,p = rednet.receive(5)
  4.   if s == 1125 then
  5.     if msg == "200" then
  6.       term.setTextColor(colors.lime)
  7.       textutils.slowWrite("network")
  8.       term.setTextColor(colors.blue)
  9.       write(">")
  10.       term.setTextColor(colors.red)
  11.       local cmd = read()
  12.       if cmd == "!exit!" then
  13.         error("End of Stream")
  14.       end
  15.       rednet.send(1125,cmd)
  16.     elseif msg == "query" then
  17.       term.setTextColor(colors.yellow)
  18.       textutils.slowWrite("File")
  19.       term.setTextColor(colors.blue)
  20.       write(">")
  21.       term.setTextColor(colors.red)
  22.       local fie = read()
  23.       rednet.send(1125,fie)
  24.     end
  25.   end
  26. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement