Advertisement
Simlor_GER

SimSoft 2.1 (English) - Desktop

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