gohamvsgoku
Member
- Joined
- Aug 21, 2017
- Messages
- 151
- Reaction score
- 9
Lua:
local combat = Combat()
combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_HEALING)
combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_GREEN)
combat:setParameter(COMBAT_PARAM_DISPEL, CONDITION_PARALYZE)
combat:setParameter(COMBAT_PARAM_AGGRESSIVE, false)
function onGetFormulaValues(player, level, maglevel)
local base = 120
local variation = 40
local value = math.random(-variation, variation) + base
local formula = 3 * maglevel + (2 * level)
return formula * value / 100
end
combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues")
function onCastSpell(creature, variant)
creature:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE)
return combat:execute(creature, variant)
end
i have some problem with this script.
current behavior:
when player(1) use exura sio on player(2), player(1) receive effect CONST_ME_MAGIC_BLUE and if the player(2) not have full health receive effect CONST_ME_MAGIC_BLUE
but if player(2) have full health receive effect CONST_ME_MAGIC_GREEN.
I watched some videos and the right behavior is
player(2) will receive CONST_ME_MAGIC_GREEN no matter your health.
how can i fix this? (One way I thought, is creating a new COMBAT_HEALING, but can i fix this without this)