Advertisement
MolaynoxX

Untitled

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