• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

How to change the "You see yourself. You are knight".

FilipeJF

New Member
Joined
Jan 9, 2012
Messages
124
Reaction score
4
I need to change this kind of words in my server.

when we look at ourselves, this message appears: "You see yourself. You are knight".

I want to change it, but I didn't find it at sources. Where can I find it, so?
 
Its a bit complicated, but you can find some info in:
game.cpp -> "You see"
player.cpp -> "You have no vocation"
example.
 
here you are :D if u are interested ;;; just tell me what do you want :p
Player.cpp
Code:
std::string Player::getDescription(int32_t lookDistance) const
{
    std::stringstream s;
    if(lookDistance == -1)
    {
        s << "yourself.";
        if(hasFlag(PlayerFlag_ShowGroupNameInsteadOfVocation))
            s << " You are " << group->getName();
        else if(vocationId != 0)
            s << " You are " << vocation->getDescription();
        else
            s << " You have no vocation";
    }
    else
    {
        s << nameDescription;
        if(!hasCustomFlag(PlayerCustomFlag_HideLevel))
            s << " (Level " << level << ")";

        s << ". " << (sex % 2 ? "He" : "She");
        if(hasFlag(PlayerFlag_ShowGroupNameInsteadOfVocation))
            s << " is " << group->getName();
        else if(vocationId != 0)
            s << " is " << vocation->getDescription();
        else
            s << " has no vocation";

        s << getSpecialDescription();
    }

    std::string tmp;
    if(marriage && IOLoginData::getInstance()->getNameByGuid(marriage, tmp))
    {
        s << ", ";
        if(vocationId == 0)
        {
            if(lookDistance == -1)
                s << "and you are";
            else
                s << "and is";

            s << " ";
        }

        s << (sex % 2 ? "husband" : "wife") << " of " << tmp;
    }

    s << ".";
    if(guildId)
    {
        if(lookDistance == -1)
            s << " You are ";
        else
            s << " " << (sex % 2 ? "He" : "She") << " is ";

        s << (rankName.empty() ? "a member" : rankName)<< " of the " << guildName;
        if(!guildNick.empty())
            s << " (" << guildNick << ")";

        s << ".";
    }

    return s.str();
}
 
So, I change it there (I take my sister's notebook to edit the sources) but anything changes into my server. I need to put it in other language...

EDIT:
Well, the things changes, but no when we look at ourselves.
 
Last edited:
those are the parts of you
Code:
    std::stringstream s;
    std::string str;
    if(lookDistance == -1)
    {
        s << "yourself.";
        if(accessLevel != 0)
            s << " You are " << groupName << ".";
        else if(vocation_id != 0)
            s << " You are " << vocation->getVocDescription() << ".";
        else
            s << " You have no vocation.";

and
about marry and guild
Code:
    std::string tmp;
    if(marriage && IOLoginData::getInstance()->getNameByGuid(marriage, tmp))
    {
        s << ", ";
        if(vocationId == 0)
        {
            if(lookDistance == -1)
                s << "and you are";
            else
                s << "and is";

            s << " ";
        }

        s << (sex % 2 ? "husband" : "wife") << " of " << tmp;
    }

    s << ".";
    if(guildId)
    {
        if(lookDistance == -1)
            s << " You are ";
        else
            s << " " << (sex % 2 ? "He" : "She") << " is ";

        s << (rankName.empty() ? "a member" : rankName)<< " of the " << guildName;
        if(!guildNick.empty())
            s << " (" << guildNick << ")";

        s << ".";
    }

    return s.str();
 
I know that.
But the problem is, this part doesn't modify ingame. Only the others (when I look another player, I see that in portuguese, but when I look at myself, I see that in english).
I think I need to modify in another location, not only into the sources. Or my source is with problem.
 
Back
Top