• 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+ How to set effect to correct order in TFS 1.5

mano368

Senior Support Team Member
Staff member
Support Team
Joined
Sep 2, 2011
Messages
619
Solutions
42
Reaction score
270
Location
Brazil
How to solve this problem? Anyone knows how to make effect work in correct order?

When you use exori vis, the energy spark appear below of teleport effect, but the correct way is the energy spark appear on top.

Tested in tfs 1.5 nekiro down 7.72

Thanks in advance!
 
Solution
I'd change order of execution here:

In some OTClient there's a logic to re-draw these effects in reverse order so once you fix it for CIP it won't work for OTClient ;)

Simply comment out:
C++:
/*
    if (params.impactEffect != CONST_ME_NONE) {
        Game::addMagicEffect(spectators, tile->getPosition(), params.impactEffect);
    }
*/

And put this at the end of Combat::doAreaCombat
C++:
    for (Tile* tile : tiles) {
        if (canDoCombat(caster, tile, params.aggressive) !=...
I'd change order of execution here:

In some OTClient there's a logic to re-draw these effects in reverse order so once you fix it for CIP it won't work for OTClient ;)

Simply comment out:
C++:
/*
    if (params.impactEffect != CONST_ME_NONE) {
        Game::addMagicEffect(spectators, tile->getPosition(), params.impactEffect);
    }
*/

And put this at the end of Combat::doAreaCombat
C++:
    for (Tile* tile : tiles) {
        if (canDoCombat(caster, tile, params.aggressive) != RETURNVALUE_NOERROR) {
            continue;
        }

      
       if (params.impactEffect != CONST_ME_NONE) {
           Game::addMagicEffect(spectators, tile->getPosition(), params.impactEffect);
       }
    }

But for me it looks like it's already in correct order 🤔
I wouldn't be surprised if CIP client had some logic to render these in reversed order or even some flag to render on top.
 
Last edited:
Solution
I'd change order of execution here:

In some OTClient there's a logic to re-draw these effects in reverse order so once you fix it for CIP it won't work for OTClient ;)

Simply comment out:
C++:
        // combatTileEffects(spectators, caster, tile, params);

And put this at the end of Combat::doAreaCombat
C++:
    for (Tile* tile : tiles) {
        if (canDoCombat(caster, tile, params.aggressive) != RETURNVALUE_NOERROR) {
            continue;
        }

        combatTileEffects(spectators, caster, tile, params);
    }

But for me it looks like it's already in correct order 🤔
I wouldn't be surprised if CIP client had some logic to render these in reversed order or even some flag to render on top.
commenting that line won't cause any trouble?
 
Ahh right it would be anyway executed afterwards, but maybe it'd be safer to not change execution order.
Method responsible for creating things like "fields", sending impactEffect but it also executes tileCallback so I'm nut sure about this case, whether executing it later could cause any issue.

Idea was no to execute:
C++:
    if (params.impactEffect != CONST_ME_NONE) {
        Game::addMagicEffect(spectators, tile->getPosition(), params.impactEffect);
    }

Which is in fact inside of this method, so either comment that part out (and check if it does not affect other use cases negatively) or parametrize it so it can decide whether to send effect. Remember to check other use cases like area spells.
Anyway you need to playaround a bit with these function and check if it fits your needs.
 
Last edited:
@lursky
thanks bro, just did what you told and worked fine.

tested with rune fields, attack area spells, single target runes and area target runes.
 
I'd change order of execution here:

In some OTClient there's a logic to re-draw these effects in reverse order so once you fix it for CIP it won't work for OTClient ;)

Simply comment out:
C++:
/*
    if (params.impactEffect != CONST_ME_NONE) {
        Game::addMagicEffect(spectators, tile->getPosition(), params.impactEffect);
    }
*/

And put this at the end of Combat::doAreaCombat
C++:
    for (Tile* tile : tiles) {
        if (canDoCombat(caster, tile, params.aggressive) != RETURNVALUE_NOERROR) {
            continue;
        }

    
       if (params.impactEffect != CONST_ME_NONE) {
           Game::addMagicEffect(spectators, tile->getPosition(), params.impactEffect);
       }
    }

But for me it looks like it's already in correct order 🤔
I wouldn't be surprised if CIP client had some logic to render these in reversed order or even some flag to render on top.
if we do that, spells like utevo lux and others loose the blue/green/red effect, so we need to change:
C++:
/*
    if (params.impactEffect != CONST_ME_NONE) {
        Game::addMagicEffect(spectators, tile->getPosition(), params.impactEffect);
    }
*/

to

C++:
    if (params.impactEffect == CONST_ME_MAGIC_BLUE || params.impactEffect == CONST_ME_MAGIC_RED || params.impactEffect == CONST_ME_MAGIC_GREEN) {
        Game::addMagicEffect(spectators, tile->getPosition(), params.impactEffect);
    }
 
if we do that, spells like utevo lux and others loose the blue/green/red effect, so we need to change:
C++:
/*
    if (params.impactEffect != CONST_ME_NONE) {
        Game::addMagicEffect(spectators, tile->getPosition(), params.impactEffect);
    }
*/

to

C++:
    if (params.impactEffect == CONST_ME_MAGIC_BLUE || params.impactEffect == CONST_ME_MAGIC_RED || params.impactEffect == CONST_ME_MAGIC_GREEN) {
        Game::addMagicEffect(spectators, tile->getPosition(), params.impactEffect);
    }
Thanks You. Sorry yo quote it here but do You know hiwnto make poison condition like in tibia 7.4 i ask it to you because you have posted many solutions for old tibia
Would you mind sharing this?
 
Thanks You. Sorry yo quote it here but do You know hiwnto make poison condition like in tibia 7.4 i ask it to you because you have posted many solutions for old tibia
Would you mind sharing this?
What do you mean? When step poison has green rings effect and no damage?
 
yes and only use the first step as attack damage
I really can't help you about it, what I do is not what you want and maybe even not a correct fix, I call it as "momentary solution"., but if u want, I can try to share(forgot from where i got it)

I think we need to create a github to help us to share all fix, maybe its a good solution, using nekiro 7.72 as main.

I dont own a server, but I like to do ot things
 
I really can't help you about it, what I do is not what you want and maybe even not a correct fix, I call it as "momentary solution"., but if u want, I can try to share(forgot from where i got it)

I think we need to create a github to help us to share all fix, maybe its a good solution, using nekiro 7.72 as main.

I dont own a server, but I like to do ot things

lets just wait @Nekiro to release new updated downgrade, we can always dream 🥺
 
have a repository up to date but it has outfit buggy( can't change them) i think i can fix it. but haven't had time yet due to university
a new git repository would be a nice idea. pm me. also im interested in your fix. could you share?
have outdated repo which im working on and the up to date one which haven't added any fix yet
 
Back
Top