Simlor_GER

SimSoft 3 - Desktop

Mar 29th, 2016
301
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.51 KB | None | 0 0
  1. --Alle Rechte an SimSoft 3 sind "SimlorLP" (oder in Minecraft auch nur "Simlor") vorbehalten.
  2.  
  3. file = fs.open("SimSoft/Daten/Config","r")
  4. local fileData = {}
  5. local line = file.readLine()
  6. repeat
  7. table.insert(fileData,line)
  8. line = file.readLine()
  9. until line == nil
  10. file.close()
  11. PassSystem = fileData[1]
  12. Hintergrund = fileData[2]
  13. versionOS = fileData[3]
  14. Sprache = fileData[4]
  15.  
  16. --SappS Touch Function
  17.  
  18. function SappSL(xa, xb, ya, yb, num)
  19.  
  20. if x >= xa and x <= xb and y >= ya and y <= yb then
  21. file = fs.open("SimSoft/Daten/SappS/"..num,"r")
  22. local fileData = {}
  23. local line = file.readLine()
  24. repeat
  25. table.insert(fileData,line)
  26. line = file.readLine()
  27. until line == nil
  28. file.close()
  29. ver = fileData[5]
  30. if ver == "n" then
  31. else
  32. shell.run("SimSoft/SappS/"..ver)
  33. shell.run("SimSoft/System/Desktop")
  34. end
  35. end
  36. end
  37.  
  38.  
  39. --Sapps Function
  40.  
  41. function AppG(name,pos,farbe)
  42.  
  43. --Pos
  44.  
  45. if pos == "1.0" then
  46. x = 4
  47. y = 5
  48. elseif pos == "2.0" then
  49. x = 12
  50. y = 5
  51. elseif pos == "3.0" then
  52. x = 20
  53. y = 5
  54. elseif pos == "4.0" then
  55. x = 28
  56. y = 5
  57. elseif pos == "5.0" then
  58. x = 36
  59. y = 5
  60. elseif pos == "6.0" then
  61. x = 4
  62. y = 9
  63. elseif pos == "7.0" then
  64. x = 12
  65. y = 9
  66. elseif pos == "8.0" then
  67. x = 20
  68. y = 9
  69. elseif pos == "9.0" then
  70. x = 28
  71. y = 9
  72. elseif pos == "10.0" then
  73. x = 36
  74. y = 9
  75. elseif pos == "11.0" then
  76. x = 4
  77. y = 13
  78. elseif pos == "12.0" then
  79. x = 12
  80. y = 13
  81. elseif pos == "13.0" then
  82. x = 20
  83. y = 13
  84. elseif pos == "14.0" then
  85. x = 28
  86. y = 13
  87. elseif pos == "15.0" then
  88. x = 36
  89. y = 13
  90. end
  91.  
  92. --Farbe
  93.  
  94. TC(256)
  95.  
  96. if farbe == "1.0" then
  97. BC(1)
  98. elseif farbe == "2.0" then
  99. BC(2048)
  100. elseif farbe == "3.0" then
  101. BC(2048)
  102. elseif farbe == "4.0" then
  103. BC(8)
  104. elseif farbe == "5.0" then
  105. BC(32)
  106. elseif farbe == "6.0" then
  107. BC(6)
  108. elseif farbe == "7.0" then
  109. BC(2048)
  110. elseif farbe == "8.0" then
  111. BC(16)
  112. elseif farbe == "9.0" then
  113. BC(1024)
  114. elseif farbe == "10.0" then
  115. BC(4069)
  116. elseif farbe == "11.0" then
  117. BC(2)
  118. elseif farbe == "12.0" then
  119. BC(1024)
  120. elseif farbe == "13.0" then
  121. BC(16384)
  122. elseif farbe == "14.0" then
  123. BC(8192)
  124. elseif farbe == "15.0" then
  125. BC(2)
  126. elseif farbe == "16.0" then
  127. BC(4)
  128. elseif farbe == "17.0" then
  129. BC(8)
  130. elseif farbe == "18.0" then
  131. BC(16)
  132. elseif farbe == "19.0" then
  133. BC(32)
  134. elseif farbe == "20.0" then
  135. BC(64)
  136.  
  137. end
  138.  
  139. --Pos
  140.  
  141. CP(x,y) --4,6
  142. print(" ")
  143. x = (x+1)
  144. y = (y+1)
  145. CP(x,y) --5,7
  146. print(" ")
  147. y = (y-1)
  148.  
  149. --Farbe
  150.  
  151. if farbe == "1.0" then
  152. BC(32768)
  153. elseif farbe == "2.0" then
  154. BC(1)
  155. elseif farbe == "3.0" then
  156. BC(32768)
  157. elseif farbe == "4.0" then
  158. BC(1)
  159. elseif farbe == "5.0" then
  160. BC(32768)
  161. elseif farbe == "6.0" then
  162. BC(1)
  163. elseif farbe == "7.0" then
  164. BC(16384)
  165. elseif farbe == "8.0" then
  166. BC(32)
  167. elseif farbe == "9.0" then
  168. BC(32768)
  169. elseif farbe == "10.0" then
  170. BC(8192)
  171. elseif farbe == "11.0" then
  172. BC(32768)
  173. elseif farbe == "12.0" then
  174. BC(4)
  175. elseif farbe == "13.0" then
  176. BC(16)
  177. elseif farbe == "14.0" then
  178. BC(32)
  179. elseif farbe == "15.0" then
  180. BC(64)
  181. elseif farbe == "16.0" then
  182. BC(256)
  183. elseif farbe == "17.0" then
  184. BC(256)
  185. elseif farbe == "18.0" then
  186. BC(512)
  187. elseif farbe == "19.0" then
  188. BC(1024)
  189. elseif farbe == "20.0" then
  190. BC(8192)
  191. end
  192.  
  193. --Pos
  194.  
  195. CP(x,y) --5,6
  196. print(" ")
  197. x = (x-1)
  198. y = (y+1)
  199. CP(x,y) --4,7
  200. print(" ")
  201. x = (x-2)
  202. y = (y+1)
  203. CP(x,y) --2,8
  204. TC(256)
  205. BC(128)
  206. print(name)
  207. end
  208.  
  209.  
  210. --Hintergrund erstellung
  211.  
  212. BC(128)
  213. Clear()
  214.  
  215. file = fs.open("SimSoft/Daten/Config","r")
  216. local fileData = {}
  217. local line = file.readLine()
  218. repeat
  219. table.insert(fileData,line)
  220. line = file.readLine()
  221. until line == nil
  222. file.close()
  223.  
  224. Hintergrund = fileData[2]
  225.  
  226. if Hintergrund == "t" then
  227.  
  228. _Background = paintutils.loadImage("SimSoft/Daten/DesktopBG")
  229. paintutils.drawImage(_Background,1,2)
  230.  
  231. elseif Hintergrund == "f" then
  232. end
  233.  
  234.  
  235. --Interface und Icons
  236.  
  237. CP(1,1)
  238. BC(32768)
  239. print(" ")
  240. print(" ")
  241. print(" ")
  242.  
  243. CP(17,2)
  244. TC(1)
  245. print("SimSoft 3 - Desktop")
  246.  
  247. CP(49,4)
  248. BC(256)
  249. print(" ")
  250. CP(49,5)
  251. print(" @ ")
  252. CP(49,6)
  253. print(" ")
  254. CP(49,7)
  255. print(" ")
  256. CP(49,8)
  257. print(" ")
  258. CP(49,9)
  259. print(" ")
  260. CP(49,10)
  261. print(" ")
  262. CP(49,11)
  263. print(" ")
  264. CP(49,12)
  265. print(" ")
  266. CP(49,13)
  267. print(" ")
  268. CP(49,14)
  269. print(" ")
  270. CP(49,15)
  271. print(" ")
  272. CP(49,16)
  273. print(" ")
  274. CP(49,17)
  275. print(" ")
  276. CP(49,18)
  277. print(" @ ")
  278. CP(49,19)
  279. write(" ")
  280. CP(1,15)
  281.  
  282. file = fs.open("SimSoft/Daten/SappS/A","r")
  283. local fileData = {}
  284. local line = file.readLine()
  285. repeat
  286. table.insert(fileData,line)
  287. line = file.readLine()
  288. until line == nil
  289. file.close()
  290.  
  291. sc = fileData[1]
  292.  
  293. sc = (sc+1)
  294. sc = (sc-1)
  295.  
  296. if sc >= 16 then
  297. sc = 15
  298. elseif sc <= -1 then
  299. sc = 0
  300. end
  301.  
  302. if sc == 0 then
  303. shell.run("")
  304. else
  305.  
  306. anz = 0
  307.  
  308. while true do
  309.  
  310. anz = (anz+1)
  311.  
  312. file = fs.open("SimSoft/Daten/SappS/"..anz,"r")
  313. local fileData = {}
  314. local line = file.readLine()
  315. repeat
  316. table.insert(fileData,line)
  317. line = file.readLine()
  318. until line == nil
  319. file.close()
  320.  
  321. a = fileData[1]
  322. b = fileData[2]
  323. c = fileData[3]
  324.  
  325. AppG(a,b,c)
  326.  
  327. if anz == sc then
  328. break
  329. end
  330. end
  331. end
  332.  
  333. --Touch
  334.  
  335. while true do
  336.  
  337. event,side,x,y = os.pullEvent()
  338. if event == "mouse_click" then
  339.  
  340. --SappS
  341.  
  342. SappSL(2, 7, 5, 7, 1)
  343. SappSL(10, 15, 5, 7, 2)
  344. SappSL(18, 23, 5, 7, 3)
  345. SappSL(26, 31, 5, 7, 4)
  346. SappSL(34, 39, 5, 7, 5)
  347. SappSL(2, 7, 9, 11, 6)
  348. SappSL(10, 15, 9, 11, 7)
  349. SappSL(18, 23, 9, 11, 8)
  350. SappSL(26, 31, 9, 11, 9)
  351. SappSL(34, 39, 9, 11, 10)
  352. SappSL(2, 7, 13, 15, 11)
  353. SappSL(10, 15, 13, 15, 12)
  354. SappSL(18, 23, 13, 15, 13)
  355. SappSL(26, 31, 13, 15, 14)
  356. SappSL(34, 39, 13, 15, 15)
  357.  
  358. --Balkenleisten
  359.  
  360. if x >= 1 and x <= 51 and y >= 1 and y <= 3 then
  361.  
  362. CP(1,4)
  363. BC(128)
  364. TC(1)
  365. print(" ")
  366. print(" ")
  367. print(" ")
  368. print(" ")
  369. print(" ")
  370. print(" ")
  371. print(" ")
  372. print(" ")
  373. print(" ")
  374. print(" ")
  375. print(" ")
  376. print(" ")
  377. print(" ")
  378. print(" ")
  379. print(" ")
  380. write(" ")
  381.  
  382. TC(1)
  383. CP(6,5)
  384. print("System")
  385.  
  386. --Version
  387. TC(32768)
  388. CP(4,8)
  389. write("OS version - ")
  390. TC(256)
  391. print(versionOS)
  392.  
  393. --ID
  394. CP(4,10)
  395. TC(32768)
  396. write("PC-ID - ")
  397. TC(256)
  398. print(os.getComputerID())
  399.  
  400. --by
  401. CP(4,12)
  402. TC(32768)
  403. write("Copyright - ")
  404. TC(256)
  405. print("SimlorLP")
  406.  
  407. --Hintergrund
  408. BC(128)
  409. CP(4,14)
  410. TC(1)
  411. print("Edit Background")
  412.  
  413. --Acounts
  414. BC(128)
  415. CP(4,16)
  416. TC(1)
  417. print("Account manager")
  418.  
  419. while true do
  420.  
  421. file = fs.open("SimSoft/Daten/Config","r")
  422. local fileData = {}
  423. local line = file.readLine()
  424. repeat
  425. table.insert(fileData,line)
  426. line = file.readLine()
  427. until line == nil
  428. file.close()
  429. PassSystem = fileData[1]
  430. Hintergrund = fileData[2]
  431. versionOS = fileData[3]
  432. Sprache = fileData[4]
  433.  
  434. if Hintergrund == "t" then
  435. CP(22,14)
  436. BC(2048)
  437. write(" ")
  438. BC(32768)
  439. print(" ")
  440. else
  441. CP(22,14)
  442. BC(32768)
  443. write(" ")
  444. BC(256)
  445. print(" ")
  446. end
  447.  
  448. event,side,x,y = os.pullEvent()
  449. if event == "mouse_click" then
  450.  
  451. if x >= 4 and x <= 18 and y == 14 then
  452. shell.run("paint SimSoft/Daten/DesktopBG")
  453. shell.run("SimSoft/System/Desktop")
  454. end
  455.  
  456. if x >= 4 and x <= 18 and y == 16 then
  457. shell.run("SimSoft/System/AcManager")
  458. shell.run("SimSoft/System/Desktop")
  459. end
  460.  
  461. if x >= 22 and x <= 24 and y == 14 then
  462.  
  463. local file = fs.open("SimSoft/Daten/Config","w")
  464. file.close()
  465.  
  466. if Hintergrund == "t" then
  467. Hintergrund = "f"
  468. elseif Hintergrund == "f" then
  469. Hintergrund = "t"
  470. end
  471.  
  472. local file = fs.open("SimSoft/Daten/Config","a")
  473. file.writeLine(PassSystem)
  474. file.writeLine(Hintergrund)
  475. file.writeLine(SS2V)
  476. file.writeLine(Sprache)
  477. file.close()
  478. end
  479.  
  480. if x >= 1 and x <= 51 and y >= 1 and y <= 3 then
  481. shell.run("SimSoft/System/Desktop")
  482. break
  483. end
  484.  
  485. if x >= 49 and x <= 51 and y >= 4 and y <= 19 then
  486. shell.run("SimSoft/System/Desktop")
  487. break
  488. end
  489. end
  490. end
  491. break
  492. end
  493.  
  494. if x >= 49 and x <= 51 and y >= 4 and y <= 19 then
  495. CP(37,4)
  496. BC(256)
  497. TC(1)
  498. write(" ")
  499. CP(37,5)
  500. write(" @ ")
  501. CP(37,6)
  502. write(" ")
  503. CP(37,7)
  504. write(" ")
  505. CP(37,8)
  506. write(" ")
  507. CP(37,9)
  508. write(" ")
  509. CP(37,10)
  510. write(" ")
  511. CP(37,11)
  512. write(" ")
  513. CP(37,12)
  514. write(" ")
  515. CP(37,13)
  516. write(" ")
  517. CP(37,14)
  518. write(" ")
  519. CP(37,15)
  520. write(" ")
  521. CP(37,16)
  522. write(" ")
  523. CP(37,17)
  524. write(" ")
  525. CP(37,18)
  526. write(" @ ")
  527. CP(37,19)
  528. write(" ")
  529.  
  530. CP(40,18)
  531. TC(128)
  532. print("by SimlorLP")
  533.  
  534. CP(40,5)
  535. TC(32768)
  536. print("SimSoft 3")
  537.  
  538. CP(37,7)
  539. TC(256)
  540. BC(128)
  541. print(" Log off ")
  542.  
  543. CP(37,8)
  544. TC(128)
  545. BC(256)
  546. print(" Shutdown ")
  547.  
  548. CP(37,9)
  549. TC(256)
  550. BC(128)
  551. print(" Restart ")
  552.  
  553. CP(37,10)
  554. TC(128)
  555. BC(256)
  556. print(" SappS Store ")
  557.  
  558. CP(37,11)
  559. TC(256)
  560. BC(128)
  561. print(" Delete ")
  562.  
  563. UpdateC()
  564.  
  565. if UpdateCV == "true" then
  566. CP(37,12)
  567. TC(128)
  568. BC(256)
  569. print(" OS-Updates ")
  570. else
  571. CP(37,12)
  572. TC(16384)
  573. BC(256)
  574. print(" OS-Updates ")
  575. end
  576.  
  577. while true do
  578. event,side,x,y = os.pullEvent()
  579. if event == "mouse_click" then
  580.  
  581. if x >= 37 and x <= 51 and y == 7 then
  582. shell.run("SimSoft/System/SystemStart")
  583. break
  584. end
  585.  
  586. if x >= 37 and x <= 51 and y == 8 then
  587. os.shutdown()
  588. break
  589. end
  590.  
  591. if x >= 37 and x <= 51 and y == 9 then
  592. os.reboot()
  593. break
  594. end
  595.  
  596. if x >= 37 and x <= 51 and y == 10 then
  597. shell.run("SimSoft/System/SappS")
  598. break
  599. end
  600.  
  601. if x >= 37 and x <= 51 and y == 11 then
  602. shell.run("SimSoft/System/SappSLoeschen")
  603. break
  604. end
  605.  
  606. if x >= 37 and x <= 51 and y == 12 then
  607. shell.run("SimSoft/System/SystemUpdate")
  608. break
  609. end
  610.  
  611. --Seitenleiste aus
  612.  
  613. if x >= 1 and x <= 36 and y >= 4 and y <= 19 then
  614. shell.run("SimSoft/System/Desktop")
  615. break
  616. end
  617. if x >= 1 and x <= 51 and y >= 1 and y <= 3 then
  618. shell.run("SimSoft/System/Desktop")
  619. break
  620. end
  621. end
  622. end
  623. break
  624. end
  625. end
  626. end
Add Comment
Please, Sign In to add comment