Advertisement
Simlor_GER

SimSoft 2.1 (English) - UpdateSystem

Feb 26th, 2016
514
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.81 KB | None | 0 0
  1. --Alle Rechte an SimSoft 2.1 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 2.1 - 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/User","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[5]
  33.  
  34. print("Clint os version: "..SS2V)
  35.  
  36. --Update Datei wird geladen
  37. CP(2,8)
  38. print("Load update details")
  39.  
  40. CP(1,9)
  41. TC(128)
  42. shell.run("pastebin get DrUiPUvq SimSoft/Daten/UpdateCheck/S")
  43.  
  44. CP(2,9)
  45. TC(256)
  46.  
  47. file = fs.open("SimSoft/Daten/UpdateCheck/S","r")
  48. local fileData = {}
  49. local line = file.readLine()
  50. repeat
  51. table.insert(fileData,line)
  52. line = file.readLine()
  53. until line == nil
  54. file.close()
  55.  
  56. v = fileData[1]
  57.  
  58. if v == SS2V then
  59. print("The latest version is already")
  60. CP(2,10)
  61. print("installed")
  62. TC(1)
  63. CP(2,11)
  64. print("Please wait...")
  65. sleep(4)
  66. fs.delete("SimSoft/Daten/UpdateCheck/S")
  67. print(" System reboot...")
  68. sleep(0.2)
  69. os.reboot()
  70. else
  71. print("Updates are installed...")
  72. sleep(2)
  73. BC(32768)
  74. TC(1)
  75. Clear()
  76. print("SimSoft 2.1 Update Console 2")
  77.  
  78. a = 1
  79.  
  80. while true do
  81. a = (a+3)
  82. v = fileData[a]
  83.  
  84. if v == SS2V then
  85. break
  86. end
  87. end
  88.  
  89. a = (a+1)
  90. l = fileData[a]
  91.  
  92. shell.run("pastebin get "..l.." SimSoft/Daten/UpdateCheck/version")
  93. shell.run("SimSoft/Daten/UpdateCheck/version")
  94.  
  95. fs.delete("SimSoft/Daten/UpdateCheck/S")
  96. print("System reboot...")
  97. sleep(0.2)
  98. os.reboot()
  99. end
  100.  
  101. --End
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement