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

TFS 1.X+ changing emote spells color to purple

miguelshta

Member
Joined
Mar 21, 2009
Messages
351
Solutions
1
Reaction score
13
Location
Toronto, Canada
i found these lines and i know the value es "TALKTYPE_MONSTER_SAY" but i dont know more saytypes or colors to change can someone help me to change the text of emote spells to purple color?
C++:
    result = g_spells->playerSaySpell(player, words);
    if (result == TALKACTION_BREAK) {
        if (!g_config.getBoolean(ConfigManager::EMOTE_SPELLS)) {
            return internalCreatureSay(player, TALKTYPE_SAY, words, false);
        } else {
            return internalCreatureSay(player,TALKTYPE_MONSTER_SAY, words, false);
        }

    } else if (result == TALKACTION_FAILED) {
        return true;
    }
 
This is how it looks like in TFS 1.3
Lua:
    TALKTYPE_SAY = 1,
    TALKTYPE_WHISPER = 2,
    TALKTYPE_YELL = 3,
    TALKTYPE_PRIVATE_FROM = 4,
    TALKTYPE_PRIVATE_TO = 5,
    TALKTYPE_CHANNEL_Y = 7,
    TALKTYPE_CHANNEL_O = 8,
    TALKTYPE_PRIVATE_NP = 10,
    TALKTYPE_PRIVATE_PN = 12,
    TALKTYPE_BROADCAST = 13,
    TALKTYPE_CHANNEL_R1 = 14, //red - #c text
    TALKTYPE_PRIVATE_RED_FROM = 15, //@name@text
    TALKTYPE_PRIVATE_RED_TO = 16, //@name@text
    TALKTYPE_MONSTER_SAY = 36,
    TALKTYPE_MONSTER_YELL = 37,
 
This is how it looks like in TFS 1.3
Lua:
    TALKTYPE_SAY = 1,
    TALKTYPE_WHISPER = 2,
    TALKTYPE_YELL = 3,
    TALKTYPE_PRIVATE_FROM = 4,
    TALKTYPE_PRIVATE_TO = 5,
    TALKTYPE_CHANNEL_Y = 7,
    TALKTYPE_CHANNEL_O = 8,
    TALKTYPE_PRIVATE_NP = 10,
    TALKTYPE_PRIVATE_PN = 12,
    TALKTYPE_BROADCAST = 13,
    TALKTYPE_CHANNEL_R1 = 14, //red - #c text
    TALKTYPE_PRIVATE_RED_FROM = 15, //@name@text
    TALKTYPE_PRIVATE_RED_TO = 16, //@name@text
    TALKTYPE_MONSTER_SAY = 36,
    TALKTYPE_MONSTER_YELL = 37,
yes i have this but how to change it to purple? what talktype i need to use
 
You might try to normal text colors but I don't know if it gonna work in this case or not.
Lua:
    TEXTCOLOR_BLUE = 5,
    TEXTCOLOR_LIGHTGREEN = 30,
    TEXTCOLOR_LIGHTBLUE = 35,
    TEXTCOLOR_MAYABLUE = 95,
    TEXTCOLOR_DARKRED = 108,
    TEXTCOLOR_LIGHTGREY = 129,
    TEXTCOLOR_SKYBLUE = 143,
    TEXTCOLOR_PURPLE = 154,
    TEXTCOLOR_ELECTRICPURPLE = 155,
    TEXTCOLOR_RED = 180,
    TEXTCOLOR_PASTELRED = 194,
    TEXTCOLOR_ORANGE = 198,
    TEXTCOLOR_YELLOW = 210,
    TEXTCOLOR_WHITE_EXP = 215,
    TEXTCOLOR_NONE = 255,
 
You might try to normal text colors but I don't know if it gonna work in this case or not.
Lua:
    TEXTCOLOR_BLUE = 5,
    TEXTCOLOR_LIGHTGREEN = 30,
    TEXTCOLOR_LIGHTBLUE = 35,
    TEXTCOLOR_MAYABLUE = 95,
    TEXTCOLOR_DARKRED = 108,
    TEXTCOLOR_LIGHTGREY = 129,
    TEXTCOLOR_SKYBLUE = 143,
    TEXTCOLOR_PURPLE = 154,
    TEXTCOLOR_ELECTRICPURPLE = 155,
    TEXTCOLOR_RED = 180,
    TEXTCOLOR_PASTELRED = 194,
    TEXTCOLOR_ORANGE = 198,
    TEXTCOLOR_YELLOW = 210,
    TEXTCOLOR_WHITE_EXP = 215,
    TEXTCOLOR_NONE = 255,
got this error

C++:
Severity    Code    Description    Project    File    Line    Suppression State
Error (active)        argument of type "TextColor_t" is incompatible with parameter of type "SpeakClasses"    theforgottenserver    c:\Users\Administrator\Documents\alunia\src\game.cpp    3301
 
I think that animated text was working up to 8.6 and is still supported by downgrade repos.

1.2 downgrade:
Code:
g_game.addAnimatedText(message, position, color);

0.4:
Code:
g_game.addAnimatedText(pos, color, text);
yeah, he didn't stated what version he was using so I assumed latest, but your right
he's talking about this tho:
WgQBb4c.gif
 
He need to add new talktype, and then modify on client side void StaticText::compose()
Something like:
Code:
else if(m_mode == Otc::MessageSpell){
        text += m_name;
        text += " casts:\n";
        m_color = Color(254, 101, 0);
    }
Set the color to purple or whatever and it's done.
 
Back
Top