Cedricator

Monitor-Engine-Fuel-Overlay Notstrom

Apr 21st, 2020
41
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.17 KB | None | 0 0
  1. --Engine Fuel Overlay Notstorm
  2.  
  3. mon = peripheral.wrap("back")
  4. mon.clear()
  5. mon.setTextScale(0.5)
  6.  
  7. function button_notstrom()
  8.  
  9. mon.setBackgroundColor(colors.green)
  10. mon.setCursorPos(9,23)
  11. mon.write(" NtSt ")
  12. mon.setBackgroundColor(colors.black)
  13.  
  14. end
  15.  
  16. function button_EMG()
  17.  
  18. mon.setBackgroundColor(colors.red)
  19. mon.setCursorPos(2,23)
  20. mon.write(" STOP ")
  21. mon.setBackgroundColor(colors.black)
  22.  
  23. end
  24.  
  25. function text_notstrom()
  26.  
  27. mon.setBackgroundColor(colors.orange)
  28. mon.setCursorPos(2,12)
  29. mon.write(" Not Strom ")
  30. mon.setCursorPos(2,13)
  31. mon.write(" Protokoll ")
  32. mon.setCursorPos(2,14)
  33. mon.write(" Aktiv ")
  34. mon.setBackgroundColor(colors.black)
  35.  
  36. end
  37.  
  38. function overlay()
  39.  
  40. mon.setBackgroundColor(colors.black)
  41.  
  42. zeile01 = "+-------------+"
  43. zeile02 = "| Engine Fuel |"
  44. zeile03 = "| RF Overlay |"
  45. zeile04 = "+-------------+"
  46. zeile05 = "| |"
  47. zeile06 = "| |"
  48. zeile07 = "| |"
  49. zeile08 = "| |"
  50. zeile09 = "| |"
  51. zeile10 = "| |"
  52. zeile11 = "+-------------+"
  53. zeile12 = "| |"
  54. zeile13 = "| |"
  55. zeile14 = "| |"
  56. zeile15 = "+-------------+"
  57. zeile16 = "| |"
  58. zeile17 = "| |"
  59. zeile18 = "| |"
  60. zeile19 = "| |"
  61. zeile20 = "| |"
  62. zeile21 = "| |"
  63. zeile22 = "+------+------+"
  64. zeile23 = "| | |"
  65. zeile24 = "+------+------+"
  66.  
  67. mon.setCursorPos(1,1)
  68. mon.write(zeile01)
  69. mon.setCursorPos(1,2)
  70. mon.write(zeile02)
  71. mon.setCursorPos(1,3)
  72. mon.write(zeile03)
  73. mon.setCursorPos(1,4)
  74. mon.write(zeile04)
  75. mon.setCursorPos(1,5)
  76. mon.write(zeile05)
  77. mon.setCursorPos(1,6)
  78. mon.write(zeile06)
  79. mon.setCursorPos(1,7)
  80. mon.write(zeile07)
  81. mon.setCursorPos(1,8)
  82. mon.write(zeile08)
  83. mon.setCursorPos(1,9)
  84. mon.write(zeile09)
  85. mon.setCursorPos(1,10)
  86. mon.write(zeile10)
  87. mon.setCursorPos(1,11)
  88. mon.write(zeile11)
  89. mon.setCursorPos(1,12)
  90. mon.write(zeile12)
  91.  
  92. mon.setCursorPos(1,13)
  93. mon.write(zeile13)
  94. mon.setCursorPos(1,14)
  95. mon.write(zeile14)
  96. mon.setCursorPos(1,15)
  97. mon.write(zeile15)
  98. mon.setCursorPos(1,16)
  99. mon.write(zeile16)
  100. mon.setCursorPos(1,17)
  101. mon.write(zeile17)
  102. mon.setCursorPos(1,18)
  103. mon.write(zeile18)
  104. mon.setCursorPos(1,19)
  105. mon.write(zeile19)
  106. mon.setCursorPos(1,20)
  107. mon.write(zeile20)
  108. mon.setCursorPos(1,21)
  109. mon.write(zeile21)
  110. mon.setCursorPos(1,22)
  111. mon.write(zeile22)
  112. mon.setCursorPos(1,23)
  113. mon.write(zeile23)
  114. mon.setCursorPos(1,24)
  115. mon.write(zeile24)
  116.  
  117. button_EMG()
  118. text_notstrom()
  119. button_notstrom()
  120.  
  121. redstone.setBundledOutput("bottom", colors.white)
  122. end
  123.  
  124. overlay()
  125.  
  126. while true do
  127.  
  128. -- button_EMG
  129. event, side, x, y = os.pullEvent("monitor_touch")
  130. if x > 1 and x < 8 and y == 23 then
  131.  
  132. mon.clear()
  133. sleep(5)
  134. shell.run("reboot")
  135. end
  136.  
  137. sleep(1)
  138. end
Add Comment
Please, Sign In to add comment