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

Exp from players (TFS 1.3 CLIENT 8.6)

Lucifer

Active Member
Joined
Dec 27, 2014
Messages
145
Reaction score
33
Location
Sweden
Hello Otland!

I am doing a high exp war ot which is almost completely finished. All functions are now complete and now trying to balance the ot.
But I have problems with exp rate from players because it is a high exp server so when for example I kill someone who is 9k and I myself am 3k I get 23k levels
Is there some simple way to edit the exp rate of players or how can i do it, can someone help me?
 
Sorry for Bumbing but i found the solution. If somebody need it you found it in your sources Player.cpp


Code:
uint64_t Player::getGainedExperience(Creature* attacker) const
{
    if (g_config.getBoolean(ConfigManager::EXPERIENCE_FROM_PLAYERS)) {
        Player* attackerPlayer = attacker->getPlayer();
        if (attackerPlayer && attackerPlayer != this && skillLoss && std::abs(static_cast<int32_t>(attackerPlayer->getLevel() - level)) <= g_config.getNumber(ConfigManager::EXP_FROM_PLAYERS_LEVEL_RANGE)) {
            return std::max<uint64_t>(0, std::floor(getLostExperience() * getDamageRatio(attacker) * 0.00001));
        }
    }
    return 0;
}
 
Back
Top