/* Ventriloquate spell ported over from Smaugfuss 1.9 to an LoP 1.39 format.
Should work with LoP 1.40 as well without any trouble, though I used a 
modified version of 1.39 so you 'might' find a bug or two.

In magic.c plug this snippet anywhere in the file. */

/* Ventriloquate */
NM ch_ret spell_ventriloquate( int sn, int level, CHAR_DATA * ch, void *vo )
{
   char buf1[MSL];
   char buf2[MSL];
   char speaker[MSL];
   CHAR_DATA *vch;

   target_name = one_argument( target_name, speaker );

   snprintf( buf1, MSL, "%s says '%s'.\r\n", speaker, target_name );
   snprintf( buf2, MSL, "Someone makes %s say '%s'.\r\n", speaker, target_name );
   buf1[0] = UPPER( buf1[0] );

   for( vch = ch->in_room->first_person; vch; vch = vch->next_in_room )
   {
      if( !is_name( speaker, vch->name ) )
      {
         set_char_color( AT_SAY, vch );
         send_to_char( saves_will( level, vch ) ? buf2 : buf1, vch );
      }
   }

   return rNONE;
}