Advertisement
Guest User

get

a guest
Aug 17th, 2019
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.43 KB | None | 0 0
  1. term.clear()
  2. term.setCursorPos(1,1)
  3. local sides = {"back"}
  4. for i=1,#sides do
  5.  if not rednet.isOpen(sides[i]) then
  6.   rednet.open(sides[i])
  7.  end
  8. end
  9. while true do
  10.  id,msg = rednet.receive("ftp")
  11.  if msg == "RECEIVE" then
  12.   id2,msg2 = rednet.receive("ftp")
  13.   f = fs.open(msg2, "w")
  14.   id3,msg3 = rednet.receive("ftp")
  15.   f.write(msg3)
  16.   f.close()
  17.   print("File "..msg2.." received!")
  18.  elseif msg == "SC" then
  19.   break
  20.  end
  21. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement