Advertisement
Ewgeniy

STILLALI

Jan 18th, 2025 (edited)
35
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 8.55 KB | None | 0 0
  1. -- Полная адаптация программы из QuickBasic для OpenComputers на Lua
  2.  
  3. local component = require("component")
  4. local term = require("term")
  5. local event = require("event")
  6. local computer = require("computer")
  7.  
  8. -- Подключаем компоненты
  9. local gpu = component.gpu
  10. local note = component.isAvailable("note") and component.note or nil
  11.  
  12. -- Настройки экрана
  13. local screenWidth, screenHeight = gpu.getResolution()
  14.  
  15. -- Общие переменные
  16. local posX, posY = 1, 1
  17. local credits = {}
  18. local creditIndex = 1
  19. local lineNumber = 0
  20. local songLines = {}
  21.  
  22. -- Заполнение массива кредитов
  23. local function initializeCredits()
  24.     credits = {
  25.         ">LIST PERSONNEL",
  26.         "",
  27.         "Gautam Babbar",
  28.         "Ted Backman",
  29.         "Kelly Bailey",
  30.         "Jeff Ballinger",
  31.         "Aaron Barber",
  32.         "Jeep Barnett",
  33.         "Jeremy Bennett",
  34.         "Dan Berger",
  35.         "Yahm Bernier",
  36.         "Ken Birdwell",
  37.         "Derrick Birum",
  38.         "Mike Blaszczak",
  39.         "Iestyn Bleasdale-Shepherd",
  40.         "Chris Bokitch",
  41.         "Steve Bond",
  42.         "Matt Boone",
  43.         "Antoine Bourdon",
  44.         "Jamaal Bradley",
  45.         "Jason Brashill",
  46.         "Charlie Brown",
  47.         "Charlie Burgin",
  48.         "Andrew Burke",
  49.         "Augusta Butlin",
  50.         "Julie Caldwell",
  51.         "Dario Casali",
  52.         "Chris Chin",
  53.         "Jess Cliffe",
  54.         "Phil Co",
  55.         "John Cook",
  56.         "Christen Coomer",
  57.         "Greg Coomer",
  58.         "Scott Dalton",
  59.         "Kerry Davis",
  60.         "Jason Deakins",
  61.         "Joe Demers",
  62.         "Ariel Diaz",
  63.         "Quintin Doroquez",
  64.         "Jim Dose",
  65.         "Chris Douglass",
  66.         "Laura Dubuk",
  67.         "Mike Dunkle",
  68.         "Mike Durand",
  69.         "Mike Dussault",
  70.         "Dhabih Eng",
  71.         "Katie Engel",
  72.         "Chet Faliszek",
  73.         "Adrian Finol",
  74.         "Bill Fletcher",
  75.         "Moby Francke",
  76.         "Stephane Gaudette",
  77.         "Kathy Gehrig",
  78.         "Vitaliy Genkin",
  79.         "Paul Graham",
  80.         "Chris Green",
  81.         "Chris Grinstead",
  82.         "John Guthrie",
  83.         "Aaron Halifax",
  84.         "Reagan Halifax",
  85.         "Leslie Hall",
  86.         "Jeff Hameluck",
  87.         "Joe Han",
  88.         "Don Holden",
  89.         "Jason Holtman",
  90.         "Gray Horsfield",
  91.         "Keith Huggins",
  92.         "Jim Hughes",
  93.         "Jon Huisingh",
  94.         "Brian Jacobson",
  95.         "Lars Jensvold",
  96.         "Erik Johnson",
  97.         "Jakob Jungels",
  98.         "Rich Kaethler",
  99.         "Steve Kalning",
  100.         "Aaron Kearly",
  101.         "Iikka Keranen",
  102.         "David Kircher",
  103.         "Eric Kirchmer",
  104.         "Scott Klintworth",
  105.         "Alden Kroll",
  106.         "Marc Laidlaw",
  107.         "Jeff Lane",
  108.         "Tim Larkin",
  109.         "Dan LeFree",
  110.         "Isabelle LeMay",
  111.         "Tom Leonard",
  112.         "Jeff Lind",
  113.         "Doug Lombardi",
  114.         "Bianca Loomis",
  115.         "Richard Lord",
  116.         "Realm Lovejoy",
  117.         "Randy Lundeen",
  118.         "Scott Lynch",
  119.         "Ido Magal",
  120.         "Nick Maggiore",
  121.         "John McCaskey",
  122.         "Patrick McClard",
  123.         "Steve McClure",
  124.         "Hamish McKenzie",
  125.         "Gary McTaggart",
  126.         "Jason Mitchell",
  127.         "Mike Morasky",
  128.         "John Morello II",
  129.         "Bryn Moslow",
  130.         "Arsenio Navarro",
  131.         "Gabe Newell",
  132.         "Milton Ngan",
  133.         "Jake Nicholson",
  134.         "Martin Otten",
  135.         "Nick Papineau",
  136.         "Karen Prell",
  137.         "Bay Raitt",
  138.         "Tristan Reidford",
  139.         "Alfred Reynolds",
  140.         "Matt Rhoten",
  141.         "Garret Rickey",
  142.         "Dave Riller",
  143.         "Elan Ruskin",
  144.         "Matthew Russell",
  145.         "Jason Ruymen",
  146.         "David Sawyer",
  147.         "Marc Scaparro",
  148.         "Wade Schin",
  149.         "Matthew Scott",
  150.         "Aaron Seeler",
  151.         "Jennifer Seeley",
  152.         "Taylor Sherman",
  153.         "Eric Smith",
  154.         "Jeff Sorensen",
  155.         "David Speyrer",
  156.         "Jay Stelly",
  157.         "Jeremy Stone",
  158.         "Eric Strand",
  159.         "Kim Swift",
  160.         "Kelly Thornton",
  161.         "Eric Twelker",
  162.         "Carl Uhlman",
  163.         "Doug Valente",
  164.         "Bill Van Buren",
  165.         "Gabe Van Engel",
  166.         "Alex Vlachos",
  167.         "Robin Walker",
  168.         "Joshua Weier",
  169.         "Andrea Wicklund",
  170.         "Greg Winkler",
  171.         "Erik Wolpaw",
  172.         "Doug Wood",
  173.         "Matt T. Wood",
  174.         "Danika Wright",
  175.         "Matt Wright",
  176.         "Shawn Zabecki",
  177.         "Torsten Zabka",
  178.         "",
  179.         "'Still Alive' by:",
  180.         "Jonathan Coulton",
  181.         "",
  182.         "Voices:",
  183.         "Ellen McLain - GLaDOS, Turrets",
  184.         "Mike Patton - THE ANGER SPHERE",
  185.         "",
  186.         "Voice Casting:",
  187.         "Shana Landsburg-Teri Fiddleman",
  188.         "",
  189.         "Voice Recording:",
  190.         "Pure Audio, Seattle, WA",
  191.         "",
  192.         "Translations:",
  193.         "SDL",
  194.         "",
  195.         "Crack Legal Team:",
  196.         "Liam Lavery",
  197.         "Karl Quackenbush",
  198.         "Kristen Boraas",
  199.         "Kevin Rosenfield",
  200.         "Alan Bruggeman",
  201.         "Dennis Tessier",
  202.         "",
  203.         "Special thanks to everyone at:",
  204.         "Alienware",
  205.         "ATI",
  206.         "Dell",
  207.         "Falcon Northwest",
  208.         "Havok",
  209.         "SOFTIMAGE",
  210.         "and Don Kemmis, SLK Technologies",
  211.         "",
  212.         "THANK YOU FOR PARTICIPATING",
  213.         "IN THIS",
  214.         "ENRICHMENT CENTER ACTIVITY!!",
  215.     }
  216. end
  217.  
  218. -- Заполнение строк текста песни
  219. local function initializeSong()
  220.     songLines = {
  221.         "This was a triumph.",
  222.         "I'm making a note here: HUGE SUCCESS.",
  223.         "It's hard to overstate my satisfaction.",
  224.         "Aperture Science:",
  225.         "We do what we must, because we can.",
  226.         "For the good of all of us.",
  227.         "Except the ones who are dead.",
  228.         "But there's no sense crying over every mistake.",
  229.         "You just keep on trying till you run out of cake.",
  230.         "And the science gets done, and you make a neat gun.",
  231.         "For the people who are still alive.",
  232.         -- Добавьте остальные строки песни
  233.     }
  234. end
  235.  
  236. -- Воспроизведение текста с разной скоростью
  237. local function slowText(text, delay)
  238.     for i = 1, #text do
  239.         local char = text:sub(i, i)
  240.         gpu.set(posX, posY, char)
  241.         posX = posX + 1
  242.         if posX > screenWidth then
  243.             posX = 1
  244.             posY = posY + 1
  245.         end
  246.         os.sleep(delay or 0.1)
  247.     end
  248. end
  249.  
  250. local function fastText(text)
  251.     slowText(text, 0.05)
  252. end
  253.  
  254. local function slowerText(text)
  255.     slowText(text, 0.2)
  256. end
  257.  
  258. -- Очистка строки и каретки
  259. local function clearCaret()
  260.     gpu.set(posX, posY, " ")
  261.     posX = 1
  262. end
  263.  
  264. -- Отображение лого
  265. local function drawApertureLogo()
  266.     local logo = {
  267.         "             .,-:;//;:=,                ",
  268.         "         . :H@@@MM@M#H/.,+%;,           ",
  269.         "     -+@MM; $M@@MH+-,;XMMMM@MMMM@+-     ",
  270.         "    ;@M@@M- XM@X;. -+XXXXXHHH@M@M#@/.   ",
  271.         "  -@#@@@MX .,              -%HX$$%%%+;  ",
  272.         " =-./@M@M$                  .;@MMMM@MM: ",
  273.         ",@M@H: :@:                    . -X#@@@@-",
  274.         ",@@@MMX, .                    /H- ;@M@M=",
  275.         " /MMMM@MMH/.                  XM@MH; -; ",
  276.         "  /%+%$XHH@$=              , .H@@@@MX,  ",
  277.         "   .%MM@@@HHHXX$$$%+- .:$MMX -M@@MM%.   ",
  278.         "     =XMMM@MM@MM#H;,-+HMM@M+ /MMMX=     ",
  279.         "         ,:+$+-,/H#MMMMMMM@- -,         ",
  280.         "               =++%%%%+/:-.             "
  281.     }
  282.     clearScreen()
  283.     for i, line in ipairs(logo) do
  284.         gpu.set(1, i, line)
  285.     end
  286. end
  287.  
  288. -- Основная логика программы
  289. local function main()
  290.     initializeCredits()
  291.     initializeSong()
  292.     clearScreen()
  293.     slowText("Forms FORM-29827281-12:", 0.1)
  294.     posY = posY + 1
  295.     slowText("Test Assessment Report", 0.1)
  296.     os.sleep(1)
  297.  
  298.     -- Логотип
  299.     drawApertureLogo()
  300.     os.sleep(2)
  301.  
  302.     -- Перебор кредитов
  303.     clearScreen()
  304.     for i = 1, #credits do
  305.         clearCaret()
  306.         gpu.set(posX, posY, credits[i])
  307.         os.sleep(0.5)
  308.         posY = posY + 1
  309.         if posY > screenHeight then
  310.             posY = 1
  311.             clearScreen()
  312.         end
  313.     end
  314.  
  315.     -- Показ текста песни
  316.     clearScreen()
  317.     for i, line in ipairs(songLines) do
  318.         gpu.set(1, i, line)
  319.         os.sleep(1)
  320.     end
  321. end
  322.  
  323. -- Запуск программы
  324. main()
  325.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement