Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function clear()
- term.clear()
- term.setCursorPos(1,1)
- end
- print( "Copyright by TheBommel" )
- print( "Ueberarbeitet by Birog" )
- write( "Es wird nach Updates gesucht... " )
- local response = http.get("http://pastebin.com/raw.php?i=f76ULPSr")
- if response then
- print("Update-suche erfolgreich!")
- local sSource = response.readAll()
- response.close()
- local file = fs.open( "startup", "r" )
- local sTarget = ""
- if file then
- sTarget = file.readAll()
- file.close()
- end
- if sSource ~= sTarget then
- term.write("Updates gefunden!")
- file = fs.open( "startup", "w" )
- file.write( sSource )
- file.close()
- print( "Wurde herruntergeladen als - startup - -Datei")
- print("Programm wird Neugestartet!")
- shell.run("startup")
- return
- else
- print("Es sind keine Updates vorhanden!")
- print("Programm wird gestartet!")
- sleep(3)
- clear()
- end
- else
- clear()
- print("ERROR! Informiere bitte TheBommel!!")
- clear()
- end
- --------------------------------------------------------------------------------------------------------
- rednet.open("top")
- while true do
- local id, msg, dist = rednet.receive()
- if msg == "ron" and id == 270 then
- redstone.setOutput("right", true)
- print(msg)
- rednet.send(287,msg)
- elseif msg == "lon" and id == 270 then
- redstone.setOutput("left", true)
- print(msg)
- rednet.send(287,msg)
- elseif msg == "roff" and id == 270 then
- redstone.setOutput("right", false)
- print(msg)
- rednet.send(287,msg)
- elseif msg == "loff" and id == 270 then
- redstone.setOutput("left", false)
- print(msg)
- rednet.send(287,msg)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement