Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[ ### Hier bitte nix mehr machen außer du weißt was du machst! ###
- function clear()
- term.clear()
- term.setCursorPos(1,1)
- end
- print( "Copyright by Birog" )
- write( "Es wird nach Updates gesucht... " )
- local response = http.get("http://pastebin.com/raw.php?i=EhTQMcyC")
- 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 Birog!!")
- clear()
- end]]
- -------------------------------------------------------------------------------------------------------------------
- moniside = "right"
- --
- redout = "left"
- --
- Info = "Schild"
- --
- adminpass = "5555"
- term = peripheral.wrap(moniside)
- local pullEvent = os.pullEvent
- os.pullEvent = os.pullEventRaw
- function AnzeigeAus()
- term.setCursorPos(2,1)
- term.setBackgroundColor(colors.red)
- term.write(" ")
- term.setBackgroundColor(colors.black)
- term.setCursorPos(3,1)
- term.setBackgroundColor(colors.red)
- term.write("O")
- term.setBackgroundColor(colors.black)
- term.setCursorPos(4,1)
- term.setBackgroundColor(colors.red)
- term.write("F")
- term.setBackgroundColor(colors.black)
- term.setCursorPos(5,1)
- term.setBackgroundColor(colors.red)
- term.write("F")
- term.setBackgroundColor(colors.black)
- term.setCursorPos(6,1)
- term.setBackgroundColor(colors.red)
- term.write(" ")
- term.setBackgroundColor(colors.black)
- end
- function AnzeigeEin()
- term.setCursorPos(2,1)
- term.setBackgroundColor(colors.green)
- term.write(" ")
- term.setBackgroundColor(colors.black)
- term.setCursorPos(3,1)
- term.setBackgroundColor(colors.green)
- term.write("O")
- term.setBackgroundColor(colors.black)
- term.setCursorPos(4,1)
- term.setBackgroundColor(colors.green)
- term.write("N")
- term.setBackgroundColor(colors.black)
- term.setCursorPos(5,1)
- term.setBackgroundColor(colors.green)
- term.write(" ")
- term.setBackgroundColor(colors.black)
- term.setCursorPos(6,1)
- term.setBackgroundColor(colors.green)
- term.write(" ")
- term.setBackgroundColor(colors.black)
- end
- function Rahmen()
- term.clear()
- term.setTextColor(colors.white)
- -- Information
- term.setCursorPos(2,2)
- term.setBackgroundColor(colors.blue)
- term.write("Hello")
- term.setBackgroundColor(colors.black)
- -- Anzeige
- term.setCursorPos(2,1)
- term.setBackgroundColor(colors.orange)
- term.write(" ")
- term.setBackgroundColor(colors.black)
- term.setCursorPos(3,1)
- term.setBackgroundColor(colors.orange)
- term.write(" ")
- term.setBackgroundColor(colors.black)
- term.setCursorPos(4,1)
- term.setBackgroundColor(colors.orange)
- term.write(" ")
- term.setBackgroundColor(colors.black)
- term.setCursorPos(5,1)
- term.setBackgroundColor(colors.orange)
- term.write(" ")
- term.setBackgroundColor(colors.black)
- term.setCursorPos(6,1)
- term.setBackgroundColor(colors.orange)
- term.write(" ")
- term.setBackgroundColor(colors.black)
- -- Einschalten
- term.setCursorPos(2,3)
- term.setBackgroundColor(colors.green)
- term.write(" ")
- term.setBackgroundColor(colors.black)
- term.setCursorPos(2,4)
- term.setBackgroundColor(colors.green)
- term.write(" ")
- term.setBackgroundColor(colors.black)
- term.setCursorPos(2,5)
- term.setBackgroundColor(colors.green)
- term.write(" ")
- term.setBackgroundColor(colors.black)
- term.setCursorPos(3,3)
- term.setBackgroundColor(colors.green)
- term.write(" ")
- term.setBackgroundColor(colors.black)
- term.setCursorPos(3,4)
- term.setBackgroundColor(colors.green)
- term.write(" ")
- term.setBackgroundColor(colors.black)
- term.setCursorPos(3,5)
- term.setBackgroundColor(colors.green)
- term.write(" ")
- term.setBackgroundColor(colors.black)
- -- Ausschalten
- term.setCursorPos(5,3)
- term.setBackgroundColor(colors.red)
- term.write(" ")
- term.setBackgroundColor(colors.black)
- term.setCursorPos(5,4)
- term.setBackgroundColor(colors.red)
- term.write(" ")
- term.setBackgroundColor(colors.black)
- term.setCursorPos(5,5)
- term.setBackgroundColor(colors.red)
- term.write(" ")
- term.setBackgroundColor(colors.black)
- term.setCursorPos(6,3)
- term.setBackgroundColor(colors.red)
- term.write(" ")
- term.setBackgroundColor(colors.black)
- term.setCursorPos(6,4)
- term.setBackgroundColor(colors.red)
- term.write(" ")
- term.setBackgroundColor(colors.black)
- term.setCursorPos(6,5)
- term.setBackgroundColor(colors.red)
- term.write(" ")
- term.setBackgroundColor(colors.black)
- end
- function Eingabe()
- event,side,x,y = os.pullEvent()
- if event == "terminate" then
- write("Admin Passwort:")
- admin = read("*")
- if admin == adminpass then
- os.pullEvent = pullEvent
- write("Richtig! Mache jetzt nochmal STRG + T für 4 sec")
- sleep(5)
- end
- end
- if event == "monitor_touch" then
- if x == 2 and y == 2 or
- x == 2 and y == 3 or
- x == 2 and y == 4 or
- x == 3 and y == 2 or
- x == 3 and y == 3 or
- x == 3 and y == 4 then
- redstone.setOutput(redout, true)
- -- redstone.setOutput(redout2, false)
- AnzeigeEin()
- end
- if x == 5 and y == 2 or
- x == 5 and y == 3 or
- x == 5 and y == 4 or
- x == 6 and y == 2 or
- x == 6 and y == 3 or
- x == 6 and y == 4 then
- redstone.setOutput(redout, false)
- -- redstone.setOutput(redout2, true)
- AnzeigeAus()
- end
- end
- end
- redstone.setOutput(redout, false)
- Rahmen()
- while true do
- Eingabe()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement