• 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!

C++ Changing admin's color name?

I don't know about cipsoft's client but it might be possible.
If you are going to use OTClient then you should know that health and character name uses same color while it goes from 100% to 0% color keeps changing, So you'll have to write different color for each percentage.
in src\client\creature.cpp find this and change the colors as you wish.
C++:
void Creature::setHealthPercent(uint8 healthPercent)
{
    if(healthPercent > 92)
        m_informationColor = Color(0x00, 0xBC, 0x00);
    else if(healthPercent > 60)
        m_informationColor = Color(0x50, 0xA1, 0x50);
    else if(healthPercent > 30)
        m_informationColor = Color(0xA1, 0xA1, 0x00);
    else if(healthPercent > 8)
        m_informationColor = Color(0xBF, 0x0A, 0x0A);
    else if(healthPercent > 3)
        m_informationColor = Color(0x91, 0x0F, 0x0F);
    else
        m_informationColor = Color(0x85, 0x0C, 0x0C);
 
I don't know about cipsoft's client but it might be possible.
If you are going to use OTClient then you should know that health and character name uses same color while it goes from 100% to 0% color keeps changing, So you'll have to write different color for each percentage.
in src\client\creature.cpp find this and change the colors as you wish.
C++:
void Creature::setHealthPercent(uint8 healthPercent)
{
    if(healthPercent > 92)
        m_informationColor = Color(0x00, 0xBC, 0x00);
    else if(healthPercent > 60)
        m_informationColor = Color(0x50, 0xA1, 0x50);
    else if(healthPercent > 30)
        m_informationColor = Color(0xA1, 0xA1, 0x00);
    else if(healthPercent > 8)
        m_informationColor = Color(0xBF, 0x0A, 0x0A);
    else if(healthPercent > 3)
        m_informationColor = Color(0x91, 0x0F, 0x0F);
    else
        m_informationColor = Color(0x85, 0x0C, 0x0C);
Thanks i'll test as soon as i can
 
I don't know about cipsoft's client but it might be possible.
If you are going to use OTClient then you should know that health and character name uses same color while it goes from 100% to 0% color keeps changing, So you'll have to write different color for each percentage.
in src\client\creature.cpp find this and change the colors as you wish.
C++:
void Creature::setHealthPercent(uint8 healthPercent)
{
    if(healthPercent > 92)
        m_informationColor = Color(0x00, 0xBC, 0x00);
    else if(healthPercent > 60)
        m_informationColor = Color(0x50, 0xA1, 0x50);
    else if(healthPercent > 30)
        m_informationColor = Color(0xA1, 0xA1, 0x00);
    else if(healthPercent > 8)
        m_informationColor = Color(0xBF, 0x0A, 0x0A);
    else if(healthPercent > 3)
        m_informationColor = Color(0x91, 0x0F, 0x0F);
    else
        m_informationColor = Color(0x85, 0x0C, 0x0C);
Well this will change all characters color , i need to change color of name of specific character not even the health bar
 
Back
Top