• 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:
if u use search function you will find many threads about that ..
and answer is .. ~ ..
all use to increase experience not levels ;/
the problem is some people knew how to do it . . .
but they don't tell anyone
 
I Have Already Posted this before
in player.h
Change This Function:
C++:
    static uint64_t getExpForLevel(uint32_t lv)
To
C++:
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
C++:
if(experience > 0x7FFFFFFF) // client debugs after 2,147,483,647 exp
     msg->put<uint32_t>(0x7FFFFFFF);
To
C++:
if(experience > 2147483647) // client debugs after 2,147,483,647 exp
     msg->put<uint32_t>(2147483647);
 
Last edited by a moderator:
then find what you are doing wrong because it have worked for me and my friend.try rebuilding and creating a new account.and make a script that gives much levels
 
it is necessary because if you passed level 717k you will get experience more than 2,147,483,647 and the tibia client limit is a unsigned int 32.so i check if experience is after 2,147,483,647.it will just print(2,147,483,647)
 
it is necessary because if you passed level 717k you will get experience more than 2,147,483,647 and the tibia client limit is a unsigned int 32.so i check if experience is after 2,147,483,647.it will just print(2,147,483,647)
It is not necessary because that's what the hex value stands for is 2,147,483,64, so all you've done is made it so the server has to convert it to the value before sending the byte to the client.
 
Does it work on 0.4? cus I compiled it twice... and I'm trying to /addskill, but I can't give more than 717k.

Edit: When I /addskill for example 900k, the character level goes back to 1, but it has 2,147,483,647 EXP.

@dchampag
@tetra20
 
Does it work on 0.4? cus I compiled it twice... and I'm trying to /addskill, but I can't give more than 717k.

Edit: When I /addskill for example 900k, the character level goes back to 1, but it has 2,147,483,647 EXP.

@dchampag
@tetra20

For addskill, the function might need editing also, as for exp, you hav to check actual value in database, because the client can only see 2,147,483,647 because any more than that and the client will debug.


Try doing it with very high exp mob and such, if still not working make sure when you compiled you did rebuild all.
 
Ok so, here's the thing...
Killing a monster that gives extremly high EXP: 15:37 You advanced from Level 717217 to Level 973413.
But killing a player: 15:39 You were downgraded from Level 693676 to Level 686646. edit: you're supposed to get exp by killing players

I'm more interested in being able to get above 717k by killing players, rather than monsters

@dchampag
 
Well so far so good, now you just need to find something in sources like tetra posted but for player kills and addskill command, and add the same code to it. On my phone right now so I can't look around to see.
 
Try Changing in Player.cpp the experience got from int32 or int64 to unsigned long int64
i Can't Really remember the function it was like this
Code:
void onGainExperience
 
Last edited:
C++:
void Player::onGainExperience(double& gainExp, bool fromMonster, bool multiplied)
{
    if(party && party->isSharedExperienceEnabled() && party->isSharedExperienceActive())
    {
        party->shareExperience(gainExp, fromMonster, multiplied);
        rateExperience(gainExp, fromMonster);
        return; //we will get a share of the experience through the sharing mechanism
    }

    if(gainExperience(gainExp, fromMonster))
        Creature::onGainExperience(gainExp, fromMonster, true);
}

Anything here?
 
Last edited by a moderator:
Back
Top