function onCastSpell(cid, var) if getPlayerStorageValue(cid,11487) >= 1 then -- storage 11487 return doCombat(cid, acombat, var) else doPlayerSendCancel(cid, "Desculpe,Só jogadores Vips usam está magia.") end return TRUE end
sua spell
local acombat = createCombatObject()
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_BLOCKARMOR, 0)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_FIRE)
function getCombatFormulas(cid, lv, maglv)
local formula_min = -((lv*1.5 + maglv*3) * 1.8)
local formula_max = -((lv*1.5 + maglv*3) * 2)
if(formula_max < formula_min) then
local tmp = formula_max
formula_max = formula_min
formula_min = tmp
end
return formula_min, formula_max
end
local arr = {
{0, 1, 1, 1, 1, 1, 0},
{1, 1, 1, 1, 1, 1, 1},
{1, 1, 1, 1, 1, 1, 1},
{1, 1, 1, 3, 1, 1, 1},
{1, 1, 1, 1, 1, 1, 1},
{1, 1, 1, 1, 1, 1, 1},
{0, 1, 1, 1, 1, 1, 0}
}
local area = createCombatArea(arr)
setCombatArea(acombat, area)
function onTargetTile(cid, pos)
doCombat(cid,combat,positionToVariant(pos))
end
setCombatCallback(combat, CALLBACK_PARAM_LEVELMAGICVALUE, "getCombatFormulas")
setCombatCallback(acombat, CALLBACK_PARAM_TARGETTILE, "onTargetTile")
function onCastSpell(cid, var)
if getPlayerStorageValue(cid,11487) >= 1 then
return doCombat(cid, acombat, var)
else
doPlayerSendCancel(cid, "Desculpe,Só jogadores Vips usam está magia.")
end
return TRUE
end



info
Grupo: Campones
Registrado: 25/11/06
Posts: 12
Reputação: +1
como faço para por x storage nessa spell? vi uns topicos por ai, tentanto arrumar mas não deu!
local acombat = createCombatObject()
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_BLOCKARMOR, 0)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_FIRE)
function getCombatFormulas(cid, lv, maglv)
local formula_min = -((lv*1.5 + maglv*3) * 1.8)
local formula_max = -((lv*1.5 + maglv*3) * 2)
if(formula_max < formula_min) then
local tmp = formula_max
formula_max = formula_min
formula_min = tmp
end
return formula_min, formula_max
end
local arr = {
{0, 1, 1, 1, 1, 1, 0},
{1, 1, 1, 1, 1, 1, 1},
{1, 1, 1, 1, 1, 1, 1},
{1, 1, 1, 3, 1, 1, 1},
{1, 1, 1, 1, 1, 1, 1},
{1, 1, 1, 1, 1, 1, 1},
{0, 1, 1, 1, 1, 1, 0}
}
local area = createCombatArea(arr)
setCombatArea(acombat, area)
function onTargetTile(cid, pos)
doCombat(cid,combat,positionToVariant(pos))
end
setCombatCallback(combat, CALLBACK_PARAM_LEVELMAGICVALUE, "getCombatFormulas")
setCombatCallback(acombat, CALLBACK_PARAM_TARGETTILE, "onTargetTile")
function onCastSpell(cid, var)
return doCombat(cid, acombat, var)
end