Jump to content




Password Protected Door


22 replies to this topic

#1 unstopablekk

  • Members
  • 50 posts

Posted 20 April 2012 - 01:46 AM

An actual real one. I havent played minecraft with cc in a long time since I had to run my server for 100 players :)/> I just let a moderator take over for a while and joined a tekkit server. I just want a password door. I have the redstone setup to the back of the computer and all i need is the script. Too re-research computercraft.
Thanks Much appreciated!

#2 EmTeaKay

  • Members
  • 115 posts

Posted 20 April 2012 - 03:21 AM

local oldPull = os.pullEvent;
os.pullEvent = os.pullEventRaw;
term.clear()
term.setCursorPos(1,1)
correctpass = "Open"
write("Enter Password: ")
pass = read("*")
if pass == (correctpass) then
write("Opening Door")
redstone.setOutput("back", true )
sleep(3)
redstone.setOutput("back", false )
os.shutdown()
end
write("Incorrect Password")
sleep(3)
term.clear()
term.setCursorPos(1,1)
textutils.slowPrint("Terminal Locking Down in 3... 2... 1...")
sleep(.5)
os.shutdown()
os.pullEvent = oldPull;
You can change the password and sayings to what suits you.

#3 BigSHinyToys

  • Members
  • 1,001 posts

Posted 20 April 2012 - 11:23 AM

that is a good lock but there are three ways around it.

make a disk. Make a program on the disk called startup.Put one of these in that program

One
print("Open")

Two
correctpass = "123"
Shell.run(startup)
when asked for pass just enter 123

Three
os.pullEventRaw = os.pullEvent:
Shell.run(startup)
and Ctrl T it


place disk in a drive next to the computer while it is shutdown startup computer.

#4 Dirkus7

  • Members
  • 148 posts
  • Locationthe Netherlands

Posted 20 April 2012 - 02:20 PM

Then don't put the password program on the terminal, but on a disk and make a disk drive on the top of the computer. and make it so that people can't get into it.

#5 EmTeaKay

  • Members
  • 115 posts

Posted 20 April 2012 - 04:07 PM

He asked for a password lock, I gave it to him. And I know there are plenty of ways to get the password of a computer.

#6 Robd

  • New Members
  • 32 posts

Posted 21 April 2012 - 03:51 AM

View PostBigSHinyToys, on 20 April 2012 - 11:23 AM, said:

that is a good lock but there are three ways around it.

make a disk. Make a program on the disk called startup.Put one of these in that program

One
print("Open")

Two
correctpass = "123"
Shell.run(startup)
when asked for pass just enter 123

Three
os.pullEventRaw = os.pullEvent:
Shell.run(startup)
and Ctrl T it


place disk in a drive next to the computer while it is shutdown startup computer.
Or you could bypass the terminal all together and use the infamous "redstone torch" method lol (hehe) :)/> :)/>

#7 unstopablekk

  • Members
  • 50 posts

Posted 21 April 2012 - 02:10 PM

Im good with that script thankyou! Im on a tekkit server and people freaked out when I got the computer to say "Rawr" lol (noobs)

#8 EmTeaKay

  • Members
  • 115 posts

Posted 21 April 2012 - 03:56 PM

lol! That's funny. And don't forget to do this:
shell.run("clear")
textutlis.slowPrint("You have been chosen to...")
sleep(4)
shell.run("clear")
textutlis.slowPrint("DIE!")
sleep(3)
os.shutdown()
end


#9 BigSHinyToys

  • Members
  • 1,001 posts

Posted 21 April 2012 - 08:45 PM

Slightly modified for maximum effect
1) Save as startup
2 )Shutdown computer
3) Place TNT bellow computer
4) lol
shell.run("clear")
textutlis.slowPrint("You have been chosen to...")
sleep(2)
rs.setOutput ("bottom", true) -- with TNT under terminal
sleep(2)
shell.run("clear")
textutlis.slowPrint("DIE!")
sleep(3)
os.shutdown()
end
credit to EmTeaKay

#10 EmTeaKay

  • Members
  • 115 posts

Posted 21 April 2012 - 11:55 PM

View PostBigSHinyToys, on 21 April 2012 - 08:45 PM, said:

