Wesley_Alves

[ComputerCraft]Watch_Dogs Bootscreen for Advanced Computers

Jul 12th, 2014
272
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.94 KB | None | 0 0
  1. --[Variables]--
  2. local boot1 = paintutils.loadImage("Bootscreen1")
  3. local boot2 = paintutils.loadImage("Bootscreen2")
  4. local Part4Counter = 0
  5. local width, height = term.getSize()
  6. local yPos = 6
  7.  
  8. --[Utilites]--
  9. function clear()
  10.   term.setBackgroundColor(colors.black)
  11.   term.clear()
  12. end
  13.  
  14. function printImg(img, x, y)
  15.   paintutils.drawImage(img, x, y)
  16. end
  17.  
  18. --[Main Function]--
  19. function BootScreen()
  20.   --[Bootscreen Part 1]--
  21.   for i=1, 5 do
  22.     clear()
  23.     term.setCursorPos(19, 9)
  24.     term.write("Starting OS")
  25.     textutils.slowPrint("...", 5)
  26.     sleep(.8)  
  27.   end
  28.   --[Bootscreen Part 2]--
  29.   for i=1, 6 do
  30.     clear()
  31.     sleep(.3)
  32.     printImg(boot1, 7, 7)
  33.     sleep(.1)
  34.     term.clear()
  35.   end
  36.   --[Bootscreen Part 3]--
  37.   clear()
  38.   term.setCursorPos(17,10)
  39.   textutils.slowPrint("******************",18)
  40.   sleep(.5)
  41.   term.setCursorPos(17,10)
  42.   textutils.slowPrint("Module Initialized")
  43.   for i=1, 3 do
  44.     term.setCursorPos(17,10)
  45.     sleep(.01)
  46.     print("Module            ")
  47.     sleep(.1)
  48.     term.setCursorPos(17,10)
  49.     print("Module Initialized")
  50.   end
  51.   sleep(1)
  52.   --[Bootscreen Part 4]--
  53.     for i=1, 4 do
  54.       term.setBackgroundColor(colors.black)
  55.       printImg(boot2, 17, yPos)
  56.       yPos = yPos+2
  57.       sleep(.3)
  58.     end
  59.     yPos = 6
  60.     for i=1, 4 do
  61.       Part4Counter = Part4Counter+1
  62.       if Part4Counter==3 then
  63.         term.setCursorPos(16, 10)
  64.         textutils.slowPrint("    Boot Sequence    ", 5000)
  65.         term.setCursorPos(17, yPos+2)
  66.         textutils.slowPrint("                     ",80)
  67.         term.setCursorPos(16, 10)
  68.       elseif Part4Counter==4 then
  69.         break
  70.       else
  71.         term.setBackgroundColor(colors.black)
  72.         term.setCursorPos(17, yPos)
  73.         textutils.slowPrint("                     ",80)
  74.         yPos = yPos+2
  75.         term.setCursorPos(1,1)
  76.         sleep(.01)
  77.       end
  78.     end
  79.   --[Bootscreen Part 5]
  80. end
  81.  
  82. --[Main Program]--
  83. BootScreen()
Add Comment
Please, Sign In to add comment