Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- term.setBackgroundColor(colors.white)
- term.setTextColor(colors.blue)
- shell.run("clear")
- --Start--
- function start()
- shell.run("clear")
- term.setBackgroundColor(colors.white)
- term.setTextColor(colors.blue)
- shell.run("clear")
- print(" Willkommen in der Computercraft Akademie")
- term.setCursorPos(16, 3)
- print("BurningKeys")
- term.setCursorPos(1, 5)
- print(" Hier werden die einzelnen Grundlagen gezeigt")
- print(" Um den PC zu starten bitte ENTER druecken")
- pcstr()
- end
- --PCstr-- PC startet
- function pcstr()
- evt, key = os.pullEvent("key")
- if key == 28 then
- shell.run("clear")
- print("Bitte Logge dich ein." )
- print("Erstellt ein Profil oder laedt es wenn eins vorhanden ist")
- tAcc()
- else
- pcstr()
- end
- end
- -- rAccs -- Reading Accounts
- function rAccs()
- sleep(2)
- shell.run("clear")
- rAcc = fs.open(name, "r")
- rname = rAcc.readLine(1)
- rpass = rAcc.readLine(2)
- rcode = rAcc.readLine(3)
- rAcc.close()
- loading()
- end
- -- tAcc -- test Accounts
- function tAcc()
- name = io.read()
- if fs.exists(name) == true then
- sleep(0.2)
- shell.run("clear")
- print("Willkommen zurueck " .. name .. ". Bitte gib DEIN Password ein")
- pass = read("*")
- if pass == rpass then
- rAccs()
- else
- print("Falsches Password!")
- sleep(2)
- shell.run("clear")
- tAcc()
- end
- else
- sAcc()
- end
- end
- -- Loading-- Daten werden Geladen
- function sAcc()
- print("Neuer Account wird Erstellt")
- sleep(2)
- shell.run("clear")
- print("Bitte PW waehlen")
- spass = read("*")
- print("Password gewaehlt. Code wird Generiert")
- sleep(2)
- shell.run("clear")
- term.setCursorPos(12, 4)
- print("Speichert Datein. Bitte warten.")
- term.setCursorPos(17, 5)
- term.setBackgroundColor(colors.black)
- print(" ")
- term.setCursorPos(17, 7)
- print(" ")
- term.setCursorPos(17, 6)
- print(" ")
- term.setCursorPos(29, 6)
- print(" ")
- term.setCursorPos(18, 6)
- term.setBackgroundColor(colors.green)
- textutils.slowPrint(" ", 0.60)
- term.setBackgroundColor(colors.white)
- code1 = math.random(0, 9)
- code2 = math.random(0, 9)
- code3 = math.random(0, 9)
- code4 = math.random(0, 9)
- code5 = math.random(0, 9)
- code6 = math.random(0, 9)
- code7 = math.random(0, 9)
- code8 = math.random(0, 9)
- code = code1 .. code2 .. code3 .. code4 .. code5 .. code6 .. code7 .. code8
- print("Deine Codenummer ist: " .. code)
- sAcc = fs.open(name, "w")
- sAcc.writeLine(name)
- sAcc.writeLine(spass)
- sAcc.writeLine(code)
- sAcc.close()
- loading()
- end
- function loading()
- sleep(1)
- shell.run("clear")
- term.setCursorPos(4, 2)
- term.setTextColor(colors.red)
- print("Daten werden Geladen eine Sekunde")
- term.setCursorPos(17, 5)
- term.setBackgroundColor(colors.black)
- print(" ")
- term.setCursorPos(17, 7)
- print(" ")
- term.setCursorPos(17, 6)
- print(" ")
- term.setCursorPos(29, 6)
- print(" ")
- term.setCursorPos(18, 6)
- term.setBackgroundColor(colors.green)
- textutils.slowPrint(" ", 0.60)
- term.setBackgroundColor(colors.white)
- lprog1()
- end
- function lprog1()
- shell.run("clear")
- sleep(1)
- print("||||||||||")
- evt1, key1 = os.pullEvent("key")
- if key1 == 2 then
- shell.run("prog1")
- else
- lprog1()
- end
- end
- --Beginschleife--
- while true do
- start()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement