• 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+ Stun Spell

IgoR lYCAN

New Member
Joined
Dec 1, 2018
Messages
169
Reaction score
4
Hi, I would like to make this spell, this way :

Stun( completly stop the walk from the player ). for 2 seconds,
and cant cast spells for 2 seconds.


Lua:
local combat = createCombatObject()
    setCombatParam(combat, COMBAT_PARAM_BLOCKARMOR, 1)
    setCombatParam(combat, COMBAT_PARAM_BLOCKSHIELD, 1)
    setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
    setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_STUN)
    setCombatFormula(combat, COMBAT_FORMULA_SKILL, 0, 0, 1.0, 0)    

local paralyze = createConditionObject(CONDITION_PARALYZE)
setConditionParam(paralyze, CONDITION_PARAM_TICKS, 2000)
 

local pacified = createConditionObject(CONDITION_PACIFIED)
setConditionParam(pacified, CONDITION_PARAM_TICKS, 2000)

local exhaust = createConditionObject(CONDITION_EXHAUST)
setConditionParam(exhaust, CONDITION_PARAM_TICKS, 2000)

function onCastSpell(cid, var)
    
    local target = getCreatureTarget(cid)
    local speed = getCreatureSpeed(target)
    doChangeSpeed(target, -speed)    
    addEvent(doChangeSpeed, 2000, target, speed)
    doAddCondition(target, paralyze)
    doAddCondition(target, pacified)
    doAddCondition(target, exhaust)
       
    return doCombat(cid, combat, var)
end
 
Solution

Players and creatures will not stop moving without source edits.
Mays well just add the STUN condition from the post above.

Players and creatures will not stop moving without source edits.
Mays well just add the STUN condition from the post above.
 
Solution

Players and creatures will not stop moving without source edits.
Mays well just add the STUN condition from the post above.

Only with source edits, the players can stop moving?

Thanks 4 the answer.
 
Back
Top