SHARE
TWEET

SimSoft 4 - Startup

Simlor_GER Jul 6th, 2016 (edited) 1,515 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. --Copyright Simlor (http://www.computercraft.info/forums2/index.php?/user/55655-simlor/) -  Alle Rechte an diesen Programm sind Simlor vorbehalten.
  2.  
  3.  
  4. os.pullEvent = os.pullEventRaw
  5.  
  6.  
  7. if peripheral.getType("front") == "monitor" then
  8.  bildausgabeSystem = "front"
  9.  
  10. elseif peripheral.getType("left") == "monitor" then
  11.  bildausgabeSystem = "left"
  12.  
  13. elseif peripheral.getType("right") == "monitor" then
  14.  bildausgabeSystem = "right"
  15.  
  16. elseif peripheral.getType("top") == "monitor" then
  17.  bildausgabeSystem = "top"
  18.  
  19. elseif peripheral.getType("bottom") == "monitor" then
  20.  bildausgabeSystem = "bottom"
  21.  
  22. elseif peripheral.getType("back") == "monitor" then
  23.  bildausgabeSystem = "back"
  24.  
  25. else
  26.  bildausgabeSystem = "normal"
  27.  
  28. end
  29.  
  30. if bildausgabeSystem == "normal" then
  31. else
  32.  term.setTextColor(1)
  33.  term.setBackgroundColor(32768)
  34.  term.clear()
  35.  term.setCursorPos(1,1)
  36.  print("Boot SimSoft on monitor ("..bildausgabeSystem..")?")
  37.  print(" yes [y] - no [n]")
  38.  print("")
  39.  
  40.  write("y/n > ")
  41.  st = read()
  42.  
  43.  if st == "y" or st == "yes" then
  44.  elseif st == "n" or st == "no" then
  45.   bildausgabeSystem = "normal"
  46.  else
  47.   os.reboot()
  48.  end
  49. end
  50.  
  51. if bildausgabeSystem == "normal" then
  52.  shell.run("SimSoft/System/SystemStart")
  53. else
  54.  shell.run("monitor "..bildausgabeSystem.." SimSoft/System/SystemStart")
  55. end
  56.  
  57. --SystemBruch
  58.  
  59. term.setBackgroundColor(256)
  60. term.setTextColor(1)
  61. term.setCursorBlink(false)
  62. term.clear()
  63. term.setCursorPos(1,1)
  64.  
  65. --Nachricht
  66. print("SimSoft has crashed!")
  67. print("")
  68. print("Wait for reboot...")
  69. sleep(2)
  70.  
  71. os.reboot()
  72.  
  73. --end
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top