Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- p = peripheral.wrap("bottom")
- rednet.open("bottom")
- --Program Decor
- term.setTextColor(colors.blue)
- term.clear()
- term.setCursorPos(1,1)
- print("Djgaven588's Rednet Power Manager")
- print(" ")
- print("Managment Started On Day: "..os.day())
- term.setTextColor(colors.white)
- --Wait for a message on protocall PowerManagement
- --Then do action
- while true do
- senderId, msg, protocall = rednet.receive()
- if protocall == "PowerManagement" then
- print("Day: "..os.day().." Time: "..os.time())
- print("Message: "..msg)
- print(" ")
- if msg == "PowerFull" then
- rednet.broadcast("DAll", "Reactor")
- end
- if msg == "Power98" then
- rednet.broadcast("E1", "Reactor")
- end
- if msg == "Power96" then
- rednet.broadcast("E2", "Reactor")
- end
- if msg == "Power94" then
- rednet.broadcast("E3", "Reactor")
- end
- if msg == "PowerFalling" then
- rednet.broadcast("E4", "Reactor")
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement