Posted 29 September 2012 - 12:44 AM
hi I need a keycard program here is my idea for one, it should be that when you put in the keycard you will have to enter a passcoad to open a door or something please help i have the coad for the password program:
local function clearScreen()
term.clear()
term.setCursorPos(1, 1)
end
while true do
clearScreen()
print ("Type password to enter {LOCATION}!")
if read("*") == "{PASSWORD}" then
clearScreen()
print("Correct Password!")
print("Open door for how long?")
local a = read()
clearScreen()
print("Opening door!")
sleep (1)
redstone.setOutput("{SIDE OF DOOR}",true)
clearScreen()
sleep (a)
else
clearScreen()
print("Incorrect Password, please try again.")
sleep (5)
end
end
local function clearScreen()
term.clear()
term.setCursorPos(1, 1)
end
while true do
clearScreen()
print ("Type password to enter {LOCATION}!")
if read("*") == "{PASSWORD}" then
clearScreen()
print("Correct Password!")
print("Open door for how long?")
local a = read()
clearScreen()
print("Opening door!")
sleep (1)
redstone.setOutput("{SIDE OF DOOR}",true)
clearScreen()
sleep (a)
else
clearScreen()
print("Incorrect Password, please try again.")
sleep (5)
end
end