If I understand you correctly, try something like this:
: match "enter 1234" {
: if (is_safe_locked) {
: set_false "is_safe_locked";
: print "Click.";
: done;
}
: else {
: print "It's already unlocked.";
: done;
}
}
: match "enter _" {
: print "Nothing happens.";
}
}
Make sure the specific match comes before the general match. Obviously, you've got to do any other tests necessary such as making sure you're in the correct room.