Ir para conteúdo

Featured Replies

Resolvido por otteN

Ir para solução
  • Respostas 7
  • Visualizações 641
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • tenta: function doSenzuHeal(pid, heal, cooldown) doPlayerAddMana(pid, heal) doCreatureAddHealth(pid, heal) doSendAnimatedText(getPlayerPosition(pid), "+" .. heal, TEXTCOLO

Posted Images

Postado

Fiz aqui, testa para ver se deu certo, só apaga tudo do arquivo do teu script e cola o que eu fiz:

function doSenzuHeal(pid, heal, cooldown)
    doPlayerAddMana(pid, heal)
    doCreatureAddHealth(pid, heal)
    doSendAnimatedText(getPlayerPosition(pid), "+" .. heal, TEXTCOLOR_YELLOW)
    doSendMagicEffect({x = getPlayerPosition(pid).x + 1, y = getPlayerPosition(pid).y + 0, z = getPlayerPosition(pid).z}, 76)
    exhaustion.set(pid, cooldown.storage, cooldown.wait)
end


function onUse(cid, item, fromPosition, itemEx, toposition)
    local config = {
        idSenzu = 2157, --id (configurado no items.xml) do senzu
        cooldown = { 
        storage = 50000, --storage, mexa apenas se souber o que está fazendo para não causar conflitos no servidor
        wait = 1.5 --tempo de cooldown (em segundos)
        },       
        regeneration = 180000 --valor da cura
    }
    if (exhaustion.get(cid, config.cooldown.storage == false)) then
        if (fromPosition.x ~= CONTAINER_POSITION) then
            doSenzuHeal(cid, regeneration, config.cooldown)
        elseif (item.itemid == config.idSenzu) then 
            doSenzuHeal(cid, regeneration, config.cooldown)
        end
    else
        doPlayerSendCancel(cid, "Você está exausto.")
    end 

    return true 
end

 

Editado por otteN (veja o histórico de edições)

Postado
  • Autor
  Em 03/12/2017 em 07:56, otteN disse:

Fiz aqui, testa para ver se deu certo, só apaga tudo do arquivo do teu script e cola o que eu fiz:


function doSenzuHeal(pid, heal, cooldown)
    doPlayerAddMana(pid, heal)
    doCreatureAddHealth(pid, heal)
    doSendAnimatedText(getPlayerPosition(pid), "+" .. heal, TEXTCOLOR_YELLOW)
    doSendMagicEffect({x = getPlayerPosition(pid).x + 1, y = getPlayerPosition(pid).y + 0, z = getPlayerPosition(pid).z}, 76)
    exhaustion.set(pid, cooldown.storage, cooldown.wait)
end


function onUse(cid, item, fromPosition, itemEx, toposition)
    local config = {
        idSenzu = 2157, --id (configurado no items.xml) do senzu
        cooldown = { 
        storage = 50000, --storage, mexa apenas se souber o que está fazendo para não causar conflitos no servidor
        wait = 1.5 --tempo de cooldown (em segundos)
        },       
        regeneration = 180000 --valor da cura
    }
    if (exhaustion.get(cid, config.cooldown.storage == false)) then
        if (fromPosition.x ~= CONTAINER_POSITION) then
            doSenzuHeal(cid, regeneration, config.cooldown)
        elseif (item.itemid == config.idSenzu) then 
            doSenzuHeal(cid, regeneration, config.cooldown)
        end
    else
        doPlayerSendCancel(cid, "Você está exausto.")
    end 

    return true 
end

 

 

Não funciona , fica só falando que estou exausto.

Postado
  Em 03/12/2017 em 08:00, Christinacsa disse:

Não funciona , fica só falando que estou exausto.


 

Foi erro de digitação, tinha feito mto rápido EHAUEHAUAHU, agora vai:

function doSenzuHeal(pid, heal, cooldown)
    doPlayerAddMana(pid, heal)
    doCreatureAddHealth(pid, heal)
    doSendAnimatedText(getPlayerPosition(pid), "+" .. heal, TEXTCOLOR_YELLOW)
    doSendMagicEffect({x = getPlayerPosition(pid).x + 1, y = getPlayerPosition(pid).y + 0, z = getPlayerPosition(pid).z}, 76)
    exhaustion.set(pid, cooldown.storage, cooldown.wait)
end


function onUse(cid, item, fromPosition, itemEx, toposition)
    local config = {
        idSenzu = 2157, --id (configurado no items.xml) do senzu
        cooldown = { 
        storage = 50000, --storage, mexa apenas se souber o que está fazendo para não causar conflitos no servidor
        wait = 1.5 --tempo de cooldown (em segundos)
        },       
        regeneration = 180000 --valor da cura
    }
    if (exhaustion.get(cid, config.cooldown.storage) == false) then
        if (fromPosition.x ~= CONTAINER_POSITION) then
            doSenzuHeal(cid, regeneration, config.cooldown)
        elseif (item.itemid == config.idSenzu) then 
            doSenzuHeal(cid, regeneration, config.cooldown)
        end
    else
        doPlayerSendCancel(cid, "Você está exausto.")
    end 

    return true 
end

 

Postado
  • Autor
  Em 03/12/2017 em 08:06, otteN disse:


 

Foi erro de digitação, tinha feito mto rápido EHAUEHAUAHU, agora vai:


function doSenzuHeal(pid, heal, cooldown)
    doPlayerAddMana(pid, heal)
    doCreatureAddHealth(pid, heal)
    doSendAnimatedText(getPlayerPosition(pid), "+" .. heal, TEXTCOLOR_YELLOW)
    doSendMagicEffect({x = getPlayerPosition(pid).x + 1, y = getPlayerPosition(pid).y + 0, z = getPlayerPosition(pid).z}, 76)
    exhaustion.set(pid, cooldown.storage, cooldown.wait)
end


function onUse(cid, item, fromPosition, itemEx, toposition)
    local config = {
        idSenzu = 2157, --id (configurado no items.xml) do senzu
        cooldown = { 
        storage = 50000, --storage, mexa apenas se souber o que está fazendo para não causar conflitos no servidor
        wait = 1.5 --tempo de cooldown (em segundos)
        },       
        regeneration = 180000 --valor da cura
    }
    if (exhaustion.get(cid, config.cooldown.storage) == false) then
        if (fromPosition.x ~= CONTAINER_POSITION) then
            doSenzuHeal(cid, regeneration, config.cooldown)
        elseif (item.itemid == config.idSenzu) then 
            doSenzuHeal(cid, regeneration, config.cooldown)
        end
    else
        doPlayerSendCancel(cid, "Você está exausto.")
    end 

    return true 
end

 

No distro da errordadadada.thumb.png.3f3f1c1d8c84d38227d8430e31740dc2.png

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

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.6k

Informação Importante

Confirmação de Termo