Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- This program is designed for use with Computercraft
- This is a modern version of the billboard program designed for newer versions of Minecraft (above 1.6.4)
- Custom version for: The Condemned Network - The 1.12 Pack player mall
- Billboard Specs: 8 blocks wide by 5 blocks tall advanced monitor
- Programmed by Rolcam
- You can copy/modify this program as you wish, just please leave the documentation intact
- ]]--
- -- Time variable for how long (in seconds) to display each sign
- t = 5
- --Redirects setup/install output to monitor (for artistic effect)
- tSides = {"left","right","bottom","top","front","back"}
- for i = 1, #tSides do
- monitor = peripheral.wrap(tSides[i])
- if monitor then
- side = tSides[i]
- break
- end
- end
- --Prevents program termination
- os.pullEvent = os.pullEventRaw
- local currentTerm = term.current()
- function adText()
- term.setTextColor(colors.orange)
- term.setBackgroundColor(colors.black)
- term.setCursorPos(2,19)
- term.write(" Your Ad Here! ")
- term.setCursorPos(2,20)
- term.write("Contact Rolcam for details!")
- term.setTextColor(colors.white)
- term.setCursorPos(1,1)
- end
- 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("Boot image downloaded.")
- term.setTextColor(colors.white)
- else
- term.setTextColor(colors.green)
- print("boot image found!")
- term.setTextColor(colors.white)
- end
- img = paintutils.loadImage("boot")
- term.redirect(monitor)
- paintutils.drawImage(img, 1,1)
- term.redirect(currentTerm)
- 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: advert 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
- adSign = paintutils.loadImage("image")
- 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
- if not fs.exists("bar") then
- term.setTextColor(colors.red)
- print("Warning: bar image missing!")
- term.setTextColor(colors.white)
- print("Downloading image...")
- shell.run("pastebin get T2r2qxNj bar")
- term.setTextColor(colors.green)
- print("File downloaded")
- term.setTextColor(colors.white)
- else
- term.setTextColor(colors.green)
- print("bar image found!")
- term.setTextColor(colors.white)
- end
- bar = paintutils.loadImage("bar")
- mallImg = paintutils.loadImage("mall")
- 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)
- mallImg = paintutils.loadImage("mall")
- while true do
- paintutils.drawImage(mallImg, 1, 1)
- sleep(15)
- paintutils.drawImage(adSign, 1, 1)
- sleep(t)
- paintutils.drawImage(bar, 1, 1)
- sleep(t)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement