Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- os.loadAPI("ocs/apis/sensor")
- --LATO SENSORE
- prox = sensor.wrap("right")
- --INSERIRE QUI LA API-KEY
- api1 = "sbrodolatura-epco-lincroft"
- emailMandata = 0
- function mandaEmail()
- if emailMandata == 0 then
- emailMandata = 1
- http.get("http://172.16.20.220/luanet/servlets/notifier.php?api="..api1.."&var1="..giocatore)
- print("Email mandata")
- end
- end
- while true do
- term.clear()
- term.setCursorPos(1, 1)
- event = os.pullEvent("redstone")
- giocatore = textutils.serialize(prox.getTargets())
- print("Rilevato giocatore non autorizzato: "..giocatore)
- mandaEmail()
- if emailMandata == 1 then
- ritardo = ritardo + 1
- end
- if ritardo == 120 then
- ritardo = 0
- emailMandata = 0
- end
- sleep(1)
- end
Advertisement
Add Comment
Please, Sign In to add comment