key.c - example for course 15

[previous example] [course15] [Table of contents] [next example]
/* File          : key.c
 * Description   : the key object for the chest examples
 *
 * written       : 25-Nov-2000 - Ghorwin
 * last modified : 26-Mar-2001 - Ghorwin
 */

#include <mudlib.h>
inherit I_KEY;

void
create() {
    ::create();
    set_name("iron key");
    set_short("an iron key");
    set_long("It's a key made from iron that opens a few chests.\n");
    set_keycode("key for chest examples");  // must be the same as
                                            // in the container
    add_property("iron");
    set_value(10);
    set_weight(1);
    replace_program(I_KEY);
}