Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- peripheral.wrap("back")
- rednet.open("back")
- lampon = "allumer lampe"
- lampoff = "eteindre lampe"
- porteescalier1o = "ouvrir porte securite"
- porteescalier1f = "fermer porte securite"
- incendi1open = "allumer systeme anti-incendie"
- incendi1close = "eteindre systeme anti-incendie"
- labopen = "ouvrir laboratoire"
- labclose = "fermer laboratoire"
- portesecreteopen = "2530o"
- portesecreteclose = "2530f"
- coffreopen = "ouvrir securite coffre"
- coffreclose = "fermer securite coffre"
- identiter1 = "chuck bartowski"
- identiter2 = "sarah walker"
- identiter3 = "john casey"
- identiter4 = "morgan grimes"
- identiter5 = "diane beckman"
- identiter6 = "createur"
- edit = "editer"
- update = "mise a jour"
- code = "diane beckman"
- print("bonjour")
- --identification
- write ("identification : ")
- identiter = read()
- --chuck
- if identiter == identiter1 then
- write ("Memo : ")
- memo = read()
- if memo == edit then
- sleep(0.5)
- print ("allumer lampe")
- sleep(0.5)
- print ("eteindre lampe")
- sleep(0.5)
- print ("ouvrir porte securite")
- sleep(0.5)
- print ("fermer porte securite")
- sleep(0.5)
- print ("ouvrir porte anti-incendie")
- sleep(0.5)
- print ("fermer porte anti-incendie")
- sleep(0.5)
- print ("ouvrir laboratoire")
- sleep(0.5)
- print ("fermer laboratoire")
- end
- write ("action : ")
- action = read()
- if action == lampon then
- rednet.send(70, "ouvrir-chateau")
- print("lampe allumer")
- end
- if action == lampoff then
- rednet.send(70, "fermer-chateau")
- print("lampe eteint")
- end
- if action == porteescalier1o then
- rednet.send(68, "ouvrir-chateau")
- print("porte ouverte")
- end
- if action == porteescalier1f then
- rednet.send(68, "fermer-chateau")
- print("porte fermer")
- end
- if action == incendi1open then
- rednet.send(69, "ouvrir-chateau")
- rednet.send(68, "fermer-chateau")
- rednet.send(70, "fermer-chateau")
- rednet.send(105, "fermer-chateau")
- print("securite anti-incendie ouverte")
- end
- if action == incendi1close then
- rednet.send(69, "fermer-chateau")
- rednet.send(68, "ouvrir-chateau")
- rednet.send(70, "ouvrir-chateau")
- rednet.send(105, "ouvrir-chateau")
- print("securite anti-incendie ouverte")
- end
- if action == labopen then
- rednet.send(105, "ouvrir-chateau")
- print("labo ouvert")
- end
- if action == labclose then
- rednet.send(105, "fermer-chateau")
- print("labo fermer")
- end
- if action == coffreopen then
- rednet.send(134, "ouvrir-chateau")
- print("securite du coffre ouverte")
- end
- if action == coffreclose then
- rednet.send(134, "fermer-chateau")
- print("securite du coffre fermer")
- end
- end
- --sarah
- if identiter == identiter2 then
- write ("Memo : ")
- memo = read()
- if memo == edit then
- sleep(0.5)
- print ("allumer lampe")
- sleep(0.5)
- print ("eteindre lampe")
- sleep(0.5)
- print ("ouvrir porte securite")
- sleep(0.5)
- print ("fermer porte securite")
- sleep(0.5)
- print ("ouvrir porte anti-incendie")
- sleep(0.5)
- print ("fermer porte anti-incendie")
- sleep(0.5)
- print ("ouvrir laboratoire")
- sleep(0.5)
- print ("fermer laboratoire")
- end
- write ("action : ")
- action = read()
- if action == lampon then
- rednet.send(70, "ouvrir-chateau")
- print("lampe allumer")
- end
- if action == lampoff then
- rednet.send(70, "fermer-chateau")
- print("lampe eteint")
- end
- if action == porteescalier1o then
- rednet.send(68, "ouvrir-chateau")
- print("porte ouverte")
- end
- if action == porteescalier1f then
- rednet.send(68, "fermer-chateau")
- print("porte fermer")
- end
- if action == incendi1open then
- rednet.send(69, "ouvrir-chateau")
- rednet.send(68, "fermer-chateau")
- rednet.send(70, "fermer-chateau")
- rednet.send(105, "fermer-chateau")
- print("securite anti-incendie ouverte")
- end
- if action == incendi1close then
- rednet.send(69, "fermer-chateau")
- rednet.send(68, "ouvrir-chateau")
- rednet.send(70, "ouvrir-chateau")
- rednet.send(105, "ouvrir-chateau")
- print("securite anti-incendie ouverte")
- end
- if action == labopen then
- rednet.send(105, "ouvrir-chateau")
- print("labo ouvert")
- end
- if action == labclose then
- rednet.send(105, "fermer-chateau")
- print("labo fermer")
- end
- if action == coffreopen then
- rednet.send(134, "ouvrir-chateau")
- print("securite du coffre ouverte")
- end
- if action == coffreclose then
- rednet.send(134, "fermer-chateau")
- print("securite du coffre fermer")
- end
- end
- --john
- if identiter == identiter3 then
- write ("Memo : ")
- memo = read()
- if memo == edit then
- sleep(0.5)
- print ("allumer lampe")
- sleep(0.5)
- print ("eteindre lampe")
- sleep(0.5)
- print ("ouvrir porte securite")
- sleep(0.5)
- print ("fermer porte securite")
- sleep(0.5)
- print ("ouvrir porte anti-incendie")
- sleep(0.5)
- print ("fermer porte anti-incendie")
- sleep(0.5)
- print ("ouvrir laboratoire")
- sleep(0.5)
- print ("fermer laboratoire")
- end
- write ("action : ")
- action = read()
- if action == lampon then
- rednet.send(70, "ouvrir-chateau")
- print("lampe allumer")
- end
- if action == lampoff then
- rednet.send(70, "fermer-chateau")
- print("lampe eteint")
- end
- if action == porteescalier1o then
- rednet.send(68, "ouvrir-chateau")
- print("porte ouverte")
- end
- if action == porteescalier1f then
- rednet.send(68, "fermer-chateau")
- print("porte fermer")
- end
- if action == incendi1open then
- rednet.send(69, "ouvrir-chateau")
- rednet.send(68, "fermer-chateau")
- rednet.send(70, "fermer-chateau")
- rednet.send(105, "fermer-chateau")
- print("securite anti-incendie ouverte")
- end
- if action == incendi1close then
- rednet.send(69, "fermer-chateau")
- rednet.send(68, "ouvrir-chateau")
- rednet.send(70, "ouvrir-chateau")
- rednet.send(105, "ouvrir-chateau")
- print("securite anti-incendie ouverte")
- end
- if action == labopen then
- rednet.send(105, "ouvrir-chateau")
- print("labo ouvert")
- end
- if action == labclose then
- rednet.send(105, "fermer-chateau")
- print("labo fermer")
- end
- if action == coffreopen then
- rednet.send(134, "ouvrir-chateau")
- print("securite du coffre ouverte")
- end
- if action == coffreclose then
- rednet.send(134, "fermer-chateau")
- print("securite du coffre fermer")
- end
- end
- --morgan
- if identiter == identiter4 then
- write ("Memo : ")
- memo = read()
- if memo == edit then
- sleep(0.5)
- print ("allumer lampe")
- sleep(0.5)
- print ("eteindre lampe")
- sleep(0.5)
- print ("ouvrir porte securite")
- sleep(0.5)
- print ("fermer porte securite")
- sleep(0.5)
- print ("ouvrir porte anti-incendie")
- sleep(0.5)
- print ("fermer porte anti-incendie")
- sleep(0.5)
- print ("ouvrir laboratoire")
- sleep(0.5)
- print ("fermer laboratoire")
- end
- write ("action : ")
- action = read()
- if action == lampon then
- rednet.send(70, "ouvrir-chateau")
- print("lampe allumer")
- end
- if action == lampoff then
- rednet.send(70, "fermer-chateau")
- print("lampe eteint")
- end
- if action == porteescalier1o then
- rednet.send(68, "ouvrir-chateau")
- print("porte ouverte")
- end
- if action == porteescalier1f then
- rednet.send(68, "fermer-chateau")
- print("porte fermer")
- end
- if action == incendi1open then
- rednet.send(69, "ouvrir-chateau")
- rednet.send(68, "fermer-chateau")
- rednet.send(70, "fermer-chateau")
- rednet.send(105, "fermer-chateau")
- print("securite anti-incendie ouverte")
- end
- if action == incendi1close then
- rednet.send(69, "fermer-chateau")
- rednet.send(68, "ouvrir-chateau")
- rednet.send(70, "ouvrir-chateau")
- rednet.send(105, "ouvrir-chateau")
- print("securite anti-incendie ouverte")
- end
- if action == labopen then
- rednet.send(105, "ouvrir-chateau")
- print("labo ouvert")
- end
- if action == labclose then
- rednet.send(105, "fermer-chateau")
- print("labo fermer")
- end
- if action == coffreopen then
- rednet.send(134, "ouvrir-chateau")
- print("securite du coffre ouverte")
- end
- if action == coffreclose then
- rednet.send(134, "fermer-chateau")
- print("securite du coffre fermer")
- end
- end
- --diane beckman
- if identiter == identiter5 then
- write ("code secret : ")
- code = read()
- if code == code then
- print ("bonjour generale beckman")
- sleep(1)
- write ("Memo : ")
- memo = read()
- if memo == edit then
- sleep(0.5)
- print ("allumer lampe")
- sleep(0.5)
- print ("eteindre lampe")
- sleep(0.5)
- print ("ouvrir porte securite")
- sleep(0.5)
- print ("fermer porte securite")
- sleep(0.5)
- print ("ouvrir porte anti-incendie")
- sleep(0.5)
- print ("fermer porte anti-incendie")
- sleep(0.5)
- print ("ouvrir laboratoire")
- sleep(0.5)
- print ("fermer laboratoire")
- end
- write ("action : ")
- action = read()
- if action == lampon then
- rednet.send(70, "ouvrir-chateau")
- print("lampe allumer")
- end
- if action == lampoff then
- rednet.send(70, "fermer-chateau")
- print("lampe eteint")
- end
- if action == porteescalier1o then
- rednet.send(68, "ouvrir-chateau")
- print("porte ouverte")
- end
- if action == porteescalier1f then
- rednet.send(68, "fermer-chateau")
- print("porte fermer")
- end
- if action == incendi1open then
- rednet.send(69, "ouvrir-chateau")
- rednet.send(68, "fermer-chateau")
- rednet.send(70, "fermer-chateau")
- rednet.send(105, "fermer-chateau")
- print("securite anti-incendie ouverte")
- end
- if action == incendi1close then
- rednet.send(69, "fermer-chateau")
- rednet.send(68, "ouvrir-chateau")
- rednet.send(70, "ouvrir-chateau")
- rednet.send(105, "ouvrir-chateau")
- print("securite anti-incendie ouverte")
- end
- if action == labopen then
- rednet.send(105, "ouvrir-chateau")
- print("labo ouvert")
- end
- if action == labclose then
- rednet.send(105, "fermer-chateau")
- print("labo fermer")
- end
- if action == portesecreteopen then
- rednet.send(129, "ouvrir-chateau")
- print("porte secrete code 23904682 ouverte")
- end
- if action == portesecreteclose then
- rednet.send(129, "fermer-chateau")
- print("porte secrete code 23904682 fermer")
- end
- if action == coffreopen then
- rednet.send(134, "ouvrir-chateau")
- print("securite du coffre ouverte")
- end
- if action == coffreclose then
- rednet.send(134, "fermer-chateau")
- print("securite du coffre fermer")
- end
- end
- end
- --createur
- if identiter == identiter6 then
- write ("Memo : ")
- memo = read()
- if memo == edit then
- sleep(0.5)
- print ("allumer lampe")
- sleep(0.5)
- print ("eteindre lampe")
- sleep(0.5)
- print ("ouvrir porte securite")
- sleep(0.5)
- print ("fermer porte securite")
- sleep(0.5)
- print ("ouvrir porte anti-incendie")
- sleep(0.5)
- print ("fermer porte anti-incendie")
- sleep(0.5)
- print ("ouvrir laboratoire")
- sleep(0.5)
- print ("fermer laboratoire")
- end
- write ("action : ")
- action = read()
- if action == lampon then
- rednet.send(70, "ouvrir-chateau")
- print("lampe allumer")
- end
- if action == lampoff then
- rednet.send(70, "fermer-chateau")
- print("lampe eteint")
- end
- if action == porteescalier1o then
- rednet.send(68, "ouvrir-chateau")
- print("porte ouverte")
- end
- if action == porteescalier1f then
- rednet.send(68, "fermer-chateau")
- print("porte fermer")
- end
- if action == incendi1open then
- rednet.send(69, "ouvrir-chateau")
- rednet.send(68, "fermer-chateau")
- rednet.send(70, "fermer-chateau")
- rednet.send(105, "fermer-chateau")
- print("securite anti-incendie ouverte")
- end
- if action == incendi1close then
- rednet.send(69, "fermer-chateau")
- rednet.send(68, "ouvrir-chateau")
- rednet.send(70, "ouvrir-chateau")
- rednet.send(105, "ouvrir-chateau")
- print("securite anti-incendie ouverte")
- end
- if action == labopen then
- rednet.send(105, "ouvrir-chateau")
- print("labo ouvert")
- end
- if action == labclose then
- rednet.send(105, "fermer-chateau")
- print("labo fermer")
- end
- if action == coffreopen then
- rednet.send(134, "ouvrir-chateau")
- print("securite du coffre ouverte")
- end
- if action == coffreclose then
- rednet.send(134, "fermer-chateau")
- print("securite du coffre fermer")
- end
- end
- --stop
- sleep(0.5)
- os.reboot()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement