Advertisement
lego11

Untitled

May 14th, 2020
156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.94 KB | None | 0 0
  1. os.loadAPI("ocs/apis/sensor")
  2.  
  3. -- LATO MODEM
  4. rednet.open("right")
  5.  
  6. --LATO SENSORE
  7. se = sensor.wrap("top")
  8.  
  9. --LATO ATTIVAZIONE REDSTONE QUANDO SQUILLA L'ALLARME
  10. lato = "right"
  11. ritardo = 0
  12.  
  13. -- DATI LOG
  14. id_ricevitore = 2829
  15.  
  16. --GIOCATORI PER CUI L'ALLARME NON SI ATTIVA
  17. giocatore1 = ""
  18. giocatore2 = ""
  19. giocatore3 = ""
  20.  
  21. os.loadAPI("ocs/apis/sensor")
  22. while true do
  23. ta = se.getTargets()
  24. for k,v in pairs(ta) do
  25. if v["Name"] == "Player" and k ~= "lego11" and k ~= "Lay4play" and k ~= "lucky255" and k ~= "Kiiw" and k ~= "Questura" and k ~= giocatore1 and k ~= giocatore2 and k ~= giocatore3 then
  26. print("Rilevato giocatore non autorizzato: "..k)
  27. -- MODIFICARE QUA IL MESSAGGIO (k รจ il nome del giocatore)
  28. rednet.send(id_ricevitore, "Rilevato, " .. k)
  29. -- ********************************************
  30. rs.setOutput(lato, true)
  31. else
  32. rs.setOutput(lato, false)
  33. end
  34. end
  35. sleep(1)
  36. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement