Supports:
- control+t prevention
- optional multiple passwords
- optional case-sensitivity
- lockout timer
- optional lockout timer increases after unsuccessful attempts
- optional multi-side activation
Minecraft Lock V4 Download
Posted 27 April 2012 - 08:45 PM
Posted 27 April 2012 - 09:04 PM
Posted 27 April 2012 - 09:13 PM
MysticT, on 27 April 2012 - 09:04 PM, said:
Posted 27 April 2012 - 09:22 PM
--Settings
passwords={"PepsiMax", "PepsiMin"} --password(s) for the terminal
matchcase=true --require capital/lowercase letters to match?
sides={"left", "right"} --side(s) to activate on correct password
triggerfor=5 --how long to activate redstone after success
lockout=2 --lockout period after incorrect password
antiguess=true --increase lockout for each incorrect password?
function passprompt()
term.clear()
term.setCursorPos(1,1)
term.write("Enter password: ")
entry=read("*")
for i=1, #passwords do
if((entry==passwords[i]) or ((matchcase == false) and (string.lower(value) == string.lower(passwords[i])))) then
term.write("correct.")
attempts=0
cycledoor()
return true
end
end
term.write("incorrect.")
attempts=attempts+1
if(antiguess) then
sleep(lockout*attempts)
else
sleep(lockout)
end
end
function setsides(toggle)
for i=1, #sides do redstone.setOutput(sides[i], toggle) end
end
function cycledoor()
setsides(true)
sleep(triggerfor)
setsides(false)
end
attempts=0
os.pullEvent = os.pullEventRaw
while true do passprompt() end
Posted 27 April 2012 - 10:42 PM
password="blah"
entry=os.read()
if password==entry then
redstone.setOutput("right",true)
sleep(5)
end
os.reboot()
Posted 27 April 2012 - 10:43 PM
Posted 27 April 2012 - 10:46 PM
libraryaddict, on 27 April 2012 - 09:13 PM, said:
EmTeaKay, on 27 April 2012 - 10:43 PM, said:
Posted 29 April 2012 - 06:55 PM
Biopsy, on 27 April 2012 - 10:46 PM, said:
Posted 30 April 2012 - 05:50 PM
libraryaddict, on 29 April 2012 - 06:55 PM, said:
Biopsy, on 27 April 2012 - 10:46 PM, said:
0 members, 1 guests, 0 anonymous users