• 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 Weapon Effect

MopdaAll

New Member
Joined
May 29, 2020
Messages
26
Reaction score
2
1591145635894.png
Lua:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_BLOCKARMOR, 0)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_EXPLOSION)
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, 5)

function onGetFormulaValues(cid, level, maglevel)
    local min = (level / 20) + (maglevel * 5.1) + 36
    local max = (level / 50) + (maglevel * 7.4) + 42
    return -min, -max
end

setCombatCallback(combat, CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues")

function onUseWeapon(cid, var)
    return doCombat(cid, combat, var)
end
How do I remove
Code:
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE)
the effect of it?
I tried to remove that line all together but it wouldn't damage the monster.
 
Solution
remove this line
Lua:
setCombatParam(combat, COMBAT_PARAM_EFFECT, 5)

If its wrong effect go to ur game.cpp and find this:
C++:
        case COMBAT_DEATHDAMAGE: {
            color = TEXTCOLOR_DARKRED;
            effect = CONST_ME_SMALLCLOUDS;
            break;
        }

And remove this:
C++:
effect = CONST_ME_SMALLCLOUDS;
then compile the server again
remove this line
Lua:
setCombatParam(combat, COMBAT_PARAM_EFFECT, 5)

If its wrong effect go to ur game.cpp and find this:
C++:
        case COMBAT_DEATHDAMAGE: {
            color = TEXTCOLOR_DARKRED;
            effect = CONST_ME_SMALLCLOUDS;
            break;
        }

And remove this:
C++:
effect = CONST_ME_SMALLCLOUDS;
then compile the server again
 
Last edited:
Solution
remove this line
Lua:
setCombatParam(combat, COMBAT_PARAM_EFFECT, 5)

If its wrong effect go to ur game.cpp and find this:
C++:
        case COMBAT_DEATHDAMAGE: {
            color = TEXTCOLOR_DARKRED;
            effect = CONST_ME_SMALLCLOUDS;
            break;
        }

And remove this:
C++:
effect = CONST_ME_SMALLCLOUDS;
then compile the server again
thanks
 
Back
Top