• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

C++ ManaShield Damage Transparent

miguelshta

Member
Joined
Mar 21, 2009
Messages
356
Solutions
1
Reaction score
18
Location
Sonora, Mexico
Hello i want to be able to change the manashield damage color in my configlua i saw this effect some times in tibia rl in the old times the effect becames transparent i'm using tfs 0.4, i tried to change to COLOR_GREY but didnt change anything still seeing blue so if someone can help me it would be great!

C++:
            if(target->hasCondition(CONDITION_MANASHIELD) && params.combatType != COMBAT_UNDEFINEDDAMAGE)
            {
                int32_t manaDamage = std::min(target->getMana(), damage + elementDamage);
                damage = std::max((int32_t)0, damage + elementDamage - manaDamage);

                elementDamage = 0; // TODO: I don't know how it works ;(
                if(manaDamage && combatChangeMana(attacker, target, -manaDamage, params.combatType, true))
                    addMagicEffect(list, targetPos, COLOR_GREY);
21x.PNG
old image from tibia world " Zanera "​
 
Solution
nice thats all what i need but i dont have these lines in game.cpp just have this:

C++:
            if(target->hasCondition(CONDITION_MANASHIELD) && params.combatType != COMBAT_UNDEFINEDDAMAGE)
            {
                int32_t manaDamage = std::min(target->getMana(), damage + elementDamage);
                damage = std::max((int32_t)0, damage + elementDamage - manaDamage);

                elementDamage = 0; // TODO: I don't know how it works ;(
                if(manaDamage && combatChangeMana(attacker, target, -manaDamage, params.combatType, true))
                    addMagicEffect(list, targetPos, COLOR_GREY);
            }
This lines dont define this color,
open const.h check colors by number in ObjectBuilder. Then...
this is not transparent lol, that is the light blue used by drown damage... and you can't change magic effect colors unless you edit your client files... if I recall correctly it is the same effect of the fishing animation, just copy it
 
this is not transparent lol, that is the light blue used by drown damage... and you can't change magic effect colors unless you edit your client files... if I recall correctly it is the same effect of the fishing animation, just copy it
colors can be changed through tfs in 1.X versions without any changes in client, i have no idea how it is in 0.X
 
magic effect colors can be changed? 🤔 he is not talking about the text, but the blue rings
talking about manashield damage doesn't make sense to connect it with real magic effects, the magic effect of the damage is about the weapon or the spell so i don't think he wan't to change the magic effect color (including that there is no specified magic effect on receiving damage while manashield is activated) i though he was talking about the values of damage text color.
 
this is not transparent lol, that is the light blue used by drown damage... and you can't change magic effect colors unless you edit your client files... if I recall correctly it is the same effect of the fishing animation, just copy it
i'm talking about the text the "107" numbers of the hit in the character scyzor
 
Its simple:
Effect colors is "Sprites",

Text color you can change in
const.h
C++:
enum TextColor_t : uint8_t {
    TEXTCOLOR_BLUE = 5,
    TEXTCOLOR_LIGHTGREEN = 30,
    TEXTCOLOR_LIGHTBLUE = 35,
    TEXTCOLOR_MAYABLUE = 95,
    TEXTCOLOR_DARKRED = 108,
    TEXTCOLOR_LIGHTGREY = 129,
    TEXTCOLOR_SKYBLUE = 143,
    TEXTCOLOR_PURPLE = 155,
    TEXTCOLOR_RED = 180,
    TEXTCOLOR_ORANGE = 198,
    TEXTCOLOR_YELLOW = 210,
    TEXTCOLOR_WHITE_EXP = 215,
    TEXTCOLOR_HEALING = 203,
    TEXTCOLOR_NONE = 255,
};
Numbers defined color, you can get color number from ObjectBuilder (Just open it, pick some item->properties->has light-> and chose any color light then you get number of it) now you can change this color here, of even add new one.

then in
game.cpp
Code:
                message.primary.value = manaDamage;
                message.primary.color = TEXTCOLOR_BLUE;
You have defined colors :) Example for mana,
 
Its simple:
Effect colors is "Sprites",

Text color you can change in
const.h
C++:
enum TextColor_t : uint8_t {
    TEXTCOLOR_BLUE = 5,
    TEXTCOLOR_LIGHTGREEN = 30,
    TEXTCOLOR_LIGHTBLUE = 35,
    TEXTCOLOR_MAYABLUE = 95,
    TEXTCOLOR_DARKRED = 108,
    TEXTCOLOR_LIGHTGREY = 129,
    TEXTCOLOR_SKYBLUE = 143,
    TEXTCOLOR_PURPLE = 155,
    TEXTCOLOR_RED = 180,
    TEXTCOLOR_ORANGE = 198,
    TEXTCOLOR_YELLOW = 210,
    TEXTCOLOR_WHITE_EXP = 215,
    TEXTCOLOR_HEALING = 203,
    TEXTCOLOR_NONE = 255,
};
Numbers defined color, you can get color number from ObjectBuilder (Just open it, pick some item->properties->has light-> and chose any color light then you get number of it) now you can change this color here, of even add new one.

then in
game.cpp
Code:
                message.primary.value = manaDamage;
                message.primary.color = TEXTCOLOR_BLUE;
You have defined colors :) Example for mana,
nice thats all what i need but i dont have these lines in game.cpp just have this:

C++:
            if(target->hasCondition(CONDITION_MANASHIELD) && params.combatType != COMBAT_UNDEFINEDDAMAGE)
            {
                int32_t manaDamage = std::min(target->getMana(), damage + elementDamage);
                damage = std::max((int32_t)0, damage + elementDamage - manaDamage);

                elementDamage = 0; // TODO: I don't know how it works ;(
                if(manaDamage && combatChangeMana(attacker, target, -manaDamage, params.combatType, true))
                    addMagicEffect(list, targetPos, COLOR_GREY);
            }
 
nice thats all what i need but i dont have these lines in game.cpp just have this:

C++:
            if(target->hasCondition(CONDITION_MANASHIELD) && params.combatType != COMBAT_UNDEFINEDDAMAGE)
            {
                int32_t manaDamage = std::min(target->getMana(), damage + elementDamage);
                damage = std::max((int32_t)0, damage + elementDamage - manaDamage);

                elementDamage = 0; // TODO: I don't know how it works ;(
                if(manaDamage && combatChangeMana(attacker, target, -manaDamage, params.combatType, true))
                    addMagicEffect(list, targetPos, COLOR_GREY);
            }
This lines dont define this color,
open const.h check colors by number in ObjectBuilder. Then when you find exactly name of color that are show in game you can find it in game.cpp, Or just change to other one in const.h
 
Solution
Back
Top