_Aion_
Nothing Else
@Limos @Printer Someone can help me?
I made this script for heal per stages in percent.
But don't works
you can fix and tell why are the error?
And when i use this spells, i take batle
Healing give batle is tense
I made this script for heal per stages in percent.
But don't works
you can fix and tell why are the error?
Code:
local combat = createCombatObject()
--setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_HEALING)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, 1)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false)
setCombatParam(combat, COMBAT_PARAM_DISPEL, CONDITION_PARALYZE)
local config = {
stage1 = 100000000,
stage2 = 200000000,
stage3 = 300000000,
stage4 = 600000000,
stage5 = 1000000000,
stage6 = 2000000000,
stage7 = 3000000000,
------Porcetagem dos stages-------
percent1 = 6.0, --60%
percent2 = 5.0, --50%
percent3 = 4.0, --40%
percent4 = 3.0, --30%
percent5 = 1.5, --15%
percent6 = 1.0, --10%
percent7 = 0.7 --7%
}
function onCastSpell(cid, var)
if not isPlayer(cid) then return true end
if getCreatureMaxHealth(cid) <= config.stage1 then
doCreatureAddHealth(cid, (getCreatureMaxHealth(cid) / 100) * config.percent1)
elseif getCreatureMaxHealth(cid) >= config.stage2 and getCreatureMaxHealth(cid) < config.stage3 then
doCreatureAddHealth(cid, (getCreatureMaxHealth(cid) / 100) * config.percent2)
elseif getCreatureMaxHealth(cid) >= config.stage3 and getCreatureMaxHealth(cid) < config.stage4 then
doCreatureAddHealth(cid, (getCreatureMaxHealth(cid) / 100) * config.percent3)
elseif getCreatureMaxHealth(cid) >= config.stage4 and getCreatureMaxHealth(cid) < config.stage5 then
doCreatureAddHealth(cid, (getCreatureMaxHealth(cid) / 100) * config.percent4)
elseif getCreatureMaxHealth(cid) >= config.stage5 and getCreatureMaxHealth(cid) < config.stage6 then
doCreatureAddHealth(cid, (getCreatureMaxHealth(cid) / 100) * config.percent5)
elseif getCreatureMaxHealth(cid) >= config.stage6 and getCreatureMaxHealth(cid) < config.stage7 then
doCreatureAddHealth(cid, (getCreatureMaxHealth(cid) / 100) * config.percent6)
elseif getCreatureMaxHealth(cid) >= config.stage7 then
doCreatureAddHealth(cid, (getCreatureMaxHealth(cid) / 100) * config.percent7)
return doCombat(cid, combat, var)
end
And when i use this spells, i take batle
Healing give batle is tense
Last edited: