Simlor_GER

SimSoft Yellow Installer - < 1.7.10

Sep 18th, 2017 (edited)
2,041
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.69 KB | None | 0 0
  1. --SimSoft Yellow - Copyright by Simlor (http://www.computercraft.info/forums2/index.php?/user/55655-simlor/)
  2.  
  3. --Installer
  4.  
  5. --Functions
  6.  
  7. function Clear()
  8. term.clear()
  9. term.setCursorPos(1,1)
  10. end
  11.  
  12. function CP(x,y)
  13. term.setCursorPos(x,y)
  14. end
  15.  
  16. function BC(farbe)
  17. term.setBackgroundColor(farbe)
  18. end
  19.  
  20. function TC(farbe)
  21. term.setTextColor(farbe)
  22. end
  23.  
  24.  
  25. function SimSoftClear(anzeige)
  26.  
  27. BC(1)
  28. Clear()
  29.  
  30. w, h = term.getSize()
  31.  
  32. wC = 0
  33. hC = 1
  34.  
  35. while true do
  36.  
  37. wC = (wC+1)
  38.  
  39. CP(wC, hC)
  40. BC(SystemColor)
  41. write(" ")
  42.  
  43. if wC == w then
  44. if hC == 3 then
  45. break
  46. else
  47. hC = (hC+1)
  48. wC = 0
  49. end
  50. end
  51.  
  52. end
  53.  
  54. TC(1)
  55. CP(((w/2)-((#anzeige)/2)),2)
  56.  
  57. print(anzeige)
  58.  
  59. end
  60.  
  61. --FlshDep
  62.  
  63. BC(32768)
  64. Clear()
  65. sleep(0.1)
  66. BC(128)
  67. Clear()
  68. sleep(0.1)
  69. BC(256)
  70. Clear()
  71. sleep(0.1)
  72. BC(1)
  73. Clear()
  74. sleep(0.1)
  75.  
  76. --Variablen
  77.  
  78. SystemColor = 16
  79.  
  80. --System
  81.  
  82. w, h = term.getSize()
  83.  
  84. SimSoftClear(" SimSoft Yellow")
  85.  
  86. BC(SystemColor)
  87. TC(1)
  88.  
  89. CP(10,10)
  90. print(" ")
  91. CP(10,11)
  92. print(" English ")
  93. CP(10,12)
  94. print(" ")
  95.  
  96. CP((w-20),10)
  97. print(" ")
  98. CP((w-20),11)
  99. print(" Deutsch ")
  100. CP((w-20),12)
  101. print(" ")
  102.  
  103. while true do
  104.  
  105. event, side, x, y = os.pullEvent()
  106. if event == "mouse_click" then
  107.  
  108.  
  109. if x >= 10 and x <= 20 and y >= 10 and y <= 12 then
  110. sprache = "english"
  111. break
  112.  
  113. end
  114.  
  115. if x >= (w-20) and x <= (w-10) and y >= 10 and y <= 12 then
  116. sprache = "german"
  117. break
  118.  
  119. end
  120.  
  121. end
  122.  
  123. end
  124.  
  125.  
  126. SimSoftClear(" SimSoft Yellow")
  127.  
  128. function ColorAuswahl()
  129.  
  130. BC(4)
  131. CP(15,7)
  132. print(" ")
  133. CP(15,8)
  134. print(" ")
  135.  
  136. BC(8)
  137. CP(19,7)
  138. print(" ")
  139. CP(19,8)
  140. print(" ")
  141.  
  142. BC(16)
  143. CP(23,7)
  144. print(" ")
  145. CP(23,8)
  146. print(" ")
  147.  
  148. BC(32)
  149. CP(27,7)
  150. print(" ")
  151. CP(27,8)
  152. print(" ")
  153.  
  154. BC(64)
  155. CP(31,7)
  156. print(" ")
  157. CP(31,8)
  158. print(" ")
  159.  
  160. BC(512)
  161. CP(35,7)
  162. print(" ")
  163. CP(35,8)
  164. print(" ")
  165.  
  166. --
  167.  
  168. BC(2)
  169. CP(15,10)
  170. print(" ")
  171. CP(15,11)
  172. print(" ")
  173.  
  174. BC(2048)
  175. CP(19,10)
  176. print(" ")
  177. CP(19,11)
  178. print(" ")
  179.  
  180. BC(4096)
  181. CP(23,10)
  182. print(" ")
  183. CP(23,11)
  184. print(" ")
  185.  
  186. BC(8192)
  187. CP(27,10)
  188. print(" ")
  189. CP(27,11)
  190. print(" ")
  191.  
  192. BC(16384)
  193. CP(31,10)
  194. print(" ")
  195. CP(31,11)
  196. print(" ")
  197.  
  198. BC(1024)
  199. CP(35,10)
  200. print(" ")
  201. CP(35,11)
  202. print(" ")
  203.  
  204. BC(SystemColor)
  205. TC(1)
  206.  
  207. if sprache == "german" then
  208.  
  209. CP(15,14)
  210. print(" ")
  211. CP(15,15)
  212. print(" Weiter ")
  213. CP(15,16)
  214. print(" ")
  215.  
  216. elseif sprache == "english" then
  217.  
  218. CP(15,14)
  219. print(" ")
  220. CP(15,15)
  221. print(" Continue ")
  222. CP(15,16)
  223. print(" ")
  224.  
  225. end
  226. end
  227.  
  228. ColorAuswahl()
  229.  
  230. while true do
  231.  
  232. event, side, x, y = os.pullEvent()
  233. if event == "mouse_click" then
  234.  
  235.  
  236. if x >= 15 and x <= 16 and y >= 7 and y <= 8 then
  237. SystemColor = 4
  238. SimSoftClear(" SimSoft Yellow")
  239. ColorAuswahl()
  240. end
  241.  
  242. if x >= 19 and x <= 20 and y >= 7 and y <= 8 then
  243. SystemColor = 8
  244. SimSoftClear(" SimSoft Yellow")
  245. ColorAuswahl()
  246. end
  247.  
  248. if x >= 23 and x <= 24 and y >= 7 and y <= 8 then
  249. SystemColor = 16
  250. SimSoftClear(" SimSoft Yellow")
  251. ColorAuswahl()
  252. end
  253.  
  254. if x >= 27 and x <= 28 and y >= 7 and y <= 8 then
  255. SystemColor = 32
  256. SimSoftClear(" SimSoft Yellow")
  257. ColorAuswahl()
  258. end
  259.  
  260. if x >= 31 and x <= 32 and y >= 7 and y <= 8 then
  261. SystemColor = 64
  262. SimSoftClear(" SimSoft Yellow")
  263. ColorAuswahl()
  264. end
  265.  
  266. if x >= 35 and x <= 36 and y >= 7 and y <= 8 then
  267. SystemColor = 512
  268. SimSoftClear(" SimSoft Yellow")
  269. ColorAuswahl()
  270. end
  271.  
  272. --
  273.  
  274. if x >= 15 and x <= 16 and y >= 10 and y <= 11 then
  275. SystemColor = 2
  276. SimSoftClear(" SimSoft Yellow")
  277. ColorAuswahl()
  278. end
  279.  
  280. if x >= 19 and x <= 20 and y >= 10 and y <= 11 then
  281. SystemColor = 2048
  282. SimSoftClear(" SimSoft Yellow")
  283. ColorAuswahl()
  284. end
  285.  
  286. if x >= 23 and x <= 24 and y >= 10 and y <= 11 then
  287. SystemColor = 4096
  288. SimSoftClear(" SimSoft Yellow")
  289. ColorAuswahl()
  290. end
  291.  
  292. if x >= 27 and x <= 28 and y >= 10 and y <= 11 then
  293. SystemColor = 8192
  294. SimSoftClear(" SimSoft Yellow")
  295. ColorAuswahl()
  296. end
  297.  
  298. if x >= 31 and x <= 32 and y >= 10 and y <= 11 then
  299. SystemColor = 16384
  300. SimSoftClear(" SimSoft Yellow")
  301. ColorAuswahl()
  302. end
  303.  
  304. if x >= 35 and x <= 36 and y >= 10 and y <= 11 then
  305. SystemColor = 1024
  306. SimSoftClear(" SimSoft Yellow")
  307. ColorAuswahl()
  308. end
  309.  
  310. if x >= 15 and x <= 36 and y >= 14 and y <= 16 then
  311. break
  312. end
  313.  
  314. end
  315.  
  316. end
  317.  
  318. SimSoftClear(" SimSoft Yellow")
  319.  
  320. if sprache == "german" then
  321.  
  322. e1 = "Nutzername"
  323. e2 = " Passwort"
  324. e3 = " PC-Name"
  325.  
  326. e4 = " Installieren "
  327. e5 = " "
  328.  
  329. e6 = "Exit"
  330. e7 = "Sicher?"
  331. e8 = "Bist Du Dir Wirklich Sicher?"
  332. e9 = "Komm Schon... :("
  333. e10 = "Dann geh halt..."
  334.  
  335. elseif sprache == "english" then
  336.  
  337. e1 = " Username"
  338. e2 = " Password"
  339. e3 = " PC-Name"
  340.  
  341. e4 = " Install "
  342. e5 = " "
  343.  
  344. e6 = "Quit"
  345. e7 = "Sure?"
  346. e8 = "Are You Really Sure?"
  347. e9 = "Come On... :("
  348. e10 = "Then go out..."
  349.  
  350. end
  351.  
  352. BC(1)
  353. TC(128)
  354.  
  355. CP(4,7)
  356. print(e1)
  357.  
  358. CP(4,9)
  359. print(e2)
  360.  
  361. CP(4,11)
  362. print(e3)
  363.  
  364. TC(SystemColor)
  365.  
  366. CP(15,7)
  367. name = read()
  368.  
  369. CP(15,9)
  370. pass = read("#")
  371.  
  372. CP(15,11)
  373. pcname = read()
  374.  
  375.  
  376. SimSoftClear(" SimSoft Yellow")
  377.  
  378. BC(SystemColor)
  379. TC(1)
  380.  
  381. CP(((w/2)-8),9)
  382. print(e5)
  383. CP(((w/2)-8),10)
  384. print(e4)
  385. CP(((w/2)-8),11)
  386. print(e5)
  387.  
  388. TC(256)
  389. BC(1)
  390. CP(3,(h-1))
  391. print(e6)
  392.  
  393. est = 1
  394.  
  395. while true do
  396.  
  397. event, side, x, y = os.pullEvent()
  398. if event == "mouse_click" then
  399.  
  400.  
  401. if x >= ((w/2)-9) and x <= ((#e5)+((w/2)-9)) and y >= 9 and y <= 11 then
  402. break
  403. end
  404.  
  405. if x >= 3 and x <= 6 and y == (h-1) and est == 1 then
  406. est = 2
  407.  
  408. BC(1)
  409. TC(256)
  410.  
  411. CP(3, (h-1))
  412. print(" ")
  413.  
  414. CP(34,5)
  415. print(e7)
  416. end
  417.  
  418. if x >= 34 and x <= (34+((#e7)-1)) and y == 5 and est == 2 then
  419. est = 3
  420.  
  421. BC(1)
  422. TC(256)
  423.  
  424. CP(34,5)
  425. print(" ")
  426.  
  427. CP(20,16)
  428. print(e8)
  429. end
  430.  
  431. if x >= 20 and x <= (20+((#e8)-1)) and y == 16 and est == 3 then
  432. est = 4
  433.  
  434. BC(1)
  435. TC(256)
  436.  
  437. CP(20,16)
  438. print(" ")
  439.  
  440. CP(2,5)
  441. print(e9)
  442. end
  443.  
  444. if x >= 2 and x <= (2+((#e9)-1)) and y == 5 and est == 4 then
  445. est = 5
  446.  
  447. BC(1)
  448. TC(256)
  449.  
  450. CP(2,5)
  451. print(" ")
  452.  
  453. CP(5,13)
  454. print(e10)
  455. end
  456.  
  457. if x >= 5 and x <= (5+((#e10)-1)) and y == 13 and est == 5 then
  458.  
  459. os.reboot()
  460.  
  461. end
  462.  
  463.  
  464.  
  465. end
  466.  
  467. end
  468.  
  469.  
  470. function Download(CodePB, Pfad)
  471. local cacheBuster = ("%x"):format(math.random(0, 2 ^ 30))
  472. local datei = http.get("https://pastebin.com/raw/" .. textutils.urlEncode(CodePB) .. "?cb=" .. cacheBuster)
  473.  
  474. datei = datei.readAll()
  475.  
  476. local file = fs.open(Pfad, "w")
  477. file.write(datei)
  478. file.close()
  479. write(" ")
  480.  
  481. end
  482.  
  483. SimSoftClear(" SimSoft Yellow")
  484.  
  485. BC(256)
  486. CP(10,10)
  487. print(" ")
  488.  
  489. CP(10,10)
  490.  
  491. BC(SystemColor)
  492.  
  493. write(" ")
  494.  
  495. fs.delete("startup")
  496. fs.delete("SimSoft")
  497.  
  498. if sprache == "english" then
  499.  
  500. Download("dcjj6U0K","startup")
  501. Download("sLdeYQHx","SimSoft/System/Desktop")
  502. Download("VBjNd2NS","SimSoft/System/SystemStart")
  503. Download("jALaL4ap","SimSoft/System/Update")
  504. Download("zNnJ9UU7","SimSoft/System/AppStore")
  505.  
  506. elseif sprache == "german" then
  507.  
  508. Download("dcjj6U0K","startup")
  509. Download("TcDnMcBC","SimSoft/System/Desktop")
  510. Download("dt27J7kG","SimSoft/System/SystemStart")
  511. Download("LUX6HVMy","SimSoft/System/Update")
  512. Download("iSCumw3S","SimSoft/System/AppStore")
  513.  
  514. end
  515.  
  516. --BackgroundParty
  517.  
  518. Download("YWxbZmJ5","SimSoft/Data/Background")
  519.  
  520. --end BackgroundParty
  521.  
  522.  
  523. local file = fs.open("SimSoft/Data/BackgroundConfig", "w")
  524.  
  525. file.writeLine("SimSoft Background Config")
  526. file.writeLine("")
  527. file.writeLine("true")
  528.  
  529. file.close()
  530.  
  531. write(" ")
  532.  
  533. local file = fs.open("SimSoft/Data/SystemColor", "w")
  534.  
  535. file.writeLine("SimSoft System Color")
  536. file.writeLine("")
  537. file.writeLine(SystemColor)
  538.  
  539. file.close()
  540.  
  541. write(" ")
  542.  
  543. local file = fs.open("SimSoft/Data/UserData", "w")
  544.  
  545. file.writeLine("SimSoft User Data")
  546. file.writeLine("")
  547. file.writeLine(name)
  548. file.writeLine(pass)
  549. file.writeLine("true")
  550.  
  551. file.close()
  552.  
  553. write(" ")
  554.  
  555. local file = fs.open("SimSoft/Data/Version", "w")
  556.  
  557. file.writeLine("SimSoft System Version")
  558. file.writeLine("")
  559. file.writeLine("5.0.2")
  560. file.writeLine(sprache)
  561.  
  562. file.close()
  563.  
  564. write(" ")
  565.  
  566. os.setComputerLabel(pcname)
  567.  
  568. write(" ")
  569.  
  570. fs.makeDir("SimSoft/SappS")
  571.  
  572. CP(10,10)
  573. print(" ")
  574.  
  575. os.reboot()
  576.  
  577. --end
Add Comment
Please, Sign In to add comment