Slightly modified for maximum effect
1) Save as startup
2 )Shutdown computer
3) Place TNT bellow computer
4) lol
shell.run("clear")
textutlis.slowPrint("You have been chosen to...")
sleep(2)
rs.setOutput ("bottom", true) -- with TNT under terminal
sleep(2)
shell.run("clear")
textutlis.slowPrint("DIE!")
sleep(3)
os.shutdown()
end
credit to EmTeaKay
This is tons better! I would love to see them rage quit after this. And the best part? It only requires 10 lines of coding! (I counted)

#11 Robd

  • New Members
  • 32 posts

Posted 23 April 2012 - 08:21 PM

View PostEmTeaKay, on 21 April 2012 - 11:55 PM, said:

View PostBigSHinyToys, on 21 April 2012 - 08:45 PM, said:

Slightly modified for maximum effect
1) Save as startup
2 )Shutdown computer
3) Place TNT bellow computer
4) lol
shell.run("clear")
textutlis.slowPrint("You have been chosen to...")
sleep(2)
rs.setOutput ("bottom", true) -- with TNT under terminal
sleep(2)
shell.run("clear")
textutlis.slowPrint("DIE!")
sleep(3)
os.shutdown()
end
credit to EmTeaKay
This is tons better! I would love to see them rage quit after this. And the best part? It only requires 10 lines of coding! (I counted)
Then there's always the infamous piston platform in front of the computer hehe (stick a nice little lava pit underneath >:)/> )

#12 EmTeaKay

  • Members
  • 115 posts

Posted 25 April 2012 - 12:03 AM

You're right, lava is better, as it burns their items too.

#13 gringomotel

  • New Members
  • 1 posts

Posted 12 January 2013 - 01:05 AM

I love the lava Idea haha!!

#14 Mikeemoo

  • Members
  • 732 posts
  • LocationLondon, UK

Posted 12 January 2013 - 01:13 AM

Necro!

#15 Ivanthefirst

  • New Members
  • 2 posts

Posted 05 October 2013 - 04:41 PM

The code posted by EmTeaKay works well. I have no problem getting it to work out the back via red-stone to the door or without the red-stone by placing computer next to the door. I can enter the password and door opens and closes just fine. My problem is that the door is not locked. When I or anyone else comes up to door they can click on door and it opens just as any other door does. What did I miss?

#16 awsmazinggenius

  • Members
  • 930 posts
  • LocationCanada

Posted 06 October 2013 - 01:06 PM

I just added to this, changed a bit of wording...
term.clear()				
term.setCursorPos(1,1)				
textutils.slowPrint("Please ... walk inside.")				
sleep(0.7)				
rs.setOutput("left", true)				
sleep(1.5)				
textutils.slowPrint("and...")				
sleep(1.5)				
term.clear()				
if term.isColor == true then			  
  term.setTextColor(colors.red)				
  term.write("DIE!!!")				
  term.setTextColor(colors.whte)				
  rs.setOutput("bottom", true])				
else			  
  print("DIE!!!")				
  rs.setOutput("bottom", true)				
end			
This assumes you have an iron door on the left, and TNT on the bottom. As well as an (empty) chest on the inside and a server plugin to prevent others from breaking or placing blocks.

#17 ThiagoTGM

  • Members
  • 5 posts

Posted 06 October 2013 - 09:00 PM

View PostIvanthefirst, on 05 October 2013 - 04:41 PM, said:

The code posted by EmTeaKay works well. I have no problem getting it to work out the back via red-stone to the door or without the red-stone by placing computer next to the door. I can enter the password and door opens and closes just fine. My problem is that the door is not locked. When I or anyone else comes up to door they can click on door and it opens just as any other door does. What did I miss?
Use Iron Doors?

#18 Agoldfish

  • Members
  • 451 posts
  • LocationSome Fish Bowl in Ohio.

Posted 08 October 2013 - 01:45 PM

If you wanted a SUPER simple one...

-- Make a new program and make the program name your password
print"Correct"
redstone.setOutput("left",true)
sleep(2)
redstone.setOutput("left",false)
I know, plenty of ways around it.

#19 Ivanthefirst

  • New Members
  • 2 posts

Posted 08 October 2013 - 07:22 PM

Iron door it is. So simple once you add the iron door.
Thanks all.

#20 overfritz

  • Members
  • 65 posts

Posted 09 October 2013 - 03:05 PM

For those who want a convenient way to get the TNT & Computer setup, I made a paste for it. Credit has been given where credit is due.
pastebin get bdFAqPfp explode






1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users