IgoR lYCAN
New Member
- Joined
- Dec 1, 2018
- Messages
- 169
- Reaction score
- 4
Hi everyone
I would like to make the exp gain from players, 70% of the lose exp from the target.
For example... If the target dies, and lose : 10kk of exp
who killed him , should receive the equal of 7kk, shared using the ratiusdamage;
The problem that im suffering is that:
When alot of people kills the target,(actives the unfair fighting) so the exp to the players are getting highter than his loss.
For example: if 1 guy die, killed by one player, the unfair doenst count, he lose all the exp, like dieng by mosnters, but just lose the twist of fate. (ITS OK)
For example: if he dies by 3 guys, he is getting a reduce from his lost. (ITS OK)
For example: if he dies by 6 players, and he lose, 40kk, for example, this 6 players, are getting more than 40kk. (ITS NOT OK)
Im using this formula:
the original formula on TFS, is much bad than this one;
the original formula on tfs is :
also, I would like retire the "experience range from players" it should be like:
If the target is higher lvl than you are, you receive experience from his death;
also, I think, the unfair formula is ok;
The whole problem, is that the players cant get more exp, from their enemies death;
I would like to make the exp gain from players, 70% of the lose exp from the target.
For example... If the target dies, and lose : 10kk of exp
who killed him , should receive the equal of 7kk, shared using the ratiusdamage;
The problem that im suffering is that:
When alot of people kills the target,(actives the unfair fighting) so the exp to the players are getting highter than his loss.
For example: if 1 guy die, killed by one player, the unfair doenst count, he lose all the exp, like dieng by mosnters, but just lose the twist of fate. (ITS OK)
For example: if he dies by 3 guys, he is getting a reduce from his lost. (ITS OK)
For example: if he dies by 6 players, and he lose, 40kk, for example, this 6 players, are getting more than 40kk. (ITS NOT OK)
Im using this formula:
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.35));
}
}
return 0;
}
the original formula on TFS, is much bad than this one;
the original formula on tfs is :
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;
}
also, I would like retire the "experience range from players" it should be like:
If the target is higher lvl than you are, you receive experience from his death;
also, I think, the unfair formula is ok;
The whole problem, is that the players cant get more exp, from their enemies death;