SHOW:
|
|
- or go back to the newest paste.
| 1 | - | local password1 = "monde1" |
| 1 | + | local password1 = "nether" |
| 2 | - | local password2 = "monde2" |
| 2 | + | local password2 = "dense" |
| 3 | - | local password3 = "dense" |
| 3 | + | local password3 = "twilight" |
| 4 | term.clear() | |
| 5 | sleep(1) | |
| 6 | print("Bienvenue a la gare FTF ! ")
| |
| 7 | print(" ")
| |
| 8 | print("Appuyez sur le bouton a votre droite apres avoir choisi une destination")
| |
| 9 | print(" ")
| |
| 10 | print("Ne modifiez pas la vitesse de la locomotive, celle ci pourrait vous tuer dans un virage")
| |
| 11 | print(" ")
| |
| 12 | - | print("Destinations disponibles : monde1, monde2, dense")
|
| 12 | + | print("Destinations disponibles : nether, dense, twilight")
|
| 13 | print(" ")
| |
| 14 | write("Destination: ")
| |
| 15 | local input = read("*")
| |
| 16 | if input == password1 then | |
| 17 | term.clear() | |
| 18 | term.setCursorPos(1,1) | |
| 19 | print("OK!")
| |
| 20 | rs.setOutput("left", true)
| |
| 21 | sleep(40) | |
| 22 | rs.setOutput("left", false)
| |
| 23 | os.reboot() | |
| 24 | end | |
| 25 | if input == password2 then | |
| 26 | term.clear() | |
| 27 | term.setCursorPos(1,1) | |
| 28 | print("OK!")
| |
| 29 | rs.setOutput("right", true)
| |
| 30 | sleep(40) | |
| 31 | rs.setOutput("right", false)
| |
| 32 | os.reboot() | |
| 33 | end | |
| 34 | if input == password3 then | |
| 35 | term.clear() | |
| 36 | term.setCursorPos(1,1) | |
| 37 | print("OK!")
| |
| 38 | rs.setOutput("back", true)
| |
| 39 | sleep(40) | |
| 40 | rs.setOutput("back", false)
| |
| 41 | os.reboot() | |
| 42 | end | |
| 43 | if input == passwordadmin then | |
| 44 | term.clear() | |
| 45 | term.setCursorPos(1,1) | |
| 46 | print("Password correct!")
| |
| 47 | print("Computer unlocking...")
| |
| 48 | print("Please type 'reboot' or 'shutdown' before leaving")
| |
| 49 | os.pullEvent(terminate) | |
| 50 | ||
| 51 | else | |
| 52 | term.clear() | |
| 53 | term.setCursorPos(1,1) | |
| 54 | print("Destination inconnue. Reessayez.")
| |
| 55 | sleep(3) | |
| 56 | os.reboot() | |
| 57 | end |