Advertisement
Rolcam

Billboard Program V3 (Legacy Version for Tekkit 1.6)

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