Advertisement
Rolcam

Legacy Mall Billboard Program - Condemned Network

Feb 3rd, 2024 (edited)
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. --[[
  2. This program is designed for use with Computercraft
  3. This is a legacy version of the billboard program designed for use in Minecraft 1.6.4
  4. Custom version for: The Condemned Network - Tekkit Main (1.6.4) player mall
  5. Billboard Specs: 8 blocks wide by 5 blocks tall advanced monitor
  6.  
  7. Programmed by Rolcam
  8. You can copy/modify this program as you wish, just please leave the documentation intact
  9.  
  10. ]]--
  11.  
  12. -- Adds a casino advert to the sign rotation if set to 1
  13. slotHall = 0
  14. --Change this to the side the monitor is on
  15. side = "back"
  16. -- Time variable for how long (in seconds) to display each advert
  17. t = 5
  18. --Redirects setup/install output to monitor (for artistic effect)
  19. local monitor = peripheral.wrap(side)
  20. if not fs.exists("boot") then
  21.     term.setTextColor(colors.red)
  22.     print("Warning: boot image missing!")
  23.     print("Downloading image...")
  24.     term.setTextColor(colors.white)
  25.     shell.run("pastebin get edscQ8zU boot")
  26.     term.setTextColor(colors.green)
  27.     print("Main boot image downloaded.")
  28.     term.setTextColor(colors.white)
  29. else
  30.     term.setTextColor(colors.green)
  31.     print("boot image found!")
  32.     term.setTextColor(colors.white)
  33. end
  34. local img = paintutils.loadImage("boot")
  35. term.redirect(monitor)
  36. paintutils.drawImage(img, 1,1)
  37. term.restore()
  38. term.setBackgroundColor(colors.blue)
  39. term.setTextColor(colors.orange)
  40. term.clear()
  41. print("Rolcam's Billboard Program V3")
  42. term.setTextColor(colors.white)
  43. print(" ")
  44. print("Beginning system check...")
  45. --Checks for missing signs and labels itself
  46. print("Checking signs...")
  47. if not fs.exists("image") then
  48.     term.setTextColor(colors.red)
  49.     print("Warning: advert image missing!")
  50.     term.setTextColor(colors.white)
  51.     print("Downloading image...")
  52.     shell.run("pastebin get EZDcTC35 image")
  53.     term.setTextColor(colors.green)
  54.     print("File downloaded")
  55.     term.setTextColor(colors.white)
  56. else
  57.     term.setTextColor(colors.green)
  58.     print("beach image found!")
  59.     term.setTextColor(colors.white)
  60. end
  61.  
  62. if not fs.exists("mall") then
  63.     term.setTextColor(colors.red)
  64.     print("Warning: Mall sign is missing!")
  65.     term.setTextColor(colors.white)
  66.     print("Downloading image...")
  67.     shell.run("pastebin get k1dsWddA mall")
  68.     term.setTextColor(colors.green)
  69.     print("File downloaded")
  70.     term.setTextColor(colors.white)
  71. else
  72.     term.setTextColor(colors.green)
  73.     print("Mall sign image found!")
  74.     term.setTextColor(colors.white)
  75. end
  76.  
  77. --Downloads the slot hall signs if this board is configured for the slot hall
  78. if slotHall == 1 then
  79.     if not fs.exists("Frame1") then
  80.         term.setTextColor(colors.red)
  81.         print("Warning: Slot frame 1 image missing!")
  82.         term.setTextColor(colors.white)
  83.         print("Downloading image...")
  84.         shell.run("pastebin get 0jtcj1F4 Frame1")
  85.         term.setTextColor(colors.green)
  86.         print("File downloaded")
  87.         term.setTextColor(colors.white)
  88.     else
  89.         term.setTextColor(colors.green)
  90.         print("Slot frame 1 image found!")
  91.         term.setTextColor(colors.white)
  92.     end
  93.     if not fs.exists("Frame2") then
  94.         term.setTextColor(colors.red)
  95.         print("Warning: Slot frame 2 image missing!")
  96.         term.setTextColor(colors.white)
  97.         print("Downloading image...")
  98.         shell.run("pastebin get xgqQ1wJ2 Frame2")
  99.         term.setTextColor(colors.green)
  100.         print("File downloaded")
  101.         term.setTextColor(colors.white)
  102.     else
  103.         term.setTextColor(colors.green)
  104.         print("Slot frame 2 image found!")
  105.         term.setTextColor(colors.white)
  106.     end
  107.     if not fs.exists("Frame3") then
  108.         term.setTextColor(colors.red)
  109.         print("Warning: Slot frame 3 image missing!")
  110.         term.setTextColor(colors.white)
  111.         print("Downloading image...")
  112.         shell.run("pastebin get 07eWGpLk Frame3")
  113.         term.setTextColor(colors.green)
  114.         print("File downloaded")
  115.         term.setTextColor(colors.white)
  116.     else
  117.         term.setTextColor(colors.green)
  118.         print("Slot frame 3 image found!")
  119.         term.setTextColor(colors.white)
  120.     end
  121.     p = paintutils.loadImage("Frame1")
  122.     q = paintutils.loadImage("Frame2")
  123.     s = paintutils.loadImage("Frame3")
  124. end
  125.  
  126. print("Sign check completed!")
  127. print("Checking for computer label")
  128. if os.getComputerLabel() == nil then
  129.     term.setTextColor(colors.red)
  130.     print("Warning: Computer is not labeled!")
  131.     term.setTextColor(colors.white)
  132.     print("Labelling Computer")
  133.     os.setComputerLabel("Mall - Billboard")
  134. else
  135.     term.setTextColor(colors.green)
  136.     print("Computer is already labelled. Great!")
  137.     term.setTextColor(colors.white)
  138. end
  139. print("System Check Completed!")
  140. print("Starting Billboard!")
  141.  
  142. term.redirect(monitor)
  143. adSign = paintutils.loadImage("image")
  144. mallImg = paintutils.loadImage("mall")
  145. while true do
  146.     paintutils.drawImage(mallImg, 1, 1)
  147.     sleep(10)
  148.     paintutils.drawImage(adSign, 1, 1)
  149.     sleep(t)
  150.     if slotHall == 1 then
  151.         num1 = 1
  152.         num2 = 2
  153.         num3 = 3
  154.         term.setBackgroundColor(colors.orange)
  155.         term.clear()
  156.         paintutils.drawImage(p,15,7)
  157.         term.setCursorPos(21,20)
  158.         print(">")
  159.         term.setCursorPos(31,20)
  160.         if num1 == 1 then
  161.             print("7")
  162.         elseif num1 == 2 then
  163.             print("R")
  164.         elseif num1 == 3 then
  165.             print("J")
  166.         elseif num1 == 4 then
  167.             print("I")
  168.         elseif num1 == 5 then
  169.             print("D")
  170.         else
  171.             print("L")
  172.         end
  173.         term.setCursorPos(41,20)
  174.         if num2 == 1 then
  175.             print("7")
  176.         elseif num2 == 2 then
  177.             print("R")
  178.         elseif num2 == 3 then
  179.             print("J")
  180.         elseif num2 == 4 then
  181.             print("I")
  182.         elseif num2 == 5 then
  183.             print("D")
  184.         else
  185.             print("L")
  186.         end
  187.         term.setCursorPos(51,20)
  188.         if num3 == 1 then
  189.             print("7")
  190.         elseif num3 == 2 then
  191.             print("R")
  192.         elseif num3 == 3 then
  193.             print("J")
  194.         elseif num3 == 4 then
  195.             print("I")
  196.         elseif num3 == 5 then
  197.             print("D")
  198.         else
  199.             print("L")
  200.         end
  201.         term.setCursorPos(61,20)
  202.         print("<")
  203.         sleep(1)
  204.         paintutils.drawImage(q,15,7)
  205.         term.setCursorPos(21,20)
  206.         print(">")
  207.         term.setCursorPos(31,20)
  208.         if num1 == 1 then
  209.             print("7")
  210.         elseif num1 == 2 then
  211.             print("R")
  212.         elseif num1 == 3 then
  213.             print("J")
  214.         elseif num1 == 4 then
  215.             print("I")
  216.         elseif num1 == 5 then
  217.             print("D")
  218.         else
  219.             print("L")
  220.         end
  221.         term.setCursorPos(41,20)
  222.         if num2 == 1 then
  223.             print("7")
  224.         elseif num2 == 2 then
  225.             print("R")
  226.         elseif num2 == 3 then
  227.             print("J")
  228.         elseif num2 == 4 then
  229.             print("I")
  230.         elseif num2 == 5 then
  231.             print("D")
  232.         else
  233.             print("L")
  234.         end
  235.         term.setCursorPos(51,20)
  236.         if num3 == 1 then
  237.             print("7")
  238.         elseif num3 == 2 then
  239.             print("R")
  240.         elseif num3 == 3 then
  241.             print("J")
  242.         elseif num3 == 4 then
  243.             print("I")
  244.         elseif num3 == 5 then
  245.             print("D")
  246.         else
  247.             print("L")
  248.         end
  249.         term.setCursorPos(61,20)
  250.         print("<")
  251.         sleep(0.2)
  252.         paintutils.drawImage(s,15,7)
  253.         term.setCursorPos(21,20)
  254.         print(">")
  255.         term.setCursorPos(31,20)
  256.         if num1 == 1 then
  257.             print("7")
  258.         elseif num1 == 2 then
  259.             print("R")
  260.         elseif num1 == 3 then
  261.             print("J")
  262.         elseif num1 == 4 then
  263.             print("I")
  264.         elseif num1 == 5 then
  265.             print("D")
  266.         else
  267.             print("L")
  268.         end
  269.         term.setCursorPos(41,20)
  270.         if num2 == 1 then
  271.             print("7")
  272.         elseif num2 == 2 then
  273.             print("R")
  274.         elseif num2 == 3 then
  275.             print("J")
  276.         elseif num2 == 4 then
  277.             print("I")
  278.         elseif num2 == 5 then
  279.             print("D")
  280.         else
  281.             print("L")
  282.         end
  283.         term.setCursorPos(51,20)
  284.         if num3 == 1 then
  285.             print("7")
  286.         elseif num3 == 2 then
  287.             print("R")
  288.         elseif num3 == 3 then
  289.             print("J")
  290.         elseif num3 == 4 then
  291.             print("I")
  292.         elseif num3 == 5 then
  293.             print("D")
  294.         else
  295.             print("L")
  296.         end
  297.         term.setCursorPos(61,20)
  298.         print("<")
  299.         sleep(0.2)
  300.         paintutils.drawImage(q,15,7)
  301.         term.setCursorPos(21,20)
  302.         print(">")
  303.         term.setCursorPos(31,20)
  304.         if num1 == 1 then
  305.             print("7")
  306.         elseif num1 == 2 then
  307.             print("R")
  308.         elseif num1 == 3 then
  309.             print("J")
  310.         elseif num1 == 4 then
  311.             print("I")
  312.         elseif num1 == 5 then
  313.             print("D")
  314.         else
  315.             print("L")
  316.         end
  317.         term.setCursorPos(41,20)
  318.         if num2 == 1 then
  319.             print("7")
  320.         elseif num2 == 2 then
  321.             print("R")
  322.         elseif num2 == 3 then
  323.             print("J")
  324.         elseif num2 == 4 then
  325.             print("I")
  326.         elseif num2 == 5 then
  327.             print("D")
  328.         else
  329.             print("L")
  330.         end
  331.         term.setCursorPos(51,20)
  332.         if num3 == 1 then
  333.             print("7")
  334.         elseif num3 == 2 then
  335.             print("R")
  336.         elseif num3 == 3 then
  337.             print("J")
  338.         elseif num3 == 4 then
  339.             print("I")
  340.         elseif num3 == 5 then
  341.             print("D")
  342.         else
  343.             print("L")
  344.         end
  345.         term.setCursorPos(61,20)
  346.         print("<")
  347.         sleep(0.2)
  348.         paintutils.drawImage(p,15,7)
  349.         term.setCursorPos(21,20)
  350.         print(">")
  351.         term.setCursorPos(31,20)
  352.         if num1 == 1 then
  353.             print("7")
  354.         elseif num1 == 2 then
  355.             print("R")
  356.         elseif num1 == 3 then
  357.             print("J")
  358.         elseif num1 == 4 then
  359.             print("I")
  360.         elseif num1 == 5 then
  361.             print("D")
  362.         else
  363.             print("L")
  364.         end
  365.         term.setCursorPos(41,20)
  366.         if num2 == 1 then
  367.             print("7")
  368.         elseif num2 == 2 then
  369.             print("R")
  370.         elseif num2 == 3 then
  371.             print("J")
  372.         elseif num2 == 4 then
  373.             print("I")
  374.         elseif num2 == 5 then
  375.             print("D")
  376.         else
  377.             print("L")
  378.         end
  379.         term.setCursorPos(51,20)
  380.         if num3 == 1 then
  381.             print("7")
  382.         elseif num3 == 2 then
  383.             print("R")
  384.         elseif num3 == 3 then
  385.             print("J")
  386.         elseif num3 == 4 then
  387.             print("I")
  388.         elseif num3 == 5 then
  389.             print("D")
  390.         else
  391.             print("L")
  392.         end
  393.         term.setCursorPos(61,20)
  394.         print("<")
  395.         spinSlots = 1
  396.         spin1 = 20
  397.         spin2 = 30
  398.         spin3 = 40
  399.         -- Reel Spin Code
  400.         while spinSlots == 1 do
  401.             if spin1 > 0 then
  402.                 num1 = math.random(1,6)
  403.                 spin1 = spin1 - 1
  404.             else
  405.                 num1 = 1
  406.             end
  407.             if spin2 > 0 then
  408.                 num2 = math.random(1,6)
  409.                 spin2 = spin2 - 1
  410.             else
  411.                 num2 = 1
  412.             end
  413.             if spin3 > 0 then
  414.                 num3 = math.random(1,6)
  415.                 spin3 = spin3 - 1
  416.             else
  417.                 num3 = 1
  418.             end
  419.             if (spin1 <= 0) and (spin2 <= 0) and (spin3 <= 0) then
  420.                 spinSlots = 0
  421.             end
  422.             sleep(0.1)
  423.             term.setCursorPos(21,20)
  424.             print(">")
  425.             term.setCursorPos(31,20)
  426.             if num1 == 1 then
  427.                 print("7")
  428.             elseif num1 == 2 then
  429.                 print("R")
  430.             elseif num1 == 3 then
  431.                 print("J")
  432.             elseif num1 == 4 then
  433.                 print("I")
  434.             elseif num1 == 5 then
  435.                 print("D")
  436.             else
  437.                 print("L")
  438.             end
  439.             term.setCursorPos(41,20)
  440.             if num2 == 1 then
  441.                 print("7")
  442.             elseif num2 == 2 then
  443.                 print("R")
  444.             elseif num2 == 3 then
  445.                 print("J")
  446.             elseif num2 == 4 then
  447.                 print("I")
  448.             elseif num2 == 5 then
  449.                 print("D")
  450.             else
  451.                 print("L")
  452.             end
  453.             term.setCursorPos(51,20)
  454.             if num3 == 1 then
  455.                 print("7")
  456.             elseif num3 == 2 then
  457.                 print("R")
  458.             elseif num3 == 3 then
  459.                 print("J")
  460.             elseif num3 == 4 then
  461.                 print("I")
  462.             elseif num3 == 5 then
  463.                 print("D")
  464.             else
  465.                 print("L")
  466.             end
  467.             term.setCursorPos(61,20)
  468.             print("<")
  469.         end
  470.         num3 = 1
  471.         term.setCursorPos(21,20)
  472.         print(">")
  473.         term.setCursorPos(31,20)
  474.         if num1 == 1 then
  475.             print("7")
  476.         elseif num1 == 2 then
  477.             print("R")
  478.         elseif num1 == 3 then
  479.             print("J")
  480.         elseif num1 == 4 then
  481.             print("I")
  482.         elseif num1 == 5 then
  483.             print("D")
  484.         else
  485.             print("L")
  486.         end
  487.         term.setCursorPos(41,20)
  488.         if num2 == 1 then
  489.             print("7")
  490.         elseif num2 == 2 then
  491.             print("R")
  492.         elseif num2 == 3 then
  493.             print("J")
  494.         elseif num2 == 4 then
  495.             print("I")
  496.         elseif num2 == 5 then
  497.             print("D")
  498.         else
  499.             print("L")
  500.         end
  501.         term.setCursorPos(51,20)
  502.         if num3 == 1 then
  503.             print("7")
  504.         elseif num3 == 2 then
  505.             print("R")
  506.         elseif num3 == 3 then
  507.             print("J")
  508.         elseif num3 == 4 then
  509.             print("I")
  510.         elseif num3 == 5 then
  511.             print("D")
  512.         else
  513.             print("L")
  514.         end
  515.         term.setCursorPos(61,20)
  516.         print("<")
  517.         sleep(1)
  518.         term.setCursorPos(21,30)
  519.         print("JACKPOT!!!!!")
  520.         term.setCursorPos(21,33)
  521.         term.setTextColor(colors.white)
  522.         print("Rolcam's Casino, NOW OPEN!!!")
  523.     end
  524.     sleep(t)
  525. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement