Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local modem = peripheral.find("modem")
- term.clear()
- term.setCursorPos(1,1)
- repeat
- while rs.getInput("front") == false
- do
- modem.open(23)
- local event, modemSide, senderChannel, replyChannel, message, senderDistance = os.pullEvent("modem_message")
- if message == "Online"
- then
- rs.setOutput("back",true)
- print("Oil Rig Control")
- print("-=-=-=-=-=-=-=-")
- print("Active")
- sleep(1)
- term.clear()
- term.setCursorPos(1,1)
- end
- if message == "Offline"
- then
- rs.setOutput("back",false)
- print("Oil Rig Control")
- print("-=-=-=-=-=-=-=-")
- print("Standby")
- sleep(1)
- term.clear()
- term.setCursorPos(1,1)
- end
- modem.close(23)
- end
- until rs.getInput("front") == true
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement