Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --SimSoft 4.0.1 Update
- print("Start-Update 4.0.1")
- local cacheBuster = ("%x"):format(math.random(0, 2 ^ 30))
- local datei = http.get("https://pastebin.com/raw/4246xccR" .. "?cb=" .. cacheBuster)
- if not datei then
- BC(256)
- Clear()
- TC(16384)
- print("Please, check you internet connection!")
- print("Or try it later again.")
- sleep(3)
- else
- --Download Function
- function Download(CodePB, Pfad)
- local cacheBuster = ("%x"):format(math.random(0, 2 ^ 30))
- local datei = http.get("https://pastebin.com/raw/" .. textutils.urlEncode(CodePB) .. "?cb=" .. cacheBuster)
- datei = datei.readAll()
- local file = fs.open(Pfad, "w")
- file.write(datei)
- file.close()
- end
- fs.delete("SimSoft/System/SystemUpdate")
- Download("Yv4VUL6Z", "SimSoft/System/SystemUpdate")
- fs.delete("SimSoft/System/SappS")
- Download("4246xccR", "SimSoft/System/SappS")
- file = fs.open("SimSoft/Data/Config","r")
- local fileData = {}
- local line = file.readLine()
- repeat
- table.insert(fileData,line)
- line = file.readLine()
- until line == nil
- file.close()
- a = fileData[1]
- b = fileData[2]
- version = "4.0.1"
- sprache = fileData[4]
- local file = fs.open("SimSoft/Data/Config","w")
- file.close()
- local file = fs.open("SimSoft/Data/Config","a")
- file.writeLine(a)
- file.writeLine(b)
- file.writeLine(version)
- file.writeLine(sprache)
- file.close()
- end
- --end
Add Comment
Please, Sign In to add comment