POST.C
LIB3/D/HOME/CITY/POSTOFFI/POST.C · 1.9 KB
From the archive nm4dos.zip
Download the archive « Back to the archive contents
inherit "/std/room";
#include "path.h"
#include "mail.h"
object board;
void setup() {
set_short(CITYNAME+"'s post office");
set_long("This is the main post office of "+CITYNAME+". A number of "+
"post office workers (hah!) sit behind a desk here, while a group "+
"of couriers sit at a nearby table playing cards. Off to the north you "+
"can see the mailing room, while to the east lies the "
+"parcel office. To the south, a door leads out onto Main Street.\n");
set_light(60);
add_exit("south", HOMECITY+"mainstreet13", "door");
add_exit("north", "post_mail", "door");
add_exit("east", "parcel", "door");
add_item("desk", "The desk is wooden and very desk-like in form.\n");
add_item("table", "Strewn with cards, the table just sits there.\n");
add_item("courier", "The couriers are mostly young humans, although "+
"from where you stand you can see an avian and a dolphin.\n");
add_item( ({"dolphin", "avian"}),
"The unusual couriers must be used to deliver mail to unusual places.\n");
add_item("card",
"The cards have pictures of Konrad on thier backs. There seem "+
"to be an inordinate amout of aces in the pack.\n");
add_item("ace", "There seem to be at least 12 in this pack.\n");
add_item( ({"worker", "teller"}),
"The post office staff seem to be suffering from acute lethargy.\n");
} /* setup() */
void init()
{
::init();
if (!board)
{
board = clone_object("/obj/misc/board");
board->set_datafile("postoffice");
board->move(this_object());
}
}
void dest_me()
{
if (board) board->dest_me();
}
int mail(string str) {
MAIL_TRACK->mail(str);
return 1;
} /* mail() */
int send_message(string to) {
object ob;
ob=find_living(to);
if(!ob) return 0;
tell_object(ob, this_player()->query_cap_name()
+" has sent you a letter. Go to the post-office to read it.\n");
tell_object(this_player(), ob->query_cap_name()
+" has received your letter.\n");
} /* send_message() */