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

Compiling Editing Max level aka 717k 0.3.6

Zippow

Member
Joined
Aug 27, 2011
Messages
454
Reaction score
21
Location
Sweden
It's possible, i've seen ot's where players are more than 717k.
I do know how to compile, but how do I edit the max level?
0.3.6
0.4

Kind Regards
 
Last edited:
I Have Already Posted this before
in player.h
Change This Function:
Code:
    static uint64_t getExpForLevel(uint32_t lv)
To
Code:
static uint64_t getExpForLevel(uint32_t lv)
     {
       static std::map<uint32_t, uint64_t> cache;
       lv--;

       std::map<uint32_t, uint64_t>::iterator it = cache.find(lv);
       if(it != cache.end())
         return it->second;

       uint64_t exp = ((50ULL * (lv+1ULL) / 3ULL - 100ULL) * (lv+1ULL) + 850ULL / 3ULL) * (lv+1ULL) - 200ULL;
       cache[lv] = exp;
       return exp;
     }

Change this in protocolgame.cpp
Code:
if(experience > 0x7FFFFFFF) // client debugs after 2,147,483,647 exp
     msg->put<uint32_t>(0x7FFFFFFF);
To
Code:
if(experience > 2147483647) // client debugs after 2,147,483,647 exp
     msg->put<uint32_t>(2147483647);

456bb7522088ec4f5350eaf52f977d4b
error.png
Pls help!
 
As it's question nr 100000 about exp formula I decide to write short tutorial about this problem:
https://otland.net/threads/c-how-to-increase-maximum-level-on-server.230364/

I will post link to PHP script that can 'verify', if your new formula is 'right' soon.
What is right formula?
1. Gives value over ZERO for every level.
2. Value for '$level + 1' is always higher then for '$level'.
 
Back
Top