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ISTRY/
LPMUD/MUDLIB/SECURE/
LPMUD/MUDLIB/SECURE/UDP_CMD_/
LPMUD/MUDLIB/SKILLS/
LPMUD/MUDLIB/SKILLS/FIGHTER/
LPMUD/MUDLIB/SKILLS/THIEF/
LPMUD/MUDLIB/USR/
LPMUD/MUDLIB/USR/CREATORS/
LPMUD/MUDLIB/USR/PLAYERS/
/* post office */
/* a post office with a lockable door, using "city key" as an exit */
/* a "city key" defaults to open on a reset */

inherit "inherit/room2";

void reset(status arg) {
  ::reset(arg); /* resets doors */
  if(arg) 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"+
                       "There is a large padlock.\n",
   "lock id",          "padlock",
   "lock description", "The padlock is well greased.\n",
   "lock difficulty", 14,
   "key",             "city key",        
  }));

  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; }