SHOW:
|
|
- or go back to the newest paste.
1 | - | sleep(1) |
1 | + | function clear() |
2 | term.clear() | |
3 | - | sleep(1) |
3 | + | term.setCursorPos(1,1) |
4 | end | |
5 | print( "Copyright by Birog" ) | |
6 | write( "Es wird nach Updates gesucht... " ) | |
7 | local response = http.get("http://pastebin.com/raw.php?i=rf8SZAS7") | |
8 | if response then | |
9 | print("Update-suche erfolgreich!") | |
10 | local sSource = response.readAll() | |
11 | response.close() | |
12 | local file = fs.open( "startup", "r" ) | |
13 | local sTarget = "" | |
14 | if file then | |
15 | sTarget = file.readAll() | |
16 | file.close() | |
17 | end | |
18 | if sSource ~= sTarget then | |
19 | term.write("Updates gefunden!") | |
20 | file = fs.open( "startup", "w" ) | |
21 | file.write( sSource ) | |
22 | file.close() | |
23 | print( "Wurde herruntergeladen als - startup - -Datei") | |
24 | print("Programm wird Neugestartet!") | |
25 | shell.run("startup") | |
26 | return | |
27 | else | |
28 | print("Es sind keine Updates vorhanden!") | |
29 | print("Programm wird gestartet!") | |
30 | sleep(3) | |
31 | clear() | |
32 | end | |
33 | else | |
34 | clear() | |
35 | print("ERROR! Informiere bitte Birog!!") | |
36 | clear() | |
37 | end | |
38 | rednet.open("right") | |
39 | print(os.getComputerLabel().." ID "..os.getComputerID()) | |
40 | clear() | |
41 | print("Warten auf Arbeit ") | |
42 | y,x,z = rednet.receive() | |
43 | if y == 3498 then | |
44 | print("Daten empfangen") | |
45 | if x == "3x3" then | |
46 | shell.run("Tunnel3x3 32") | |
47 | elseif x == "4x5" then | |
48 | shell.run("Tunnel4x5 32") | |
49 | elseif x == "update" then | |
50 | print("Programm Update, bitte warten") | |
51 | end | |
52 | end |