Advertisement
30000legos

Untitled

Mar 27th, 2015
202
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.88 KB | None | 0 0
  1.  
  2. --Pocket Dimensions: 26 by 20
  3. slc = 1
  4. loading = paintutils.loadImage(".background") --Loading Screen
  5. game1 = paintutils.loadImage("2048.ico")
  6. screen = paintutils.loadImage(".backgroundmain")
  7. function loadOnBoot()
  8. paintutils.drawImage(loading, 1, 1)
  9. sleep(0.2)
  10. term.setCursorPos(2,14)
  11. term.setBackgroundColor(32)
  12. textutils.slowPrint("------------------------")
  13. sleep(0.2)
  14. term.clear()
  15. term.setCursorPos(1,1)
  16. term.setCursorPos(12,13)
  17. paintutils.drawImage(screen, 1, 1)
  18. paintutils.drawImage(game1, 12, 15)
  19. term.setCursorPos(12,16)
  20. print("2048")
  21. slc = 1
  22. end
  23. function appListen()
  24. if slc <= 0 then
  25. slc = 4
  26. elseif slc == 1 then
  27. paintutils.drawImage(screen, 1, 1)
  28. paintutils.drawImage(game1, 12, 15)
  29. term.setCursorPos(12,16)
  30. print("2048")
  31. elseif slc == 2 then
  32. elseif slc == 3 then
  33. elseif slc == 4 then
  34. elseif slc >= 5 then
  35. slc = 0
  36. end
  37. end
  38. loadOnBoot()
  39. while true do
  40. event = {os.pullEventRaw()}
  41. if event[1] == "key" then
  42. if event[2] == 205 then
  43. slc = slc + 1
  44. if slc == 5 and event[2] == 205 then
  45. slc = 1
  46. end
  47. appListen()
  48. elseif event[2] == 203 then
  49. slc = slc - 1
  50. if slc == 0 and event[2] == 203 then
  51. slc = 4
  52. end
  53. appListen()
  54. end
  55. if event[2] == 57 then
  56. print("Installing App #", slc)
  57. if slc == 1 then
  58. -- check(rom,"2048game")
  59. if fs.exists("2048game") then
  60. shell.run("2048game")
  61. else
  62. shell.run("pastebin","get","tY191fCY","2048game")
  63. shell.run("pastebin","get","UGAwSwg4","icon")
  64. term.clear()
  65. loadOnBoot()
  66. term.setCursorPos(1,13)
  67. term.setBackgroundColor(128)
  68. print("App Installed!")
  69. end
  70. elseif slc == 2 then
  71. elseif slc == 3 then
  72. elseif slc == 4 then
  73. end
  74. end
  75. end
  76. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement