SHARE
TWEET

drone.bios

a guest Oct 21st, 2019 85 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local m=component.proxy(component.list("modem")(1)
  2. m.open(2412)
  3. local function respond(...)
  4. local args=table.pack(...)
  5. pcall(function() m.broadcast(2412, table.unpack(args)) end)
  6. end
  7. local function receive()
  8. while true do
  9. local evt,_,_,_,_,cmd=computer.pullSignal()
  10. if evt=="modem_message" then return load(cmd) end
  11. end
  12. end
  13. while true do
  14. local result,reason=pcall(function()
  15. local result,reason=receive()
  16. if not result then return respond(reason) end
  17. respond(result())
  18. end)
  19. if not result then respond(reason) end
  20. end
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top