Jump to content




Door PW-lock

computer utility

  • You cannot reply to this topic
12 replies to this topic

#1 hetpepijntje

  • New Members
  • 5 posts

Posted 06 May 2012 - 08:20 AM

Hi all,

The last few days, I was looking for a super-noob friendly doorlock.
Most of the locks that are available are very complex, and I couldn't get them to work at all.

This one is called pwlock, it is a door-lock, which I made myself, as easy as it can get, and easy-to-make with text-util in craft-os itself:
write("Password:")


password = read("*")
if password == "CHANGEPASSWORD" then
rs.setOutput("bottom", true)
sleep(3)
rs.setOutput("bottom", false)
term.clear()
term.setCursorPos(1,1)
else
write("Incorrect Password!")
term.clear()
term.setCursorPos(1,1)
os.shutdown()
end
  • The "CHANGEPASSWORD" do you have to change to the password you prefer :)/>
  • Both of the "rs.setOutput" shall you have to change to the direction the door is placed on.
Piece of cake, right?!

Download link: http://www.mediafire...nxoaz8ffd8pvocy

Have fun!

7-5-12, 18:02 *EDIT*: I just discovered that if you change the "bottom" in left or right, the door won't open. This means that the terminal has to be placed on top or underneath.. I'm sorry for the inconvenience..

#2 digpoe

  • Members
  • 92 posts

Posted 06 May 2012 - 06:56 PM

It's pretty good and VERY user friendly :)/>
Also, I used parts of this to help me in what I was making, so thanks too. :)/>

#3 Halleyelec

  • New Members
  • 6 posts

Posted 07 May 2012 - 11:53 AM

As you can see I am a noob at this! This is also my first post!

I can't seem to get the pwlock to work. is it just me or have I done something wrong.

I am running multiple mods through Technic Pack and have a reinforced door to the left of my computer. As far as I can see the password is correct and the OS shutsdown leaving the black DOS screen but the door does not open.

Can anyone help?

#4 digpoe

  • Members
  • 92 posts

Posted 07 May 2012 - 11:55 AM

View PostHalleyelec, on 07 May 2012 - 11:53 AM, said:

As you can see I am a noob at this! This is also my first post!

I can't seem to get the pwlock to work. is it just me or have I done something wrong.

I am running multiple mods through Technic Pack and have a reinforced door to the left of my computer. As far as I can see the password is correct and the OS shutsdown leaving the black DOS screen but the door does not open.

Can anyone help?
Name it as startup, then type "reboot" into the OS screen, then it should come up.

#5 Halleyelec

  • New Members
  • 6 posts

Posted 07 May 2012 - 12:07 PM

Hi Clueless,

I have done as you advised, upon clicking the computer, the password screen does appear but once the correct password has been entered the door still does not open and os.shutdown() leaves the screen black...

rather than download your version I wrote it word for word (out of practice by about 20 years!) but no luck....


and if i enter a wrong password, same screen appears.....blackness

#6 hetpepijntje

  • New Members
  • 5 posts

Posted 07 May 2012 - 03:49 PM

View Postdigpoe, on 06 May 2012 - 06:56 PM, said:

It's pretty good and VERY user friendly :)/>
Also, I used parts of this to help me in what I was making, so thanks too. :)/>
No problem @ all, I'm glad I could help

#7 hetpepijntje

  • New Members
  • 5 posts

Posted 07 May 2012 - 03:53 PM

View PostHalleyelec, on 07 May 2012 - 12:07 PM, said:

Hi Clueless,

I have done as you advised, upon clicking the computer, the password screen does appear but once the correct password has been entered the door still does not open and os.shutdown() leaves the screen black...

rather than download your version I wrote it word for word (out of practice by about 20 years!) but no luck....


and if i enter a wrong password, same screen appears.....blackness

Did you change the variable "bottom" in rs.setOutput("bottom", true) and rs.setOutput("bottom", false) to left or right? See the edit of the start-post..

#8 Halleyelec

  • New Members
  • 6 posts

Posted 07 May 2012 - 08:30 PM

View Posthetpepijntje, on 07 May 2012 - 03:53 PM, said:

View PostHalleyelec, on 07 May 2012 - 12:07 PM, said:

Hi Clueless,

I have done as you advised, upon clicking the computer, the password screen does appear but once the correct password has been entered the door still does not open and os.shutdown() leaves the screen black...

rather than download your version I wrote it word for word (out of practice by about 20 years!) but no luck....


and if i enter a wrong password, same screen appears.....blackness

Did you change the variable "bottom" in rs.setOutput("bottom", true) and rs.setOutput("bottom", false) to left or right? See the edit of the start-post..

Yeah that was the first thing I did......changed it to "left" as it was to the left of the computer....

:)/>

#9 hetpepijntje

  • New Members
  • 5 posts

Posted 08 May 2012 - 05:15 AM

View PostHalleyelec, on 07 May 2012 - 08:30 PM, said:

View Posthetpepijntje, on 07 May 2012 - 03:53 PM, said:

View PostHalleyelec, on 07 May 2012 - 12:07 PM, said:

Hi Clueless,

I have done as you advised, upon clicking the computer, the password screen does appear but once the correct password has been entered the door still does not open and os.shutdown() leaves the screen black...

rather than download your version I wrote it word for word (out of practice by about 20 years!) but no luck....


and if i enter a wrong password, same screen appears.....blackness

Did you change the variable "bottom" in rs.setOutput("bottom", true) and rs.setOutput("bottom", false) to left or right? See the edit of the start-post..

Yeah that was the first thing I did......changed it to "left" as it was to the left of the computer....

:)/>
Does it works when the computer is placed above with variable "bottom"?

#10 Halleyelec

  • New Members
  • 6 posts

Posted 08 May 2012 - 05:35 PM

it must be me doing something wrong because it still comes back as a blank screen.....

EDIT: aha!! I am an idiot! I have it working now!!!

Thank you very much!!!!

#11 PoLoMoTo

  • New Members
  • 21 posts

Posted 10 May 2012 - 12:57 AM

Put os.reboot() after the door closes from it to reset and instead of the os.shutdown() at the end try os.reboot() also put os.pullEvent = os.pullEventRaw at the beginning to stop people from hold CTRL+T to exit the lock. Nice job though :)/> just a few tweaks

#12 kikotte

  • New Members
  • 4 posts
  • LocationSwedish

Posted 19 May 2012 - 09:11 AM

what is the language which it used? where you find all the code?
I did not get mine to work.

kikotte

#13 hetpepijntje

  • New Members
  • 5 posts

Posted 20 May 2012 - 01:24 PM

View Postkikotte, on 19 May 2012 - 09:11 AM, said:

what is the language which it used? where you find all the code?
I did not get mine to work.

kikotte
It's made in the text-utility, name it like you want and re-type the code in it and it shall work :P/>





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users