Simlor_GER

SimSoft Yellow (german) - AppStore

Jun 11th, 2017 (edited)
694
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.19 KB | None | 0 0
  1. --SimSoft Yellow - Copyright by Simlor (http://www.computercraft.info/forums2/index.php?/user/55655-simlor/)
  2.  
  3. --AppStore
  4.  
  5. AppLink = nil
  6. AppName = nil
  7.  
  8. seite = 1
  9.  
  10. AppStoreEXIT = false
  11.  
  12. AppStoreAnzeigeC = 2
  13. MaximaleAppSeitenC = 3
  14. IsPastebin = false
  15.  
  16.  
  17. function IsPastebinANZEIGE()
  18.  
  19. if IsPastebin == true then
  20.  
  21. CP(13,10)
  22.  
  23. BC(SystemColor)
  24. write(" ")
  25.  
  26. BC(128)
  27. print(" ")
  28.  
  29. elseif IsPastebin == false then
  30.  
  31. CP(13,10)
  32.  
  33. BC(SystemColor)
  34. write(" ")
  35.  
  36. BC(128)
  37. print(" ")
  38.  
  39. end
  40. end
  41.  
  42. function STD_GUI_ANZEIGE()
  43.  
  44. BC(1)
  45. Clear()
  46.  
  47. file = fs.open("SimSoft/Data/SystemColor","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. SystemColor = fileData[3]
  57.  
  58. SystemColor = ((SystemColor-1)+1)
  59.  
  60. w, h = term.getSize()
  61.  
  62. wC = 0
  63. hC = 1
  64.  
  65. while true do
  66.  
  67. wC = (wC+1)
  68.  
  69. CP(wC, hC)
  70. BC(SystemColor)
  71. write(" ")
  72.  
  73. if wC == w then
  74. if hC == 3 then
  75. break
  76. else
  77. hC = (hC+1)
  78. wC = 0
  79. end
  80. end
  81.  
  82. end
  83.  
  84. anzeige = "App Store - STD-GUI"
  85.  
  86. TC(1)
  87. CP(((w/2)-((#anzeige)/2)),2)
  88.  
  89. print(anzeige)
  90.  
  91. CP(2,2)
  92. BC(SystemColor)
  93. TC(1)
  94. write("<")
  95.  
  96. CP((w-1),2)
  97. BC(SystemColor)
  98. TC(1)
  99. write(">")
  100.  
  101. CP(1,1)
  102.  
  103. BC(SystemColor)
  104. TC(1)
  105.  
  106. CP((w-11), (h-3))
  107. print(" ")
  108. CP((w-11), (h-2))
  109. print(" Desktop ")
  110. CP((w-11), (h-1))
  111. print(" ")
  112.  
  113.  
  114. BC(SystemColor)
  115. TC(1)
  116.  
  117. anzeige = " STD-GUI "
  118.  
  119. CP(((w/2)-((#anzeige)/2)),7)
  120. print(" ")
  121. CP(((w/2)-((#anzeige)/2)),8)
  122. print(anzeige)
  123. CP(((w/2)-((#anzeige)/2)),9)
  124. print(" ")
  125.  
  126. BC(1)
  127.  
  128. TC(128)
  129.  
  130. anzeige = "STD-GUI Ist Ein Fuer SimSoft Optimierter"
  131.  
  132. CP((((w/2)-((#anzeige)/2))+2),12)
  133. print(anzeige)
  134.  
  135. anzeige = "App Store."
  136.  
  137. CP((((w/2)-((#anzeige)/2))+2),13)
  138. print(anzeige)
  139.  
  140. anzeige = "Store by LDDestroier"
  141.  
  142. TC(128)
  143. CP((((w/2)-((#anzeige)/2))+1),15)
  144. write("Store By ")
  145. TC(SystemColor)
  146. print("LDDestroier")
  147.  
  148.  
  149.  
  150. end
  151.  
  152.  
  153. function AppListe_ANZEIGE()
  154.  
  155. BC(1)
  156. Clear()
  157.  
  158. file = fs.open("SimSoft/Data/SystemColor","r")
  159. local fileData = {}
  160. local line = file.readLine()
  161. repeat
  162. table.insert(fileData,line)
  163. line = file.readLine()
  164. until line == nil
  165. file.close()
  166.  
  167. SystemColor = fileData[3]
  168.  
  169. SystemColor = ((SystemColor-1)+1)
  170.  
  171. w, h = term.getSize()
  172.  
  173. wC = 0
  174. hC = 1
  175.  
  176. while true do
  177.  
  178. wC = (wC+1)
  179.  
  180. CP(wC, hC)
  181. BC(SystemColor)
  182. write(" ")
  183.  
  184. if wC == w then
  185. if hC == 3 then
  186. break
  187. else
  188. hC = (hC+1)
  189. wC = 0
  190. end
  191. end
  192.  
  193. end
  194.  
  195. anzeige = "App Store - App List"
  196.  
  197. TC(1)
  198. CP(((w/2)-((#anzeige)/2)),2)
  199.  
  200. print(anzeige)
  201.  
  202.  
  203. CP(2,2)
  204. BC(SystemColor)
  205. TC(1)
  206. write("<")
  207.  
  208. CP((w-1),2)
  209. BC(SystemColor)
  210. TC(1)
  211. write(">")
  212.  
  213. CP(1,1)
  214.  
  215. BC(SystemColor)
  216. TC(1)
  217.  
  218. CP((w-11), (h-3))
  219. print(" ")
  220. CP((w-11), (h-2))
  221. print(" Desktop ")
  222. CP((w-11), (h-1))
  223. print(" ")
  224.  
  225. AppListLoader()
  226.  
  227. AppListANZEIGE(seite)
  228.  
  229. end
  230.  
  231. function SelfMadeApp_ANZEIGE()
  232.  
  233. BC(1)
  234. Clear()
  235.  
  236. file = fs.open("SimSoft/Data/SystemColor","r")
  237. local fileData = {}
  238. local line = file.readLine()
  239. repeat
  240. table.insert(fileData,line)
  241. line = file.readLine()
  242. until line == nil
  243. file.close()
  244.  
  245. SystemColor = fileData[3]
  246.  
  247. SystemColor = ((SystemColor-1)+1)
  248.  
  249. w, h = term.getSize()
  250.  
  251. wC = 0
  252. hC = 1
  253.  
  254. while true do
  255.  
  256. wC = (wC+1)
  257.  
  258. CP(wC, hC)
  259. BC(SystemColor)
  260. write(" ")
  261.  
  262. if wC == w then
  263. if hC == 3 then
  264. break
  265. else
  266. hC = (hC+1)
  267. wC = 0
  268. end
  269. end
  270.  
  271. end
  272.  
  273. anzeige = "App Store - App-Creator"
  274.  
  275. TC(1)
  276. CP(((w/2)-((#anzeige)/2)),2)
  277.  
  278. print(anzeige)
  279.  
  280.  
  281. CP(2,2)
  282. BC(SystemColor)
  283. TC(1)
  284. write("<")
  285.  
  286. CP((w-1),2)
  287. BC(SystemColor)
  288. TC(1)
  289. write(">")
  290.  
  291. CP(1,1)
  292.  
  293. BC(SystemColor)
  294. TC(1)
  295.  
  296. CP((w-11), (h-3))
  297. print(" ")
  298. CP((w-11), (h-2))
  299. print(" Desktop ")
  300. CP((w-11), (h-1))
  301. print(" ")
  302.  
  303. BC(1)
  304.  
  305. if (AppName == nil) then
  306. TC(SystemColor)
  307. CP(4,6)
  308. write("Programm Name ")
  309. TC(128)
  310. print("(9 Zeichen)")
  311. else
  312.  
  313. TC(SystemColor)
  314. CP(4,6)
  315. print(" ")
  316. CP(4,6)
  317. print(AppName)
  318.  
  319. end
  320.  
  321. if (AppLink == nil) then
  322. TC(SystemColor)
  323. CP(4,8)
  324. write("Programm Pfad Oder Pastebin-Code")
  325. else
  326. TC(SystemColor)
  327. CP(4,8)
  328. print(" ")
  329. CP(4,8)
  330. print(AppLink)
  331. end
  332.  
  333.  
  334. if not (AppName == nil) and not (AppLink == nil) then
  335. TC(32)
  336. CP(4,(h-2))
  337. write("Erstellen")
  338. write("Erstellen")
  339. else
  340. TC(128)
  341. CP(4,(h-2))
  342. write("Erstellen")
  343. end
  344.  
  345.  
  346. TC(128)
  347. CP(4,10)
  348. write("Pastebin")
  349.  
  350. TC(256)
  351. CP(4,12)
  352. write("Aktiviere Pastebin Zuerst,")
  353. CP(4,13)
  354. write("Wenn Du Es Nutzen Willst")
  355. TC(128)
  356.  
  357. IsPastebinANZEIGE()
  358.  
  359. end
  360.  
  361.  
  362. function AnzeigeLoader()
  363. if AppStoreAnzeigeC == 1 and AppStoreEXIT == false then
  364.  
  365. AppListe_ANZEIGE()
  366.  
  367.  
  368. elseif AppStoreAnzeigeC == 2 and AppStoreEXIT == false then
  369.  
  370. SelfMadeApp_ANZEIGE()
  371.  
  372. elseif AppStoreAnzeigeC == 3 and AppStoreEXIT == false then
  373.  
  374. STD_GUI_ANZEIGE()
  375.  
  376. end
  377. end
  378.  
  379.  
  380. function AppListLoader()
  381.  
  382. fs.delete("SimSoft/Data/StoreTemp")
  383. local cacheBuster = ("%x"):format(math.random(0, 2 ^ 30))
  384. local datei = http.get("https://pastebin.com/raw/VGVnVK4j" .. "?cb=" .. cacheBuster)
  385. datei = datei.readAll()
  386.  
  387. local file = fs.open("SimSoft/Data/StoreTemp", "w")
  388. file.write(datei)
  389. file.close()
  390.  
  391. file = fs.open("SimSoft/Data/StoreTemp","r")
  392. local fileData = {}
  393. local line = file.readLine()
  394. repeat
  395. table.insert(fileData,line)
  396. line = file.readLine()
  397. until line == nil
  398. file.close()
  399.  
  400. C = 0
  401. StoreTempData = nil
  402. StoreTempData = {}
  403.  
  404. while true do
  405.  
  406. C = (C+1)
  407.  
  408. if fileData[C] == nil or fileData[C] == "" then
  409.  
  410. MaxStoreApp = ((C-1)/3)
  411. break
  412.  
  413. else
  414.  
  415. table.insert(StoreTempData, (fileData[C]))
  416.  
  417. end
  418.  
  419. end
  420.  
  421. end
  422.  
  423. function AppListANZEIGE(seite)
  424.  
  425. w, h = term.getSize()
  426.  
  427. BC(1)
  428.  
  429. CP(4,(h-2))
  430. TC(SystemColor)
  431. print("< >")
  432.  
  433. CP(6,6)
  434. print(" ")
  435.  
  436. TC(SystemColor)
  437. CP(4,6)
  438. print((StoreTempData[((seite*3)-2)]))
  439.  
  440. CP(6,9)
  441. print(" ")
  442.  
  443. TC(128)
  444. CP(6,9)
  445. write("App by ")
  446. TC(SystemColor)
  447. print((StoreTempData[((seite*3)-1)]))
  448.  
  449. CP(6,11)
  450. print(" ")
  451.  
  452. TC(128)
  453. CP(6,11)
  454. write("Copy ")
  455. TC(SystemColor)
  456. print("("..(StoreTempData[((seite*3)-0)])..")")
  457.  
  458. TC(256)
  459. CP(6,13)
  460. print("Klick Auf 'Copy' Um Den Code In")
  461. CP(6,14)
  462. print("Den App-Creator Zu Verschieben.")
  463.  
  464.  
  465.  
  466. end
  467.  
  468.  
  469.  
  470. w, h = term.getSize()
  471.  
  472. AnzeigeLoader()
  473.  
  474. while true do
  475.  
  476. event, side, x, y = os.pullEvent()
  477. if event == "mouse_click" then
  478.  
  479. --Anzeige 1
  480.  
  481. if x >= (w-11) and x <= (w-1) and y >= (h-3) and y <= (h-1) and AppStoreEXIT == false then
  482.  
  483. AppStoreEXIT = true
  484.  
  485. end
  486.  
  487. if AppStoreEXIT == false and AppStoreAnzeigeC == 1 and x >= 1 and x <= w and y >= 3 and y <= h and not (x >= (w-11) and x <= (w-1) and y >= (h-3) and y <= (h-1)) then
  488.  
  489. if x == 4 and y == (h-2) then
  490.  
  491. if seite == 1 then
  492. seite = MaxStoreApp
  493. else
  494. seite = (seite-1)
  495. end
  496.  
  497. AppListANZEIGE(seite)
  498.  
  499. end
  500.  
  501. if x == 7 and y == (h-2) then
  502.  
  503. if seite == MaxStoreApp then
  504. seite = 1
  505. else
  506. seite = (seite+1)
  507. end
  508.  
  509. AppListANZEIGE(seite)
  510.  
  511. end
  512.  
  513. if x >= 6 and x <= 20 and y == 11 then
  514.  
  515. IsPastebin = true
  516. AppLink = (StoreTempData[((seite*3)-0)])
  517.  
  518. AppName = nil
  519.  
  520. TC(256)
  521. CP(6,11)
  522. write("Copy ")
  523. TC(256)
  524. print("("..(StoreTempData[((seite*3)-0)])..")")
  525. sleep(0.2)
  526.  
  527.  
  528. TC(128)
  529. CP(6,11)
  530. write("Copy ")
  531. TC(SystemColor)
  532. print("("..(StoreTempData[((seite*3)-0)])..")")
  533.  
  534. end
  535.  
  536. end
  537.  
  538. --Anzeige 2
  539.  
  540. if AppStoreEXIT == false and AppStoreAnzeigeC == 2 and x >= 1 and x <= w and y >= 3 and y <= h and not (x >= (w-11) and x <= (w-1) and y >= (h-3) and y <= (h-1)) then
  541.  
  542.  
  543. if x >= 4 and x <= (w-1) and y == 6 then
  544.  
  545. BC(1)
  546. CP(4,6)
  547. print(" ")
  548. CP(4,6)
  549. TC(SystemColor)
  550. AppName = read()
  551.  
  552. if AppName == "" then
  553. CP(4,6)
  554. print(" ")
  555. CP(4,6)
  556. TC(SystemColor)
  557. print("Gebe einen Namen ein.")
  558. AppName = nil
  559.  
  560. sleep(1)
  561.  
  562. SelfMadeApp_ANZEIGE()
  563.  
  564. end
  565.  
  566. end
  567.  
  568. if x >= 4 and x <= (w-1) and y == 8 then
  569.  
  570. BC(1)
  571. CP(4,8)
  572. print(" ")
  573. CP(4,8)
  574. TC(SystemColor)
  575. AppLink = read()
  576.  
  577. AppLinkA = fs.exists(AppLink)
  578.  
  579. if IsPastebin == false and (AppLink == "" or AppLinkA == false) then
  580. CP(4,8)
  581. print(" ")
  582. CP(4,8)
  583. TC(SystemColor)
  584. print("Der Pfad wurde nicht gefunden.")
  585. AppLink = nil
  586.  
  587. sleep(1)
  588.  
  589. SelfMadeApp_ANZEIGE()
  590.  
  591. end
  592.  
  593. if IsPastebin == true and AppLink == "" then
  594.  
  595. CP(4,8)
  596. print(" ")
  597. CP(4,8)
  598. TC(SystemColor)
  599. print("Bitte gebe irgendwas ein.")
  600. AppLink = nil
  601.  
  602. sleep(1)
  603.  
  604. SelfMadeApp_ANZEIGE()
  605.  
  606. end
  607.  
  608. end
  609.  
  610. if x >= 13 and x <= 15 and y == 10 then
  611.  
  612. if IsPastebin == true then
  613. IsPastebin = false
  614. elseif IsPastebin == false then
  615. IsPastebin = true
  616. end
  617.  
  618. IsPastebinANZEIGE()
  619.  
  620. end
  621.  
  622. if not (AppName == nil) and not (AppLink == nil) then
  623.  
  624. TC(32)
  625. CP(4,(h-2))
  626. BC(1)
  627. write("Erstellen")
  628.  
  629.  
  630.  
  631.  
  632. end
  633.  
  634. if x >= 4 and x <= 12 and y == (h-2) and not (AppName == nil) and not (AppLink == nil) and not (AppName == "") and not (AppLink == "") then
  635.  
  636. fs.makeDir("SimSoft/SappS/"..AppName)
  637.  
  638. if IsPastebin == true then
  639. local file = fs.open("SimSoft/SappS/"..AppName.."/SappS", "w")
  640. file.writeLine("SimSoft App System (SappS)")
  641. file.writeLine("SimSoft/SappS/"..AppName.."/"..AppLink)
  642. file.writeLine(AppName)
  643. file.close()
  644. local cacheBuster = ("%x"):format(math.random(0, 2 ^ 30))
  645. local datei = http.get("https://pastebin.com/raw/" .. textutils.urlEncode(AppLink) .. "?cb=" .. cacheBuster)
  646. datei = datei.readAll()
  647.  
  648. local file = fs.open("SimSoft/SappS/"..AppName.."/"..AppLink, "w")
  649. file.writeLine(datei)
  650. file.close()
  651. else
  652. local file = fs.open("SimSoft/SappS/"..AppName.."/SappS", "w")
  653. file.writeLine("SimSoft App System (SappS)")
  654. file.writeLine(AppLink)
  655. file.writeLine(AppName)
  656. file.close()
  657. end
  658.  
  659. AppStoreEXIT = true
  660.  
  661. end
  662.  
  663. end
  664.  
  665. --Anzeige 3
  666.  
  667. if AppStoreEXIT == false and AppStoreAnzeigeC == 3 and x >= 1 and x <= w and y >= 3 and y <= h and not (x >= (w-11) and x <= (w-1) and y >= (h-3) and y <= (h-1)) then
  668.  
  669. anzeige = " STD-GUI "
  670.  
  671. if x >= ((w/2)-((#anzeige)/2)) and x <= (((w/2)-((#anzeige)/2))+((#anzeige)-1)) and y >= 7 and y <= 9 then
  672.  
  673. fs.delete("SimSoft/Data/STDGUI_Temp")
  674.  
  675. local cacheBuster = ("%x"):format(math.random(0, 2 ^ 30))
  676. local datei = http.get("https://pastebin.com/raw/P9dDhQ2m".. "?cb=" .. cacheBuster)
  677. datei = datei.readAll()
  678.  
  679. local file = fs.open("SimSoft/Data/STDGUI_Temp", "w")
  680. file.write(datei)
  681. file.close()
  682.  
  683. shell.run("SimSoft/Data/STDGUI_Temp")
  684.  
  685. STD_GUI_ANZEIGE()
  686.  
  687. end
  688. end
  689.  
  690. if x == 2 and y == 2 then
  691.  
  692. if AppStoreAnzeigeC == 1 then
  693. AppStoreAnzeigeC = MaximaleAppSeitenC
  694. else
  695. AppStoreAnzeigeC = (AppStoreAnzeigeC-1)
  696. end
  697.  
  698. AnzeigeLoader()
  699.  
  700. end
  701.  
  702. if x == (w-1) and y == 2 then
  703.  
  704. if AppStoreAnzeigeC == MaximaleAppSeitenC then
  705. AppStoreAnzeigeC = 1
  706. else
  707. AppStoreAnzeigeC = (AppStoreAnzeigeC+1)
  708. end
  709.  
  710. AnzeigeLoader()
  711.  
  712. end
  713.  
  714. if AppStoreEXIT == true then
  715. break
  716. end
  717.  
  718.  
  719. end
  720. end
  721.  
  722.  
  723.  
  724.  
  725.  
  726.  
  727.  
  728.  
  729. --end
Add Comment
Please, Sign In to add comment