Advertisement
Rolcam

Legacy Mall Kiosk Program - Condemned Network Mall

Feb 16th, 2024 (edited)
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. --[[
  2. This program is designed for use with Computercraft
  3. This is a legacy version of the kiosk program designed for use in minecraft 1.6.4 and earlier (Tekkit)
  4. Custom version for: The Condemned Network - Tekkit Main (1.6.4) player mall
  5. Kiosk Specs: 2 blocks wide by 3 blocks tall advanced monitor
  6.  
  7. Programmed by Rolcam
  8. You can copy/modify this program as you wish, just please leave the documentation intact
  9.  
  10. ]]--
  11. -- Mall Location Variable (mLoc) - This determines what text based sign the kiosk is to display when it cycles back to its main screen
  12. -- Default Locations: 0 - Ad Agency Demo | 1 - Main Mall Directory (Front Entrance Facing) | 2 - McDonalds Kiosk | 3 - Ad Only Mode
  13. mLoc = 3
  14. --Change this to the side the monitor is on
  15. side = "top"
  16. -- Time variable for how long (in seconds) to display each sign
  17. t = 7
  18. --Prevents program termination
  19. os.pullEvent = os.pullEventRaw
  20. --Redirects setup/install output to monitor (for artistic effect)
  21. local monitor = peripheral.wrap(side)
  22. if not fs.exists("boot") then
  23.     term.setTextColor(colors.red)
  24.     print("Warning: boot image missing!")
  25.     print("Downloading image...")
  26.     term.setTextColor(colors.white)
  27.     shell.run("pastebin get JUKMFJSe boot")
  28.     term.setTextColor(colors.green)
  29.     print("Kiosk boot image downloaded.")
  30.     term.setTextColor(colors.white)
  31. else
  32.     term.setTextColor(colors.green)
  33.     print("boot image found!")
  34.     term.setTextColor(colors.white)
  35. end
  36. local img = paintutils.loadImage("boot")
  37. term.redirect(monitor)
  38. paintutils.drawImage(img, 1,1)
  39. term.restore()
  40. term.setBackgroundColor(colors.blue)
  41. term.setTextColor(colors.orange)
  42. term.clear()
  43. print("Rolcam's Billboard Program V3")
  44. term.setTextColor(colors.white)
  45. print(" ")
  46. print("Beginning system check...")
  47. --Checks for missing signs and labels itself
  48. print("Checking signs...")
  49. if not fs.exists("image") then
  50.     term.setTextColor(colors.red)
  51.     print("Warning: advert image missing!")
  52.     term.setTextColor(colors.white)
  53.     print("Downloading image...")
  54.     shell.run("pastebin get WwMDuBuY image")
  55.     term.setTextColor(colors.green)
  56.     print("File downloaded")
  57.     term.setTextColor(colors.white)
  58. else
  59.     term.setTextColor(colors.green)
  60.     print("beach image found!")
  61.     term.setTextColor(colors.white)
  62. end
  63.  
  64. if not fs.exists("XpqUUpqX") then
  65.     term.setTextColor(colors.red)
  66.     print("Warning: XpqUUpqX's advert sign is missing!")
  67.     term.setTextColor(colors.white)
  68.     print("Downloading image...")
  69.     shell.run("pastebin get NSRCc7uv XpqUUpqX")
  70.     term.setTextColor(colors.green)
  71.     print("File downloaded")
  72.     term.setTextColor(colors.white)
  73. else
  74.     term.setTextColor(colors.green)
  75.     print("XpqUUpqX's advert sign found!")
  76.     term.setTextColor(colors.white)
  77. end
  78.  
  79. if not fs.exists("JoeBobDaGreat") then
  80.     term.setTextColor(colors.red)
  81.     print("Warning: JoeBobDaGreat's advert sign is missing!")
  82.     term.setTextColor(colors.white)
  83.     print("Downloading image...")
  84.     shell.run("pastebin get QRFnPLvu JoeBobDaGreat")
  85.     term.setTextColor(colors.green)
  86.     print("File downloaded")
  87.     term.setTextColor(colors.white)
  88. else
  89.     term.setTextColor(colors.green)
  90.     print("JoeBobDaGreat's advert sign found!")
  91.     term.setTextColor(colors.white)
  92. end
  93.  
  94. if mLoc == 2 then
  95.     if not fs.exists("McDonalds") then
  96.         term.setTextColor(colors.red)
  97.         print("Warning: Kiosk McDonalds sign is missing!")
  98.         term.setTextColor(colors.white)
  99.         print("Downloading image...")
  100.         shell.run("pastebin get J3PTn6ze McDonalds")
  101.         term.setTextColor(colors.green)
  102.         print("File downloaded")
  103.         term.setTextColor(colors.white)
  104.     else
  105.         term.setTextColor(colors.green)
  106.         print("Kiosk McDonalds sign found!")
  107.         term.setTextColor(colors.white)
  108.     end
  109. end
  110.  
  111. --Sign Loading
  112. adSign = paintutils.loadImage("image")
  113. XpqAd = paintutils.loadImage("XpqUUpqX")
  114. McDon = paintutils.loadImage("McDonalds")
  115. JoeBobAd = paintutils.loadImage("JoeBobDaGreat")
  116.        
  117. print("Sign check completed!")
  118. print("Checking for computer label")
  119. if os.getComputerLabel() == nil then
  120.     term.setTextColor(colors.red)
  121.     print("Warning: Computer is not labeled!")
  122.     print("Labelling Computer")
  123.     os.setComputerLabel("Mall - Advert Kiosk")
  124.     term.setTextColor(colors.white)
  125. else
  126.     term.setTextColor(colors.green)
  127.     print("Computer is already labelled. Great!")
  128.     term.setTextColor(colors.white)
  129. end
  130. print("System Check Completed!")
  131. sleep(1)
  132. print("Starting Kiosk!")
  133.  
  134. -- Displays text overlay over images - Modify this to fit your needs
  135. function adText()
  136.     if mLoc == 0 then
  137.         term.setBackgroundColor(colors.black)
  138.         term.clear()
  139.         term.setCursorPos(1,1)
  140.         term.setTextColor(colors.orange)
  141.         print("  Condemned Mall  ")
  142.         print("Advertising Agency")
  143.         print("    Demo Kiosk    ")
  144.         print(" ")
  145.         term.setTextColor(colors.yellow)
  146.         sleep(0.5)
  147.         print("Pricing Rates --->")
  148.         print(" ")
  149.         sleep(0.5)
  150.         print("<--- Example Text ")
  151.         sleep(0.5)
  152.         print(" Example Text --->")
  153.         sleep(10)
  154.     elseif mLoc == 1 then
  155.         term.setBackgroundColor(colors.black)
  156.         term.clear()
  157.         term.setTextColor(colors.yellow)
  158.         term.setCursorPos(1,1)
  159.         print("Welcome :)")
  160.         print("Condemned Mall")
  161.         print("Player Shops")
  162.         term.setTextColor(colors.cyan)
  163.         term.setCursorPos(1,6)
  164.         print("Created by:")
  165.         print("Vloetboy, Rush0313 ")
  166.         print("& Admins")
  167.         term.setTextColor(colors.yellow)
  168.         term.setCursorPos(1,10)
  169.         print("   McDonalds and   ")
  170.         print("     Taco Bell     ")
  171.         print("    --------->>    ")
  172.         print(" ")
  173.         print("  /warp tutorial   ")
  174.         print("    <<---------    ")
  175.         print(" ")
  176.         term.setTextColor(colors.orange)
  177.         print("    Admin Shop     ")
  178.         print("  Straight Ahead!  ")
  179.         sleep(10)
  180.     elseif mLoc == 2 then
  181.         term.clear()
  182.         paintutils.drawImage(McDon, 1, 1)
  183.         term.setTextColor(colors.yellow)
  184.         term.setCursorPos(1,10)
  185.         print("    Welcome to     ")
  186.         print("     McDonalds     ")
  187.         print("                   ")
  188.         print("    Order Here!    ")
  189.         sleep(10)
  190.     elseif mLoc == 3 then
  191.         sleep(0.5)
  192.     else
  193.         if adNum == 1 then
  194.             term.setTextColor(colors.orange)
  195.             term.setBackgroundColor(colors.black)
  196.             term.setCursorPos(2,14)
  197.             print("  Your Ad Here! ")
  198.             term.setCursorPos(2,15)
  199.             print(" Contact Rolcam ")
  200.             term.setCursorPos(2,16)
  201.             print("  for details!  ")
  202.             term.setTextColor(colors.white)
  203.             term.setCursorPos(1,1)
  204.         elseif adNum == 2 then
  205.             term.setTextColor(colors.orange)
  206.             term.setBackgroundColor(colors.purple)
  207.             term.setCursorPos(1,14)
  208.             print("     Buy From     ")
  209.             print("  XpqUUpqX's Shop ")
  210.             term.setTextColor(colors.white)
  211.             term.setCursorPos(1,1)
  212.         elseif adNum == 3 then
  213.             term.setTextColor(colors.black)
  214.             term.setBackgroundColor(colors.cyan)
  215.             term.setCursorPos(1,13)
  216.             print("    Buy From      ")
  217.             print("  JoeBobDaGreat   ")
  218.             print(" ")
  219.             print(" Joe's prices will")
  220.             print("   be the best!   ")
  221.             print("     One day.     ")
  222.             term.setTextColor(colors.white)
  223.             term.setCursorPos(1,1)
  224.            
  225.         end
  226.     end
  227. end
  228.  
  229.  
  230.  
  231. mLoc2 = mLoc
  232.  
  233. term.redirect(monitor)
  234. while true do
  235.     -- Main Screen
  236.     mLoc = mLoc2
  237.     adText()
  238.     -- Default Advert
  239.     mLoc = 999
  240.     paintutils.drawImage(adSign, 1, 1)
  241.     adNum = 1
  242.     adText()
  243.     sleep(t)
  244.     -- Main Screen
  245.     mLoc = mLoc2
  246.     adText()
  247.     -- XpqUUpqX's Advert
  248.     mLoc = 999
  249.     adNum = 2
  250.     paintutils.drawImage(XpqAd, 1, 1)
  251.     adText()
  252.     sleep(t)
  253.     -- Main Screen
  254.     mLoc = mLoc2
  255.     adText()
  256.     -- JoeBobDaGreat's Advert
  257.     mLoc = 999
  258.     adNum = 3
  259.     paintutils.drawImage(JoeBobAd, 1, 1)
  260.     adText()
  261.     sleep(t)
  262. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement