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 kiosk program designed for use in Minecraft versions newer than 1.6.4
- Custom version for: The Condemned Network - The 1.12 Pack 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 - Rolcam's Bar & Grill | 2 - McDonalds Kiosk
- mLoc = 0
- -- Time variable for how long (in seconds) to display each sign
- t = 5
- oldTerm = term.current()
- --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
- 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.redirect(oldTerm)
- term.setBackgroundColor(colors.blue)
- term.setTextColor(colors.orange)
- term.clear()
- print("Rolcam's Kiosk Program V1")
- 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 fDigRNmG 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("ad2") then
- term.setTextColor(colors.red)
- print("Warning: Kiosk advert sign is missing!")
- term.setTextColor(colors.white)
- print("Downloading image...")
- shell.run("pastebin get WwMDuBuY ad2")
- term.setTextColor(colors.green)
- print("File downloaded")
- term.setTextColor(colors.white)
- else
- term.setTextColor(colors.green)
- print("Kiosk advert sign image found!")
- term.setTextColor(colors.white)
- end
- adSign2 = paintutils.loadImage("ad2")
- 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
- McDon = paintutils.loadImage("McDonalds")
- 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 --->")
- elseif mLoc == 1 then
- term.setBackgroundColor(colors.black)
- term.clear()
- term.setTextColor(colors.orange)
- term.setCursorPos(1,1)
- print(" Welcome to ")
- print(" Rolcam's ")
- print(" Bar & Grill! ")
- print(" ")
- print(" Food Menu: ")
- print("Cheese Wheels: $25")
- print("Venison Burg: $20")
- print("Paradise Burg: $10")
- print("Deluxe Nachos: $10")
- print("Onion Rings: $5 ")
- print("Fries: $5")
- print(" ")
- print(" Drinks Menu: ")
- print("Kumis: $10")
- print("Mead: $10")
- print("Cider: TBD")
- print("Cider [Intox]: TBD")
- print("Ale: TBD")
- print("Lager: TBD")
- 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! ")
- else
- term.setTextColor(colors.orange)
- term.setBackgroundColor(colors.black)
- term.setCursorPos(2,14)
- term.write(" 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)
- end
- end
- mLoc2 = mLoc
- term.redirect(monitor)
- adSign = paintutils.loadImage("image")
- while redstone.getInput("left") == true do
- sleep(1)
- end
- while true do
- mLoc = mLoc2
- adText()
- sleep(10)
- mLoc = 999
- paintutils.drawImage(adSign, 1, 1)
- adText()
- sleep(t)
- mLoc = mLoc2
- adText()
- sleep(10)
- mLoc = 999
- paintutils.drawImage(adSign2, 1, 1)
- adText()
- sleep(t)
- end
Add Comment
Please, Sign In to add comment