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

Bonus exp based on party size?

Tysoch86

New Member
Joined
Jan 8, 2016
Messages
81
Reaction score
1
Hi there,

Does anyone know of a way to give bonus exp based on the number of players in a party?

Thanks
-Tys
 
You have to edit the sharedExperience gain part in sources, my sources are based on tfs 0.4 which looks like this:
Code:
void Party::shareExperience(double experience, Creature* target, bool multiplied)
{
   double shareExperience = experience;
   if(experience >= (double)g_config.getNumber(ConfigManager::EXTRA_PARTY_LIMIT))
     shareExperience += (experience * ((double)g_config.getNumber(ConfigManager::EXTRA_PARTY_PERCENT) / 100));

   shareExperience /= memberList.size() + 1;
   double tmpExperience = shareExperience;

   leader->onGainSharedExperience(tmpExperience, target, multiplied);
   for(PlayerVector::iterator it = memberList.begin(); it != memberList.end(); ++it)
   {
     tmpExperience = shareExperience;
     (*it)->onGainSharedExperience(tmpExperience, target, multiplied);
   }
}
 
Back
Top