--Created with OSM--
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE,COMBAT_ICEDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT,CONST_ME_PURPLEENERGY)
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -1.0, -50000000, 1.6, -55000000)
arr = {
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0},
{0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0},
{0, 0, 0, 1, 1, 3, 1, 1, 0, 0, 0},
{0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0},
{0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
}
local area = createCombatArea(arr)
setCombatArea(combat, area)
function onCastSpell(cid, var)
if getPlayerStorageValue(cid, 378378) >=3 then
doCombat(cid, combat, var)
return true
else
doPlayerSendCancel(cid, "You need to have at least 3 resets to cast this spell.")
return false
end
end
vc tem que garantir que o storage dos resets é esse 378378, de resto tá tudo certo