Ir para conteúdo

Featured Replies

Postado

.

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

Meu Servidor Minecraft : Ip - Skylowcraft.minecraftbr.net:25585 = Servidor 24hrs Sem Lag , Sem Hackers (1.7.2) Servidor De Fullpvp e Survival - Vamos Colocar Minigames!.

Resolvido por otteN

Ir para solução
  • Respostas 7
  • Visualizações 642
  • 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)

Nem todo loop infinito é ruim ;P 

User *eu = new User("otteN");
RepSystem<User> *myRep = new RepSystem<User>("jóinha");
myRep->setAlvo(eu);

/* só por ser criado já sou o melhor membro */ 

while(eu->isMelhorMembro()){
myRep->reputar();
}

 

Postado
  • Autor
3 minutos atrás, 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.

Meu Servidor Minecraft : Ip - Skylowcraft.minecraftbr.net:25585 = Servidor 24hrs Sem Lag , Sem Hackers (1.7.2) Servidor De Fullpvp e Survival - Vamos Colocar Minigames!.

Postado
2 horas atrás, 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

 

Nem todo loop infinito é ruim ;P 

User *eu = new User("otteN");
RepSystem<User> *myRep = new RepSystem<User>("jóinha");
myRep->setAlvo(eu);

/* só por ser criado já sou o melhor membro */ 

while(eu->isMelhorMembro()){
myRep->reputar();
}

 

Postado
  • Autor
12 minutos atrás, 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

Meu Servidor Minecraft : Ip - Skylowcraft.minecraftbr.net:25585 = Servidor 24hrs Sem Lag , Sem Hackers (1.7.2) Servidor De Fullpvp e Survival - Vamos Colocar Minigames!.

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