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

Code door (Or redstone pulse activated by code)

Started by Kadecamz, 29 July 2012 - 03:34 AM
Kadecamz #1
Posted 29 July 2012 - 05:34 AM

code = ("1337") -- Change the number to ANYTHING you want, letters are also accepted. Don't use your minecraft account's password if making a video.
print ("Enter code to enter")
input = read()
if input == code then
print ("Code accepted!")
rs.setOutput ("left",true)
sleep(4)
os.shutdown()
else
print ("Code rejected!")
sleep(4)
os.shutdown()
end

This is truely my first code without posting in 'ask a pro' thread,
Enjoy!


BTW, I made a missile silo map that uses the computercraft mod, icbm mod, wireless redstone mod, and the extrabiomesxl.

Its quite beast from my point of view. :ph34r:/>/>

I would give one screenshot, it is over 500K…sorry.
Xenthera #2
Posted 29 July 2012 - 06:29 AM
Great work, but you have some stuff to do, like looping it, so it doesn't quit everytime it ends. A simple While loop can achieve that.
Hidden Monarch #3
Posted 30 July 2012 - 07:50 AM
Heh, that code isn't secure. Add this to the top of the code:

os.pullEvent = os.pullEventRaw