Lbtg
Intermediate OT User
- Joined
- Nov 22, 2008
- Messages
- 2,311
- Reaction score
- 133
Hello, so we find out this formula
And as i tested the exp is like this: Player loss exp * 0.75 = exp number player gets
My question, what for getDamageRatio(attacker) stands for, what is it , can someone explain ?
Please can someone explain whole Formula, script ?
Aswel in config.lua i have only this lines
experienceByKillingPlayers = true
expFromPlayersLevelRange = 99 - what this line means ? Its like pvp exp RATE right ?
Does 1.3 tfs have lines for/of level GAP of getting exp ?like 0.4 tfs had i remember
C++:
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.75));
}
}
return 0;
}
And as i tested the exp is like this: Player loss exp * 0.75 = exp number player gets
My question, what for getDamageRatio(attacker) stands for, what is it , can someone explain ?
Please can someone explain whole Formula, script ?
Aswel in config.lua i have only this lines
experienceByKillingPlayers = true
expFromPlayersLevelRange = 99 - what this line means ? Its like pvp exp RATE right ?
Does 1.3 tfs have lines for/of level GAP of getting exp ?like 0.4 tfs had i remember