Postado Março 11, 2012 13 anos Autor entao nesse codigo que eu peguei seu ele nao tava funcionando... nao usava a uh ai eu peguei e pus o lvlmagic como queria bom sei la o que eu fiz mais ele ta healando = level 100k de lvl cura 100k de hp queria saber como coloco pra healar em dobro 100k de level = cura 200k de hp essa e a formula que eu editei sua local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_HEALING) setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false) setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, true) setCombatParam(combat, COMBAT_PARAM_DISPEL, CONDITION_PARALYZE) setHealingFormula(combat, COMBAT_FORMULA_LEVELMAGIC, 1, 1, 1, 2.6) function onCastSpell(cid, var) local config = { min = 50, max = 100, health = {2.60, 2.6}, } local x = getPlayerLevel(cid) local min_, max_ = config.min, config.max local health = config.health if health then local hp = math.ceil(math.random(health[1] * x, health[2] * x)) if hp < min_ then hp = math.random(min_, max_) elseif hp > max_ then hp = math.random(max_, max_ + 100) end doCreatureAddHealth(cid, hp) end return doCombat(cid, combat, var) end Editado Março 11, 2012 13 anos por Ryodragon (veja o histórico de edições)
Postado Março 11, 2012 13 anos Tenta assim local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_HEALING) setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false) setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, true) setCombatParam(combat, COMBAT_PARAM_DISPEL, CONDITION_PARALYZE) function onCastSpell(cid, var) local config = { min = 50, max = 100, health = {1.60, 2.6}, } local x = getPlayerLevel(cid) local min_, max_ = config.min, config.max local health = config.health if health then local hp = math.ceil(math.random(health[1] * x, health[2] * x)) if hp < min_ then hp = math.random(min_, max_) elseif hp > max_ then hp = math.random(max_, max_ + 100) end doCreatureAddHealth(cid, hp) end return doCombat(cid, combat, var) end
Postado Março 11, 2012 13 anos Autor Kimos obrigado novamente eu consegui atravez dessa eu tava vendo outros topicos e apliquei essa logica Bom so sei que funciono como eu quero novamente eu agradeço atençao 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, 0) setCombatParam(combat, COMBAT_PARAM_DISPEL, CONDITION_PARALYZE) function getCombatFormulas(cid, lv, maglv) local formula_min = (lv*2.00) local formula_max = (lv*2.00) if(formula_max < formula_min) then local tmp = formula_max formula_max = formula_min formula_min = tmp end return formula_min, formula_max end setCombatCallback(combat, CALLBACK_PARAM_LEVELMAGICVALUE, "getCombatFormulas") function onCastSpell(cid, var) return doCombat(cid, combat, var) end
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.