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

SPELL THAT CHANGES TARGET OUTFIT

Vandryx

New Member
Joined
Apr 29, 2019
Messages
5
Reaction score
1
Hello family,
Today i i'll ask your help with this target spell.

I want that spell paralyze and change the target looktype for 6 seconds when it casts.


Here's the code;


Lua:
    local combat1 = createCombatObject()
    setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
    setCombatParam(combat1, COMBAT_PARAM_DISTANCEEFFECT, 29)
    setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, 0, 0, 0, 0)

    local combat2 = createCombatObject()
    setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
    setCombatParam(combat2, COMBAT_PARAM_DISTANCEEFFECT, 29)
    setCombatFormula(combat2, COMBAT_FORMULA_LEVELMAGIC, 0, 0, 0, 0)

    local combat3 = createCombatObject()
    setCombatParam(combat3, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
    setCombatParam(combat3, COMBAT_PARAM_DISTANCEEFFECT, 29)
    setCombatFormula(combat3, COMBAT_FORMULA_LEVELMAGIC, 0, 0, 0, 0)

    local combat4 = createCombatObject()
    setCombatParam(combat4, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
    setCombatParam(combat4, COMBAT_PARAM_DISTANCEEFFECT, 29)
    setCombatFormula(combat4, COMBAT_FORMULA_LEVELMAGIC, 0, 0, 0, 0)

    local combat5 = createCombatObject()
    setCombatParam(combat5, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
    setCombatParam(combat5, COMBAT_PARAM_DISTANCEEFFECT, 29)
    setCombatFormula(combat5, COMBAT_FORMULA_LEVELMAGIC, 0, 0, 0, 0)

    local combat6 = createCombatObject()
    setCombatParam(combat6, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
    setCombatParam(combat6, COMBAT_PARAM_DISTANCEEFFECT, 29)
    setCombatFormula(combat6, COMBAT_FORMULA_LEVELMAGIC, 0, 0, 0, 0)

    local combat7 = createCombatObject()
    setCombatParam(combat7, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
    setCombatParam(combat7, COMBAT_PARAM_DISTANCEEFFECT, 29)
    setCombatFormula(combat7, COMBAT_FORMULA_LEVELMAGIC, 0, 0, 0, 0)

    local condition = createConditionObject(CONDITION_PARALYZE)
    setConditionParam(condition, CONDITION_PARAM_TICKS, 20000)
    --setConditionParam(condition, CONDITION_PARAM_SPEED, -20)
    setConditionFormula(condition, -0.9, 0, -0.9, 0)
    setCombatCondition(combat7, condition)

    arr1 = {
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    }

    arr2 = {
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    }


    arr3 = {
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    }


    arr4 = {
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    }

    arr5 = {
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    }

    arr6 = {
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    }

    arr7 = {
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    }



    local area1 = createCombatArea(arr1)
    local area2 = createCombatArea(arr2)
    local area3 = createCombatArea(arr3)
    local area4 = createCombatArea(arr4)
    local area5 = createCombatArea(arr5)
    local area6 = createCombatArea(arr6)
    local area7 = createCombatArea(arr7)
    setCombatArea(combat1, area1)
    setCombatArea(combat2, area2)
    setCombatArea(combat3, area3)
    setCombatArea(combat4, area4)
    setCombatArea(combat5, area5)
    setCombatArea(combat6, area6)
    setCombatArea(combat7, area7)

    local function onCastSpell1(parameters)
    doCombat(parameters.cid, combat1, parameters.var)
    end

    local function onCastSpell2(parameters)
    doCombat(parameters.cid, combat2, parameters.var)
    end
    local function onCastSpell3(parameters)
    doCombat(parameters.cid, combat3, parameters.var)
    end

    local function onCastSpell4(parameters)
    doCombat(parameters.cid, combat4, parameters.var)
    end

    local function onCastSpell5(parameters)
    doCombat(parameters.cid, combat5, parameters.var)
    end

    local function onCastSpell6(parameters)
    doCombat(parameters.cid, combat6, parameters.var)
    end
    local function onCastSpell7(parameters)
    doCombat(parameters.cid, combat7, parameters.var)
    end


    function onCastSpell(cid, var)
    local parameters = { cid = cid, var = var}
    mayNotMove(cid, TRUE)
    addEvent(onCastSpell1, 100, parameters)
    addEvent(onCastSpell2, 600, parameters)
    addEvent(onCastSpell3, 1100, parameters)
    addEvent(onCastSpell4, 1600, parameters)
    addEvent(onCastSpell6, 2100, parameters)
    addEvent(onCastSpell7, 2600, parameters)
    addEvent(mayNotMove, 2600, cid, FALSE)

    return TRUE
    end
 
Last edited:
this should work for you
Code:
    local combat1 = createCombatObject()
    setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
    setCombatParam(combat1, COMBAT_PARAM_DISTANCEEFFECT, 29)
    setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, 0, 0, 0, 0)

    local combat2 = createCombatObject()
    setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
    setCombatParam(combat2, COMBAT_PARAM_DISTANCEEFFECT, 29)
    setCombatFormula(combat2, COMBAT_FORMULA_LEVELMAGIC, 0, 0, 0, 0)

    local combat3 = createCombatObject()
    setCombatParam(combat3, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
    setCombatParam(combat3, COMBAT_PARAM_DISTANCEEFFECT, 29)
    setCombatFormula(combat3, COMBAT_FORMULA_LEVELMAGIC, 0, 0, 0, 0)

    local combat4 = createCombatObject()
    setCombatParam(combat4, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
    setCombatParam(combat4, COMBAT_PARAM_DISTANCEEFFECT, 29)
    setCombatFormula(combat4, COMBAT_FORMULA_LEVELMAGIC, 0, 0, 0, 0)

    local combat5 = createCombatObject()
    setCombatParam(combat5, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
    setCombatParam(combat5, COMBAT_PARAM_DISTANCEEFFECT, 29)
    setCombatFormula(combat5, COMBAT_FORMULA_LEVELMAGIC, 0, 0, 0, 0)

    local combat6 = createCombatObject()
    setCombatParam(combat6, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
    setCombatParam(combat6, COMBAT_PARAM_DISTANCEEFFECT, 29)
    setCombatFormula(combat6, COMBAT_FORMULA_LEVELMAGIC, 0, 0, 0, 0)

    local combat7 = createCombatObject()
    setCombatParam(combat7, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
    setCombatParam(combat7, COMBAT_PARAM_DISTANCEEFFECT, 29)
    setCombatFormula(combat7, COMBAT_FORMULA_LEVELMAGIC, 0, 0, 0, 0)

    local outfit = createConditionObject(CONDITION_OUTFIT)
    setConditionParam(outfit, CONDITION_PARAM_TICKS, 6000)

    local condition = createConditionObject(CONDITION_PARALYZE)
    setConditionParam(condition, CONDITION_PARAM_TICKS, 20000)
    --setConditionParam(condition, CONDITION_PARAM_SPEED, -20)
    setConditionFormula(condition, -0.9, 0, -0.9, 0)
    setCombatCondition(combat7, condition)

    arr1 = {
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    }

    arr2 = {
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    }


    arr3 = {
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    }


    arr4 = {
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    }

    arr5 = {
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    }

    arr6 = {
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    }

    arr7 = {
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    }



    local area1 = createCombatArea(arr1)
    local area2 = createCombatArea(arr2)
    local area3 = createCombatArea(arr3)
    local area4 = createCombatArea(arr4)
    local area5 = createCombatArea(arr5)
    local area6 = createCombatArea(arr6)
    local area7 = createCombatArea(arr7)
    setCombatArea(combat1, area1)
    setCombatArea(combat2, area2)
    setCombatArea(combat3, area3)
    setCombatArea(combat4, area4)
    setCombatArea(combat5, area5)
    setCombatArea(combat6, area6)
    setCombatArea(combat7, area7)

    local function onCastSpell1(parameters)
    doCombat(parameters.cid, combat1, parameters.var)
    end

    local function onCastSpell2(parameters)
    doCombat(parameters.cid, combat2, parameters.var)
    end
    local function onCastSpell3(parameters)
    doCombat(parameters.cid, combat3, parameters.var)
    end

    local function onCastSpell4(parameters)
    doCombat(parameters.cid, combat4, parameters.var)
    end

    local function onCastSpell5(parameters)
    doCombat(parameters.cid, combat5, parameters.var)
    end

    local function onCastSpell6(parameters)
    doCombat(parameters.cid, combat6, parameters.var)
    end
    local function onCastSpell7(parameters)
    doCombat(parameters.cid, combat7, parameters.var)
    end


    function onCastSpell(cid, var)
    local parameters = { cid = cid, var = var}
    mayNotMove(cid, TRUE)
    addEvent(onCastSpell1, 100, parameters)
    addEvent(onCastSpell2, 600, parameters)
    addEvent(onCastSpell3, 1100, parameters)
    addEvent(onCastSpell4, 1600, parameters)
    addEvent(onCastSpell6, 2100, parameters)
    addEvent(onCastSpell7, 2600, parameters)
    addEvent(mayNotMove, 2600, cid, FALSE)
    setConditionParam(outfit, CONDITION_PARAM_OUTFIT, 32)
    return TRUE
    end
the outfit will be changed to dog anyway
 
Hello family,
Today i i'll ask your help with this target spell.

I want that spell paralyze and change the target looktype for 6 seconds when it casts.


Here's the code;


Lua:
    local combat1 = createCombatObject()
    setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
    setCombatParam(combat1, COMBAT_PARAM_DISTANCEEFFECT, 29)
    setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, 0, 0, 0, 0)

    local combat2 = createCombatObject()
    setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
    setCombatParam(combat2, COMBAT_PARAM_DISTANCEEFFECT, 29)
    setCombatFormula(combat2, COMBAT_FORMULA_LEVELMAGIC, 0, 0, 0, 0)

    local combat3 = createCombatObject()
    setCombatParam(combat3, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
    setCombatParam(combat3, COMBAT_PARAM_DISTANCEEFFECT, 29)
    setCombatFormula(combat3, COMBAT_FORMULA_LEVELMAGIC, 0, 0, 0, 0)

    local combat4 = createCombatObject()
    setCombatParam(combat4, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
    setCombatParam(combat4, COMBAT_PARAM_DISTANCEEFFECT, 29)
    setCombatFormula(combat4, COMBAT_FORMULA_LEVELMAGIC, 0, 0, 0, 0)

    local combat5 = createCombatObject()
    setCombatParam(combat5, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
    setCombatParam(combat5, COMBAT_PARAM_DISTANCEEFFECT, 29)
    setCombatFormula(combat5, COMBAT_FORMULA_LEVELMAGIC, 0, 0, 0, 0)

    local combat6 = createCombatObject()
    setCombatParam(combat6, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
    setCombatParam(combat6, COMBAT_PARAM_DISTANCEEFFECT, 29)
    setCombatFormula(combat6, COMBAT_FORMULA_LEVELMAGIC, 0, 0, 0, 0)

    local combat7 = createCombatObject()
    setCombatParam(combat7, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
    setCombatParam(combat7, COMBAT_PARAM_DISTANCEEFFECT, 29)
    setCombatFormula(combat7, COMBAT_FORMULA_LEVELMAGIC, 0, 0, 0, 0)

    local condition = createConditionObject(CONDITION_PARALYZE)
    setConditionParam(condition, CONDITION_PARAM_TICKS, 20000)
    --setConditionParam(condition, CONDITION_PARAM_SPEED, -20)
    setConditionFormula(condition, -0.9, 0, -0.9, 0)
    setCombatCondition(combat7, condition)

    arr1 = {
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    }

    arr2 = {
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    }


    arr3 = {
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    }


    arr4 = {
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    }

    arr5 = {
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    }

    arr6 = {
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    }

    arr7 = {
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    }



    local area1 = createCombatArea(arr1)
    local area2 = createCombatArea(arr2)
    local area3 = createCombatArea(arr3)
    local area4 = createCombatArea(arr4)
    local area5 = createCombatArea(arr5)
    local area6 = createCombatArea(arr6)
    local area7 = createCombatArea(arr7)
    setCombatArea(combat1, area1)
    setCombatArea(combat2, area2)
    setCombatArea(combat3, area3)
    setCombatArea(combat4, area4)
    setCombatArea(combat5, area5)
    setCombatArea(combat6, area6)
    setCombatArea(combat7, area7)

    local function onCastSpell1(parameters)
    doCombat(parameters.cid, combat1, parameters.var)
    end

    local function onCastSpell2(parameters)
    doCombat(parameters.cid, combat2, parameters.var)
    end
    local function onCastSpell3(parameters)
    doCombat(parameters.cid, combat3, parameters.var)
    end

    local function onCastSpell4(parameters)
    doCombat(parameters.cid, combat4, parameters.var)
    end

    local function onCastSpell5(parameters)
    doCombat(parameters.cid, combat5, parameters.var)
    end

    local function onCastSpell6(parameters)
    doCombat(parameters.cid, combat6, parameters.var)
    end
    local function onCastSpell7(parameters)
    doCombat(parameters.cid, combat7, parameters.var)
    end


    function onCastSpell(cid, var)
    local parameters = { cid = cid, var = var}
    mayNotMove(cid, TRUE)
    addEvent(onCastSpell1, 100, parameters)
    addEvent(onCastSpell2, 600, parameters)
    addEvent(onCastSpell3, 1100, parameters)
    addEvent(onCastSpell4, 1600, parameters)
    addEvent(onCastSpell6, 2100, parameters)
    addEvent(onCastSpell7, 2600, parameters)
    addEvent(mayNotMove, 2600, cid, FALSE)

    return TRUE
    end
This spell is messed up dude. It would be best to rewrite the spell, what do you want it to do? I don't see why you are setting an area with no effect and only sending to the space the player is standing on.

But here's an idea on how to rewrite it much cleaner:
Lua:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, 29)
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, 0, 0, 0, 0)
setCombatArea(combat, createCombatArea({{3}}))

local condition = createConditionObject(CONDITION_PARALYZE)
setConditionParam(condition, CONDITION_PARAM_TICKS, 20000)
setConditionParam(condition, CONDITION_PARAM_SPEED, -20)
setConditionFormula(condition, -0.9, 0, -0.9, 0)
setCombatCondition(combat, condition)

function repeatSpell(cid, var, count)
    count = count - 1
    if count < 1 then
        mayNotMove(cid, FALSE)
        return
    end

    doCombat(cid, combat, var)
    addEvent(repeatSpell, 500, cid, var, count)
end

function onCastSpell(cid, var)
    if doCombat(cid, combat, var) then
        mayNotMove(cid, TRUE)
        repeatSpell(cid, var, 6)
        return TRUE
    end
    return FALSE
end
 
This spell is messed up dude. It would be best to rewrite the spell, what do you want it to do? I don't see why you are setting an area with no effect and only sending to the space the player is standing on.

But here's an idea on how to rewrite it much cleaner:
Lua:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, 29)
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, 0, 0, 0, 0)
setCombatArea(combat, createCombatArea({{3}}))

local condition = createConditionObject(CONDITION_PARALYZE)
setConditionParam(condition, CONDITION_PARAM_TICKS, 20000)
setConditionParam(condition, CONDITION_PARAM_SPEED, -20)
setConditionFormula(condition, -0.9, 0, -0.9, 0)
setCombatCondition(combat, condition)

function repeatSpell(cid, var, count)
    count = count - 1
    if count < 1 then
        mayNotMove(cid, FALSE)
        return
    end

    doCombat(cid, combat, var)
    addEvent(repeatSpell, 500, cid, var, count)
end

function onCastSpell(cid, var)
    if doCombat(cid, combat, var) then
        mayNotMove(cid, TRUE)
        repeatSpell(cid, var, 6)
        return TRUE
    end
    return FALSE
end
add the outfit you will find it in my script instead of rewriting so the thread can be closed
 
add the outfit you will find it in my script instead of rewriting so the thread can be closed
Problem is if you set the condition to a global combat variable it will always have that condition for any following uses until script is reloaded. Instead of the last combat only having the condition. Which I don't know old TFS functions enough to add the condition manually without adding it to the combat. I guess making only one separate combat for only the paralyze and outfit would work best.
 
This is a bad idea because if the player dies and doesn't log in he could be stuck unable to move until you fix his character.
 
This is a bad idea because if the player dies and doesn't log in he could be stuck unable to move until you fix his character.
Completely false, outfit conditions are always temporary. An example is utevo res ina, temporarily gives your character a monster outfit, when you relog or die it does not stay after relog.
 
it still does not solve, I managed to make it change the outfit of my character when the spell casts, but the target outfit does not change ...
 
Completely false, outfit conditions are always temporary. An example is utevo res ina, temporarily gives your character a monster outfit, when you relog or die it does not stay after relog.

mayNotMove(cid, TRUE)
mayNotMove(cid, FALSE)
 
Back
Top