SHARE
TWEET

Minecraft CC Music player main

bennyuoppd Nov 23rd, 2012 973 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local oldPull = os.pullEvent;
  2. os.pullEvent = os.pullEventRaw;
  3. turtleid = 453
  4. term.setTextColour(colours.orange)
  5. term.clear()
  6. term.setCursorPos(1,1)
  7. print("                   .,-:;//;:=,")
  8. print("               . :H@@@MM@M#H/.,+%;,")
  9. print("            ,/X+ +M@@M@MM%=,-%HMMM@X/,")
  10. print("          -+@MM; $M@@MH+-,;XMMMM@MMMM@+-")
  11. print("         ;@M@@M- XM@X;. -+XXXXXHHH@M@M#@/.")
  12. print("       ,%MM@@MH ,@%=             .---=-=:=,.")
  13. print("       =@#@@@MX.,                -%HX$$%%%:;")
  14. print("      =-./@M@M$                   .;@MMMM@MM:")
  15. print("      X@/ -$MM/     Aperture       . +MM@@@M$")
  16. print("     ,@@@MMX,        Science       /H- ;@M@M=")
  17. print("     .H@@@@M@+,       Jukebox      %MM+..%#$.")
  18. print("      /MMMM@MMH/.      Loading 0%  XM@MH; =;")
  19. print("       /%+%$XHH@$=              , .H@@@@MX,")
  20. print("        .=--------.           -%H.,@@@@@MX,")
  21. print("        .%MM@@@HHHXX$$$%+- .:$MMX =M@@MM%.")
  22. print("          =XMMM@MM@MM#H;,-+HMM@M+ /MMMX=")
  23. print("            =%@M@M#@$-.=$@MM@@@M; %M%=")
  24. print("              ,:+$+-,/H#MMMMMMM@= =,")
  25. write("                    =++%%%%+/:-.")
  26. sleep(0.5)
  27. term.setCursorPos(1,12)
  28. term.clearLine()
  29. print("      /MMMM@MMH/.      Loading 1%  XM@MH; =;")
  30. sleep(0.5)
  31. term.setCursorPos(1,12)
  32. term.clearLine()
  33. print("      /MMMM@MMH/.      Loading 7%  XM@MH; =;")
  34. sleep(0.5)
  35. term.setCursorPos(1,12)
  36. term.clearLine()
  37. print("      /MMMM@MMH/.      Loading 11% XM@MH; =;")
  38. sleep(0.5)
  39. term.setCursorPos(1,12)
  40. term.clearLine()
  41. print("      /MMMM@MMH/.      Loading 18% XM@MH; =;")
  42. sleep(0.5)
  43. term.setCursorPos(1,12)
  44. term.clearLine()
  45. print("      /MMMM@MMH/.      Loading 23% XM@MH; =;")
  46. sleep(0.5)
  47. term.setCursorPos(1,12)
  48. term.clearLine()
  49. print("      /MMMM@MMH/.      Loading 29% XM@MH; =;")
  50. sleep(0.5)
  51. term.setCursorPos(1,12)
  52. term.clearLine()
  53. print("      /MMMM@MMH/.      Loading 34% XM@MH; =;")
  54. sleep(0.5)
  55. term.setCursorPos(1,12)
  56. term.clearLine()
  57. print("      /MMMM@MMH/.      Loading 39% XM@MH; =;")
  58. sleep(0.5)
  59. term.setCursorPos(1,12)
  60. term.clearLine()
  61. print("      /MMMM@MMH/.      Loading 45% XM@MH; =;")
  62. sleep(0.5)
  63. term.setCursorPos(1,12)
  64. term.clearLine()
  65. print("      /MMMM@MMH/.      Loading 48% XM@MH; =;")
  66. sleep(0.5)
  67. term.setCursorPos(1,12)
  68. term.clearLine()
  69. print("      /MMMM@MMH/.      Loading 52% XM@MH; =;")
  70. sleep(0.5)
  71. term.setCursorPos(1,12)
  72. term.clearLine()
  73. print("      /MMMM@MMH/.      Loading 57% XM@MH; =;")
  74. sleep(0.5)
  75. term.setCursorPos(1,12)
  76. term.clearLine()
  77. print("      /MMMM@MMH/.      Loading 63% XM@MH; =;")
  78. sleep(0.5)
  79. term.setCursorPos(1,12)
  80. term.clearLine()
  81. print("      /MMMM@MMH/.      Loading 67% XM@MH; =;")
  82. sleep(0.5)
  83. term.setCursorPos(1,12)
  84. term.clearLine()
  85. print("      /MMMM@MMH/.      Loading 72% XM@MH; =;")
  86. sleep(0.5)
  87. term.setCursorPos(1,12)
  88. term.clearLine()
  89. print("      /MMMM@MMH/.      Loading 78% XM@MH; =;")
  90. sleep(0.5)
  91. term.setCursorPos(1,12)
  92. term.clearLine()
  93. print("      /MMMM@MMH/.      Loading 81% XM@MH; =;")
  94. sleep(0.5)
  95. term.setCursorPos(1,12)
  96. term.clearLine()
  97. print("      /MMMM@MMH/.      Loading 87% XM@MH; =;")
  98. sleep(0.5)
  99. term.setCursorPos(1,12)
  100. term.clearLine()
  101. print("      /MMMM@MMH/.      Loading 95% XM@MH; =;")
  102. sleep(0.5)
  103. term.setCursorPos(1,12)
  104. term.clearLine()
  105. print("      /MMMM@MMH/.      Loaded 100% XM@MH; =;")
  106. sleep(2)
  107. term.setTextColour(colours.lime)
  108. term.clear()
  109. term.setCursorPos(1,1)
  110. print("GlaDoS 4.3 Successfuly booted")
  111. sleep(2)
  112. print("Loading music addon...  [==        ] 23%")
  113. sleep(0.5)
  114. term.setCursorPos(1,2)
  115. term.clearLine()
  116.  
  117. function gg()
  118. term.setBackgroundColour(colours.green)
  119. term.setTextColour(colours.blue)
  120. end
  121.  
  122. print("Loading music addon..   [====      ] 43%")
  123. sleep(0.5)
  124. term.setCursorPos(1,2)
  125. term.clearLine()
  126. print("Loading music addon...  [======    ] 67%")
  127. sleep(0.5)
  128. term.setCursorPos(1,2)
  129. term.clearLine()
  130.  
  131. function cc()
  132. term.setBackgroundColour(colours.cyan)
  133. term.setTextColour(colours.lime)
  134. end
  135.  
  136. print("Loading music addon..   [========  ] 85%")
  137. sleep(0.5)
  138. term.setCursorPos(1,2)
  139. term.clearLine()
  140. print("Loading music addon...  [========= ] 93%")
  141. sleep(0.5)
  142.  
  143. function bl()
  144. term.setBackgroundColour(colours.blue)
  145. term.setTextColour(colours.lime)
  146. end
  147.  
  148. term.setCursorPos(1,2)
  149. term.clearLine()
  150. print("Loaded music addon.     [==========] 100%")
  151. sleep(2)
  152. print("Connecting to rednet... [==        ] 22%")
  153. sleep(0.5)
  154. term.setCursorPos(1,3)
  155. term.clearLine()
  156. print("Connecting to rednet... [====      ] 43%")
  157. sleep(0.5)
  158. term.setCursorPos(1,3)
  159. term.clearLine()
  160. print("Connecting to rednet... [======    ] 67%")
  161. sleep(0.5)
  162. term.setCursorPos(1,3)
  163. term.clearLine()
  164. print("Connecting to rednet... [========  ] 85%")
  165. sleep(0.5)
  166. term.setCursorPos(1,3)
  167. term.clearLine()
  168. print("Connecting to rednet... [========= ] 93%")
  169. sleep(0.5)
  170. term.setCursorPos(1,3)
  171. term.clearLine()
  172. print("Connected to rednet.    [==========] 100%")
  173. rednet.open("back")
  174. sleep(3)
  175. --GUI
  176. gg()
  177. term.clear()
  178. term.setCursorPos(1,1)
  179. print("+--------------------------------------------+----+")
  180. write("|")
  181. bl()
  182. write("                                            ")
  183. gg()
  184. write("|")
  185. cc()
  186. write("    ")
  187. gg()
  188. write("|")
  189. print("")
  190. write("|")
  191. bl()
  192. write("       C418  -   13                         ")
  193. gg()
  194. write("|")
  195. cc()
  196. write("[00]")
  197. gg()
  198. write("|")
  199. print("")
  200. write("|")
  201. bl()
  202. write("       C418  -   Cat                        ")
  203. gg()
  204. write("|")
  205. cc()
  206. write("[01]")
  207. gg()
  208. write("|")
  209. print("")
  210. write("|")
  211. bl()
  212. write("       C418  -   Blocks                     ")
  213. gg()
  214. write("|")
  215. cc()
  216. write("[02]")
  217. gg()
  218. write("|")
  219. print("")
  220. write("|")
  221. bl()
  222. write("       C418  -   Chirp                      ")
  223. gg()
  224. write("|")
  225. cc()
  226. write("[03]")
  227. gg()
  228. write("|")
  229. print("")
  230. write("|")
  231. bl()
  232. write("       C418  -   Far                        ")
  233. gg()
  234. write("|")
  235. cc()
  236. write("[04]")
  237. gg()
  238. write("|")
  239. print("")
  240. write("|")
  241. bl()
  242. write("       C418  -   Mall                       ")
  243. gg()
  244. write("|")
  245. cc()
  246. write("[05]")
  247. gg()
  248. write("|")
  249. print("")
  250. write("|")
  251. bl()
  252. write("       C418  -   Mellohi                    ")
  253. gg()
  254. write("|")
  255. cc()
  256. write("[06]")
  257. gg()
  258. write("|")
  259. print("")
  260. write("|")
  261. bl()
  262. write("       C418  -   Stal                       ")
  263. gg()
  264. write("|")
  265. cc()
  266. write("[07]")
  267. gg()
  268. write("|")
  269. print("")
  270. write("|")
  271. bl()
  272. write("       C418  -   Strad                      ")
  273. gg()
  274. write("|")
  275. cc()
  276. write("[08]")
  277. gg()
  278. write("|")
  279. print("")
  280. write("|")
  281. bl()
  282. write("       C418  -   Ward                       ")
  283. gg()
  284. write("|")
  285. cc()
  286. write("[09]")
  287. gg()
  288. write("|")
  289. print("")
  290. write("|")
  291. bl()
  292. write("       Valve -   Still alive                ")
  293. gg()
  294. write("|")
  295. cc()
  296. write("[10]")
  297. gg()
  298. write("|")
  299. print("")
  300. write("|")
  301. bl()
  302. write("       Valve -   Radio loop                 ")
  303. gg()
  304. write("|")
  305. cc()
  306. write("[11]")
  307. gg()
  308. write("|")
  309. print("")
  310. write("|")
  311. bl()
  312. write("       Valve -   Want you gone              ")
  313. gg()
  314. write("|")
  315. cc()
  316. write("[12]")
  317. gg()
  318. write("|")
  319. print("")
  320. write("|")
  321. bl()
  322. write("       Stop the current song                ")
  323. gg()
  324. write("|")
  325. cc()
  326. write("[13]")
  327. gg()
  328. write("|")
  329. print("")
  330. write("|")
  331. bl()
  332. write("       Shutdown the jukebox                 ")
  333. gg()
  334. write("|")
  335. cc()
  336. write("[14]")
  337. gg()
  338. write("|")
  339. print("")
  340. write("|")
  341. bl()
  342. write("                                            ")
  343. gg()
  344. write("|")
  345. cc()
  346. write("    ")
  347. gg()
  348. write("|")
  349. print("")
  350. write("+--------------------------------------------+----+")
  351. --Clicking and playing loop
  352. while true do
  353. local event, button, xPos, yPos = os.pullEvent("mouse_click")
  354. if button == 1 then
  355. if xPos > 46 and xPos < 51 then
  356. if yPos > 2 and yPos < 16 then
  357. msg = yPos - 2
  358. msg = tostring(msg)
  359. rednet.send(turtleid,msg)
  360. elseif yPos == 16 then
  361. rednet.send(turtleid,"15")
  362. elseif yPos == 17 then
  363. rednet.send(turtleid,"15")
  364. os.shutdown()
  365. end
  366. end
  367. end
  368. end
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top