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

OTClient Bug skills OTClient (skills show 0, but not 0)... extended limit

roriscrave

Advanced OT User
Joined
Dec 7, 2011
Messages
1,188
Solutions
34
Reaction score
200
Hello everyone, I have the skill limits extended in the source, player can take skill > 255, and it work in old client 100%, because i changed client with a dll.
But if i login with OTClient, it show all skills = 0, why? How can i extended skills in OTclient?

protocolgame.cpp
C++:
        if (player->getOperatingSystem() >= CLIENTOS_OTCLIENT_LINUX) {
            playermsg.addByte(std::min<int32_t>(player->getSkillLevel(i), std::numeric_limits<uint16_t>::max()));
        } else {
            playermsg.add<uint16_t>(std::min<int32_t>(player->getSkillLevel(i), std::numeric_limits<uint16_t>::max()));
        }

1701549807215.png
 
version?

try with

Lua:
g_game.enableFeature(GameDoubleSkills);
or
            g_game.enableFeature(GameBaseSkillU16);
 
Last edited:
version?

try with

Lua:
g_game.enableFeature(GameDoubleSkills);
            g_game.enableFeature(GameBaseSkillU16);
OTCv8 and tfs 1.x... i added it but not solved.
When i login my skills stay in 0, when i put some item that have skills atributte, the skill show real, if i remove item, back to 0
 
Replace in protocolgame.cpp on server:
C++:
        if (player->getOperatingSystem() >= CLIENTOS_OTCLIENT_LINUX) {
            playermsg.addByte(std::min<int32_t>(player->getSkillLevel(i), std::numeric_limits<uint16_t>::max()));
        } else {
            playermsg.add<uint16_t>(std::min<int32_t>(player->getSkillLevel(i), std::numeric_limits<uint16_t>::max()));
        }
with:
C++:
        playermsg.add<uint16_t>(std::min<int32_t>(player->getSkillLevel(i), std::numeric_limits<uint16_t>::max()));
and enable feature GameDoubleSkills in OTCv8, to make it read 16 bit skill levels:

To enable GameDoubleSkills for old protocols in OTCv8, add:
Lua:
g_game.enableFeature(GameDoubleSkills)
in modules/game_features/features.lua:
 
Solved, added what Gesior saied, and now works fine:

Code:
        g_game.enableFeature(GameDoubleMagicLevel)
        g_game.enableFeature(GameDoubleSkills)
 
Last edited:
Back
Top