Advertisement
MolaynoxX

Untitled

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