local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, TRUE) 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 spellCallbackMort(param) if (isPlayer(param.cid)) == 1 then if(param.hitmin == nil or param.hitmax == nil) then param.hitmin = math.floor(-getPlayerLevel(param.cid) * 0.5 + -getPlayerMagLevel(param.cid) * 1) param.hitmax = math.floor(-getPlayerLevel(param.cid) * 0.7 + -getPlayerMagLevel(param.cid) * 1.2) end if param.count > 0 or math.random(0, 1) == 1 then doAreaCombatHealth(param.cid, COMBAT_DEATHDAMAGE, param.pos, 0, param.hitmin, param.hitmax, CONST_ME_MORTAREA) doSendDistanceShoot(getCreaturePosition(param.cid), param.pos, CONST_ANI_DEATH) end if(param.count < 3) then param.count = param.count + 1 addEvent(spellCallbackMort, math.random(1000, 3000), param) end end end function onTargetTileMort(cid, pos) local param = {} param.cid = cid param.pos = pos param.count = 0 spellCallbackMort(param) end setCombatCallback(combat, CALLBACK_PARAM_TARGETTILE, "onTargetTileMort") function onCastSpell(cid, var) return doCombat(cid, combat, var) end