Advertisement
Guest User

startup2

a guest
May 16th, 2018
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.85 KB | None | 0 0
  1. local Stunden = 1
  2. local Minuten = 1
  3. local Sekunden = 6
  4. local Timer = 5
  5. local red = 16384
  6. local green = 8192
  7.  
  8.  
  9. local function Wartung()
  10. while true do  
  11.  
  12. if Stunden + Minuten +Sekunden == 0 then
  13.  
  14. break
  15. end
  16.  
  17.     monitor = peripheral.wrap("left")
  18.     monitor.setCursorPos(1,3)
  19.     Sekunden = Sekunden -1
  20.     os.sleep(1)
  21.     monitor.write( [[Std;]] ..Stunden.. [[ min;]] ..Minuten.. [[ Sek;]] ..Sekunden.. [[ ]] )
  22.         if Stunden + Minuten + Sekunden == 0 then
  23.             os.sleep(1)
  24.             break
  25.                         elseif  Sekunden == 0 then
  26.                             Sekunden = 6
  27.                             Minuten = Minuten -1
  28.                             os.sleep(2)
  29.  
  30.                             elseif Minuten + Sekunden == 0 then
  31.                                 Stunden = Stunden -1
  32.                                 os.sleep(2)
  33.                             elseif Stunden + Minuten + Sekunden == 0 then
  34.  
  35.  
  36. break
  37.  
  38.           elseif Stunden == 0 then
  39.  
  40.                                 os.sleep(1)
  41.                                 elseif Stunden + Minuten + Sekunden == 0 then
  42.                                
  43.         end
  44.     end
  45. end
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53. local function startup()
  54.  
  55. monitor = peripheral.wrap( "left" )
  56. monitor.setCursorPos(1,1)
  57. monitor.clear()
  58. monitor.setTextScale(1)
  59.  
  60. monitor.setTextColor(32768)
  61. monitor.write("Diese Turbine befindet sich momentan in Wartung!!")
  62.  
  63. end
  64.  
  65.  
  66. local function Counter()
  67.  
  68.   while true do
  69.  
  70.       if Timer > 0 then
  71.   monitor.setBackgroundColor(red)    
  72.         sleep(1)
  73.         Timer = Timer -1
  74.         monitor.setCursorPos(6,6)
  75.         monitor.write("Vorraussichtlich fertig in: ")
  76.         monitor.write(Timer)
  77.        
  78.  
  79.   else
  80.          
  81.         Timer = Timer +20
  82.  
  83. break
  84.  
  85.         end
  86.     end
  87. end
  88.  
  89. print("Bitte Bug beheben ","Farbenbug")
  90. monitor = peripheral.wrap("left")
  91.  
  92. monitor.setBackgroundColor(16384)
  93. startup()
  94. os.sleep(0,1)
  95. Counter()
  96. os.sleep(1)
  97. --peripheral.wrap("left")
  98. monitor.setCursorPos(1,1)
  99.  
  100. monitor.setTextScale(1)
  101. monitor.clear()
  102. monitor.setTextColor(32768)
  103. monitor.setBackgroundColor(8192)
  104. os.sleep(1)
  105.  
  106. if monitor.setBackgroundColor(8192) == true then
  107.  
  108. os.sleep(3)
  109. monitor.write("Spast")
  110.  
  111. else
  112. monitor.setTextScale(1)
  113. monitor.clear()
  114. monitor.setTextColor(32768)
  115. monitor.setBackgroundColor(8192)
  116. print("Farben bug aktiv")
  117. monitor.setCursorPos(1,1)
  118.  
  119. monitor.write("Die Turbine wurde erfolgreich gewartet !!!")
  120. os.sleep(2)
  121. monitor.clear()
  122. monitor.setCursorPos(1,1)
  123. monitor.write("Folgende Wartungsarbeiten wurden durchgefuert :  ")
  124. monitor.setCursorPos(1,3)
  125. os.sleep(0,1)
  126. monitor.write("- Systemdateien wurden auf Fehler ueberprueft")
  127. monitor.setCursorPos(1,5)
  128. monitor.write("- Rotor geschwindigkeit wurde angepasst")
  129.  
  130.  
  131.  
  132. end
  133.  
  134.  
  135. monitor = peripheral.wrap("left")
  136.  
  137.  
  138. monitor.clear()
  139. monitor.setBackgroundColor(8192)
  140. monitor.setCursorPos(5,1)
  141. monitor.setTextColor(32768)
  142. os.sleep(1)
  143. monitor.setCursorPos(1,1)
  144. monitor.write("Wartung geplant in ;   ")
  145. monitor.setCursorPos(1,3)
  146. monitor.setTextScale(1)
  147. monitor.write( [[Std;]] ..Stunden.. [[ min;]] ..Minuten.. [[ Sek;]] ..Sekunden.. [[ ]] )
  148.  
  149. Wartung()
  150.  
  151. os.sleep(1)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement