Advertisement
Rolcam

Billboard Program V3 Xmas Edition (Legacy Version for Tekkit 1.6)

Dec 10th, 2023 (edited)
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 5.35 KB | None | 0 0
  1. -- Designed for an 8 wide by 5 tall advanced monitor
  2.  
  3. --Change this to the side the monitor is on
  4. side = "back"
  5. --Prevents program termination
  6. os.pullEvent = os.pullEventRaw
  7. --Redirects setup/install output to monitor (for artistic effect)
  8. local monitor = peripheral.wrap(side)
  9. if not fs.exists("boot") then
  10.     term.setTextColor(colors.red)
  11.     print("Warning: boot image missing!")
  12.     print("Downloading image...")
  13.     term.setTextColor(colors.white)
  14.     shell.run("pastebin get edscQ8zU boot")
  15.     term.setTextColor(colors.green)
  16.     print("File downloaded")
  17.     term.setTextColor(colors.white)
  18. else
  19.     term.setTextColor(colors.green)
  20.     print("boot image found!")
  21.     term.setTextColor(colors.white)
  22. end
  23. local img = paintutils.loadImage("boot")
  24. term.redirect(monitor)
  25. paintutils.drawImage(img, 1,1)
  26. term.restore()
  27. term.setBackgroundColor(colors.green)
  28. term.setTextColor(colors.red)
  29. term.clear()
  30. print("Rolcam's Billboard Program V3 - Xmas Edition")
  31. term.setTextColor(colors.white)
  32. print(" ")
  33. print("Beginning system check...")
  34. --Checks for missing signs and labels itself
  35. print("Checking signs...")
  36. if not fs.exists("beach") then
  37.     term.setTextColor(colors.red)
  38.     print("Warning: beach image missing!")
  39.     term.setTextColor(colors.white)
  40.     print("Downloading image...")
  41.     shell.run("pastebin get F8hWPxD1 beach")
  42.     term.setTextColor(colors.green)
  43.     print("File downloaded")
  44.     term.setTextColor(colors.white)
  45. else
  46.     term.setTextColor(colors.green)
  47.     print("beach image found!")
  48.     term.setTextColor(colors.white)
  49. end
  50. if not fs.exists("tree") then
  51.     term.setTextColor(colors.red)
  52.     print("Warning: Christmas tree 1/3 image missing!")
  53.     term.setTextColor(colors.white)
  54.     print("Downloading image...")
  55.     shell.run("pastebin get C4p7xrWd tree")
  56.     term.setTextColor(colors.green)
  57.     print("File downloaded")
  58.     term.setTextColor(colors.white)
  59. else
  60.     term.setTextColor(colors.green)
  61.     print("Christmas tree image 1/3 found!")
  62.     term.setTextColor(colors.white)
  63. end
  64. if not fs.exists("tree2") then
  65.     term.setTextColor(colors.red)
  66.     print("Warning: Christmas tree image 2/3 missing!")
  67.     term.setTextColor(colors.white)
  68.     print("Downloading image...")
  69.     shell.run("pastebin get 1v1fPcth tree2")
  70.     term.setTextColor(colors.green)
  71.     print("File downloaded")
  72.     term.setTextColor(colors.white)
  73. else
  74.     term.setTextColor(colors.green)
  75.     print("Christmas tree image 2/3 found!")
  76.     term.setTextColor(colors.white)
  77. end
  78. if not fs.exists("tree3") then
  79.     term.setTextColor(colors.red)
  80.     print("Warning: Christmas tree image 3/3 missing!")
  81.     term.setTextColor(colors.white)
  82.     print("Downloading image...")
  83.     shell.run("pastebin get YAYejpSW tree3")
  84.     term.setTextColor(colors.green)
  85.     print("File downloaded")
  86.     term.setTextColor(colors.white)
  87. else
  88.     term.setTextColor(colors.green)
  89.     print("Christmas tree image 3/3 found!")
  90.     term.setTextColor(colors.white)
  91. end
  92. if not fs.exists("snowflake") then
  93.     term.setTextColor(colors.red)
  94.     print("Warning: snowflake image missing!")
  95.     term.setTextColor(colors.white)
  96.     print("Downloading image...")
  97.     shell.run("pastebin get XbLRZ99h snowflake")
  98.     term.setTextColor(colors.green)
  99.     print("File downloaded")
  100.     term.setTextColor(colors.white)
  101. else
  102.     term.setTextColor(colors.green)
  103.     print("snowflake image found!")
  104.     term.setTextColor(colors.white)
  105. end
  106. if not fs.exists("village") then
  107.     term.setTextColor(colors.red)
  108.     print("Warning: village image missing!")
  109.     term.setTextColor(colors.white)
  110.     print("Downloading image...")
  111.     shell.run("pastebin get dxZLBDSR village")
  112.     term.setTextColor(colors.green)
  113.     print("File downloaded")
  114.     term.setTextColor(colors.white)
  115. else
  116.     term.setTextColor(colors.green)
  117.     print("village image found!")
  118.     term.setTextColor(colors.white)
  119. end
  120.  
  121. --Downloads the slot hall signs if this board is configured for the slot hall
  122. print("Sign check completed!")
  123. print("Checking for computer label")
  124. if os.getComputerLabel() == nil then
  125.     term.setTextColor(colors.red)
  126.     print("Warning: Computer is not labeled!")
  127.     print("Labelling Computer")
  128.     os.setComputerLabel("Billboard Comp")
  129.     term.setTextColor(colors.white)
  130. else
  131.     term.setTextColor(colors.green)
  132.     print("Computer is already labelled. Great!")
  133.     term.setTextColor(colors.white)
  134. end
  135. print("System Check Completed!")
  136. sleep(1)
  137. print("Starting Billboard!")
  138. term.redirect(monitor)
  139. img2 = paintutils.loadImage("beach")
  140. img3 = paintutils.loadImage("tree")
  141. img32 = paintutils.loadImage("tree2")
  142. img33 = paintutils.loadImage("tree3")
  143. img4 = paintutils.loadImage("snowflake")
  144. img5 = paintutils.loadImage("village")
  145. sleep(0.5)
  146. t=5
  147. while true do
  148.     paintutils.drawImage(img2, 1, 1)
  149.     sleep(t)
  150.     -- Animated Christmas Tree
  151.     yCoord = -12
  152.     while yCoord < 2 do
  153.         paintutils.drawImage(img3, 1, yCoord)
  154.         yCoord = yCoord + 1
  155.         sleep(0.25)
  156.     end
  157.     xTime = 5
  158.     while xTime > 0 do
  159.         paintutils.drawImage(img32, 1, 1)
  160.         sleep(0.25)
  161.         paintutils.drawImage(img3, 1, 1)
  162.         sleep(0.25)
  163.         paintutils.drawImage(img33, 1, 1)
  164.         sleep(0.25)
  165.         paintutils.drawImage(img3, 1, 1)
  166.         sleep(0.25)
  167.         xTime = xTime - 1
  168.     end
  169.     paintutils.drawImage(img4, 1, 1)
  170.     sleep(t)
  171.     paintutils.drawImage(img5, 1, 1)
  172.     sleep(t)
  173. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement