Advertisement
MolaynoxX

Untitled

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