Posted 17 August 2012 - 06:37 AM
hello people, sorry for my bad English, is that I am Brazilian, so lets get to the point, today I am here to announce the first new program "Rednet Works", in which case I created, I made the Login 1.2, this program you put your computer to the security of the CC 1.41, remember to first create a file named "pass" without the quotes.
For the next version:
* Auto-creation of the file 'pass'
* Login fastest
* Fewer lines of script
And ciba43,thank you for have the idea of auto creation of the 'pass' file.
pastebin get iCMHgAjt to get in-game
startup:
For the next version:
* Auto-creation of the file 'pass'
* Login fastest
* Fewer lines of script
And ciba43,thank you for have the idea of auto creation of the 'pass' file.
pastebin get iCMHgAjt to get in-game
startup:
function c()
term.clear()
term.setCursorPos(1, 1)
end
function new()
c()
print("You do not have a password")
write ("Enter a new password: ")
pass = read()
write("Confirm the password: ")
com = read()
if com == pass then
print("You have one new password")
local f = fs.open("pass", "w")
f.writeLine(com)
f.close()
else
print("Passwords must equal")
end
end
function pw()
c()
local f = fs.open("pass", "r")
write("Enter the password: ")
pass = f.readLine()
if read("*") == pass then
print("Welcome user!")
else
print("Please, enter a correct password")
sleep(1)
pw()
end
f.close()
end
function verify()
c()
local f = fs.open("pass", "r")
line = f.readLine()
if line == "" then
new()
else
pw()
end
f.close()
end
verify()
Edited on 09 January 2013 - 09:52 PM