Jump to content




ctrl+t protection in my code


  • You cannot reply to this topic
1 reply to this topic

#1 PawniX

  • New Members
  • 2 posts

Posted 07 September 2012 - 09:13 PM

hi hello,

i have a little question in currently playing on a big tekkit server
and have made a massive house
with a nice password protected forcefield door
but some guys ctrl+t'ed my computer edited the startup code and raped my house :D/>
is there a way 2 make it like u cant use CTRL+T ??
here is the startup code
sPass = "randompasswordorsomething:P"
DebugPass = "hahgay"
print(" ")
textutils.slowPrint("			   Welcome to THE HUNTERS				   ")
print("					Faction Base						")
print(" ")
sleep(1)
io.write("Password For Locked Door: ")
sInput = read("*")
  if sPass == sInput then
		print("Password Accepted!")
		redstone.setOutput("back", true)
		sleep(10)
		redstone.setOutput("back", false)
os.shutdown()
  elseif sInput == DebugPass then
print ("Debug mode activate!")
else	redstone.setOutput("left", true)
	 print("WRONG PASSWORD! ALARM ACTIVATED!")
	 print("WRONG PASSWORD! ALARM ACTIVATED!")
	 print("WRONG PASSWORD! ALARM ACTIVATED!")
	 print("WRONG PASSWORD! ALARM ACTIVATED!")
	 print("WRONG PASSWORD! ALARM ACTIVATED!")
	 print("WRONG PASSWORD! ALARM ACTIVATED!")
	 print("WRONG PASSWORD! ALARM ACTIVATED!")
	 print("WRONG PASSWORD! ALARM ACTIVATED!")
	 print("WRONG PASSWORD! ALARM ACTIVATED!")
	 print("WRONG PASSWORD! ALARM ACTIVATED!")
	 print("WRONG PASSWORD! ALARM ACTIVATED!")
	 print("WRONG PASSWORD! ALARM ACTIVATED!")
	 print("WRONG PASSWORD! ALARM ACTIVATED!")
	 print("WRONG PASSWORD! ALARM ACTIVATED!")
	 print("WRONG PASSWORD! ALARM ACTIVATED!")
	 print("WRONG PASSWORD! ALARM ACTIVATED!")
	 print("WRONG PASSWORD! ALARM ACTIVATED!")
	 print("WRONG PASSWORD! ALARM ACTIVATED!")
	 print("WRONG PASSWORD! ALARM ACTIVATED!")
	 print("WRONG PASSWORD! ALARM ACTIVATED!")
sleep(15)
redstone.setOutput("left", false)
os.shutdown()
end
can some1 tell me how 2 make it CTRL+T protected

#2 Cranium

    Ninja Scripter

  • Moderators
  • 4,031 posts
  • LocationLincoln, Nebraska

Posted 07 September 2012 - 09:19 PM

This has been posted in the tutorials section SO many times, and has been posted here in the Ask a Pro section even more. For future reference, there is a search function in the upper-right of the site.
You can CTRL+T protect your computer by adding os.pullEvent = os.pullEventRaw at the top of your code. Keep in mind that this will not prevent someone from attaching a disk drive next to your computer with a startup file in it. For that, you are kinda on your own.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users