Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Copyright Simlor (http://www.computercraft.info/forums2/index.php?/user/55655-simlor/) - Alle Rechte an diesen Programm sind Simlor vorbehalten.
- --Functions
- function Clear()
- term.clear()
- term.setCursorPos(1,1)
- end
- function CP(x,y)
- term.setCursorPos(x,y)
- end
- function TC(farbe)
- term.setTextColor(farbe)
- end
- function BC(farbe)
- term.setBackgroundColor(farbe)
- end
- --Teil 1
- BC(256)
- Clear()
- CP(1,1)
- BC(128)
- print(" ")
- print(" ")
- print(" ")
- CP(16,2)
- TC(1)
- print("SimSoft 4 by Simlor")
- BC(256)
- TC(128)
- CP(4,6)
- print(" New PC-Name -")
- CP(4,8)
- print(" New account name -")
- CP(4,10)
- print("New account password -")
- CP(47,18)
- TC(128)
- print("1/2")
- CP(4,6)
- TC(1)
- print(" New PC-Name -")
- CP(27,6)
- TC(1)
- pcname = read()
- CP(4,6)
- TC(128)
- print(" New PC-Name -")
- CP(4,8)
- TC(1)
- print(" New account name -")
- CP(27,8)
- TC(1)
- name = read()
- CP(4,8)
- TC(128)
- print(" New account name -")
- CP(4,10)
- TC(1)
- print("New account password -")
- CP(27,10)
- TC(1)
- pass = read()
- CP(4,10)
- TC(128)
- print("New account password -")
- --Teil 2
- BC(256)
- Clear()
- CP(1,1)
- BC(128)
- print(" ")
- print(" ")
- print(" ")
- CP(16,2)
- TC(1)
- print("SimSoft 4 by Simlor")
- BC(256)
- CP(21,10)
- TC(1)
- print("Let's go!")
- CP(21,11)
- TC(128)
- print(" [Enter]")
- BC(256)
- CP(2,17)
- TC(1)
- print("Cancel")
- CP(2,18)
- TC(128)
- print(" [Q]")
- CP(47,18)
- TC(256)
- print("2/2")
- while true do
- a, b = os.pullEvent()
- while a~= "key" do a,b = os.pullEvent() end
- if b == 16 then
- os.reboot()
- end
- if b == 28 then
- break
- end
- end
- --Teil 3 - Installer
- BC(128)
- TC(32)
- Clear()
- shell.run("cd /")
- fs.delete("SimSoft")
- fs.delete("startup")
- os.setComputerLabel(pcname)
- Clear()
- BC(256)
- Clear()
- CP(1,1)
- BC(128)
- print(" ")
- print(" ")
- print(" ")
- CP(16,2)
- TC(1)
- print("SimSoft 4 by Simlor")
- CP(3,8)
- BC(128)
- print(" ")
- CP(3,8)
- BC(1)
- write(" ")
- local file = fs.open("SimSoft/Data/Config","w")
- file.close()
- local file = fs.open("SimSoft/Data/Config","a")
- file.writeLine("true")
- file.writeLine("true")
- file.writeLine("4.0.1")
- file.writeLine("en")
- file.close()
- --
- local file = fs.open("SimSoft/Data/User/User1","w")
- file.close()
- local file = fs.open("SimSoft/Data/User/User1","a")
- file.writeLine(name)
- file.writeLine(pass)
- file.close()
- local file = fs.open("SimSoft/Data/User/User2","w")
- file.close()
- local file = fs.open("SimSoft/Data/User/User2","a")
- file.writeLine("Account 2")
- file.writeLine("123")
- file.writeLine("false")
- file.close()
- local file = fs.open("SimSoft/Data/User/User3","w")
- file.close()
- local file = fs.open("SimSoft/Data/User/User3","a")
- file.writeLine("Account 3")
- file.writeLine("123")
- file.writeLine("false")
- file.close()
- --
- write(" ")
- --
- local file = fs.open("SimSoft/Daten/SappS/1","w")
- file.close()
- local file = fs.open("SimSoft/Daten/SappS/1","a")
- file.writeLine("")
- file.writeLine("")
- file.writeLine("")
- file.writeLine("")
- file.writeLine("n")
- file.writeLine("false")
- file.close()
- --
- write(" ")
- --
- u = 1
- while true do
- u = (u+1)
- fs.copy("SimSoft/Daten/SappS/1", "SimSoft/Daten/SappS/"..u)
- if u == 15 then
- break
- end
- end
- local file = fs.open("SimSoft/Daten/SappS/A","w")
- file.writeLine("0.0")
- file.close()
- function Download(Pfad, CodePB)
- local cacheBuster = ("%x"):format(math.random(0, 2 ^ 30))
- local datei = http.get("https://pastebin.com/raw/" .. textutils.urlEncode(CodePB) .. "?cb=" .. cacheBuster)
- datei = datei.readAll()
- local file = fs.open(Pfad, "w")
- file.write(datei)
- file.close()
- write(" ")
- end
- Download("SimSoft/System/Desktop", "4jkJesEk")
- Download("SimSoft/System/SappS", "4246xccR")
- Download("SimSoft/System/SystemStart", "eUkjR1G3")
- Download("SimSoft/Data/DesktopBG", "2psPjAet")
- Download("startup", "sZyRc9tY")
- Download("SimSoft/System/SystemUpdate", "Yv4VUL6Z")
- Download("SimSoft/System/AcManager", "37JX7zEE")
- print(" ")
- sleep(0.8)
- os.reboot()
- --end
Add Comment
Please, Sign In to add comment