This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
mrSLIMEguy's profile picture

Keycard Door Lock Idea

Started by mrSLIMEguy, 16 September 2012 - 12:38 AM
mrSLIMEguy #1
Posted 16 September 2012 - 02:38 AM
Hello, this is my idea of a keycard for a door. I don't know if this will work because I cant test it until computercraft updates to minecraft 1.3/1.4
Anyway, here is the code.


Computer's startup File:

os.shutdown()

Disk's Startup File:


print("Disk Activated.")
write "Password:"
input = read("*")
print("")
print("")
if input == "gullible"
print("Access Granted!")
redstone.setOutput("right", true)
sleep(5)
redstone.setOutput("right", false)
print("Welcome Home!")
else
print("Access Denied.")
end

sleep(2.5)
term.clear()
term.setCursorPos(1,1)
disk.eject(bottom)
shell.run("shutdown")

I believe that if there is a startup file on a disk and a computer the disk's startup file will open instead of the computer's startup file.

To open the door, you insert the disk and turn on the computer. Then you enter the password and the door opens.

Can you guess where i got the password "gullible" from?
Lyqyd #2
Posted 16 September 2012 - 04:41 AM
Or you put in a disk with a blank startup file and then you have access to the whole computer.
mrSLIMEguy #3
Posted 18 September 2012 - 08:39 AM
Or you put in a disk with a blank startup file and then you have access to the whole computer.
Yeah… I know
Blockeh #4
Posted 18 September 2012 - 11:55 AM
Honestly i think this should be the other way round. With everything on the computer startup file & only a password on the card.
Then make the computer read the card for "password" and if true then set output true.
ccsoxos #5
Posted 18 September 2012 - 05:45 PM
sounds cool
Can you guess where i got the password "gullible" from?
hmmm i think its from one of the asdf movies
mrSLIMEguy #6
Posted 19 September 2012 - 07:55 AM
sounds cool
Can you guess where i got the password "gullible" from?
hmmm i think its from one of the asdf movies
correct!
(and i stole your lungs)