Simlor_GER

SimSoft Yellow (english) - AppStore

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