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 legacy version of the kiosk program designed for use in minecraft 1.6.4 and earlier (Tekkit)
- Custom version for: The Condemned Network - Tekkit Main (1.6.4) player mall
- Kiosk Specs: 2 blocks wide by 3 blocks tall advanced monitor
- Programmed by Rolcam
- You can copy/modify this program as you wish, just please leave the documentation intact
- ]]--
- -- Mall Location Variable (mLoc) - This determines what text based sign the kiosk is to display when it cycles back to its main screen
- -- Default Locations: 0 - Ad Agency Demo | 1 - Main Mall Directory (Front Entrance Facing) | 2 - McDonalds Kiosk | 3 - Ad Only Mode
- mLoc = 3
- --Change this to the side the monitor is on
- side = "top"
- -- Time variable for how long (in seconds) to display each sign
- t = 7
- --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 JUKMFJSe boot")
- term.setTextColor(colors.green)
- print("Kiosk boot image 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: advert image missing!")
- term.setTextColor(colors.white)
- print("Downloading image...")
- shell.run("pastebin get WwMDuBuY 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("XpqUUpqX") then
- term.setTextColor(colors.red)
- print("Warning: XpqUUpqX's advert sign is missing!")
- term.setTextColor(colors.white)
- print("Downloading image...")
- shell.run("pastebin get NSRCc7uv XpqUUpqX")
- term.setTextColor(colors.green)
- print("File downloaded")
- term.setTextColor(colors.white)
- else
- term.setTextColor(colors.green)
- print("XpqUUpqX's advert sign found!")
- term.setTextColor(colors.white)
- end
- if not fs.exists("JoeBobDaGreat") then
- term.setTextColor(colors.red)
- print("Warning: JoeBobDaGreat's advert sign is missing!")
- term.setTextColor(colors.white)
- print("Downloading image...")
- shell.run("pastebin get QRFnPLvu JoeBobDaGreat")
- term.setTextColor(colors.green)
- print("File downloaded")
- term.setTextColor(colors.white)
- else
- term.setTextColor(colors.green)
- print("JoeBobDaGreat's advert sign found!")
- term.setTextColor(colors.white)
- end
- if mLoc == 2 then
- if not fs.exists("McDonalds") then
- term.setTextColor(colors.red)
- print("Warning: Kiosk McDonalds sign is missing!")
- term.setTextColor(colors.white)
- print("Downloading image...")
- shell.run("pastebin get J3PTn6ze McDonalds")
- term.setTextColor(colors.green)
- print("File downloaded")
- term.setTextColor(colors.white)
- else
- term.setTextColor(colors.green)
- print("Kiosk McDonalds sign found!")
- term.setTextColor(colors.white)
- end
- end
- --Sign Loading
- adSign = paintutils.loadImage("image")
- XpqAd = paintutils.loadImage("XpqUUpqX")
- McDon = paintutils.loadImage("McDonalds")
- JoeBobAd = paintutils.loadImage("JoeBobDaGreat")
- 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("Mall - Advert Kiosk")
- 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 Kiosk!")
- -- Displays text overlay over images - Modify this to fit your needs
- function adText()
- if mLoc == 0 then
- term.setBackgroundColor(colors.black)
- term.clear()
- term.setCursorPos(1,1)
- term.setTextColor(colors.orange)
- print(" Condemned Mall ")
- print("Advertising Agency")
- print(" Demo Kiosk ")
- print(" ")
- term.setTextColor(colors.yellow)
- sleep(0.5)
- print("Pricing Rates --->")
- print(" ")
- sleep(0.5)
- print("<--- Example Text ")
- sleep(0.5)
- print(" Example Text --->")
- sleep(10)
- elseif mLoc == 1 then
- term.setBackgroundColor(colors.black)
- term.clear()
- term.setTextColor(colors.yellow)
- term.setCursorPos(1,1)
- print("Welcome :)")
- print("Condemned Mall")
- print("Player Shops")
- term.setTextColor(colors.cyan)
- term.setCursorPos(1,6)
- print("Created by:")
- print("Vloetboy, Rush0313 ")
- print("& Admins")
- term.setTextColor(colors.yellow)
- term.setCursorPos(1,10)
- print(" McDonalds and ")
- print(" Taco Bell ")
- print(" --------->> ")
- print(" ")
- print(" /warp tutorial ")
- print(" <<--------- ")
- print(" ")
- term.setTextColor(colors.orange)
- print(" Admin Shop ")
- print(" Straight Ahead! ")
- sleep(10)
- elseif mLoc == 2 then
- term.clear()
- paintutils.drawImage(McDon, 1, 1)
- term.setTextColor(colors.yellow)
- term.setCursorPos(1,10)
- print(" Welcome to ")
- print(" McDonalds ")
- print(" ")
- print(" Order Here! ")
- sleep(10)
- elseif mLoc == 3 then
- sleep(0.5)
- else
- if adNum == 1 then
- term.setTextColor(colors.orange)
- term.setBackgroundColor(colors.black)
- term.setCursorPos(2,14)
- print(" Your Ad Here! ")
- term.setCursorPos(2,15)
- print(" Contact Rolcam ")
- term.setCursorPos(2,16)
- print(" for details! ")
- term.setTextColor(colors.white)
- term.setCursorPos(1,1)
- elseif adNum == 2 then
- term.setTextColor(colors.orange)
- term.setBackgroundColor(colors.purple)
- term.setCursorPos(1,14)
- print(" Buy From ")
- print(" XpqUUpqX's Shop ")
- term.setTextColor(colors.white)
- term.setCursorPos(1,1)
- elseif adNum == 3 then
- term.setTextColor(colors.black)
- term.setBackgroundColor(colors.cyan)
- term.setCursorPos(1,13)
- print(" Buy From ")
- print(" JoeBobDaGreat ")
- print(" ")
- print(" Joe's prices will")
- print(" be the best! ")
- print(" One day. ")
- term.setTextColor(colors.white)
- term.setCursorPos(1,1)
- end
- end
- end
- mLoc2 = mLoc
- term.redirect(monitor)
- while true do
- -- Main Screen
- mLoc = mLoc2
- adText()
- -- Default Advert
- mLoc = 999
- paintutils.drawImage(adSign, 1, 1)
- adNum = 1
- adText()
- sleep(t)
- -- Main Screen
- mLoc = mLoc2
- adText()
- -- XpqUUpqX's Advert
- mLoc = 999
- adNum = 2
- paintutils.drawImage(XpqAd, 1, 1)
- adText()
- sleep(t)
- -- Main Screen
- mLoc = mLoc2
- adText()
- -- JoeBobDaGreat's Advert
- mLoc = 999
- adNum = 3
- paintutils.drawImage(JoeBobAd, 1, 1)
- adText()
- sleep(t)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement