Thorn
Spriting since 2013
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
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: