"Char title is here before you."

Posted by Svarox on Mon 06 Sep 2004 07:14 AM — 4 posts, 19,361 views.

#0
I wanted to remove the player's title from their long desc.
Ex: Player (Title) is here before you.

Does anyone know how to do this or done it before?
#1
Did..you look at the code before asking...
USA #2
Should be in act_info.c, function show_char_to_char.
USA #3
Well, that was kind of vague. I think we are really dealing with a newbie coder here. So here's the solution in a bit more detail.

I actually belive that it is in show_char_to_char_0 (Zeno was right, since show_char_to_char_0 is called from show_char_to_char). Doing a search for title should turn up lines like these:

    if ( !IS_NPC(victim) && !IS_SET(ch->act, PLR_BRIEF) )
        strcat( buf, victim->pcdata->title );
    else
        strcat( buf, PERS( victim, ch ) );

People who havent done a config +brief will see the whole title. If you don't care, the easiest and probably best way to fix it is to just do:

    if ( !IS_NPC(victim) && !IS_SET(ch->act, PLR_BRIEF) )
        strcat( buf, PERS( victim, ch ) );
    else
        strcat( buf, PERS( victim, ch ) );

You could just eliminate the if and else statements all togeather and just leave it as:

strcat( buf, PERS( victim, ch ) );

PERS will show a characters short description (if its an NPC) or the players name. If the looker cannot see the person, they will get "someone".

Hopefully that may help you more, or someone in the future. Good luck.