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

text coming above it's head when cast spell

Tbol

Well-Known Member
Joined
Apr 7, 2019
Messages
529
Reaction score
56
TFS 1.2 Hi, so some of the servers have this when you cast a spell lets say Energy Wave the orange text comes up above player with text Energy Wave right? So i have this same stuff, i found it on otland and modified it so when you cast spell like this lets say Energy Wave dgfrgdfgdfg text above player comes up Energy Wave "dgfrgdfgdfg but now i have an issue with it :D so i have craft runes npc and i have rune called Energy Wave Rune so when i try to cast it, it calls it as a spell called Energy Wave "Rune.
So probably solution would be that you could add your custom tags in your name only if you use this \/
7f6a06d4c8a402adc649544c4d5d5c49.png
so
Spell Name
"whatever text i want
and not like this
Spell Name whatever text i want



Not sure which code part to send here. Cant remember where it was edited in source
 
If you are not using main TFS emote spell option then you will have to post your code of how you added your spell emoting.
or you can check something like how params are added to levitate/summon creatures functions on older TFS and try doing like it.
 
If you are not using main TFS emote spell option then you will have to post your code of how you added your spell emoting.
or you can check something like how params are added to levitate/summon creatures functions on older TFS and try doing like it.
Read my thread at the bottom
"Not sure which code part to send here. Cant remember where it was edited in source"

mention on my thread that i cant remember what i edited so thats why i can provide the code maybe in spells.cpp not sure
 
How do you enable/disable it? Is it through config like normal one? Or its just always enabled? and yes it should be in spells.cpp
 
How do you enable/disable it? Is it through config like normal one? Or its just always enabled? and yes it should be in spells.cpp
It always enabled someone from otland made it like old time ago. It was source code edit because by default spell would send message on Default chat when casting spell so someone changed it.
spells.cpp
 
Found this thread real quick with search function, hope it gives you an idea (modification should be in game.cpp aswell)

 
Found this thread real quick with search function, hope it gives you an idea (modification should be in game.cpp aswell)

So how would you check if he uses Quotation Mark if there isnt a quotation mark on spell it sends as a regular text in Default chat as example SpellName Blalbalblablal <---- Incorrect sends in default chat. SpellName "Blalbalblablal <---- Correct cast it as a spell

Lua:
bool Game::playerSaySpell(Player* player, SpeakClasses type, const std::string& text)
{
    std::string words = text;

    TalkActionResult_t result = g_talkActions->playerSaySpell(player, type, words);
    if (result == TALKACTION_BREAK) {
        return true;
    }

    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;
    }

    return false;
}
 
Back
Top