Minecraft Blogs / Tutorial

Password lock on the mod computer craft? Prt 1

  • 934 views, 1 today
  • 2
  • 2
Emunator's Avatar Emunator
Level 22 : Expert Mage
9
Im here to show how to make a password lock on the mod 'Computer craft'.
Everyone thinks its hard to do and use, but thats because your either new or unfamilar with programing all together,
but to simply it done on how almost all programming and computer systems work it uses 3 simple steps.

Trigger(s)(what causes it/an action to cause it)
Condition(s)(will only work if these conditions/requirements are met)
Action(s)(what happens when the trigger is activated)

Note that conditions are only opitional.

These steps arent only used in programming, its also used in modern lifestyle but lets not get into that.

First if you want to make the start-up screen say a phrase or simply just asking for a password simply do this.

'edit startup'

after this it'll go on to an empty screen and now type this:

print ('enter password")

Also note that you must have the brackets and speech marks and you also can put whatever word or sentence inbetween the speech marks but DO NOT press enter to go to the next line.

press control then enter to save the settings, and press control again, then right arrow once, the enter again, shut down the computer and turn it on again to see if it worked.

Now the bit your waiting for, the actually lock bit, remember the 3 steps, they make it easier to under stand.
Lets say you want the password to be 'cheese'. You type 'edit cheese'
and it'll go on a empty black screen again as u just ccreated a new program. if you want it to say something when you type the correct password in type 'print ("accepted")' or whatever you want as you conformation. press enter for the next line.
Now type
'redstone.setOutput ("back", true)'

obviously replace 'back' with whatever direction u want the redstone to go or whatever you are activating is.

so in the end it should look like this.

print ("accepted")
redstone.setOutput ("back",true)

its really that simple.
Just save and exit it again shut down the computer and type in cheese and it should work.
Also note that there are heaps of variables withen this text. I'll be making another blog to show you how to actually add on to this in a simple way, but more advanced at the same time. The 3 simple steps thing is in this aswell,

typing in the password 'cheese' is the trigger, which results in the actions of sending the redstone signal back continuesly and saying the word/phrase 'accepted. You must also write this exactly as it is or it comes out as an error.

Sorry for writing so much as this is my first blog. Cheers.
Tags

1 Update Logs

Update #1 : by Emunator 01/22/2013 1:31:29 amJan 22nd, 2013

Corrected major grammer and spelling mistakes.

Create an account or sign in to comment.

Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome