Ir para conteúdo
  • 0

[AJUDA] [ COMO RETIRAR STORAGE DA MAGIA]


Dalia

Pergunta

Olá amigos, tudo bem ?

Estou iniciando o projeto do meu server, e estou na parte de magias, eu queria tirar os storages de algumas magias que tem no servidor, alguem poderia me ajudar?
já fiz de tudo mas sempre da erro, existe varias magias que eram compradas no site da base que to usando, e quero retirar elas para deixar para qualquer player.

obrigado desde já.

 

Spoiler

 

local combat1 = createCombatObject()
setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat1, COMBAT_PARAM_EFFECT, 4)
setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -1.2, -30, -1.6, 0)

local combat2 = createCombatObject()
setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE)
setCombatParam(combat2, COMBAT_PARAM_EFFECT, CONST_ME_FIREAREA)
setCombatFormula(combat2, COMBAT_FORMULA_LEVELMAGIC, -1.3, -40, -1.7, 0)

local condition1 = createConditionObject(CONDITION_CURSED)
setConditionParam(condition1, CONDITION_PARAM_DELAYED, 1)
addDamageCondition(condition1, 10, 2000, -50)
setCombatCondition(combat1, condition1)

local condition2 = createConditionObject(CONDITION_CURSED)
setConditionParam(condition2, CONDITION_PARAM_DELAYED, 1)
addDamageCondition(condition2, 10, 2000, -150)
setCombatCondition(combat2, condition2)

local arr1 = {
{0, 0, 0, 1, 0, 0, 0},
{0, 0, 1, 0, 1, 0, 0},
{0, 1, 0, 0, 0, 1, 0},
{1, 0, 0, 3, 0, 0, 1},
{0, 1, 0, 0, 0, 1, 0},
{0, 0, 1, 0, 1, 0, 0},
{0, 0, 0, 1, 0, 0, 0}
}
local arr2 = {
{0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 1, 0, 0, 0},
{0, 0, 1, 1, 1, 0, 0},
{0, 1, 1, 3, 1, 1, 0},
{0, 0, 1, 1, 1, 0, 0},
{0, 0, 0, 1, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0}
}

local area1 = createCombatArea(arr1)
local area2 = createCombatArea(arr2)

setCombatArea(combat1, area1)
setCombatArea(combat2, area2)

local function onCastSpell2(parameters)
doCombat(parameters.cid, parameters.combat2, parameters.var)
end

function onCastSpell(cid, var)
local parameters = { cid = cid, var = var, combat2 = combat2}
    timeatual = os.time()
    if (getPlayerStorageValue(cid, 870001) == -1) then 
       if getCreatureMaxMana(cid) ~= getCreatureMana(cid) then
            exhausted = exhaust(cid, 880001, 5)
            if (exhausted == 0) then
                    doPlayerSendCancel(cid, "You need wait 30 seconds for use spell.")
                return 1
            end
            doPlayerRemoveManaPercent(cid, -40)
            doCombat(cid, combat1, var)
            addEvent(onCastSpell2, 250, parameters)
            addEvent(onCastSpell3, 500, parameters)
        else
            doPlayerSendCancel(cid, "You do not have enough mana.")
        end
    else
        doPlayerSendTextMessage(cid, 19, 'Voce não pode usar esta SPELL. Para usa-la deve adquirir em nosso shop.')
        doPlayerSendTextMessage(cid, 19, 'Verifique mais infos em nosso site http://toran.com.br.')
    end
end

 

 

Link para o comentário
Compartilhar em outros sites

3 respostass a esta questão

Posts Recomendados

  • 0
 local combat1 = createCombatObject()
setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat1, COMBAT_PARAM_EFFECT, 4)
setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -1.2, -30, -1.6, 0)

local combat2 = createCombatObject()
setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE)
setCombatParam(combat2, COMBAT_PARAM_EFFECT, CONST_ME_FIREAREA)
setCombatFormula(combat2, COMBAT_FORMULA_LEVELMAGIC, -1.3, -40, -1.7, 0)

local condition1 = createConditionObject(CONDITION_CURSED)
setConditionParam(condition1, CONDITION_PARAM_DELAYED, 1)
addDamageCondition(condition1, 10, 2000, -50)
setCombatCondition(combat1, condition1)

local condition2 = createConditionObject(CONDITION_CURSED)
setConditionParam(condition2, CONDITION_PARAM_DELAYED, 1)
addDamageCondition(condition2, 10, 2000, -150)
setCombatCondition(combat2, condition2)

local arr1 = {
{0, 0, 0, 1, 0, 0, 0},
{0, 0, 1, 0, 1, 0, 0},
{0, 1, 0, 0, 0, 1, 0},
{1, 0, 0, 3, 0, 0, 1},
{0, 1, 0, 0, 0, 1, 0},
{0, 0, 1, 0, 1, 0, 0},
{0, 0, 0, 1, 0, 0, 0}
}
local arr2 = {
{0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 1, 0, 0, 0},
{0, 0, 1, 1, 1, 0, 0},
{0, 1, 1, 3, 1, 1, 0},
{0, 0, 1, 1, 1, 0, 0},
{0, 0, 0, 1, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0}
}

local area1 = createCombatArea(arr1)
local area2 = createCombatArea(arr2)

setCombatArea(combat1, area1)
setCombatArea(combat2, area2)

local function onCastSpell2(parameters)
doCombat(parameters.cid, parameters.combat2, parameters.var)
end

function onCastSpell(cid, var)
local parameters = { cid = cid, var = var, combat2 = combat2}
    timeatual = os.time()
       if getCreatureMaxMana(cid) ~= getCreatureMana(cid) then
            exhausted = exhaust(cid, 880001, 5)
            if (exhausted == 0) then
                    doPlayerSendCancel(cid, "You need wait 30 seconds for use spell.")
                return 1
            end
            doPlayerRemoveManaPercent(cid, -40)
            doCombat(cid, combat1, var)
            addEvent(onCastSpell2, 250, parameters)
            addEvent(onCastSpell3, 500, parameters)
        else
            doPlayerSendCancel(cid, "You do not have enough mana.")
        end
   end 

 

Link para o comentário
Compartilhar em outros sites

×
×
  • Criar Novo...