• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Lua Formula of Level {ENF}

Vrotz

Member
Joined
Apr 7, 2011
Messages
1,071
Reaction score
7
Location
Brazil
As it functions for that the level of player 200 earns experience about kill a level of player 150? Without that of 10% of his experience per level.. As this it would remain formula for that everybody earns exp upon killing a player even of minimum level?

Here this:
minLevelThresholdForKilledPlayer = 0.9
maxLevelThresholdForKilledPlayer = 1.1

For..?
Someone obtains explain me this form?
 
Code:
if((min > 0.0 && level < (uint32_t)std::floor(attackerLevel * min)) || (max > 0.0 &&
                level > (uint32_t)std::floor(attackerLevel * max)))
                return 0;

min = minLevelThresholdForKilledPlayer
max = maxLevelThresholdForKilledPlayer

If 0.9 is greater than 0.0 and victim level is less than attacker level * 0.9
OR (||)
if 1.1 is greater than 0.0 and victim level is greater than attacker level * 1.1
then do not give EXP (return 0)

That's what it does.

So, for example:
Let's say you're level 100.
100 * 0.9 = 90 (min level).
100 * 1.1 = 110 (max level).
If you kill anyone less than 90 and higher than 110, you gain no experience.
 
i dont have access the sources of my Tfs.
For that the victim of level high earns exp on top of the level short, as would stay? It will want to zero out the experience, for both they will earn even though be little

minLevelThresholdForKilledPlayer = 0.9
maxLevelThresholdForKilledPlayer = 0 ?
 
If you speak fluently in another language, maybe someone can translate it for you into English.
Otherwise, I just don't understand what you're asking for now.
 
I think he wants everyone to gain exp for killing everyone regardless of levels.
As per Evans source extract, I suppose if you used the following you would be covered:


minLevelThresholdForKilledPlayer = 0
maxLevelThresholdForKilledPlayer = 1000


I never got it working like it should on 0.3 though. In the end I disabled pvp exp in the config and wrote my own creaturescript to handle it.
 
I think he wants everyone to gain exp for killing everyone regardless of levels.
As per Evans source extract, I suppose if you used the following you would be covered:


minLevelThresholdForKilledPlayer = 0
maxLevelThresholdForKilledPlayer = 1000


I never got it working like it should on 0.3 though. In the end I disabled pvp exp in the config and wrote my own creaturescript to handle it.

Tfs uses the old cip formula for pvp experience, because of this you cannot gain experience for killing players below 90% of your level regardless of your config settings (i.e. less than 180 for a lvl 200 killer). If you want something different, you either need an advanced onDeath creaturescript or a rewrite of the formula in sources.
 
Back
Top