[Home] [Downloads] [Search] [Help/forum]

Gammon Software Solutions forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  SMAUG
. -> [Folder]  SMAUG coding
. . -> [Subject]  "Char title is here before you."

Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?

"Char title is here before you."

[Reply to this subject]  Reply to this subject   [New subject]  Start a new subject   [Refresh] Refresh page


Posted by Svarox   (4 posts)  [Biography] bio
Date Mon 06 Sep 2004 07:14 AM (UTC)  quote  ]
Message
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?
[Go to top] top

Posted by Spike   (27 posts)  [Biography] bio
Date Reply #1 on Mon 06 Sep 2004 09:38 AM (UTC)  quote  ]
Message
Did..you look at the code before asking...
[Go to top] top

Posted by Zeno   USA  (2,867 posts)  [Biography] bio   Moderator
Date Reply #2 on Mon 06 Sep 2004 03:50 PM (UTC)  quote  ]
Message
Should be in act_info.c, function show_char_to_char.

Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org
[Go to top] top

Posted by Nick Cash   USA  (626 posts)  [Biography] bio
Date Reply #3 on Tue 07 Sep 2004 11:40 PM (UTC)  quote  ]
Message
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.

~Nick Cash
http://www.nick-cash.com
[Go to top] top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


1,622 views.

[Reply to this subject]  Reply to this subject   [New subject]  Start a new subject   [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

[Home]

Written by Nick Gammon - 5K

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( http://www.gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Internet Contents Rating Association (ICRA) - 2K]    [Web site powered by FutureQuest.Net]