Posted 12 May 2012 - 09:35 AM
Hi.
I've created a simple "password-unlock-door code" and I want to make it better.
I am playing on a multiplayer server and some of them knows about CTRL + T and therefore I have the code
Here is my full code:
Please help :)/>/> Thanks.
I've created a simple "password-unlock-door code" and I want to make it better.
I am playing on a multiplayer server and some of them knows about CTRL + T and therefore I have the code
os.pullEvent = os.pullEventRaw
on the top of my code. But what I want to do is like if I type in a specific password, it will simulate me pressing CTRL T somehow, even with that code on top.Here is my full code:
os.pullEvent = os.pullEventRaw
function pass()
print "Welcome PetruZ!"
print "Please enter your password."
t = read("*")
if t == "password" then
print "Correct, welcome in!"
sleep(1)
redstone.setOutput("left", true)
sleep(2)
redstone.setOutput("left", flase)
print "Restarting..."
sleep(1)
os.shutdown()
pass()
else
print "Wrong password, shutting down!"
sleep(1)
os.shutdown()
pass()
end
end
pass()
Please help :)/>/> Thanks.