S
Shadow_
Guest
Hello Otland members,
I have just finished it so i found no problem to share it with you all because the old one is not working on new tfs versions ( i used it to make it working on tfs 1.2 )
anyway lets start.
First Step (1/3):Open protocolgame.cpp and find this (Should be close to line 2885) :
change it with this (1.2 Users):
1.3 Users :
Second Step (2/3) : find this :
change it with this(1.2 Users) :
1.3 :
Third Step (3/3) : Compile your TFS and have fun with the new future!
How to compile : otland/forgottenserver
More Details about compiling : Compiling TFS 1.0/1.1 latest source. 64 and 32 bits. Pics and lots of explanation.
Start tibia to find out that your mana and health are now like this :
Credits to : @Crypton3
I have just finished it so i found no problem to share it with you all because the old one is not working on new tfs versions ( i used it to make it working on tfs 1.2 )
anyway lets start.
First Step (1/3):Open protocolgame.cpp and find this (Should be close to line 2885) :
Code:
msg.add<uint16_t>(std::min<int32_t>(player->getHealth(), std::numeric_limits<uint16_t>::max()));
msg.add<uint16_t>(std::min<int32_t>(player->getMaxHealth(), std::numeric_limits<uint16_t>::max()));
change it with this (1.2 Users):
Code:
if (player->getPlayerInfo(PLAYERINFO_MAXHEALTH) > 0)
{
msg.add<uint16_t>(std::min<int32_t>(player->getHealth() * 100 / player->getPlayerInfo(PLAYERINFO_MAXHEALTH), std::numeric_limits<uint16_t>::max()));
msg.add<uint16_t>(100);
}
else
{
msg.add<uint16_t>(0);
msg.add<uint16_t>(0);
}
C++:
if (player->getMaxHealth() > 0)
{
msg.add<uint16_t>(std::min<int32_t>(player->getHealth() * 100 / player->getMaxHealth(), std::numeric_limits<uint16_t>::max()));
msg.add<uint16_t>(100);
}
else
{
msg.add<uint16_t>(0);
msg.add<uint16_t>(0);
}
Code:
msg.add<uint16_t>(std::min<int32_t>(player->getMana(), std::numeric_limits<uint16_t>::max()));
msg.add<uint16_t>(std::min<int32_t>(player->getMaxMana(), std::numeric_limits<uint16_t>::max()));
change it with this(1.2 Users) :
Code:
if (player->getPlayerInfo(PLAYERINFO_MAXMANA) > 0)
{
msg.add<uint16_t>(std::min<int32_t>(player->getMana() * 100 / player->getPlayerInfo(PLAYERINFO_MAXMANA), std::numeric_limits<uint16_t>::max()));
msg.add<uint16_t>(100);
}
else
{
msg.add<uint16_t>(0);
msg.add<uint16_t>(0);
}
C++:
if (player->getMaxMana() > 0)
{
msg.add<uint16_t>(std::min<int32_t>(player->getMana() * 100 / player->getMaxMana(), std::numeric_limits<uint16_t>::max()));
msg.add<uint16_t>(100);
}
else
{
msg.add<uint16_t>(0);
msg.add<uint16_t>(0);
}
How to compile : otland/forgottenserver
More Details about compiling : Compiling TFS 1.0/1.1 latest source. 64 and 32 bits. Pics and lots of explanation.
Start tibia to find out that your mana and health are now like this :
Credits to : @Crypton3
Last edited by a moderator: