Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- modem = peripheral.wrap("left")
- reactor = peripheral.wrap("BigReactors-Reactor_0")
- modem.open(7777) --receive
- isActive = "NaN"
- chargeStatus = 0
- while true do
- event, modemSide, senderChannel, replyChannel, message, senderDistance = os.pullEvent("modem_message")
- if message == "statusupdate" then
- if reactor.getActive() == true then
- isActive = "Reactor is currently active "
- else
- isActive = "Reactor is currently NOT active "
- end
- chargeStatus = "and "..tostring(reactor.getEnergyStored()).." RF are stored."
- replyMessage = isActive..chargeStatus
- modem.transmit(replyChannel, 7777, replyMessage)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement