Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local modem = peripheral.wrap ("top")
- modem.open (105)
- print ("Veuillez entrer le nom des abeilles dans la magic box !")
- print (" ")
- local abeille1 = read ()
- local abeille2 = read ()
- print ("Veuillez comfirmer votre choix en appuiant sur [ENTREE]")
- while true do
- if os.pullEvent("key","enter") then
- if abeille1 == "nom_de_labeille1" then
- if abeille2 == "nom_de_labeille2" then
- modem.transmit (105, 105,"bonne_reponse")
- end
- else
- print ("FAUX !")
- os.reboot ()
- end
- end
- end
- elseif abeille1 == "nom_de_labeille2" then
- if abeille2 == "nom_de_labeille1" then
- modem.transmit (105, 105,"bonne_reponse")
- end
- else
- print ("FAUX !")
- os.reboot ()
- end
- end
- end
- elseif os.pullEvent ("terminate") then
- os.reboot ()
- else
- print ("FAUX !")
- os.reboot
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment