I've seen this requested a few times now.
Players wont gain any exp from other Players which have the same IP now.
Configmanager.cpp:
0.3.6 / 0.4:
search for:
add this after it:
0.2.4+
search for:
add after it:
Configmanager.h:
search for:
add this after it:
Player.cpp:
0.3.6 / 0.4
search the function:
then goto:
and add this:
0.2.4+
search the function:
then goto:
after that add this:
then open your config.lua
and add this somewhere:
0.3.6 / 0.4
0.2.4+
Now we are done. enjoy
Players wont gain any exp from other Players which have the same IP now.
Configmanager.cpp:
0.3.6 / 0.4:
search for:
Code:
m_confBool[REMOVE_WEAPON_CHARGES] = getGlobalBool("removeWeaponCharges", true);
add this after it:
Code:
m_confBool[GAIN_EXP_FROM_SAME_IP] = getGlobalBool("gainExpFromSameIP", true);
0.2.4+
search for:
Code:
m_confBoolean[REMOVE_RUNE_CHARGES] = (getGlobalString(L, "removeChargesFromRunes", "yes") == "yes");
add after it:
Code:
m_confBoolean[GAIN_EXP_FROM_SAME_IP] = (getGlobalString(L, "gainExpFromSameIp", "no") == "yes");
Configmanager.h:
search for:
Code:
REMOVE_WEAPON_CHARGES,
add this after it:
Code:
GAIN_EXP_FROM_SAME_IP,
Player.cpp:
0.3.6 / 0.4
search the function:
Code:
double Player::getGainedExperience(Creature* attacker) const
then goto:
Code:
Player* attackerPlayer = attacker->getPlayer();
if(!attackerPlayer || attackerPlayer == this)
return 0;
and add this:
Code:
if(attackerPlayer->getIP() == getIP() && !g_config.getBool(ConfigManager::GAIN_EXP_FROM_SAME_IP))
return 0;
0.2.4+
search the function:
Code:
uint64_t Player::getGainedExperience(Creature* attacker) const
then goto:
Code:
Player* attackerPlayer = attacker->getPlayer();
after that add this:
Code:
if(attackerPlayer->getIP() == getIP() && !g_config.getBoolean(ConfigManager::GAIN_EXP_FROM_SAME_IP))
return 0;
then open your config.lua
and add this somewhere:
0.3.6 / 0.4
Code:
gainExpFromSameIp = false
0.2.4+
Code:
gainExpFromSameIp = "no"
Now we are done. enjoy