> Yeah, I know I'm being picky, but hey.. I just want it to look (and work) 
> good! :)

RD,

   You're not alone. The following is from my "Reward.c" autoquest
(available at fine snippet sites everywhere):

        if( guard == NULL )
        {
                guard = captain;
        }

        do_emote( guard, "points to a map." );

        one_argument( room->name, first );
        if( is_exact_name(first, "the a an") )
        {
                prep = "at ";
                where = decap(victim->in_room->name);
        }

        else if( is_exact_name(first, "on in at by near inside under within 
approaching standing climbing swimming sailing walking sliding floating close 
lost along going over near very atop beneath before below between" ) )
        {
                prep = "";
                where = decap(victim->in_room->name);
        }

        else
        {
                prep = "at ";
                where = victim->in_room->name;
        }

        sprintf( buf,  "I hear that %s was recently seen %s%s in %s.",
                 victim->short_descr, prep, where, room->area->name );
        do_say( guard, buf );
        

This ends up being a compromise, some room names look a little funny,
but on the whole it returns a string that looks like a human typed it
and not like some computer blindly stuffed a name in a blank. I also
changed act to have %c which handles your example of fighting mobs:

    $c
        Result is the capitalized name of 'ch'.  If 'ch' is not visible to the
        target character, result is the string 'Someone'.
        
case 'c': i = capitalize(PERS( ch, to  ));

shameless_plug( "Also included in %s.", Reward.c )


So, I guess I used both your options. First thing I did was go through
the areas and standardise all the mob and room names. Yes, that was a
lot of work, but it saved a lot of editing code being called all the
time, and I'm old enough to still worry about the CPU, and it's just
cleaner. I like tidy code.



Sandi
                        

              "SEGFAULT?!?  I have not yet begun to code!"

[EMAIL PROTECTED]                           blades.inetsolve.com 3333


Reply via email to