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

Door Lock...

Started by usernametook, 16 February 2012 - 06:51 AM
usernametook #1
Posted 16 February 2012 - 07:51 AM
First make a program called startup to prevent the lock from being terminated… (btw — means its somthing different like the edit means that in the screen then write the code :D/>/>)
———————
edit startup
———————
while true do
shell.run "lock"
end

———————
now for the lock itself :D/>/>…
———————
edit lock
———————
pass = "password"
write "Password: "

read = ("*")
if input == pass then
print "Welcome!"
rs.setOutput("back" true)
rs.setOutput("right" true)
rs.setOutput("left" true)
sleep(3.5)
rs.setOutput("back" false)
rs.setOutput("right" false)
rs.setOutput("left" false)

else

print "Incorrect Password!"
sleep(2)
os.reboot()
end
———————
Xtansia #2
Posted 16 February 2012 - 08:33 AM
Why didn't you use code tags? And spoiler tags?
usernametook #3
Posted 16 February 2012 - 08:35 AM
Why didn't you use code tags? And spoiler tags?
i dunno how :D/>/>
Xtansia #4
Posted 16 February 2012 - 08:40 AM
Why didn't you use code tags? And spoiler tags?
i dunno how :D/>/>

Code tags: [.code]Cool Code[./code]
Spoiler tags: [.spoiler]Long Text[./spoiler]
You can even nest them:
[.spoiler][.code]Ultra long code[./code][./spoiler]
Just remove the dots.
FuzzyPurp #5
Posted 16 February 2012 - 09:11 AM
Now make it hack proof.
bbc100 #6
Posted 20 February 2012 - 05:57 AM
how do you finish it?
FuzzyPurp #7
Posted 20 February 2012 - 01:54 PM
how do you finish it?
http://www.computercraft.info/forums2/index.php?/topic/61-ctrlt/