Salvus
Well-Known Member
- Joined
- Feb 7, 2019
- Messages
- 102
- Solutions
- 1
- Reaction score
- 69
How can i make this spell throw bolts, arrows or spears?
I need to add something like combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, 1) ?
I dont want the param_effect i want to trow arrows and not some magic effect
Code:
local combat = Combat()
combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_HOLYDAMAGE)
combat:setParameter(COMBAT_PARAM_EFFECT, 18)
combat:setParameter(COMBAT_PARAM_BLOCKARMOR, true)
combat:setParameter(COMBAT_PARAM_USECHARGES, true)
combat:setArea(createCombatArea(AREA_WAVE3))
function onGetFormulaValues(player, skill, attack, factor)
local min = (player:getLevel() / 0.1) + (skill * attack * 0.03) + 7
local max = (player:getLevel() / 0.1) + (skill * attack * 0.05) + 3
return -min, -max
end
combat:setCallback(CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues")
function onCastSpell(creature, variant)
return combat:execute(creature, variant)
end
I need to add something like combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, 1) ?
I dont want the param_effect i want to trow arrows and not some magic effect