Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Designed for an 8 wide by 5 tall advanced monitor
- --This is if the billboard is in my slot machine area, it makes it run a special sign from time to time
- slotHall = 0
- --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.
- mallSign = 0
- --Change this to the side the monitor is on
- side = "back"
- -- Time variable for how long (in seconds) to display each sign
- t = 5
- --Prevents program termination
- os.pullEvent = os.pullEventRaw
- --Redirects setup/install output to monitor (for artistic effect)
- local monitor = peripheral.wrap(side)
- if not fs.exists("boot") then
- term.setTextColor(colors.red)
- print("Warning: boot image missing!")
- print("Downloading image...")
- term.setTextColor(colors.white)
- shell.run("pastebin get edscQ8zU boot")
- term.setTextColor(colors.green)
- print("File downloaded")
- term.setTextColor(colors.white)
- else
- term.setTextColor(colors.green)
- print("boot image found!")
- term.setTextColor(colors.white)
- end
- local img = paintutils.loadImage("boot")
- term.redirect(monitor)
- paintutils.drawImage(img, 1,1)
- term.restore()
- term.setBackgroundColor(colors.blue)
- term.setTextColor(colors.orange)
- term.clear()
- print("Rolcam's Billboard Program V3")
- term.setTextColor(colors.white)
- print(" ")
- print("Beginning system check...")
- --Checks for missing signs and labels itself
- print("Checking signs...")
- if not fs.exists("image") then
- term.setTextColor(colors.red)
- print("Warning: beach image missing!")
- term.setTextColor(colors.white)
- print("Downloading image...")
- shell.run("pastebin get EZDcTC35 image")
- term.setTextColor(colors.green)
- print("File downloaded")
- term.setTextColor(colors.white)
- else
- term.setTextColor(colors.green)
- print("beach image found!")
- term.setTextColor(colors.white)
- end
- if not fs.exists("night") then
- term.setTextColor(colors.red)
- print("Warning: night image missing!")
- term.setTextColor(colors.white)
- print("Downloading image...")
- shell.run("pastebin get KizP2jiT night")
- term.setTextColor(colors.green)
- print("File downloaded")
- term.setTextColor(colors.white)
- else
- term.setTextColor(colors.green)
- print("night image found!")
- term.setTextColor(colors.white)
- end
- if not fs.exists("moon") then
- term.setTextColor(colors.red)
- print("Warning: moon image missing!")
- term.setTextColor(colors.white)
- print("Downloading image...")
- shell.run("pastebin get LL7rSBmx moon")
- term.setTextColor(colors.green)
- print("File downloaded")
- term.setTextColor(colors.white)
- else
- term.setTextColor(colors.green)
- print("moon image found!")
- term.setTextColor(colors.white)
- end
- if not fs.exists("village") then
- term.setTextColor(colors.red)
- print("Warning: village image missing!")
- term.setTextColor(colors.white)
- print("Downloading image...")
- shell.run("pastebin get ncJRFq5J village")
- term.setTextColor(colors.green)
- print("File downloaded")
- term.setTextColor(colors.white)
- else
- term.setTextColor(colors.green)
- print("village image found!")
- term.setTextColor(colors.white)
- end
- if not fs.exists("mars") then
- term.setTextColor(colors.red)
- print("Warning: mars image missing!")
- term.setTextColor(colors.white)
- print("Downloading image...")
- shell.run("pastebin get Xh9Lnr1u mars")
- term.setTextColor(colors.green)
- print("File downloaded")
- term.setTextColor(colors.white)
- else
- term.setTextColor(colors.green)
- print("mars image found!")
- term.setTextColor(colors.white)
- end
- --Downloads the slot hall signs if this board is configured for the slot hall
- if slotHall == 1 then
- if not fs.exists("Frame1") then
- term.setTextColor(colors.red)
- print("Warning: Slot frame 1 image missing!")
- term.setTextColor(colors.white)
- print("Downloading image...")
- shell.run("pastebin get 0jtcj1F4 Frame1")
- term.setTextColor(colors.green)
- print("File downloaded")
- term.setTextColor(colors.white)
- else
- term.setTextColor(colors.green)
- print("Slot frame 1 image found!")
- term.setTextColor(colors.white)
- end
- if not fs.exists("Frame2") then
- term.setTextColor(colors.red)
- print("Warning: Slot frame 2 image missing!")
- term.setTextColor(colors.white)
- print("Downloading image...")
- shell.run("pastebin get xgqQ1wJ2 Frame2")
- term.setTextColor(colors.green)
- print("File downloaded")
- term.setTextColor(colors.white)
- else
- term.setTextColor(colors.green)
- print("Slot frame 2 image found!")
- term.setTextColor(colors.white)
- end
- if not fs.exists("Frame3") then
- term.setTextColor(colors.red)
- print("Warning: Slot frame 3 image missing!")
- term.setTextColor(colors.white)
- print("Downloading image...")
- shell.run("pastebin get 07eWGpLk Frame3")
- term.setTextColor(colors.green)
- print("File downloaded")
- term.setTextColor(colors.white)
- else
- term.setTextColor(colors.green)
- print("Slot frame 3 image found!")
- term.setTextColor(colors.white)
- end
- p = paintutils.loadImage("Frame1")
- q = paintutils.loadImage("Frame2")
- s = paintutils.loadImage("Frame3")
- end
- --Downloads the mall signs if this board is configured for the slot hall
- if mallSign == 1 then
- if not fs.exists("mall") then
- term.setTextColor(colors.red)
- print("Warning: Mall sign is missing!")
- term.setTextColor(colors.white)
- print("Downloading image...")
- shell.run("pastebin get k1dsWddA mall")
- term.setTextColor(colors.green)
- print("File downloaded")
- term.setTextColor(colors.white)
- else
- term.setTextColor(colors.green)
- print("Mall sign image found!")
- term.setTextColor(colors.white)
- end
- mallImg = paintutils.loadImage("mall")
- end
- print("Sign check completed!")
- print("Checking for computer label")
- if os.getComputerLabel() == nil then
- term.setTextColor(colors.red)
- print("Warning: Computer is not labeled!")
- print("Labelling Computer")
- os.setComputerLabel("Billboard Comp")
- term.setTextColor(colors.white)
- else
- term.setTextColor(colors.green)
- print("Computer is already labelled. Great!")
- term.setTextColor(colors.white)
- end
- print("System Check Completed!")
- sleep(1)
- print("Starting Billboard!")
- term.redirect(monitor)
- img2 = paintutils.loadImage("image")
- img3 = paintutils.loadImage("night")
- img4 = paintutils.loadImage("moon")
- img5 = paintutils.loadImage("village")
- img6 = paintutils.loadImage("mars")
- sleep(0.5)
- --x=1
- while true do
- if mallSign == 1 then
- paintutils.drawImage(mallImg, 1, 1)
- sleep(10)
- end
- paintutils.drawImage(img2, 1, 1)
- sleep(t)
- paintutils.drawImage(img3, 1, 1)
- sleep(t)
- paintutils.drawImage(img4, 1, 1)
- sleep(t)
- paintutils.drawImage(img5, 1, 1)
- sleep(t)
- paintutils.drawImage(img6, 1, 1)
- sleep(t)
- if slotHall == 1 then
- num1 = 1
- num2 = 2
- num3 = 3
- term.setBackgroundColor(colors.orange)
- term.clear()
- paintutils.drawImage(p,15,7)
- term.setCursorPos(21,20)
- print(">")
- term.setCursorPos(31,20)
- if num1 == 1 then
- print("7")
- elseif num1 == 2 then
- print("R")
- elseif num1 == 3 then
- print("J")
- elseif num1 == 4 then
- print("I")
- elseif num1 == 5 then
- print("D")
- else
- print("L")
- end
- term.setCursorPos(41,20)
- if num2 == 1 then
- print("7")
- elseif num2 == 2 then
- print("R")
- elseif num2 == 3 then
- print("J")
- elseif num2 == 4 then
- print("I")
- elseif num2 == 5 then
- print("D")
- else
- print("L")
- end
- term.setCursorPos(51,20)
- if num3 == 1 then
- print("7")
- elseif num3 == 2 then
- print("R")
- elseif num3 == 3 then
- print("J")
- elseif num3 == 4 then
- print("I")
- elseif num3 == 5 then
- print("D")
- else
- print("L")
- end
- term.setCursorPos(61,20)
- print("<")
- sleep(1)
- paintutils.drawImage(q,15,7)
- term.setCursorPos(21,20)
- print(">")
- term.setCursorPos(31,20)
- if num1 == 1 then
- print("7")
- elseif num1 == 2 then
- print("R")
- elseif num1 == 3 then
- print("J")
- elseif num1 == 4 then
- print("I")
- elseif num1 == 5 then
- print("D")
- else
- print("L")
- end
- term.setCursorPos(41,20)
- if num2 == 1 then
- print("7")
- elseif num2 == 2 then
- print("R")
- elseif num2 == 3 then
- print("J")
- elseif num2 == 4 then
- print("I")
- elseif num2 == 5 then
- print("D")
- else
- print("L")
- end
- term.setCursorPos(51,20)
- if num3 == 1 then
- print("7")
- elseif num3 == 2 then
- print("R")
- elseif num3 == 3 then
- print("J")
- elseif num3 == 4 then
- print("I")
- elseif num3 == 5 then
- print("D")
- else
- print("L")
- end
- term.setCursorPos(61,20)
- print("<")
- sleep(0.2)
- paintutils.drawImage(s,15,7)
- term.setCursorPos(21,20)
- print(">")
- term.setCursorPos(31,20)
- if num1 == 1 then
- print("7")
- elseif num1 == 2 then
- print("R")
- elseif num1 == 3 then
- print("J")
- elseif num1 == 4 then
- print("I")
- elseif num1 == 5 then
- print("D")
- else
- print("L")
- end
- term.setCursorPos(41,20)
- if num2 == 1 then
- print("7")
- elseif num2 == 2 then
- print("R")
- elseif num2 == 3 then
- print("J")
- elseif num2 == 4 then
- print("I")
- elseif num2 == 5 then
- print("D")
- else
- print("L")
- end
- term.setCursorPos(51,20)
- if num3 == 1 then
- print("7")
- elseif num3 == 2 then
- print("R")
- elseif num3 == 3 then
- print("J")
- elseif num3 == 4 then
- print("I")
- elseif num3 == 5 then
- print("D")
- else
- print("L")
- end
- term.setCursorPos(61,20)
- print("<")
- sleep(0.2)
- paintutils.drawImage(q,15,7)
- term.setCursorPos(21,20)
- print(">")
- term.setCursorPos(31,20)
- if num1 == 1 then
- print("7")
- elseif num1 == 2 then
- print("R")
- elseif num1 == 3 then
- print("J")
- elseif num1 == 4 then
- print("I")
- elseif num1 == 5 then
- print("D")
- else
- print("L")
- end
- term.setCursorPos(41,20)
- if num2 == 1 then
- print("7")
- elseif num2 == 2 then
- print("R")
- elseif num2 == 3 then
- print("J")
- elseif num2 == 4 then
- print("I")
- elseif num2 == 5 then
- print("D")
- else
- print("L")
- end
- term.setCursorPos(51,20)
- if num3 == 1 then
- print("7")
- elseif num3 == 2 then
- print("R")
- elseif num3 == 3 then
- print("J")
- elseif num3 == 4 then
- print("I")
- elseif num3 == 5 then
- print("D")
- else
- print("L")
- end
- term.setCursorPos(61,20)
- print("<")
- sleep(0.2)
- paintutils.drawImage(p,15,7)
- term.setCursorPos(21,20)
- print(">")
- term.setCursorPos(31,20)
- if num1 == 1 then
- print("7")
- elseif num1 == 2 then
- print("R")
- elseif num1 == 3 then
- print("J")
- elseif num1 == 4 then
- print("I")
- elseif num1 == 5 then
- print("D")
- else
- print("L")
- end
- term.setCursorPos(41,20)
- if num2 == 1 then
- print("7")
- elseif num2 == 2 then
- print("R")
- elseif num2 == 3 then
- print("J")
- elseif num2 == 4 then
- print("I")
- elseif num2 == 5 then
- print("D")
- else
- print("L")
- end
- term.setCursorPos(51,20)
- if num3 == 1 then
- print("7")
- elseif num3 == 2 then
- print("R")
- elseif num3 == 3 then
- print("J")
- elseif num3 == 4 then
- print("I")
- elseif num3 == 5 then
- print("D")
- else
- print("L")
- end
- term.setCursorPos(61,20)
- print("<")
- spinSlots = 1
- spin1 = 20
- spin2 = 30
- spin3 = 40
- -- Reel Spin Code
- while spinSlots == 1 do
- if spin1 > 0 then
- num1 = math.random(1,6)
- spin1 = spin1 - 1
- else
- num1 = 1
- end
- if spin2 > 0 then
- num2 = math.random(1,6)
- spin2 = spin2 - 1
- else
- num2 = 1
- end
- if spin3 > 0 then
- num3 = math.random(1,6)
- spin3 = spin3 - 1
- else
- num3 = 1
- end
- if (spin1 <= 0) and (spin2 <= 0) and (spin3 <= 0) then
- spinSlots = 0
- end
- sleep(0.1)
- term.setCursorPos(21,20)
- print(">")
- term.setCursorPos(31,20)
- if num1 == 1 then
- print("7")
- elseif num1 == 2 then
- print("R")
- elseif num1 == 3 then
- print("J")
- elseif num1 == 4 then
- print("I")
- elseif num1 == 5 then
- print("D")
- else
- print("L")
- end
- term.setCursorPos(41,20)
- if num2 == 1 then
- print("7")
- elseif num2 == 2 then
- print("R")
- elseif num2 == 3 then
- print("J")
- elseif num2 == 4 then
- print("I")
- elseif num2 == 5 then
- print("D")
- else
- print("L")
- end
- term.setCursorPos(51,20)
- if num3 == 1 then
- print("7")
- elseif num3 == 2 then
- print("R")
- elseif num3 == 3 then
- print("J")
- elseif num3 == 4 then
- print("I")
- elseif num3 == 5 then
- print("D")
- else
- print("L")
- end
- term.setCursorPos(61,20)
- print("<")
- end
- num3 = 1
- term.setCursorPos(21,20)
- print(">")
- term.setCursorPos(31,20)
- if num1 == 1 then
- print("7")
- elseif num1 == 2 then
- print("R")
- elseif num1 == 3 then
- print("J")
- elseif num1 == 4 then
- print("I")
- elseif num1 == 5 then
- print("D")
- else
- print("L")
- end
- term.setCursorPos(41,20)
- if num2 == 1 then
- print("7")
- elseif num2 == 2 then
- print("R")
- elseif num2 == 3 then
- print("J")
- elseif num2 == 4 then
- print("I")
- elseif num2 == 5 then
- print("D")
- else
- print("L")
- end
- term.setCursorPos(51,20)
- if num3 == 1 then
- print("7")
- elseif num3 == 2 then
- print("R")
- elseif num3 == 3 then
- print("J")
- elseif num3 == 4 then
- print("I")
- elseif num3 == 5 then
- print("D")
- else
- print("L")
- end
- term.setCursorPos(61,20)
- print("<")
- sleep(1)
- term.setCursorPos(21,30)
- print("JACKPOT!!!!!")
- rs.setBundledOutput("top", colors.white)
- sleep(1)
- rs.setBundledOutput("top", colors.orange)
- sleep(1)
- rs.setBundledOutput("top", colors.magenta)
- sleep(1)
- rs.setBundledOutput("top", 0)
- sleep(1)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement