SHARE
TWEET

SimSoft 4 - Installer

Simlor_GER Jul 6th, 2016 (edited) 1,765 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. --Copyright Simlor (http://www.computercraft.info/forums2/index.php?/user/55655-simlor/) -  Alle Rechte an diesen Programm sind Simlor vorbehalten.
  2.  
  3. --Functions
  4.  
  5. function Clear()
  6.  term.clear()
  7.  term.setCursorPos(1,1)
  8. end
  9.  
  10. function CP(x,y)
  11.  term.setCursorPos(x,y)
  12. end
  13.  
  14. function TC(farbe)
  15.  term.setTextColor(farbe)
  16. end
  17.  
  18. function BC(farbe)
  19.  term.setBackgroundColor(farbe)
  20. end
  21.  
  22.  
  23. --Teil 1
  24.  
  25. BC(256)
  26. Clear()
  27.  
  28. CP(1,1)
  29. BC(128)
  30. print("                                                   ")
  31. print("                                                   ")
  32. print("                                                   ")
  33.  
  34. CP(16,2)
  35. TC(1)
  36. print("SimSoft 4 by Simlor")
  37.  
  38. BC(256)
  39. TC(128)
  40.  
  41. CP(4,6)
  42. print("         New PC-Name -")
  43.  
  44. CP(4,8)
  45. print("    New account name -")
  46.  
  47. CP(4,10)
  48. print("New account password -")
  49.  
  50. CP(47,18)
  51. TC(128)
  52. print("1/2")
  53.  
  54. CP(4,6)
  55. TC(1)
  56. print("         New PC-Name -")
  57. CP(27,6)
  58. TC(1)
  59. pcname = read()
  60. CP(4,6)
  61. TC(128)
  62. print("         New PC-Name -")
  63.  
  64. CP(4,8)
  65. TC(1)
  66. print("    New account name -")
  67. CP(27,8)
  68. TC(1)
  69. name = read()
  70. CP(4,8)
  71. TC(128)
  72. print("    New account name -")
  73.  
  74. CP(4,10)
  75. TC(1)
  76. print("New account password -")
  77. CP(27,10)
  78. TC(1)
  79. pass = read()
  80. CP(4,10)
  81. TC(128)
  82. print("New account password -")
  83.  
  84. --Teil 2
  85.  
  86. BC(256)
  87. Clear()
  88.  
  89. CP(1,1)
  90. BC(128)
  91. print("                                                   ")
  92. print("                                                   ")
  93. print("                                                   ")
  94.  
  95. CP(16,2)
  96. TC(1)
  97. print("SimSoft 4 by Simlor")
  98.  
  99. BC(256)
  100. CP(21,10)
  101. TC(1)
  102. print("Let's go!")
  103. CP(21,11)
  104. TC(128)
  105. print(" [Enter]")
  106.  
  107. BC(256)
  108. CP(2,17)
  109. TC(1)
  110. print("Cancel")
  111. CP(2,18)
  112. TC(128)
  113. print(" [Q]")
  114.  
  115. CP(47,18)
  116. TC(256)
  117. print("2/2")
  118.  
  119. while true do
  120.  
  121.  a, b = os.pullEvent()
  122.  
  123.  while a~= "key" do a,b = os.pullEvent() end
  124.  
  125.  if b == 16 then
  126.   os.reboot()
  127.  end
  128.  
  129.  if b == 28 then
  130.   break
  131.  end
  132. end
  133.  
  134. --Teil 3 - Installer
  135.  
  136. BC(128)
  137. TC(32)
  138. Clear()
  139.  
  140. shell.run("cd /")
  141. fs.delete("SimSoft")
  142. fs.delete("startup")
  143. os.setComputerLabel(pcname)
  144. Clear()
  145.  
  146. BC(256)
  147. Clear()
  148.  
  149. CP(1,1)
  150. BC(128)
  151. print("                                                   ")
  152. print("                                                   ")
  153. print("                                                   ")
  154.  
  155. CP(16,2)
  156. TC(1)
  157. print("SimSoft 4 by Simlor")
  158.  
  159. CP(3,8)
  160. BC(128)
  161. print("                                              ")
  162.  
  163. CP(3,8)
  164. BC(1)
  165. write(" ")
  166.  
  167. local file = fs.open("SimSoft/Data/Config","w")
  168. file.close()
  169.    
  170. local file = fs.open("SimSoft/Data/Config","a")
  171. file.writeLine("true")
  172. file.writeLine("true")
  173. file.writeLine("4.0.1")
  174. file.writeLine("en")
  175. file.close()
  176. --
  177.  
  178. local file = fs.open("SimSoft/Data/User/User1","w")
  179. file.close()
  180. local file = fs.open("SimSoft/Data/User/User1","a")
  181. file.writeLine(name)
  182. file.writeLine(pass)
  183. file.close()
  184.  
  185.  
  186. local file = fs.open("SimSoft/Data/User/User2","w")
  187. file.close()
  188. local file = fs.open("SimSoft/Data/User/User2","a")
  189. file.writeLine("Account 2")
  190. file.writeLine("123")
  191. file.writeLine("false")
  192. file.close()
  193.  
  194.  
  195. local file = fs.open("SimSoft/Data/User/User3","w")
  196. file.close()
  197. local file = fs.open("SimSoft/Data/User/User3","a")
  198. file.writeLine("Account 3")
  199. file.writeLine("123")
  200. file.writeLine("false")
  201. file.close()
  202.  
  203. --
  204.  
  205. write(" ")
  206.  
  207. --
  208.  
  209. local file = fs.open("SimSoft/Daten/SappS/1","w")
  210. file.close()
  211.    
  212. local file = fs.open("SimSoft/Daten/SappS/1","a")
  213. file.writeLine("")
  214. file.writeLine("")
  215. file.writeLine("")
  216. file.writeLine("")
  217. file.writeLine("n")
  218. file.writeLine("false")
  219. file.close()
  220.  
  221. --
  222.  
  223. write(" ")
  224.  
  225. --
  226.  
  227. u = 1
  228.  
  229. while true do
  230.  
  231.  u = (u+1)
  232.  
  233.  fs.copy("SimSoft/Daten/SappS/1", "SimSoft/Daten/SappS/"..u)
  234.  
  235.  if u == 15 then
  236.   break
  237.  end
  238. end
  239.  
  240. local file = fs.open("SimSoft/Daten/SappS/A","w")
  241. file.writeLine("0.0")
  242. file.close()
  243.  
  244. function Download(Pfad, CodePB)
  245.  local datei = http.get("http://pastebin.com/raw/"..CodePB)
  246.  datei = datei.readAll()
  247.  
  248.  local file = fs.open(Pfad, "w")
  249.  file.write(datei)
  250.  file.close()
  251.  write("   ")
  252. end
  253.  
  254. Download("SimSoft/System/Desktop", "4jkJesEk")
  255. Download("SimSoft/System/SappS", "4246xccR")
  256. Download("SimSoft/System/SystemStart", "eUkjR1G3")
  257. Download("SimSoft/Data/DesktopBG", "2psPjAet")
  258. Download("startup", "sZyRc9tY")
  259. Download("SimSoft/System/SystemUpdate", "Yv4VUL6Z")
  260. Download("SimSoft/System/AcManager", "37JX7zEE")
  261.  
  262. print("                      ")
  263.  
  264. sleep(0.8)
  265.  
  266. os.reboot()
  267.  
  268.  
  269.  
  270. --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