View difference between Paste ID: eP7xUw5M and tUerE8gx
SHOW: | | - or go back to the newest paste.
1
os.loadAPI("ocs/apis/sensor")
2
 
3
--LATO SENSORE
4
se = sensor.wrap("top")
5
 
6
--LATO ATTIVAZIONE REDSTONE QUANDO SQUILLA L'ALLARME
7
lato = "right"
8
ritardo = 0
9
10
--GIOCATORI PER CUI L'ALLARME NON SI ATTIVA
11-
--INSERIRE QUI LA API-KEY
11+
giocatore1 = "FoxWorn3365"
12-
api1 = ""
12+
giocatore2 = "Ghostmike_"
13
giocatore3 = "Lay4play"
14
giocatore4 = "Materasso"
15-
giocatore1 = ""
15+
giocatore5 = ""
16-
giocatore2 = ""
16+
17-
giocatore3 = ""
17+
rs.setOutput(lato, false)
18
os.loadAPI("ocs/apis/sensor")
19
while true do
20-
emailMandata = 0
20+
21
for k,v in pairs(ta) do
22
if v["Name"] == "Player" and k ~= "lego11" and k ~= giocatore1 and k ~= giocatore2 and k ~= giocatore3 and k ~= giocatore4 and k ~= giocatore5 then
23
print("Rilevato giocatore non autorizzato: "..k)
24
rs.setOutput(lato, true)
25-
if v["Name"] == "Player" and k ~= "lego11" and k ~= giocatore1 and k ~= giocatore2 and k ~= giocatore3 then
25+
sleep(0.2)
26
rs.setOutput(lato, false)
27
print("Zappato!")
28-
if emailMandata == 0 then
28+
29-
emailMandata = 1
29+
30-
http.get("http://172.16.20.220/luanet/servlets/notifier.php?api="..api1.."&var1="..k)
30+
31-
print("Email mandata")
31+
32
sleep(2)
33-
else
33+