Advertisement
Guest User

startup

a guest
Feb 26th, 2017
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.23 KB | None | 0 0
  1. m = peripheral.find("modem")
  2. m.open(150)
  3.  
  4. while true do
  5. a,b,c,d,e = os.pullEvent("modem_message")
  6. if e == "REQFILE" then
  7.   local file = fs.open("/prog","r")
  8.   local f = file.readAll()
  9.   file.close()
  10.   m.transmit(c,c,f)
  11. end
  12. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement