• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Solved spell help distanceskill tfs 1.3

Thorn

Spriting since 2013
Joined
Sep 24, 2012
Messages
2,203
Solutions
1
Reaction score
923
Location
Chile
hello guys, im trying to modify this spell to work with distanceskill but i cant make it work! i have tried making it look like etheral_spear but i cant get any result :(

would be great if anyone can help me with this, i use tfs 1.3
LUA:
local combat = Combat()
combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
combat:setParameter(COMBAT_PARAM_EFFECT, 371)
combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, 81)

function onGetFormulaValues(player, level, skill, attack, factor)
local distanceSkill = player:getEffectiveSkillLevel(SKILL_DISTANCE)
    local min = (level / 2) + (distanceSkill * 35.5) + 25
    local max = (level / 2) + (distanceSkill * 45) + 50
    return -min, -max
end
combat:setCallback(CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues")
local repeatCombats = 10
local executeSpell = function(cid, variant)
    local creature = Creature(cid)
    if creature then
        combat:execute(creature, variant)
    end
end



function onCastSpell(creature, variant)
    local ret = combat:execute(creature, variant)
    if ret then
        for current = 1, (repeatCombats-1) do
            addEvent(executeSpell, 150 * current, creature:getId(), variant)
            local condition = Condition(CONDITION_PARALYZE)
condition:setParameter(CONDITION_PARAM_TICKS, 20000)
condition:setFormula(-1, 80, -1, 80)
combat:addCondition(condition)
        end
    end
    return ret
end
 
Last edited:
Back
Top