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

C++ Double Experience per level

Lbtg

Advanced OT User
Joined
Nov 22, 2008
Messages
2,392
Reaction score
162
Hey, can anyone help me, figure out, or help me to to move and change that:

I want to make that for every level , player need double experience to get level.
As example now lvl 1 to lvl 2 need 200 experience, i want it 400exp.

AS example 10 lvl to 11 lvl need 10k exp, i want 20k exp.

So basicaly i want for every level to up, player need 2x more experience.

i tryed edit source abit, but failed just broke abit the exp show on client.. tho it kept same...


Anyone can help ? I use tfs 1,2++ , otcv8
 
Hey, can anyone help me, figure out, or help me to to move and change that:

I want to make that for every level , player need double experience to get level.
As example now lvl 1 to lvl 2 need 200 experience, i want it 400exp.

AS example 10 lvl to 11 lvl need 10k exp, i want 20k exp.

So basicaly i want for every level to up, player need 2x more experience.

i tryed edit source abit, but failed just broke abit the exp show on client.. tho it kept same...


Anyone can help ? I use tfs 1,2++ , otcv8
Replace forgottenserver/src/player.h at 1.2 · otland/forgottenserver (https://github.com/otland/forgottenserver/blob/1.2/src/player.h#L199) :
C++:
return ((50ULL * lv * lv * lv) - (150ULL * lv * lv) + (400ULL * lv)) / 3ULL;
with:
C++:
return (((50ULL * lv * lv * lv) - (150ULL * lv * lv) + (400ULL * lv)) / 3ULL) * 2;

It sounds like a bad idea. Players are used to normal level progress, they know exact exp values for levels. If you want to slow down level progress, reduce exp from monsters by 50% ex. under this forgottenserver/data/events/scripts/player.lua at 1.2 · otland/forgottenserver (https://github.com/otland/forgottenserver/blob/1.2/data/events/scripts/player.lua#L139-L142)
LUA:
function Player:onGainExperience(source, exp, rawExp)
	if not source or source:isPlayer() then
		return exp
	end
add:
LUA:
	exp = exp * 0.5
 
Back
Top