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

TFS 1.5 8.60. How to increase maximum level

2057623

Member
Joined
Jan 16, 2012
Messages
97
Reaction score
12
Good evening, I wanted to know how I can increase the maximum level of my server, it goes up to level 16561, I have already changed the source to percentage here


I saw some topics showing how new I am with source, today it's the first time I compile and I wanted some help and calm down to show me how to teach lol. I'm using TFS 1.5 from nekiro Version 8.60.

I know this is where things change but I don't know what to change

Lua:
        static uint64_t getExpForLevel(const uint64_t lv) {
            return (((lv - 6ULL) * lv + 17ULL) * lv - 12ULL) / 6ULL * 100ULL;
        }
 
You can block the max level with onGainExperience in events/scripts/player.lua

You can just put under the function something like

Lua:
if self:getLevel() >= 100000 then
    return true
end

people wont get any experience above this level anymore
 
You can block the max level with onGainExperience in events/scripts/player.lua

You can just put under the function something like

Lua:
if self:getLevel() >= 100000 then
    return true
end

people wont get any experience above this level anymore
riend, I said that my server is stuck at level 16561, the players are stuck at level 16561, how am I going to add a small code to limit the players to 100k, and the players are stuck at level 16561, I want the players to pass level 16561.
 
There's a tutorial check at resources c++ codes it was made by gestor, would attach the thread but I'm in the airport using my cellphone
 
 
There's a tutorial check at resources c++ codes it was made by gestor, would attach the thread but I'm in the airport using my cellphone
I saw this topic on gesio, but I didn't understand it very well. I'm new to this part of Source, so I don't know where to go to increase the
maximum level.

I've already seen this topic, but like I said I'm new, I didn't understand it very well, it talked about a lot of numbers and levels. I didn't understand
 
Open Player.h search this

C++:
static uint64_t getExpForLevel(const uint64_t lv) {
            return (((lv - 6ULL) * lv + 17ULL) * lv - 12ULL) / 6ULL * 100ULL;
        }
change to this

C++:
static uint64_t getExpForLevel(int32_t lv) {
                lv--;
                return ((150ULL * lv * lv) - (50ULL * lv * lv) + (1200ULL)) / 3ULL;
                }

Compile Your Soruce and it will work :)
 
Open Player.h search this

C++:
static uint64_t getExpForLevel(const uint64_t lv) {
            return (((lv - 6ULL) * lv + 17ULL) * lv - 12ULL) / 6ULL * 100ULL;
        }
change to this

C++:
static uint64_t getExpForLevel(int32_t lv) {
                lv--;
                return ((150ULL * lv * lv) - (50ULL * lv * lv) + (1200ULL)) / 3ULL;
                }

Compile Your Soruce and it will work :)
I tried it this way, it didn't work, the first number if the player's EXP gain is very high and very low can put stages 9999999999 where the gain is very little, I did a lot of tests, it just resolved it like this.

static uint64_t getExpForLevel(const uint64_t lv)
{
return ((1ULL * lv * lv * lv) - (50ULL * lv * lv) + (1200ULL * lv)) / 3ULL;
}

Remembering that the monsters have normal exp, if you have exp edited and it's good to increase the first number, you can say it's wrong, but on my server it worked, I spent the whole day testing and this was the best.
 
Back
Top