A Shell

// Petrarch #include <std.h> inherit OBJECT; void create() { ::create(); set_name("shell"); set_short("a large sea shell"); set_long("The sea shell is nearly a foot long wide. Ever wonder if it " "is true that if you put the shell to your ear and listen to can " "hear the ocean?"); set_id(({"shell", "sea shell"})); set_mass(2); set_value(90); set_material(({"bone","organic"})); } void init() { ::init(); add_action("cmd_listen", "listen"); } int cmd_listen(string str) { if(!present(this_object(), this_player())) return 0; if(!str) return notify_fail("Listen to what?\n"); if(str!="to sheall" && str!="sea shell") return notify_fail("You cannot listen to that.\n"); message("info", this_player()->query_cap_name()+" places the sea shell " "against "+this_player()->query_possessive()+" and listens.", environment(this_player()), this_player()); if(random(2)) message("info", "You hear nothing, cheap piece of junk.", this_player()); else message("info", "Yup, you hear the ocean.", this_player()); return 1; }