Advertisement
MolaynoxX

Untitled

Jul 31st, 2013
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. -- ===}==========]= NewspaperReloaded v0.1b =[=========={===
  2. -- by MolaynoxX
  3.  
  4. function prepareStartup()
  5. local progress_1 = ""
  6. local progress_2 = ""
  7. local loading_points = ""
  8. for i = 1, 100 do
  9. --term.clear()
  10. printFrame()
  11. term.setCursorPos(1,2)
  12. progress_1 = ""
  13. progress_2 = ""
  14. for x = 1, (math.floor((i / 100) * 50)) do
  15. if x > 25 or x < 1 then break end
  16. progress_1 = progress_1 .. "="
  17. end
  18. if (math.floor((i / 100) * 50)) <= 25 then
  19. for x = 1, 25 - (math.floor((i / 100) * 50)) do
  20. progress_1 = progress_1 .. " "
  21. end
  22. else
  23. for x = 25, (math.floor((i / 100) * 50)) do
  24. progress_2 = progress_2 .. "="
  25. end
  26. end
  27. for x = 1, i % 3 + 1 do
  28. loading_points = loading_points .. "."
  29. end
  30. term.setCursorPos(12, 12)
  31. term.write("Initializing Computer Environment" .. loading_points)
  32. term.setCursorPos(1, 13)
  33. term.write(progress_1 .. " " .. math.floor(i) .. " % " .. progress_2)
  34. sleep(0.1)
  35. end
  36. startProgramLoop()
  37. end
  38.  
  39. function startProgramLoop()
  40.  
  41. end
  42.  
  43. function undoNPRChanges()
  44. term.restore()
  45. term.setCursorPos(1,1)
  46. end
  47.  
  48. function runNPR()
  49. mon_0 = peripheral.wrap("top")
  50. if mon_0 == nil then return end
  51. term.redirect(mon_0)
  52. if not term.isColor() then return end
  53. mon_0.setTextScale(0.9)
  54. local height, width = term.getSize()
  55. prepareStartup()
  56. end
  57.  
  58. function printFrame()
  59. term.setCursorPos(1,1)
  60. term.setTextColor(colors.red)
  61. term.write("===}==========]= NewspaperReloaded v0.1b =[=========={===")
  62. term.setCursorPos(10,24)
  63. term.write("All Rights Reserved NewspaperReloaded")
  64. end
  65.  
  66. runNPR()
  67. undoNPRChanges()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement