5 posts
Posted 06 May 2012 - 09: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...nxoaz8ffd8pvocyHave 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..
92 posts
Posted 06 May 2012 - 07: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. :)/>/>
6 posts
Posted 07 May 2012 - 12:53 PM
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?
92 posts
Posted 07 May 2012 - 12:55 PM
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.
6 posts
Posted 07 May 2012 - 01: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
5 posts
Posted 07 May 2012 - 04:49 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. :)/>/>
No problem @ all, I'm glad I could help
5 posts
Posted 07 May 2012 - 04:53 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
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..
6 posts
Posted 07 May 2012 - 09:30 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
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….
:)/>/>
5 posts
Posted 08 May 2012 - 06:15 AM
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"?
6 posts
Posted 08 May 2012 - 06: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!!!!
21 posts
Posted 10 May 2012 - 01: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
4 posts
Location
Swedish
Posted 19 May 2012 - 10:11 AM
what is the language which it used? where you find all the code?
I did not get mine to work.
kikotte
5 posts
Posted 20 May 2012 - 02:24 PM
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/>/>