Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- os.loadAPI("ocs/apis/sensor")
- -- LATO MODEM
- rednet.open("right")
- --LATO SENSORE
- se = sensor.wrap("top")
- --LATO ATTIVAZIONE REDSTONE QUANDO SQUILLA L'ALLARME
- lato = "right"
- ritardo = 0
- -- DATI LOG
- id_ricevitore = 2829
- --GIOCATORI PER CUI L'ALLARME NON SI ATTIVA
- giocatore1 = ""
- giocatore2 = ""
- giocatore3 = ""
- os.loadAPI("ocs/apis/sensor")
- while true do
- ta = se.getTargets()
- for k,v in pairs(ta) do
- 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
- print("Rilevato giocatore non autorizzato: "..k)
- -- MODIFICARE QUA IL MESSAGGIO (k รจ il nome del giocatore)
- rednet.send(id_ricevitore, "Rilevato, " .. k)
- -- ********************************************
- rs.setOutput(lato, true)
- else
- rs.setOutput(lato, false)
- end
- end
- sleep(1)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement