This is the script for a very simplified
COMMAND with
NAME UseKeyPad.
Add a command for 'use keypad' to the room where the keypad is used, and give it the name UseKeyPad.
msg ("Enter password")
get input {
if (result="123456") {
MoveObject (player, Hallway)
}
else {
msg ("Incorrect password.")
do (UseKeyPad, "script")
}
}
Please bear in mind, that should a player get to this point without knowing the password, they'll be trapped in a loop with no escape... At least I believe so (not tested for that)If this is the case, then simply give them a 'safe word' before using the keypad, and then add another 'if' rule:
if (result="reject") {
ShowRoomDescription
}