Ir para conteúdo

Featured Replies

Postado
  • Solução

tenta:

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, config.regeneration, config.cooldown)
elseif (item.itemid == config.idSenzu) then
doSenzuHeal(cid, config.regeneration, config.cooldown)
end
else
doPlayerSendCancel(cid, "Você está exausto.")
end
 
return true
end

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

  • Respostas 7
  • Visualizações 639
  • 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
  • Autor
  Em 03/12/2017 em 08:30, otteN disse:
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, config.regeneration, config.cooldown)
elseif (item.itemid == config.idSenzu) then
doSenzuHeal(cid, config.regeneration, config.cooldown)
end
else
doPlayerSendCancel(cid, "Você está exausto.")
end
 
return true
end

Tem um error quando o jogador , usa invez de regenerarar 180000 ele regenera 200000 porque?

e não funciona a cor.

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

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