Ir para conteúdo
  • Cadastre-se

(Resolvido)Colocar storage e exausted nessa script


Ir para solução Resolvido por .Smile,

Posts Recomendados

12 minutos atrás, leozincorsair disse:

Deu esse erro :

 

 

Screenshot_44.png

o teu da esse erro

 

Screenshot_45.png

 

Arrumei o Código quanto percebi mas você já tinha pego com o erro, pega o código lá de cima de novo eu editei.

20 minutos atrás, mullino disse:

?

o meu tava errado @.Smile ???

 

Não porém o seu é menos otimizado e tem 1 linha que não faz parte do exhaustion que resultou nesse erro, de qualquer forma eu também cometi um erro no meu código mas já concertei, ninguém é perfeito soakpkosa.

Screenshot_45.png

Editado por .Smile (veja o histórico de edições)
Link para o post
Compartilhar em outros sites
  • Respostas 8
  • Created
  • Última resposta

Top Posters In This Topic

Top Posters In This Topic

Popular Posts

@leozincorsair testa ai local combat1 = createCombatObject() setCombatParam(combat1, COMBAT_PARAM_HITCOLOR, COLOR_ORANGE) setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -110.0, 0, -125.0, 0) local combat2 = createCombatObject() setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatParam(combat2, COMBAT_PARAM_EFFECT, 301) local combat3 = createCombatObject() setCombatParam(combat3, COMBAT_PARAM_TYPE

local combat1 = createCombatObject() setCombatParam(combat1, COMBAT_PARAM_HITCOLOR, COLOR_ORANGE) setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -110.0, 0, -125.0, 0) local combat2 = createCombatObject() setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatParam(combat2, COMBAT_PARAM_EFFECT, 301) local combat3 = createCombatObject() setCombatParam(combat3, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) set

Posted Images

7 minutos atrás, .Smile disse:

Arrumei o Código quanto percebi mas você já tinha pego com o erro, pega o código lá de cima de novo eu editei.

Não porém o seu é menos otimizado e tem 1 linha que não faz parte do exhaustion que resultou nesse erro

 

 

Obrigado mano ! <3

Link para o post
Compartilhar em outros sites
7 horas atrás, .Smile disse:

Não porém o seu é menos otimizado e tem 1 linha que não faz parte do exhaustion que resultou nesse erro, de qualquer forma eu também cometi um erro no meu código mas já concertei, ninguém é perfeito soakpkosa.

obrigago @.Smile estou tentando aprender mecher com as funçoes de tibia lua mas ta osso kkk

Link para o post
Compartilhar em outros sites
  • 3 weeks later...
Citar

local combat1 = createCombatObject()
setCombatParam(combat1, COMBAT_PARAM_HITCOLOR, COLOR_ORANGE)
setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -110.0, 0, -125.0, 0)

local combat2 = createCombatObject()
setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat2, COMBAT_PARAM_EFFECT, 301)

local combat3 = createCombatObject()
setCombatParam(combat3, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat3, COMBAT_PARAM_EFFECT, 301)

local combat4 = createCombatObject()
setCombatParam(combat4, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat4, COMBAT_PARAM_EFFECT, 301)

local combat5 = createCombatObject()
setCombatParam(combat5, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat5, COMBAT_PARAM_EFFECT, 301)


arr1 = {
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 1, 1, 1, 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, 2, 1, 1, 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, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0},
{0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0},
{0, 0, 1, 0, 0, 2, 0, 0, 1, 0, 0},
{0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0},
{0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 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},
}

arr5 = {
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0},
{0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0},
{0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0},
{0, 1, 0, 0, 0, 2, 0, 0, 0, 1, 0},
{0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0},
{0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0},
{0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
}

local area1 = createCombatArea(arr1)
local area2 = createCombatArea(arr2)
local area3 = createCombatArea(arr3)
local area4 = createCombatArea(arr4)
local area5 = createCombatArea(arr5)

setCombatArea(combat1, area1)
setCombatArea(combat2, area2)
setCombatArea(combat3, area3)
setCombatArea(combat4, area4)
setCombatArea(combat5, area5)

local function onCastSpell1(parameters)
    return isCreature(parameters.cid) and doCombat(parameters.cid, parameters.combat1, parameters.var)
end

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

local function onCastSpell3(parameters)
    return isCreature(parameters.cid) and doCombat(parameters.cid, parameters.combat3, parameters.var)
end

local function onCastSpell4(parameters)
    return isCreature(parameters.cid) and doCombat(parameters.cid, parameters.combat4, parameters.var)
end

local function onCastSpell5(parameters)
    return isCreature(parameters.cid) and doCombat(parameters.cid, parameters.combat5, parameters.var)
end

function onCastSpell(cid, var)
local waittime = 1 -- Tempo de exhaustion
local storage = 5948

if exhaustion.check(cid, storage) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Aguarde 1 segundo para usar a spell novamente.")
return false
end
local parameters = { cid = cid, var = var, combat1 = combat1, combat2 = combat2, combat3 = combat3, combat4 = combat4, combat5 = combat5 }
addEvent(onCastSpell1, 0, parameters)    
addEvent(onCastSpell2, 0, parameters)
addEvent(onCastSpell3, 150, parameters)
addEvent(onCastSpell4, 300, parameters)
addEvent(onCastSpell5, 450, parameters)
exhaustion.set(cid, storage, waittime)
if not isPlayer(parameters.cid) then return true end
return true
end

Teste aí.

Link para o post
Compartilhar em outros sites

Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emojis são permitidos.

×   Seu link foi automaticamente incorporado.   Mostrar como link

×   Seu conteúdo anterior foi restaurado.   Limpar o editor

×   Não é possível colar imagens diretamente. Carregar ou inserir imagens do URL.

  • Quem Está Navegando   0 membros estão online

    Nenhum usuário registrado visualizando esta página.

  • Estatísticas dos Fóruns

    96842
    Tópicos
    519594
    Posts



×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo