SHARE
TWEET

SimSoft 2.1 (English) - SystemStart

Simlor_GER Feb 26th, 2016 (edited) 456 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. --Alle Rechte an SimSoft 2.1 sind "SimlorLP" (oder in Minecraft auch nur "Simlor") vorbehalten.
  2.  
  3. --OS Version
  4.  
  5. function Version()
  6.  file = fs.open("SimSoft/Daten/User","r")
  7.  local fileData = {}
  8.  local line = file.readLine()
  9.  repeat
  10.  table.insert(fileData,line)
  11.  line = file.readLine()
  12.  until line == nil
  13.  file.close()
  14.  SS2V = fileData[5]
  15. end
  16.  
  17. Version()
  18.  
  19. --Download Function
  20.  
  21. function Download(CodePB, Pfad)
  22.  local datei = http.get("http://pastebin.com/raw/"..CodePB)
  23.  datei = datei.readAll()
  24.  
  25.  local file = fs.open(Pfad, "w")
  26.  file.write(datei)
  27.  file.close()
  28. end
  29.  
  30. --Lade screen
  31.  
  32. term.setBackgroundColor(32768)
  33. term.setTextColor(128)
  34. term.clear()
  35. term.setCursorPos(1,1)
  36.  
  37. print(">Run SimSoft in version "..SS2V)
  38. print(">Pleas wait...")
  39.  
  40. --Updata Check
  41.  
  42. Download("DrUiPUvq", "SimSoft/Daten/UpdateCheck/S")
  43.  
  44. file = fs.open("SimSoft/Daten/UpdateCheck/S","r")
  45. local fileData = {}
  46. local line = file.readLine()
  47. repeat
  48. table.insert(fileData,line)
  49. line = file.readLine()
  50. until line == nil
  51. file.close()
  52.  
  53. v = fileData[1]
  54.  
  55. if v == SS2V then
  56.  function UpdataC()
  57.   UpdataCV = true
  58.  end
  59. else
  60.  function UpdataC()
  61.   UpdataCV = false
  62.  end
  63. end
  64.  
  65. fs.delete("SimSoft/Daten/UpdateCheck/S")
  66.  
  67. --Rednet Check
  68.  
  69. if peripheral.getType("back") == "modem" then
  70.  rednet.open("back")
  71. end
  72.  
  73. if peripheral.getType("left") == "modem" then
  74.  rednet.open("left")
  75. end
  76.  
  77. if peripheral.getType("right") == "modem" then
  78.  rednet.open("right")
  79. end
  80.  
  81. if peripheral.getType("top") == "modem" then
  82.  rednet.open("top")
  83. end
  84.  
  85. if peripheral.getType("front") == "modem" then
  86.  rednet.open("front")
  87. end
  88.  
  89. if peripheral.getType("bottom") == "modem" then
  90.  rednet.open("bottom")
  91. end
  92.  
  93. --Functionen
  94.  
  95. function Clear()
  96.  term.clear()
  97.  term.setCursorPos(1,1)
  98. end
  99.  
  100. function CP(x,y)
  101.  term.setCursorPos(x,y)
  102. end
  103.  
  104. function TC(farbe)
  105.  term.setTextColor(farbe)
  106. end
  107.  
  108. function BC(farbe)
  109.  term.setBackgroundColor(farbe)
  110. end
  111.  
  112. --End Functionen
  113.  
  114. --Start System (Passwort System)
  115.  
  116. file = fs.open("SimSoft/Daten/User","r")
  117. local fileData = {}
  118. local line = file.readLine()
  119. repeat
  120. table.insert(fileData,line)
  121. line = file.readLine()
  122. until line == nil
  123. file.close()
  124.  
  125. hint = fileData[3]
  126.  
  127. if hint == "t" then
  128.  
  129.  --Pass System Desin
  130.  BC(128)
  131.  Clear()
  132.  
  133.  BC(32768)
  134.  CP(1,1)
  135.  print("                                                   ")
  136.  print("                                                   ")
  137.  print("                                                   ")
  138.  
  139.  CP(15,2)
  140.  TC(1)
  141.  print("SimSoft 2.1 - Login")
  142.  
  143.  BC(128)
  144.  CP(4,7)
  145.  TC(1)
  146.  print("Login")
  147.  
  148.  file = fs.open("SimSoft/Daten/User","r")
  149.  local fileData = {}
  150.  local line = file.readLine()
  151.  repeat
  152.  table.insert(fileData,line)
  153.  line = file.readLine()
  154.  until line == nil
  155.  file.close()
  156.  
  157.  name = fileData[1]
  158.  passr = fileData[2]
  159.  
  160.  
  161.  CP(5,9)
  162.  TC(256)
  163.  write("Username - ")
  164.  TC(32768)
  165.  print(name)
  166.  
  167.  TC(256)
  168.  CP(5,11)
  169.  write("Password - ")
  170.  TC(32768)
  171.  passe = read("*")
  172.  
  173.  if passe == passr then
  174.   shell.run("SimSoft/System/Desktop")
  175.  else
  176.   term.setCursorPos(5,14)
  177.   BC(128)
  178.   TC(256)
  179.   print("Wrong password.")
  180.   sleep(0.6)
  181.   shell.run("SimSoft/System/SystemStart")
  182.  end
  183.  
  184. else
  185.  shell.run("SimSoft/System/Desktop")
  186. end
  187.  
  188. --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