EduardoQuintela
New Member
- Joined
- Mar 10, 2014
- Messages
- 27
- Reaction score
- 1
Hello community,
I'm having trouble adding to this spell so I can have an effect on the player, could you help me?
spell works, but I want you to drop an (x) effect on the player you use.
I'm having trouble adding to this spell so I can have an effect on the player, could you help me?
spell works, but I want you to drop an (x) effect on the player you use.
Lua:
local combat = Combat()
combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_HITAREA)
combat:setParameter(COMBAT_PARAM_BLOCKARMOR, true)
combat:setParameter(COMBAT_PARAM_USECHARGES, true)
function onGetFormulaValues(player, skill, attack, factor)
local min = (player:getLevel() / 5) + (skill * attack * 0.02) + 4
local max = (player:getLevel() / 5) + (skill * attack * 0.04) + 9
return -min, -max
end
combat:setCallback(CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues")
function onCastSpell(creature, variant)
return combat:execute(creature, variant)
end