I'm gonna steal from Jason and whoever wrote the PERS one (sorry, can't
remember name and if I hit back I lose my changes) to show the final product.
The main thing is to combine the two, the loop with the PERS check, that way
you can base the invis checks against the person who's seeing the message.
Anyway here's what I think you're looking for.
void do_announce (CHAR_DATA * ch, char *argument)
{
CHAR_DATA *victim, victim2;
char arg1[MIL], arg2[MIL];
DESCRIPTOR_DATA *d;
char string[MIL];
argument = one_argument(argument, arg1);
argument = one_argument(argument, arg2);
if ((victim1 = get_char_world(ch, arg1)) == NULL ||
(victim2 = get_char_world(ch, arg2)) == NULL)
{
send_to_char("They aren't both here.\n\r", ch);
return;
}
for (d = descriptor_list; d != NULL; d = d->next)
{
CHAR_DATA *victim;
vch = d->original ? d->original : d->character;
if (d->connected == CON_PLAYING
&& d->character != ch
&& IS_SET (vch->comm, COMM_ANNOUNCE)
&& !IS_SET (vch->comm, COMM_QUIET))
{
sprintf(string, "%s took %s\'s Pepsi Challenge and got sprayed
with a can of whooop @ss",
PERS(victim2, vch), PERS(victim1, vch));
act_new (string, ch, NULL, vch, TO_VICT, POS_DEAD);
}
}
return;
}
Please excuse the formatting if it turns out bad I'm on web based email. Also
I didn't check this or anything, so it might be slightly off somewhere, but it
should be close enuf.
Jason
_____________________________________________________________
wotmania: Your number one source for The Wheel of Time.
http://wotmania.com