Advertisement
Axow01

Untitled

Aug 12th, 2023 (edited)
1,417
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.44 KB | None | 0 0
  1. local modem = peripheral.wrap("back")
  2.  
  3.  
  4. local function stat()
  5.     rednet.open("back")
  6.     print("here")
  7.     local senderId, message, protocol = rednet.receive("reactor_status_142", 20)
  8.     print(message)
  9.     rednet.close("back")
  10.     coroutine.yield()
  11.     stat()
  12. end
  13.  
  14. local co = coroutine.create(stat)
  15. coroutine.resume(co)
  16. while (true) do
  17.     if (coroutine.status(co) == "suspended") then coroutine.resume(co) end
  18.     coroutine.resume(co)
  19.     os.sleep(2)
  20. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement