/
lib/banish/
lib/d/
lib/doc/
lib/doc/domains/
lib/doc/efun/
lib/doc/examples/
lib/doc/examples/armour/
lib/doc/examples/contain/
lib/doc/examples/food/
lib/doc/examples/magic/
lib/doc/examples/monster/
lib/doc/examples/room/
lib/doc/examples/weapons/
lib/function/
lib/include/
lib/include/fn_specs/
lib/include/skills/
lib/info/
lib/inherit/base/
lib/log/
lib/manuals/312/
lib/news/
lib/obj/party/
lib/objects/components/
lib/open/
lib/open/library/
lib/open/party/
lib/players/
lib/players/zilanthius/
lib/room/
lib/room/city/arena/
lib/room/city/creator/
lib/room/city/garden/monst/
lib/room/city/obj/
lib/room/city/shop/
lib/room/death/
lib/room/registry/
lib/secure/
lib/secure/UDP_CMD_DIR/
lib/skills/
lib/skills/fighter/
lib/skills/thief/
lib/usr/
lib/usr/creators/
lib/usr/players/
/* post office */
/* a post office with a lockable door, opens on reset, and trapped */

inherit "inherit/room2";

void reset(status arg) {
  ::reset(arg); /* resets doors */
  if(arg) { /* open door on reset */
    set_door_attribute("west door", "open", 1);
    return;
  }
  set_weather(4, 1, 0); /* light, weather, climate */
  set_short("The post office");
  set_long("\tTempus Post Office \n"+
      "A long counter stands against the far wall, behind it   \n"+
      "are several small pigeon holes where mail is kept for   \n"+
      "those who live within the city. Perhaps some mail has   \n"+
      "been left here for you? A small plaque of gold hangs    \n"+
      "over the edge of the counter.\n");

  load_door(({
   "destination",       "room/city/town_hall3",
   "direction",         "west door",
   "open",
   "description",       "The door is made of solid timber.\n"+
                        "The door has a large padlock.\n",
   "lock id",           "padlock",
   "lock description",  "The padlock uses the post office key.\n",
   "lock difficulty",   14,
   "unlocked",
   "key",               "post office key",        
   "trap description",  "You find poison gas trap.\n",
   "trap damage",       10,
   "trap message",      "Poison gas sprays into your face!\n",
   "trap room message", "Poison gas sprays into "+
                        "@@query_name:$this_player()$@@'s face!\n",
   "trap on",
  }));

  set_items(({
   "counter", "On the counter are pens, stamps, and writing paper,\n"+
              "all for writing letter to the people of the city",

    "pens",   "Writing quills of long purple feathers",
    "stamps", "The stamps have the picture of the city hall "+
              "upon them",
    "writing paper#paper#papers",
              "Pure white parchment. It looks very expensive",
    "plaque#sign",
              "Post Office Commands: \n"+
              "read  Read your mail from your pigeon hole\n"+
              "mail  <name>Mail to another player\n"+
              "from  List all the mail you have stored away\n"
  }));
  set_no_fight(1);    /* no fighting allowed in room */
  set_no_summon(1);   /* no spell summoning, or teleporting */
}


void init() {
  ::init();

  /* clone mailer to player when they enter room */
  if(this_player() && !present("mailer", this_player())) {
    move_object(clone_object("obj/mail_reader"), this_player());
  }
  /* over ride player actions for "say" */
  add_action("say_fn", "say");
  add_action("say_fn", "'", 1);
}


status ready_to_move(string str) {  /* over ride normal movement */
  if(present("mailer", this_player())) {  /* destruct mailer */
    destruct(present("mailer", this_player()));
  }
  return ::ready_to_move(str);  /* now use normal room movement */
}

status door_to_move(string str) {    /* over ride door movement */
  if(present("mailer", this_player())) {  /* destruct mailer */
    destruct(present("mailer", this_player()));
  }
  return ::door_to_move(str); /* now use normal movement */
}

status say_fn(string arg) {
  write("Post master says: Shhh! People are trying to mail here.\n");
  return 1;
}

/* no teleporting from/to here */

status query_no_teleport() {  return 1; }