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

Breaking the limit of health and mana so as skills

SixNine

Active Member
Joined
Dec 12, 2018
Messages
442
Reaction score
40
Using tfs 1.2 and otclientv8,
im trying to break this max health which is 65k something like that, and skills max number is 255 if im not wrong, i know that there might be information in search tab but honestly never seen a actually a good tutorial for it. I looked into otclient const.h features and found
GameDoubleHealth = 28
GameDoubleSkills = 29
but once u enable them it starts showing millions and breaking packets probably because client becomes super glitchy, so probably its tfs source related stuff, but im not sure tho.
 
Uint8 can fit numbers between 0 and 255
Double (64-bit floating point) can fit numbers between -2147483648 to 2147483647.

The client becomes glitchy because it tries to parse a 64-bit float (which you enabled) out of an 8-bit integer.
You have to change the types (variables that store the skills, function return types) and send the correct type.

As you can see, double can fit pretty big numbers, but it would not fit the number of times this question has been asked on this forum tho,
so next time try using search first :)
 
Uint8 can fit numbers between 0 and 255
Double (64-bit floating point) can fit numbers between -2147483648 to 2147483647.

The client becomes glitchy because it tries to parse a 64-bit float (which you enabled) out of an 8-bit integer.
You have to change the types (variables that store the skills, function return types) and send the correct type.

As you can see, double can fit pretty big numbers, but it would not fit the number of times this question has been asked on this forum tho,
so next time try using search first :)
there is no correct full tutorials where to change for it too work.
 
there is no correct full tutorials where to change for it too work.
You have to change the types (variables that store the skills, function return types) and send the correct type.

Hot Shots Idiot GIF
 
Pff changed most of the stuff in src and once i enable GameDoubleHealth it chrashes the client
Sometimes "most" may not be enough, a valuable lesson you got here :)
Btw if you are able to connect and everything works fine without the feature enabled, it's a clear sign that you didn't change much, so it's hardly "most".
 
Sometimes "most" may not be enough, a valuable lesson you got here :)
Btw if you are able to connect and everything works fine without the feature enabled, it's a clear sign that you didn't change much, so it's hardly "most".
But that makes no sense because i changed every single maxHealth bit rate there is nothing left
 
The only changes you've to do are in protocolgame.cpp, Exactly in.
C++:
void ProtocolGame::AddPlayerStats(NetworkMessage& msg)
You'll have to do a few other changes if you're trying to also break how level shows in skills tab but you didn't mention level in the thread so you should be good to go with only AddPlayerStats changes.
 
The only changes you've to do are in protocolgame.cpp, Exactly in.
C++:
void ProtocolGame::AddPlayerStats(NetworkMessage& msg)
You'll have to do a few other changes if you're trying to also break how level shows in skills tab but you didn't mention level in the thread so you should be good to go with only AddPlayerStats changes.
Must be a cap, doesnt crash now but shows stupid values in game like hundreds of millions
Lua:
void ProtocolGame::AddPlayerStats(NetworkMessage& msg)
{
    msg.addByte(0xA0);
    if (player->showHealthAsPercentage) {
        if (player->getMaxHealth() > 0) {
            msg.add<uint64_t>(player->getHealth() * 100 / player->getMaxHealth());
            msg.add<uint64_t>(100);
        } else {
            msg.add<uint64_t>(0);
            msg.add<uint64_t>(0);
        }
    } else {
        msg.add<uint64_t>(std::min<int64_t>(player->getHealth(), std::numeric_limits<uint64_t>::max()));
        msg.add<uint64_t>(std::min<int64_t>(player->getMaxHealth(), std::numeric_limits<uint64_t>::max()));
    }
    msg.add<uint32_t>(player->getFreeCapacity());
    msg.add<uint32_t>(std::min<uint32_t>(player->getExperience(), 0x7FFFFFFF));
    msg.add<uint16_t>(player->getLevel());
    msg.addByte(player->getPlayerInfo(PLAYERINFO_LEVELPERCENT));
    if (player->showManaAsPercentage) {
        if (player->getMaxMana() > 0) {
            msg.add<uint64_t>(player->getMana() * 100 / player->getMaxMana());
            msg.add<uint64_t>(100);
        }
        else {
            msg.add<uint64_t>(0);
            msg.add<uint64_t>(0);
        }
    }
    else {
        msg.add<uint64_t>(std::min<int64_t>(player->getMana(), std::numeric_limits<uint64_t>::max()));
        msg.add<uint64_t>(std::min<int64_t>(player->getMaxMana(), std::numeric_limits<uint64_t>::max()));
    }
    msg.addByte(std::min<uint32_t>(player->getMagicLevel(), std::numeric_limits<uint8_t>::max()));
    msg.addByte(player->getPlayerInfo(PLAYERINFO_MAGICLEVELPERCENT));
    msg.addByte(player->getSoul());
    msg.add<uint16_t>(player->getStaminaMinutes());
}
 
msg.add<uint64_t>
Those are types man, do you want someone else to change them for you? Did you google anything that we said?
Is there something that you are missing or are you just plain lazy?
Are you aware that you can just ask questions about stuff like "what are types" or "where do they come from", but the pasted code just looks like you would want to have it done without any understanding?
 
Those are types man, do you want someone else to change them for you? Did you google anything that we said?
Is there something that you are missing or are you just plain lazy?
Are you aware that you can just ask questions about stuff like "what are types" or "where do they come from", but the pasted code just looks like you would want to have it done without any understanding?
I mean are you trying to collect free messages or what?
 
Back
Top