Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local pullEvent = os.pullEvent
- os.pullEvent = os.pullEventRaw
- idAVE = 2 -- Ordi Avant Arriere Escalier
- idGDE= 3 -- Ordi Gauche Droite Escalier
- idGDP = 4 -- Ordi Gauche Droite Planche
- idMDP = 5 -- Ordi Monter Dessante Planche
- idMDE = 6 -- Ordi Monter Dessante Escalier
- rednet.open("back")
- term.setTextColor(colors.red)
- print("Veiller saisir l'Action:")
- term.setTextColor(colors.blue)
- print(". fermer")
- print(". ouvrir")
- print(". code")
- term.setTextColor(colors.gray)
- ONNN = "ouvrir"
- OFFF = "fermer"
- code = "R9"
- time = read()
- if time == ONNN or time == OFFF or time == "code" then
- if time == ONNN then
- rednet.send(idAVE,"On")
- rednet.send(idMDP,"On")
- sleep(2)
- rednet.send(idGDP,"On")
- sleep(2)
- rednet.send(idGDE,"On")
- sleep(3)
- rednet.send(idMDE,"On")
- sleep(2)
- os.reboot()
- end
- if time == OFFF then
- rednet.send(idMDE,"Off")
- sleep(1)
- rednet.send(idGDE,"Off")
- sleep(2)
- rednet.send(idGDP,"Off")
- sleep(2)
- rednet.send(idMDP,"Off")
- rednet.send(idAVE,"Off")
- sleep(2)
- os.reboot()
- end
- if time == "code" then
- time = read("*")
- if time == code then
- else
- os.reboot()
- end
- end
- else
- os.reboot()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement