• 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+ [TFS 1.3] Multiple dispel condition on a spell?

Demnish

Tibian Hero
Joined
Sep 28, 2011
Messages
402
Solutions
2
Reaction score
65
Location
Sweden
I haven't played any 10.98, so I don't know how it should work.
HOWEVER, the healing spells do come with an included "DISPEL CONDITION_PARALYZE" param.

So I'm scratching my head as to why I can only heal Paralyze with Haste and not healing spells.
If this is how it is supposed to be in 10.98 I believe it should be changed in the sources, not much reason to have a DISPEL param if it doesn't work for everything.

Assistance or clarification on this would be valuable.
Itching to change how it currently works, preferably in sources.


EDIT: Seems its not so easy as to add multiple dispel conditions to a spell, since it apparently overwrite each other. 🤣
 
Last edited:
There you go (and all others who wanted to achieve the same, I also needed it now)

I took M4GO loop from here: Lua - TFS 1.2 Removing conditions (https://otland.net/threads/tfs-1-2-removing-conditions.259348/)
and put it inside spell. Works well.

Lua:
local combat = Combat()
combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
combat:setParameter(COMBAT_PARAM_AGGRESSIVE, false)

local conditions = {
    CONDITION_POISON,
    CONDITION_FIRE,
    CONDITION_ENERGY,
    CONDITION_PARALYZE,
    CONDITION_DRUNK,
    CONDITION_DROWN,
    CONDITION_FREEZING,
    CONDITION_DAZZLED,
    CONDITION_BLEEDING
}
                
function onCastSpell(creature, variant)
    for _, condition in ipairs(conditions) do
        if(creature:getCondition(condition)) then
            creature:removeCondition(condition)
        end
    end   
        
    return combat:execute(creature, variant)
end
 
Back
Top