Hola no hablo ingles por fabor ayudenme en esta spell necesito que cada hit que pege dependa del magic lvl que tenga el player por favor heeelp
local combat = createCombatObject()
arr = {
{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},
{0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0},
{0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0},
{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0},
{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0},
{1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1},
{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0},
{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0},
{0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0},
{0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0},
{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},
}
local area = createCombatArea(arr)
setCombatArea(combat, area)
function spellCallback(param)
if param.count > 0 or math.random(1, 1) == 1 then
doSendMagicEffect(param.pos, CONST_ME_BIGCLOUDS)
doAreaCombatHealth(param.cid, COMBAT_ENERGYDAMAGE, param.pos, 0, -2000, -4500, CONST_ME_PURPLEENERGY)
end
if(param.count < 5) then
param.count = param.count + 1
addEvent(spellCallback, math.random(1000, 4000), param)
end
end
function onTargetTile(cid, pos)
local param = {}
param.pos = pos
param.cid = cid
param.pos = pos
param.count = 3
spellCallback(param)
end
setCombatCallback(combat, CALLBACK_PARAM_TARGETTILE, "onTargetTile")
function onCastSpell(cid, var)
return doCombat(cid, combat, var)
end