Advertisement
TheMoonWolfYT

Untitled

Jul 20th, 2019
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.09 KB | None | 0 0
  1. drone = component.proxy(component.list("drone")())
  2. modem = component.proxy(component.list("modem")())
  3.  
  4. ADDR = "16f260b2-b42a-4cd7-9cfe-e37e67524c55"
  5.  
  6. modem.open(1370)
  7.  
  8. while true do
  9. drone.setStatusText("Get\nBIOS...")
  10. modem.send(ADDR, 1370, "net-eeprom", "get bios")
  11.  
  12. got = false
  13. code = ""
  14.  
  15. while not got do
  16. e = {computer.pullSignal(1)}
  17. if e[1] == "modem_message" and e[3] and e[3]:sub(1, #ADDR) == ADDR and e[6] == "net-eeprom" and e[7] == "eeprom" and e[9] then
  18. got = e[8]
  19. code = code .. e[9]
  20. end
  21. end
  22.  
  23. drone.setStatusText("Compile\ncode...")
  24.  
  25. chunk, reason = load(code)
  26. if not chunk then
  27. modem.send(ADDR, 1370, "net-eeprom", "error", "compile", reason)
  28. else
  29. drone.setStatusText("Running")
  30. result = {xpcall(chunk, debug.traceback)}
  31. if result[1] then
  32. for k, v in pairs(result) do
  33. result[k] = tostring(v)
  34. end
  35. modem.send(ADDR, 1370, "net-eeprom", "success", table.unpack(result, 2, 7))
  36. else
  37. modem.send(ADDR, 1370, "net-eeprom", "error", "runtime", tostring(result[2]))
  38. end
  39. end
  40. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement