SHOW:
|
|
- or go back to the newest paste.
1 | local m = peripheral.wrap("top") | |
2 | - | print("Passwort:") |
2 | + | m.setTextScale(2) |
3 | - | Passw = io.read() |
3 | + | m.setCursorPos(1, 1) |
4 | - | if Passw == "DB" then |
4 | + | m.write("Passwort:") |
5 | - | rs.setOutput("left",true) |
5 | + | m.setCursorPos(1, 2) |
6 | - | term.clear() |
6 | + | m.write("1") |
7 | - | sleep(3) |
7 | + | m.setCursorPos(2, 2) |
8 | - | rs.setOutput("left",false) |
8 | + | m.write("2") |
9 | - | shell.run("reboot") |
9 | + | m.setCursorPos(3, 2) |
10 | - | |
10 | + | m.write("3") |
11 | - | else |
11 | + | m.setCursorPos(1, 3) |
12 | - | term.clear() |
12 | + | m.write("4") |
13 | - | term.setCursorPos(1, 1) |
13 | + | m.setCursorPos(2, 3) |
14 | - | print("falsches Passwort") |
14 | + | m.write("5") |
15 | - | shell.run("reboot") |
15 | + | m.setCursorPos(3, 3) |
16 | m.write("6") | |
17 | m.setCursorPos(1, 4) | |
18 | m.write("7") | |
19 | m.setCursorPos(2, 4) | |
20 | m.write("8") | |
21 | m.setCursorPos(3, 4) | |
22 | m.write("9") | |
23 | while true do | |
24 | event,side,x,y = os.pullEvent() | |
25 | if event == "monitor_touch" then | |
26 | if x == 1 and y == 2 then | |
27 | set CursorPos(1, 1) | |
28 | m.write("1") | |
29 | end | |
30 | end |