I think all you need is append_note().
Here's my automatic letter sent to players who get their money stolen from
the bank:
pnote = new_note();
pnote->next = NULL;
pnote->sender=strdup(banker->short_descr);
pnote->to_list=strdup(victim->name);
pnote->subject=strdup("Bank Robbery!");
sprintf(text, "Dear %s,\n\r It is with great regret that I must
inform you\n\r"
"the %s bank has been robbed.\n\r"
"You had funds invested in this bank, and %s has taken some
from you.\n\r"
"The amount lost totals: %s\n\r\n\rRegretfully,\n\r %s\n",
victim->name,
banker->in_room->area->name,
ch->name,
disp_money(gold),
banker->short_descr);
pnote->type=NOTE_LETTER;
pnote->text=strdup(text);
strtime = ctime( ¤t_time);
strtime[strlen(strtime)-1] = '\0';
pnote->date = strdup( strtime );
pnote->date_stamp = current_time;
append_note(pnote);
Hope that helps.
Jason
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 15, 2002 2:15 PM
To: [email protected]
Subject: Automail generation
Greetings all,
I'm trying to create a note from the "system" posted to all immortals that a
user has requested something from the a mob.
I assume I have to set alot of the pnote fields up to something like
pnote->to_list = "immortal"
pnote->subject = "Request"
pnote->text = "blah blah"
pnote->date = str_dup( strtime );
pnote->date_stamp = current_time;
pnote->sender = mailermob;
My question is, can I just set it up like this in the function that will be
making the note, or do I need to do something else special because I'm at a
loss at this point.
Thanks in Advance.
Keith
--
ROM mailing list
[email protected]
http://www.rom.org/cgi-bin/mailman/listinfo/rom