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

New attributes like mana leech/life leech in tfs 1.3 8.6

vexler222

Active Member
Joined
Apr 22, 2012
Messages
714
Solutions
15
Reaction score
46
Hi, i try add mana leech and life leech to tfs 1.3 8.6 by nekiro but i have few poroblems
This is tutorial what i use: Adding "boosts" introduced in protocol 10.94 (#2395) · otland/forgottenserver@0d2c287 (https://github.com/otland/forgottenserver/commit/0d2c287f08b43ec2a3f295d6f07545e22a70c29a#)

1. I dont have any lines like it in items.cpp
boJnks6.png


2. I don't added it and all sources compiled good without errors, but when i try login in to game i got crash
QjvpxWs.png
 
Solution
8.6 doesn't have client support for those "special" skills, therefore you can't send them to the client

delete this from protocolgame.cpp:
Code:
for (uint8_t i = SPECIALSKILL_FIRST; i <= SPECIALSKILL_LAST; ++i) {
		msg.add<uint16_t>(std::min<int32_t>(100, player->varSpecialSkills[i]));
		msg.add<uint16_t>(0);
}

also there is no crit effect in 8.6 so this line:
Code:
g_game.addMagicEffect(target->getPosition(), CONST_ME_CRITICAL_DAMAGE);
could be replaced with animated text
8.6 doesn't have client support for those "special" skills, therefore you can't send them to the client

delete this from protocolgame.cpp:
Code:
for (uint8_t i = SPECIALSKILL_FIRST; i <= SPECIALSKILL_LAST; ++i) {
		msg.add<uint16_t>(std::min<int32_t>(100, player->varSpecialSkills[i]));
		msg.add<uint16_t>(0);
}

also there is no crit effect in 8.6 so this line:
Code:
g_game.addMagicEffect(target->getPosition(), CONST_ME_CRITICAL_DAMAGE);
could be replaced with animated text
 
Solution
8.6 doesn't have client support for those "special" skills, therefore you can't send them to the client

delete this from protocolgame.cpp:
Code:
for (uint8_t i = SPECIALSKILL_FIRST; i <= SPECIALSKILL_LAST; ++i) {
        msg.add<uint16_t>(std::min<int32_t>(100, player->varSpecialSkills[i]));
        msg.add<uint16_t>(0);
}

also there is no crit effect in 8.6 so this line:
Code:
g_game.addMagicEffect(target->getPosition(), CONST_ME_CRITICAL_DAMAGE);
could be replaced with animated text

effect i repleced with cake, i remove what u say and now i don't get crash but when i add attribute to item it not work :/ i see in description mana leech X percent X ammount but nothing happend when i attack monsters :/

Lines from items.cpp what i don't have't i repleced with it (i maked it like lines before what i saw in the file)
So if client 8.6 doesn't support special skills it's impossible to make it? Cuz i saw it on brazil ots and it work normal on 8.6

Code:
                case ITEM_PARSE_CRITICALHITCHANCE: {
                    abilities.specialSkills[SPECIALSKILL_CRITICALHITCHANCE] = pugi::cast<int32_t>(valueAttribute.value());
                    break;
                }

                case ITEM_PARSE_CRITICALHITAMOUNT: {
                    abilities.specialSkills[SPECIALSKILL_CRITICALHITAMOUNT] = pugi::cast<int32_t>(valueAttribute.value());
                    break;
                }

                case ITEM_PARSE_HITPOINTSLEECHCHANCE: {
                    abilities.specialSkills[SPECIALSKILL_HITPOINTSLEECHCHANCE] = pugi::cast<int32_t>(valueAttribute.value());
                    break;
                }

                case ITEM_PARSE_HITPOINTSLEECHAMOUNT: {
                    abilities.specialSkills[SPECIALSKILL_HITPOINTSLEECHAMOUNT] = pugi::cast<int32_t>(valueAttribute.value());
                    break;
                }

                case ITEM_PARSE_MANAPOINTSLEECHCHANCE: {
                    abilities.specialSkills[SPECIALSKILL_MANAPOINTSLEECHCHANCE] = pugi::cast<int32_t>(valueAttribute.value());
                    break;
                }

                case ITEM_PARSE_MANAPOINTSLEECHAMOUNT: {
                    abilities.specialSkills[SPECIALSKILL_MANAPOINTSLEECHAMOUNT] = pugi::cast<int32_t>(valueAttribute.value());
                    break;
                }
Post automatically merged:

Okey nvm i forgott add Item to movements xD
Post automatically merged:

Okey nvm i forgott add Item to movements xD
 
Last edited:
Back
Top