Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- num = 1
- screen = peripheral.wrap("back")
- rednet.open("front")
- function SetScreen(Text, Color)
- screen.setBackgroundColor(Color)
- screen.clear()
- screen.setCursorPos(1,2)
- screen.setTextScale(1.5)
- screen.write(Text)
- end
- SetScreen(" OK", 128)
- while true do
- local id, message = rednet.receive()
- if message == "poweronreactor_"..num then
- redstone.setOutput("top", true)
- SetScreen(" ON", 8192)
- rednet.broadcast("Reactor"..num.." is now ONLINE")
- elseif message == "poweroffreactor_"..num then
- redstone.setOutput("top", false)
- SetScreen(" OFF", 16384)
- rednet.broadcast("Reactor"..num.." is now OFFLINE")
- end
- sleep(0.1)
- end
Add Comment
Please, Sign In to add comment