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

Needing lil bit of C++ help

cheertimmy

New Member
Joined
Aug 11, 2012
Messages
6
Reaction score
0
So couple things i would like to change. Compiling a 9.8 mystic spirit 0.2.15 Soo i would like to change the health and mana status bars to % health and % mana numbered 1-100. So a reading of 40 health meant you had 40% health. Same with mana on high xp server with rebirths it looping over at 60k hp or whatever is kinda useless i want to make it functional. here is picture of item i would like to change

upload_2013-9-16_20-37-49.png


Other thing i would love to change is experience number to flat zero in skills box. So it doesnt jumbled up and confusing. I have wondered how hard it would be to rename it rebirths/reborns/prestige or whatever you like and display your rebirths. Either option would be ok and greatly helpful. Image below to confirm:

upload_2013-9-16_20-42-29.png

Last note if anybody has helpful link or advice on how to implement the attribute ReflectPercentAll like previous 8.6 TFS servers would also be very thankful.
 
Code:
int32_t Player::getPlayerInfo(playerinfo_t playerinfo) const
{
    switch(playerinfo)
    {
        case PLAYERINFO_LEVEL: return level;
        case PLAYERINFO_LEVELPERCENT: return levelPercent;
        case PLAYERINFO_MAGICLEVEL: return std::max<int32_t>(0, magLevel + varStats[STAT_MAGICPOINTS]);
        case PLAYERINFO_MAGICLEVELPERCENT: return magLevelPercent;
        case PLAYERINFO_HEALTH: return health;
        case PLAYERINFO_MAXHEALTH: return std::max<int32_t>(1, healthMax + varStats[STAT_MAXHITPOINTS]);
        case PLAYERINFO_MANA: return mana;
        case PLAYERINFO_MAXMANA: return std::max<int32_t>(0, manaMax + varStats[STAT_MAXMANAPOINTS]);
        case PLAYERINFO_SOUL: return std::max<int32_t>(0, soul + varStats[STAT_SOULPOINTS]);
        default: return 0;
    }
}
thanks for quick reply. I was actually having trouble locating where to put this in at. This is from players.cpp goes to skills box im guessing, and by writing it there will the status bar above char item slots update its self to read this way? and im assuming way its wrote i would want to do | case PLAYERINFO_HEALTH: return (health/healthMax)*100; | sorry for being slow at this
 
Back
Top