SHARE
TWEET

SimSoft 3 - SystemUpdate

Simlor_GER Mar 29th, 2016 (edited) 206 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. --Alle Rechte an SimSoft 3 sind "SimlorLP" (oder in Minecraft auch nur "Simlor") vorbehalten.
  2. BC(128)
  3. TC(1)
  4. Clear()
  5. BC(32768)
  6.  
  7. print("                                                   ")
  8. print("                                                   ")
  9. print("                                                   ")
  10.  
  11. CP(15,2)
  12. print("SimSoft 3 - OS update")
  13.  
  14. TC(1)
  15. BC(128)
  16. CP(4,5)
  17. print("Update console")
  18.  
  19. TC(256)
  20.  
  21. --Version des eigenen OS
  22. CP(2,7)
  23. file = fs.open("SimSoft/Daten/Config","r")
  24. local fileData = {}
  25. local line = file.readLine()
  26. repeat
  27. table.insert(fileData,line)
  28. line = file.readLine()
  29. until line == nil
  30. file.close()
  31.  
  32. SS2V = fileData[3]
  33.  
  34. print("Clint os version: "..SS2V)
  35.  
  36. --Update Datei wird geladen
  37. CP(2,8)
  38. print("Load update details")
  39.  
  40. local datei = http.get("http://pastebin.com/raw/LZch2Xnt")
  41. datei = datei.readAll()
  42.  
  43. local file = fs.open("SimSoft/Daten/UpdateCheck/S","w")
  44. file.writeLine(datei)
  45. file.close()
  46.  
  47. CP(2,9)
  48. TC(256)
  49.  
  50. file = fs.open("SimSoft/Daten/UpdateCheck/S","r")
  51. local fileData = {}
  52. local line = file.readLine()
  53. repeat
  54. table.insert(fileData,line)
  55. line = file.readLine()
  56. until line == nil
  57. file.close()
  58.  
  59. v = fileData[1]
  60.  
  61. if v == SS2V then
  62.  print("The latest version is already")
  63.  CP(2,10)
  64.  print("installed")
  65.  TC(1)
  66.  CP(2,11)
  67.  print("Please wait...")
  68.  sleep(4)
  69.  fs.delete("SimSoft/Daten/UpdateCheck/S")
  70.  print(" System reboot...")
  71.  sleep(0.2)
  72.  os.reboot()
  73. else
  74.  print("Updates are installed...")
  75.  sleep(2)
  76.  BC(32768)
  77.  TC(1)
  78.  Clear()
  79.  print("SimSoft 2.1 Update Console 2")
  80.  
  81.  a = 1
  82.  
  83.  while true do
  84.   a = (a+3)
  85.   v = fileData[a]
  86.  
  87.   if v == SS2V then
  88.    break
  89.   end
  90.  end
  91.  
  92.  a = (a+1)
  93.  l = fileData[a]
  94.  
  95.  local datei = http.get("http://pastebin.com/raw/"..l)
  96.  datei = datei.readAll()
  97.  
  98.  local file = fs.open("SimSoft/Daten/UpdateCheck/version","w")
  99.  file.writeLine(datei)
  100.  file.close()
  101.  
  102.  shell.run("SimSoft/Daten/UpdateCheck/version")
  103.  
  104.  fs.delete("SimSoft/Daten/UpdateCheck/S")
  105.  print("System reboot...")
  106.  sleep(0.2)
  107.  os.reboot()
  108. end
  109.  
  110. --End
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top