Advertisement
Tim3Game

BigReactors Reactor Screen Updater + Starter

Jan 20th, 2015
207
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.02 KB | None | 0 0
  1. local printcentred =
  2. function(text)
  3. local maxw, maxh = term.getSize() --screen dimensions
  4. local curx, cury = term.getCursorPos() --cursor pos
  5. term.setCursorPos((maxw-#text)/2,cury) --set it to the point where write will make the text centred
  6. term.write(text) --write the text
  7. term.setCursorPos(curx,cury+1) --return the cursor to the same position on the next line
  8. end
  9. local maxw, maxh = term.getSize() --screen dimensions
  10. term.setCursorPos(1,math.floor(maxh/2))--set cursor to the start of the upper middle line
  11.  
  12. local monitorprintcentred =
  13. function(text, side)
  14. local monitor = peripheral.wrap("monitor_1")
  15. local maxw, maxh = monitor.getSize() --screen dimensions
  16. local curx, cury = monitor.getCursorPos() --cursor pos
  17.  
  18. monitor.setCursorPos((maxw-#text)/2,cury) --set it to the point where write will make the text centred
  19. monitor.write(text) --write the text
  20. monitor.setCursorPos(curx,cury+1) --return the cursor to the same position on the next line
  21. end
  22.  
  23. local monitor = peripheral.wrap("monitor_1") -- makes 'monitor' refer to the monitor on the left side
  24. local maxw, maxh =monitor.getSize() --screen dimensions
  25. monitor.setCursorPos(1,math.floor(maxh/2))--set cursor to the start of the upper middle line
  26.  
  27.  
  28.  
  29.  
  30. -- Update the program
  31. shell.run("rm BRRS")
  32. shell.run("pastebin get qYrZwMqf BRRS")
  33. -- Start the program
  34. term.setTextColor(colors.green)
  35. term.clear()
  36. term.setCursorPos(1,math.floor(maxh/2))
  37. printcentred("BigReactors Reactor Screen 0.2 by Tim3Game")
  38. printcentred("[--------------------]")
  39. monitor.setTextColor(colors.green)
  40. monitor.clear()
  41. monitor.setCursorPos(1,math.floor(maxh/2))
  42. monitorprintcentred("BigReactors Reactor Screen 0.2 by Tim3Game")
  43. monitorprintcentred("[--------------------]")
  44. sleep(1)
  45. term.clear()
  46. term.setCursorPos(1,math.floor(maxh/2))
  47. printcentred("BigReactors Reactor Screen 0.2 by Tim3Game")
  48. printcentred("[===-----------------]")
  49. monitor.clear()
  50. monitor.setCursorPos(1,math.floor(maxh/2))
  51. monitorprintcentred("BigReactors Reactor Screen 0.2 by Tim3Game")
  52. monitorprintcentred("[===-----------------]")
  53. sleep(1)
  54. term.clear()
  55. term.setCursorPos(1,math.floor(maxh/2))
  56. printcentred("BigReactors Reactor Screen 0.2 by Tim3Game")
  57. printcentred("[======--------------]")
  58. monitor.clear()
  59. monitor.setCursorPos(1,math.floor(maxh/2))
  60. monitorprintcentred("BigReactors Reactor Screen 0.2 by Tim3Game")
  61. monitorprintcentred("[======--------------]")
  62. sleep(1)
  63. term.clear()
  64. term.setCursorPos(1,math.floor(maxh/2))
  65. term.setCursorPos(1,math.floor(maxh/2))
  66. printcentred("BigReactors Reactor Screen 0.2 by Tim3Game")
  67. printcentred("[=========-----------]")
  68. monitor.clear()
  69. monitor.setCursorPos(1,math.floor(maxh/2))
  70. monitorprintcentred("BigReactors Reactor Screen 0.2 by Tim3Game")
  71. monitorprintcentred("[=========-----------]")
  72. sleep(1)
  73. term.clear()
  74. term.setCursorPos(1,math.floor(maxh/2))
  75. printcentred("BigReactors Reactor Screen 0.2 by Tim3Game")
  76. printcentred("[============--------]")
  77. monitor.clear()
  78. monitor.setCursorPos(1,math.floor(maxh/2))
  79. monitorprintcentred("BigReactors Reactor Screen 0.2 by Tim3Game")
  80. monitorprintcentred("[============--------]")
  81. sleep(1)
  82. term.clear()
  83. term.setCursorPos(1,math.floor(maxh/2))
  84. printcentred("BigReactors Reactor Screen 0.2 by Tim3Game")
  85. printcentred("[==============------]")
  86. monitor.clear()
  87. monitor.setCursorPos(1,math.floor(maxh/2))
  88. monitorprintcentred("BigReactors Reactor Screen 0.2 by Tim3Game")
  89. monitorprintcentred("[==============------]")
  90. sleep(1)
  91. term.clear()
  92. term.setCursorPos(1,math.floor(maxh/2))
  93. printcentred("BigReactors Reactor Screen 0.2 by Tim3Game")
  94. printcentred("[=================---]")
  95. monitor.clear()
  96. monitor.setCursorPos(1,math.floor(maxh/2))
  97. monitorprintcentred("BigReactors Reactor Screen 0.2 by Tim3Game")
  98. monitorprintcentred("[=================---]")
  99. sleep(1)
  100. term.clear()
  101. term.setCursorPos(1,math.floor(maxh/2))
  102. printcentred("BigReactors Reactor Screen 0.2 by Tim3Game")
  103. printcentred("[====================]")
  104. monitor.clear()
  105. monitor.setCursorPos(1,math.floor(maxh/2))
  106. monitorprintcentred("BigReactors Reactor Screen 0.2 by Tim3Game")
  107. monitorprintcentred("[====================]")
  108. sleep(1)
  109. term.clear()
  110. term.setCursorPos(1,math.floor(maxh/2))
  111. printcentred("BigReactors Reactor Screen 0.2 by Tim3Game")
  112. printcentred("[ 100% ]")
  113. monitor.clear()
  114. monitor.setCursorPos(1,math.floor(maxh/2))
  115. monitorprintcentred("BigReactors Reactor Screen 0.2 by Tim3Game")
  116. monitorprintcentred("[ 100% ]")
  117. sleep(0.5)
  118. term.clear()
  119. term.setCursorPos(1,math.floor(maxh/2))
  120. printcentred("BigReactors Reactor Screen 0.2 by Tim3Game")
  121. printcentred("[ 100% ]")
  122. monitor.clear()
  123. monitor.setCursorPos(1,math.floor(maxh/2))
  124. monitorprintcentred("BigReactors Reactor Screen 0.2 by Tim3Game")
  125. monitorprintcentred("[ 100% ]")
  126. sleep(0.5)
  127. term.clear()
  128. term.setCursorPos(1,math.floor(maxh/2))
  129. printcentred("BigReactors Reactor Screen 0.2 by Tim3Game")
  130. printcentred("[ 100% ]")
  131. monitor.clear()
  132. monitor.setCursorPos(1,math.floor(maxh/2))
  133. monitorprintcentred("BigReactors Reactor Screen 0.2 by Tim3Game")
  134. monitorprintcentred("[ 100% ]")
  135. sleep(0.5)
  136. term.clear()
  137. term.setCursorPos(1,math.floor(maxh/2))
  138. printcentred("BigReactors Reactor Screen 0.2 by Tim3Game")
  139. printcentred("[ 100% ]")
  140. monitor.clear()
  141. monitor.setCursorPos(1,math.floor(maxh/2))
  142. monitorprintcentred("BigReactors Reactor Screen 0.2 by Tim3Game")
  143. monitorprintcentred("[ 100% ]")
  144. sleep(0.5)
  145. term.clear()
  146. term.setCursorPos(1,math.floor(maxh/2))
  147. printcentred("BigReactors Reactor Screen 0.2 by Tim3Game")
  148. printcentred("[ 100% ]")
  149. monitor.clear()
  150. monitor.setCursorPos(1,math.floor(maxh/2))
  151. monitorprintcentred("BigReactors Reactor Screen 0.2 by Tim3Game")
  152. monitorprintcentred("[ 100% ]")
  153. sleep(0.5)
  154. term.clear()
  155. term.setCursorPos(1,math.floor(maxh/2))
  156. printcentred("BigReactors Reactor Screen 0.2 by Tim3Game")
  157. printcentred("[ 100% ]")
  158. monitor.clear()
  159. monitor.setCursorPos(1,math.floor(maxh/2))
  160. monitorprintcentred("BigReactors Reactor Screen 0.2 by Tim3Game")
  161. monitorprintcentred("[ 100% ]")
  162. sleep(0.5)
  163. term.clear()
  164. term.setCursorPos(1,math.floor(maxh/2))
  165. printcentred("BigReactors Reactor Screen 0.2 by Tim3Game")
  166. printcentred("[ 100% ]")
  167. monitor.clear()
  168. monitor.setCursorPos(1,math.floor(maxh/2))
  169. monitorprintcentred("BigReactors Reactor Screen 0.2 by Tim3Game")
  170. monitorprintcentred("[ 100% ]")
  171. sleep(0.5)
  172. term.clear()
  173. term.setCursorPos(1,math.floor(maxh/2))
  174. printcentred("BigReactors Reactor Screen 0.2 by Tim3Game")
  175. printcentred("[100%]")
  176. monitor.clear()
  177. monitor.setCursorPos(1,math.floor(maxh/2))
  178. monitorprintcentred("BigReactors Reactor Screen 0.2 by Tim3Game")
  179. monitorprintcentred("[100%]")
  180. sleep(0.5)
  181. term.clear()
  182. term.setCursorPos(1,math.floor(maxh/2))
  183. printcentred("BigReactors Reactor Screen 0.2 by Tim3Game")
  184. printcentred("[ STARTED ]")
  185. monitor.clear()
  186. monitor.setCursorPos(1,math.floor(maxh/2))
  187. monitorprintcentred("BigReactors Reactor Screen 0.2 by Tim3Game")
  188. monitorprintcentred("[ STARTED ]")
  189. shell.run("BRRS")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement