Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --SappS Installer - by SimlorLP
- --Bitte nichts aendern!
- --Functionen
- --SappSInstaller
- function SappSInstaller(name,farbe,ver,loesch)
- term.setBackgroundColor(128)
- term.setTextColor(1)
- shell.run("clear")
- print("Installer wird gestartet.")
- --Absicherung
- file = fs.open("SimSoft/Daten/SappS/A","r")
- local fileData = {}
- local line = file.readLine()
- repeat
- table.insert(fileData,line)
- line = file.readLine()
- until line == nil
- file.close()
- anz = fileData[1]
- anz = (anz+1)
- anz = (anz-1)
- if anz >= 15 then
- print("Zu viele SappS")
- sleep(1)
- shell.run("SimSoft/System/Desktop")
- else
- anz = (anz+1)
- local file = fs.open("SimSoft/Daten/SappS/A","w")
- file.writeLine(anz)
- file.close()
- local file = fs.open("SimSoft/Daten/SappS/"..anz,"w")
- file.close()
- local file = fs.open("SimSoft/Daten/SappS/"..anz,"a")
- file.writeLine(name)
- file.writeLine(anz)
- file.writeLine(farbe)
- file.writeLine("")
- file.writeLine(ver)
- file.writeLine(loesch)
- file.close()
- end
- end
- --ABSCHNITT 1
- shell.run("pastebin get Mm5hd97E SimSoft/SappS/SketchOrdner/Sketch")
- --ABSCHNITT 2
- SappSInstaller("Sketch",7.0,"SketchOrdner/Sketch","SketchOrdner")
- --Ende
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement