SoulofSorrow

Turbinenprogramm by Thor_s_Crafter

Feb 16th, 2016
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. -- Installationsprogramm des Reaktor- und Turbinenprogramms von Thor_s_Crafter --
  2. -- Hinweis: Das Benutzung des Programms geschieht auf eigene Gefahr des Nutzers. --
  3.  
  4. -- Version 1.0 (beta)
  5.  
  6. term.clear()
  7. term.setCursorPos(1,1)
  8.  
  9. print("-- Installationsprogramm des Reaktor- und Turbinenprogramms von Thor_s_Crafter --")
  10. print("-- Version 1.0 (beta) --")
  11. print()
  12. print("HINWEIS: Das Benutzung des Programms geschieht auf eigene Gefahr.")
  13. print()
  14. print("Es wird empfohlen den Computer zu labeln.")
  15.  
  16. if not fs.exists("turbineControl") then
  17.     out = true
  18.     while out do
  19.         write("Computer labeln? (j/n): ")
  20.         input = read()
  21.         if input == "j" then
  22.             shell.run("label set \"TurbineComputer\"")
  23.             print("ComputerLabel auf \"TurbineComputer\" gesetzt.")
  24.             out = false
  25.         end
  26.         if input == "n" then
  27.             print("ComputerLabel wurde nicht gesetzt.")
  28.             out = false
  29.         else
  30.             print("Ungueltige Eingabe.")
  31.         end
  32.     end
  33. else
  34.     print("Update Programm...")
  35. end
  36.  
  37. sleep(1)   
  38. term.clear()
  39. term.setCursorPos(1,1)
  40.  
  41.  
  42. print("Checke auf vorhandene Programme...")
  43. if fs.exists("button") then
  44.     shell.run("delete button")
  45.     print("Button geloescht.")
  46. end
  47. if fs.exists("turbineControl") then
  48.     shell.run("delete turbineControl")
  49.     print("turbineControl geloescht.")
  50. end
  51.  
  52. print("Lade Button-Programm...")
  53. shell.run("pastebin get pDtimDT2 button")
  54. print("Lade Reaktor-Programm...")
  55. shell.run("pastebin get 8ib4JesQ turbineControl")  
  56. print("Download abgeschlossen.")
  57. print()
  58.  
  59. sleep(1)
  60. term.clear()
  61. term.setCursorPos(1,1)
  62.  
  63. if not fs.exists("startup") then
  64.     out2 = true
  65.     while out2 do
  66.         print("Startup hinzufuegen? (j/n): ")
  67.         input = read()
  68.         if input == "j" then
  69.             local file = fs.open("startup","w")
  70.             file.writeLine("shell.run(\"turbineControl\")")
  71.             file.close()
  72.             print("Startup wurde installiert.")
  73.             out2 = false
  74.         end
  75.         if input == "n" then
  76.             print("Startup wurde nicht installiert.")
  77.             out2 = false
  78.         else
  79.             print("Ungueltige Eingabe.")
  80.         end
  81.     end
  82. end
  83.  
  84. print()
  85. print("-- Installation abgeschlossen. --")
  86. print()
  87. term.setTextColor(colors.yellow)
  88. print("Reboote...")
  89. sleep(1)   
  90. os.reboot()
Add Comment
Please, Sign In to add comment