FoxWorn3365

MERDOR_INFO

May 29th, 2021 (edited)
170
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. rednet.open("top")
  2. while true do
  3.  
  4. to, msg, prtc = rednet.receive()
  5.  
  6. local status = rs.getInput("left")
  7. if status == false then
  8.  sender = "OFF"
  9. else
  10.  sender = "ON"
  11. end
  12.  
  13.  if msg == "STATUS" then
  14.    rednet.send(to, sender)
  15.    print("STATUS")
  16.  elseif msg == "OFF" then
  17.    rs.setOutput("left", false)
  18.    print("OFF")
  19.  elseif msg == "ON" then
  20.    rs.setOutput("left", true)
  21.    print("ON")
  22.  elseif msg == "INFO" then
  23.    var = "Installato il: 29/05/2021\nDa: FoxInvest Holding\nStato: OPERATIVO\nCodice seriale: 202105AC1"
  24.    rednet.send(to, var)
  25.    print("INFO")
  26.  end
  27. end
Add Comment
Please, Sign In to add comment