Simlor_GER

SimSoft Yellow (german) - SystemStart

Jun 11th, 2017
661
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.89 KB | None | 0 0
  1. --SimSoft Yellow - Copyright by Simlor (http://www.computercraft.info/forums2/index.php?/user/55655-simlor/)
  2.  
  3. --SystemStart
  4.  
  5.  
  6. --Funktionen
  7.  
  8.  
  9. --Clear
  10.  
  11. function Clear()
  12. term.clear()
  13. term.setCursorPos(1,1)
  14. end
  15.  
  16.  
  17. --Set Cursorposition
  18.  
  19. function CP(x,y)
  20. term.setCursorPos(x,y)
  21. end
  22.  
  23.  
  24. --Set Background Color
  25.  
  26. function BC(farbe)
  27. term.setBackgroundColor(farbe)
  28. end
  29.  
  30.  
  31. --Set Text Color
  32.  
  33. function TC(farbe)
  34. term.setTextColor(farbe)
  35. end
  36.  
  37.  
  38. --Versions Abfrage
  39.  
  40. function VersionsAbfrage()
  41. file = fs.open("SimSoft/Data/Version","r")
  42. local fileData = {}
  43. local line = file.readLine()
  44. repeat
  45. table.insert(fileData,line)
  46. line = file.readLine()
  47. until line == nil
  48. file.close()
  49. SystemVersion = fileData[3]
  50. Sprache = fileData[4]
  51. end
  52.  
  53. --System
  54.  
  55. --FlshDep
  56.  
  57. BC(32768)
  58. Clear()
  59. sleep(0.1)
  60. BC(128)
  61. Clear()
  62. sleep(0.1)
  63. BC(256)
  64. Clear()
  65. sleep(0.1)
  66. BC(1)
  67. Clear()
  68. sleep(0.1)
  69.  
  70.  
  71. --Aussehen
  72.  
  73. BC(1)
  74. Clear()
  75.  
  76. file = fs.open("SimSoft/Data/UserData","r")
  77. local fileData = {}
  78. local line = file.readLine()
  79. repeat
  80. table.insert(fileData,line)
  81. line = file.readLine()
  82. until line == nil
  83. file.close()
  84.  
  85. Rname = fileData[3]
  86. Rpass = fileData[4]
  87. IsPass = fileData[5]
  88.  
  89. if IsPass == true or IsPass == "true" then
  90.  
  91. file = fs.open("SimSoft/Data/SystemColor","r")
  92. local fileData = {}
  93. local line = file.readLine()
  94. repeat
  95. table.insert(fileData,line)
  96. line = file.readLine()
  97. until line == nil
  98. file.close()
  99.  
  100. SystemColor = fileData[3]
  101.  
  102. SystemColor = ((SystemColor-1)+1)
  103.  
  104. w, h = term.getSize()
  105.  
  106. wC = 0
  107. hC = 1
  108.  
  109. while true do
  110.  
  111. wC = (wC+1)
  112.  
  113. CP(wC, hC)
  114. BC(SystemColor)
  115. write(" ")
  116.  
  117. if wC == w then
  118. if hC == 3 then
  119. break
  120. else
  121. hC = (hC+1)
  122. wC = 0
  123. end
  124. end
  125.  
  126. end
  127.  
  128. anzeige = "SimSoft Yellow"
  129.  
  130. TC(1)
  131. CP(((w/2)-((#anzeige)/2)),2)
  132.  
  133. print(anzeige)
  134.  
  135. BC(1)
  136.  
  137. TC(SystemColor)
  138. CP(4,8)
  139. write("Username ")
  140. TC(128)
  141. print("- ")
  142.  
  143. TC(128)
  144. CP(4,10)
  145. write("Passwort ")
  146. TC(SystemColor)
  147. print("- ")
  148.  
  149.  
  150. CP(15,8)
  151. TC(SystemColor)
  152.  
  153. Ename = read()
  154.  
  155.  
  156. TC(128)
  157. CP(4,8)
  158. write("Username ")
  159. TC(SystemColor)
  160. write("- ")
  161. TC(128)
  162. print(Ename)
  163.  
  164. TC(SystemColor)
  165. CP(4,10)
  166. write("Passwort ")
  167. TC(128)
  168. print("- ")
  169.  
  170.  
  171. CP(15,10)
  172. TC(SystemColor)
  173.  
  174. Epass = read("#")
  175.  
  176.  
  177. TC(128)
  178. CP(4,10)
  179. write("Passwort ")
  180. TC(SystemColor)
  181. write("- ")
  182. TC(128)
  183. print("####### ")
  184.  
  185. CP(2,12)
  186. TC(SystemColor)
  187. print("Bitte warten...")
  188.  
  189. if Ename == Rname then
  190. if Epass == Rpass then
  191. CP(2,12)
  192. TC(SystemColor)
  193. print("Name Und Passwort Stimmen!")
  194. else
  195. CP(2,12)
  196. TC(SystemColor)
  197. print("Name Oder Passwort Sind Falsch!")
  198. sleep(1)
  199. os.reboot()
  200. end
  201.  
  202. else
  203.  
  204. CP(2,12)
  205. TC(SystemColor)
  206. print("Name Oder Passwort Sind Falsch!")
  207. sleep(1)
  208. os.reboot()
  209.  
  210. end
  211.  
  212. end
  213.  
  214. shell.run("SimSoft/System/Desktop")
  215.  
  216.  
  217. --end
Add Comment
Please, Sign In to add comment