Advertisement
Sparkybearbomb

Portal Logo

Dec 7th, 2019
631
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 15.04 KB | None | 0 0
  1. ---VERSION 2.3.0
  2. -- CUSTOMIZABLE VARIABLES
  3. txtColor = colors.orange
  4. bgColor = colors.black
  5. offsetX = 38
  6. offsetY = 20
  7. offsetX2 = 18
  8. offsetY2 = 10
  9. delay = 60
  10.  
  11. -----------------------------------------------
  12. ------- END OF USER EDITABLE VARIABLES --------
  13. -----------------------------------------------
  14.  
  15. -- LOGO TABLE
  16. logo = {
  17. "             .,-:;//;:=,",
  18. "         . :H@@@MM@M#H/.,+%;,",
  19. "      ,/X+ +M@@M@MM%=,-%HMMM@X/,",
  20. "     -+@MM; $M@@MH+-,;XMMMM@MMMM@+-",
  21. "    ;@M@@M- XM@X;. -+XXXXXHHH@M@M#@/.",
  22. "  ,%MM@@MH ,@%=            .---=-=:=,.",
  23. "  -@#@@@MX .,              -%HX$$%%%+;",
  24. " =-./@M@M$                  .;@MMMM@MM:",
  25. " X@/ -$MM/                    .+MM@@@M$",
  26. ",@M@H: :@:                    . -X#@@@@-",
  27. ",@@@MMX, .                    /H- ;@M@M=",
  28. ".H@@@@M@+,                    %MM+..%#$.",
  29. " /MMMM@MMH/.                  XM@MH; -;",
  30. "  /%+%$XHH@$=              , .H@@@@MX,",
  31. "   .=--------.           -%H.,@@@@@MX,",
  32. "   .%MM@@@HHHXX$$$%+- .:$MMX -M@@MM%.",
  33. "     =XMMM@MM@MM#H;,-+HMM@M+ /MMMX=",
  34. "       =%@M@M#@$-.=$@MM@@@M; %M%=",
  35. "         ,:+$+-,/H#MMMMMMM@- -,",
  36. "               =++%%%%+/:-."}
  37.  
  38. radiation = {
  39. "             =+$HM####@H%;,",
  40. "          /H###############M$,",
  41. "          ,@################+",
  42. "           .H##############+",
  43. "             X############/",
  44. "              $##########/",
  45. "               %########/",
  46. "                /X/;;+X/",
  47. " ",
  48. "                 -XHHX-",
  49. "                ,######,",
  50. "#############X  .M####M.  X#############",
  51. "##############-   -//-   -##############",
  52. "X##############%,      ,+##############X",
  53. "-##############X        X##############-",
  54. " %############%          %############%",
  55. "  %##########;            ;##########%",
  56. "   ;#######M=              =M#######;",
  57. "    .+M###@,                ,@###M+.",
  58. "       :XH.                  .HX:" }
  59.  
  60. cake = {
  61. "            ,:/+/-",
  62. "            /M/              .,-=;//;-",
  63. "       .:/= ;MH/,    ,=/+%$XH@MM#@:",
  64. "      -$##@+$###@H@MMM#######H:.    -/H#",
  65. " .,H@H@ X######@ -H#####@+-     -+H###@X",
  66. "  .,@##H;      +XM##M/,     =%@###@X;-",
  67. "X%-  :M##########$.    .:%M###@%:",
  68. "M##H,   +H@@@$/-.  ,;$M###@%,          -",
  69. "M####M=,,---,.-%%H####M$:          ,+@##",
  70. "@##################@/.         :%H##@$-",
  71. "M###############H,         ;HM##M$=",
  72. "#################.    .=$M##M$=",
  73. "################H..;XM##M$=          .:+",
  74. "M###################@%=           =+@MH%",
  75. "@#################M/.         =+H#X%=",
  76. "=+M###############M,      ,/X#H+:,",
  77. "  .;XM###########H=   ,/X#H+:;",
  78. "     .=+HM#######M+/+HM@+=.",
  79. "         ,:/%XM####H/.",
  80. "              ,.:=-." }
  81.  
  82.  
  83. blackMesa = {
  84. "           .-;+$XHHHHHHX$+;-.",
  85. "        ,;X@@X%/;=----=:/%X@@X/,",
  86. "      =$@@%=.              .=+H@X:",
  87. "    -XMX:                      =XMX=",
  88. "   /@@:                          =H@+",
  89. "  %@X,                            .$@$",
  90. " +@X.                               $@%",
  91. "-@@,                                .@@=",
  92. "%@%                                  +@$",
  93. "H@:                                  :@H",
  94. "H@:         :HHHHHHHHHHHHHHHHHHX,    =@H",
  95. "%@%         ;@M@@@@@@@@@@@@@@@@@H-   +@$",
  96. "=@@,        :@@@@@@@@@@@@@@@@@@@@@= .@@:",
  97. " +@X        :@@@@@@@@@@@@@@@M@@@@@@:%@%",
  98. "  $@$,      ;@@@@@@@@@@@@@@@@@M@@@@@@$.",
  99. "   +@@HHHHHHH@@@@@@@@@@@@@@@@@@@@@@@+",
  100. "    =X@@@@@@@@@@@@@@@@@@@@@@@@@@@@X=",
  101. "      :$@@@@@@@@@@@@@@@@@@@M@@@@$:",
  102. "        ,;$@@@@@@@@@@@@@@@@@@X/-",
  103. "           .-;+$XXHHHHHX$+;-." }
  104.  
  105. fire = {
  106. "                     -$-",
  107. "                    .H##H,",
  108. "                   +######+",
  109. "                .+#########H.",
  110. "              -$############@.",
  111. "            =H###############@  -X:",
  112. "          .$##################:  @#@-",
  113. "     ,;  .M###################;  H###;",
  114. "   ;@#:  @###################@  ,#####:",
  115. " -M###.  M#################@.  ;######H",
  116. " M####-  +###############$   =@#######X",
  117. " H####$   -M###########+   :#########M,",
  118. "  /####X-   =########%   :M########@/.",
  119. "    ,;%H@X;   .$###X   :##MM@%+;:-",
  120. "                 ..",
  121. "  -/;:-,.              ,,-==+M########H",
  122. " -##################@HX%%+%%$%%%+:,,",
  123. "    .-/H%%%+%%$H@###############M@+=:/+:",
  124. "/XHX%:#####MH%=    ,---:;;;;/&&XHM,:###$",
  125. "$@#MX %+;-                           ." }
  126.  
  127. atomic = {
  128. "                 =/;;/-",
  129. "                +:    //",
  130. "               /;      /;",
  131. "              -X        H.",
  132. ".//;;;:;;-,   X=        :+   .-;:=;:;%;.",
  133. "M-       ,=;;;#:,      ,:#;;:=,       ,@",
  134. ":%           :%.=/++++/=.$=           %=",
  135. " ,%;         %/:+/;,,/++:+/         ;+.",
  136. "   ,+/.    ,;@+,        ,%H;,    ,/+,",
  137. "      ;+;;/= @.  .H##X   -X :///+;",
  138. "      ;+=;;;.@,  .XM@$.  =X.//;=%/.",
  139. "   ,;:      :@%=        =$H:     .+%-",
  140. " ,%=         %;-///==///-//         =%,",
  141. ";+           :%-;;;;;;;;-X-           +:",
  142. "@-      .-;;;;M-        =M/;;;-.      -X",
  143. " :;;::;;-.    %-        :+    ,-;;-;:==",
  144. "              ,X        H.",
  145. "               ;/      %=",
  146. "                //    +;",
  147. "                 ,////," }
  148.  
  149. brokenHeart = {
  150. "                          .,---.",
  151. "                        ,/XM#MMMX;,",
  152. "                      -%##########M%,",
  153. "                     -@######%  $###@=",
  154. "      .,--,         -H#######$   $###M:",
  155. "   ,;$M###MMX;     .;##########$;HM###X=",
  156. ",/@###########H=      ;################+",
  157. "-+#############M/,      %##############+",
  158. "%M###############=      /##############:",
  159. "H################      .M#############;.",
  160. "@###############M      ,@###########M:.",
  161. "X################,      -$=X#######@:",
  162. "/@##################%-     +######$-",
  163. ".;##################X     .X#####+,",
  164. " .;H################/     -X####+.",
  165. "   ,;X##############,       .MM/",
  166. "      ,:+$H@M#######M#$-    .$$=",
  167. "           .,-=;+$@###X:    ;/=.",
  168. "                  .,/X$;   .::,",
  169. "                      .,    .." }
  170.  
  171. explosion = {
  172. "            .+",
  173. "             /M;",
  174. "              H#@:              ;,",
  175. "              -###H-          -@/",
  176. "               %####$.  -;  .%#X",
  177. "                M#####+;#H :M#M.",
  178. "..          .+/;%#############-",
  179. " -/%H%+;-,    +##############/",
  180. "    .:$M###MH$%+############X  ,--=;-",
  181. "        -/H#####################H+=.",
  182. "           .+#################X.",
  183. "         =%M####################H;.",
  184. "            /@###############+;;/%%;,",
  185. "         -%###################$",
  186. "       ;H######################M=",
  187. "    ,%#####MH$%;+#####M###-/@####%",
  188. "  :$H%+;=-      -####X.,H#   -+M##@-",
  189. " .              ,###;    ;      =$##+",
  190. "                .#H,               :XH,",
  191. "                 +                   .;-" }
  192.  
  193. check = {
  194. "                                     :X-",
  195. "                                  :X###",
  196. "                                ;@####@",
  197. "                              ;M######X",
  198. "                            -@########$",
  199. "                          .$##########@",
  200. "                         =M############-",
  201. "                        +##############$",
  202. "                      .H############$=.",
  203. "         ,/:         ,M##########M;.",
  204. "      -+@###;       =##########M;",
  205. "   =%M#######;     :#########M/",
  206. "-$M###########;   :########/",
  207. " ,;X###########; =#######$.",
  208. "     ;H#########+######M=",
  209. "       ,+#############+",
  210. "          /M########@-",
  211. "            ;M#####%",
  212. "              +####:",
  213. "               ,$M-" }
  214.  
  215. GLaDOS = {
  216. "       #+ @      # #              M#@",
  217. " .    .X  X.%##@;# #   +@#######X. @H%",
  218. "   ,==.   ,######M+  -#####%M####M-    #",
  219. "  :H##M%:=##+ .M##M,;#####/+#######% ,M#",
  220. " .M########=  =@#@.=#####M=M#######=  X#",
  221. " :@@MMM##M.  -##M.,#######M#######. =  M",
  222. "             @##..###:.    .H####. @@ X,",
  223. "   ############: ###,/####;  /##= @#. M",
  224. "           ,M## ;##,@#M;/M#M  @# X#% X#",
  225. ".%=   ######M## ##.M#:   ./#M ,M #M ,#$",
  226. "##/         $## #+;#: #### ;#/ M M- @# :",
  227. "#+ #M@MM###M-;M #:$#-##$H# .#X @ + $#. #",
  228. "      ######/.: #%=# M#:MM./#.-#  @#: H#",
  229. "+,.=   @###: /@ %#,@  ##@X #,-#@.##% .@#",
  230. "#####+;/##/ @##  @#,+       /#M    . X,",
  231. "   ;###M#@ M###H .#M-     ,##M  ;@@; ###",
  232. "   .M#M##H ;####X ,@#######M/ -M###$  -H",
  233. "    .M###%  X####H  .@@MM@;  ;@#M@",
  234. "      H#M    /@####/      ,++.  / ==-,",
  235. "               ,=/:, .+X@MMH@#H  #####$=" }
  236.  
  237. blank = {
  238. "                                        ",
  239. "                                        ",
  240. "                                        ",
  241. "                                        ",
  242. "                                        ",
  243. "                                        ",
  244. "                                        ",
  245. "                                        ",
  246. "                                        ",
  247. "                                        ",
  248. "                                        ",
  249. "                                        ",
  250. "                                        ",
  251. "                                        ",
  252. "                                        ",
  253. "                                        ",
  254. "                                        ",
  255. "                                        ",
  256. "                                        ",
  257. "                                        " }
  258.  
  259. songPage1 = {
  260. "Forms FORM-29827281-12:",
  261. "Test Assesment Report",
  262. " ",
  263. " ",
  264. "This was a triumph!",
  265. "I'm making a note here:",
  266. "HUGE SUCCESS!",
  267. "It's hard to overstate",
  268. "my satisfaction.",
  269. "Aperture Science",
  270. "We do what we must.",
  271. "because we can.",
  272. "For the good of all of us.",
  273. "Except the ones who are dead.",
  274. " ",
  275. "But there's no sense crying",
  276. "over every mistake.",
  277. "You just keep on trying",
  278. "till you run out of cake.",
  279. "And the Science gets done.",
  280. "And you make a neat gun.",
  281. "For the people who are",
  282. "still alive." }
  283.  
  284. songPage2 = {
  285. "Forms FORM-55551-5",
  286. "Personnel File Addendum:",
  287. " ",
  288. "Dear <<Subject Name Here>>,",
  289. " ",
  290. "I'm not even angry.",
  291. "I'm being so sincere right now.",
  292. "Even though you broke my",
  293. "heart and killed me.",
  294. "And tore me to pieces.",
  295. "And threw every piece into",
  296. "a fire.",
  297. "As they burned it hurt because",
  298. "I was so happy for you!",
  299. "Now these points of data",
  300. "make a beautiful line.",
  301. "And we're out of beta.",
  302. "We're releasing on time.",
  303. "So I'm GLaD. I got burned.",
  304. "Think of all the things",
  305. "we learned.",
  306. "For the people who are",
  307. "still alive." }
  308.  
  309. songPage3 = {
  310. "Forms FORM-55551-6:",
  311. "Personnel File",
  312. "Addendum Addendum",
  313. " ",
  314. "One Last Thing:",
  315. " ",
  316. "Go ahead and leave me.",
  317. "I think I prefer to stay inside",
  318. "Maybe you'll find someone else",
  319. "to help you.",
  320. "Maybe Black Mesa...",
  321. "THAT WAS A JOKE. FAT CHANCE.",
  322. "Anyway, this cake is great.",
  323. "It's so delicious and moist.",
  324. "Look at me still talking",
  325. "when there's Science to do.",
  326. "When I look out there,",
  327. "it makes me GLaD I'm not you.",
  328. "I've experiments to run.",
  329. "There is research to be done.",
  330. "On the people who are",
  331. "still alive" }
  332.  
  333. songPage4 = {
  334. "PS: Believe me I am",
  335. "still alive",
  336. "PPS: I'm doing Science and I'm",
  337. "still alive",
  338. "PPPS: I feel FANTASTIC and I'm",
  339. "still alive",
  340. " ",
  341. "FINAL THOUGHT:",
  342. "While you're dying I'll be",
  343. "still alive",
  344. " ",
  345. "FINAL THOUGHT PS:",
  346. "And when you're dead I will be",
  347. "still alive",
  348. " ",
  349. " ",
  350. "STILL ALIVE" }
  351.  
  352. top          = "--------------------------------- -------------------------------------"
  353. middle       = "|                               | -------------------------------------"
  354. bottom       = "---------------------------------"
  355. borderTop    = "|                               | |                                   |"
  356. borderBottom = "|                               |"
  357.  
  358. -- FUNCTIONS
  359. function monitorSearch()
  360.    local names = peripheral.getNames()
  361.    local i, name
  362.    for i, name in pairs(names) do
  363.       if peripheral.getType(name) == "monitor" then
  364.         test = name
  365.          return peripheral.wrap(name)
  366.       else
  367.          --return null
  368.       end
  369.    end
  370. end
  371.  
  372. function send(x,y,text)
  373.   mon.setCursorPos(x,y)
  374.   mon.write(text)
  375. end
  376.  
  377. function getKey( t, value )
  378.   for k,v in pairs(t) do
  379.     if v==value then return k end
  380.   end
  381.   return nil
  382. end
  383.  
  384. function lyrics(song)
  385.   local y = 2
  386.   local i = 1
  387.   length = table.getn(song)
  388.  
  389.   while (i <= length) do
  390.     songLine = song[i]
  391.     logoLookup(songLine)
  392.     os.sleep(0.1)
  393.     mon.setCursorPos(2,y)
  394.     mon.write(songLine)
  395.     os.sleep(2)
  396.     y = y + 1
  397.     i = i + 1
  398.   end
  399.   os.sleep(1)
  400.   local z = 1
  401.   local y = 2
  402.   length = table.getn(song)
  403.   while (z <= length) do
  404.     send(1,y,borderBottom)
  405.     z = z + 1
  406.     y = y + 1
  407.   end
  408.   os.sleep(5)
  409. end
  410.  
  411. function mainLogo(image,sleep)
  412.   mon.clear()
  413.   x = (w/2) - offsetX2
  414.   y = (h/2) - offsetY2
  415.   local i = 1
  416.   while (i <= 20) do
  417.     mon.setCursorPos(x,y)
  418.     line = image[i]
  419.     mon.write(line)
  420.     y = y + 1
  421.     i = i + 1
  422.   end
  423.   os.sleep(sleep)
  424. end
  425.  
  426. function subLogo(image)
  427.   x = w - offsetX
  428.   y = h - offsetY
  429.   local i = 1
  430.   while (i <= 20) do
  431.     mon.setCursorPos(x,y)
  432.     line = blank[i]
  433.     mon.write(line)
  434.     mon.setCursorPos(x,y)
  435.     mon.write("|")
  436.     y = y + 1
  437.     i = i + 1
  438.   end
  439.   x = w - offsetX
  440.   y = h - offsetY
  441.   local i = 1
  442.   while (i <= 20) do
  443.     mon.setCursorPos(x,y)
  444.     line = image[i]
  445.     mon.write(line)
  446.     mon.setCursorPos(x,y)
  447.     mon.write("|")
  448.     y = y + 1
  449.     i = i + 1
  450.   end
  451. end
  452.  
  453. function logoLookup(line)
  454.   if (line == "Aperture Science" or line == "For the people who are" or line == "On the people who are") then
  455.     subLogo(logo)
  456.   elseif (line == "But there's no sense crying" or line == "When I look out there,") then
  457.     subLogo(logo)
  458.   elseif (line == "And the Science gets done." or line == "I've experiments to run.") then
  459.     subLogo(atomic)
  460.   elseif (line == "Think of all the things") then
  461.     subLogo(atomic)
  462.   elseif (line == "Except the ones who are dead." or line == "when there's Science to do.") then
  463.     subLogo(radiation)
  464.   elseif (line == "There is research to be done." or line == "So I'm GLaD. I got burned.") then
  465.     subLogo(explosion)
  466.   elseif (line == "And tore me to pieces.") then
  467.     subLogo(explosion)
  468.   elseif (line == "Even though you broke my") then
  469.     subLogo(brokenHeart)
  470.   elseif (line == "I was so happy for you!") then
  471.     subLogo(check)
  472.   elseif (line == "Maybe Black Mesa...") then
  473.     subLogo(blackMesa)
  474.   elseif (line == "a fire.") then
  475.     subLogo(fire)
  476.   elseif (line == "Anyway, this cake is great.") then
  477.     subLogo(cake)
  478.   elseif (line == "Look at me still talking") then
  479.     subLogo(GLaDOS)
  480.   elseif (line == "STILL ALIVE") then
  481.     subLogo(blank)
  482.   end
  483. end
  484.  
  485. function screenSetup()
  486.   mon.clear()
  487.   send(1,1,top)
  488.   z = 2
  489.   while (z <= 17) do
  490.     send(1,z,borderTop)
  491.     z = z + 1
  492.   end
  493.   send(1,18,middle)
  494.   while (z <= 39) do
  495.     send(1,z,borderBottom)
  496.     z = z + 1
  497.   end
  498.   send(1,40,bottom)
  499. end
  500.  
  501. -- CRITICAL SETUP
  502. mon = monitorSearch()
  503. mon.setBackgroundColor(bgColor)
  504. mon.setTextColor(txtColor)
  505. mon.clear()
  506. w,h = mon.getSize()
  507.  
  508.  
  509. --SCREEN DISPLAY
  510. while true do
  511.  
  512.   mainLogo(logo,delay)
  513.   subLogo(blank)
  514.   screenSetup()
  515.  
  516.   lyrics(songPage1)
  517.   lyrics(songPage2)
  518.   lyrics(songPage3)
  519.   lyrics(songPage4)
  520.   mainLogo(logo,delay)
  521.   mainLogo(cake,delay)
  522.   mainLogo(logo,delay)
  523.   mainLogo(blackMesa,delay)
  524.   mainLogo(atomic,delay)
  525.  
  526.  
  527. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement