Advertisement
goldfiction

reactorsend

Aug 10th, 2023 (edited)
469
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.63 KB | None | 0 0
  1. rednet.open("left")
  2. local reactor = peripheral.wrap("back")
  3.  
  4. while true do
  5.  
  6. local a = reactor.getCasingTemperature()
  7. local b = reactor.getActive()
  8. local c = reactor.getEnergyProducedLastTick()
  9. local d = reactor.getEnergyStored()
  10.  
  11. if b == true then
  12.   b2 = "on"
  13. elseif b == false then
  14.   b2 = "off"
  15. end
  16.  
  17. local b2 = "Reactor Status: " .. b2
  18. local a2 = "Temperature: " .. tostring(a)
  19. local c2 = "RF Output: " .. tostring(c)
  20. local d2 = "Stored Energy: " .. tostring(d)
  21. local donnees = { b2, c2, d2, a2}
  22. local encode = textutils.serialise(donnees)
  23.  
  24. -- rednet.send(12, encode)
  25. rednet.broadcast(encode)
  26. print(encode)
  27. os.sleep(3)
  28. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement