From the NannyMUD documentation
2000-12-11
NAME
key - how to make a keyDESCRIPTION
With the lock system in /std/basic_lock it is very simple to make a key that fits a /std/door or a /std/box. A key is a /std/basic_thing with the alias "key" and the property "code" set to a string that acts as the "password" to the door.EXAMPLE
Here is an example of a key: inherit "/std/basic_thing"; reset(arg) { ::reset(arg); // Make things work right. if (arg) return; set_name("bronze key"); add_alias("key"); set_short("A bronze key"); add_property("code","hemligt"); } or as a function: make_key() { object key; key = clone_object("/std/basic_thing"); key -> set_name("iron key"); key -> add_alias("key"); key -> set_short("An iron key"); key -> set_long("The key is a bit rusty."); key -> add_property("code","xyzzy"); return key; } It is also possible to make a key using /std/lib. "/std/lib"->make("key",([ "type" : "steel","code" : "foobar" ]));