darknelson
Member
- Joined
- Jun 19, 2011
- Messages
- 190
- Solutions
- 1
- Reaction score
- 15
hey brothers please, help me with this
im trying my spell hit always the same, but not work when i hit, its spoff and fails and then sometimes return attack good
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_BLOCKSHIELD, true)
combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGYARROW)
function onGetFormulaValues(player, skill, attack, fightMode)
local base = 80
local variation = 20
local formula = 3 * player:getMagicLevel() + (2 * player:getLevel())
local damage = formula * base / 100
damage = damage * attack / 25
return (250)*-1,(350)*-1
end
combat:setCallback(CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues")
function onCastSpell(creature, variant)
return combat:execute(creature, variant)
end
im trying my spell hit always the same, but not work when i hit, its spoff and fails and then sometimes return attack good