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

Fix/Patch No limit to kill players

LucasFerraz

Systems Analyst
Joined
Jun 10, 2010
Messages
2,858
Reaction score
96
Location
Brazil
Do you know what is this?
Lua:
minLevelThresholdForKilledPlayer = 0.9	
maxLevelThresholdForKilledPlayer = 1.1
It sets minimum and maximum level difference in PVP.

Example: If Killer (level 170) kill Victim (level 150). Killer will not receive experience.

Problem: This option in config.lua don't works.

Solution:
In player.cpp change:
Code:
	double attackerLevel = (double)attackerPlayer->getLevel(), min = g_config.getDouble(
		ConfigManager::EFP_MIN_THRESHOLD), max = g_config.getDouble(ConfigManager::EFP_MAX_THRESHOLD);
	if((min > 0 && level < (uint32_t)std::floor(attackerLevel * min)) || (max > 0 &&
		level > (uint32_t)std::floor(attackerLevel * max)))
		return 0;
to:
Code:
	double attackerLevel = (double)attackerPlayer->getLevel(), max = g_config.getDouble(ConfigManager::EFP_MAX_THRESHOLD);
	if(max > 0 && level > (uint32_t)std::floor(attackerLevel * max))
		return 0;

All credits to Cykotitan.
You can find it here:[Request]minLevelThresholdForKilledPlayer.
 
Or you could just read dev comments in config.lua:

Code:
-- NOTE: min~Threshold* set to 0 will disable the minimum threshold:
-- max~Threshold* set to 0 will disable the maximum threshold:

Ur code is kind of useless...
 
Not working bro i tested any other script like this?
 
Back
Top