Ir para conteúdo
  • Cadastre-se

(Resolvido)Remover repetição de fala


Ir para solução Resolvido por Dwarfer,

Posts Recomendados

Eu tenho essa parte de codigo no meu login.lua, o problema é que repete 5x a fala quando loga, tem como ser apenas 1 vez, e de preferencia animetext, tipo de magia.

 

        for i = 1, 5 do 
  if getPlayerLevel(cid) < 250 then
    doPlayerAddBlessing(cid, i)
    doPlayerSendTextMessage(cid, 20, "Blessings free up to level 250.")

end

Link para o post
Compartilhar em outros sites
  • Solução
-- ASSIM

if getPlayerLevel(cid) < 250 then
doPlayerSendTextMessage(cid, 20, "Blessings free up to level 250.")
for i = 1, 5 do 
    doPlayerAddBlessing(cid, i)
end
end

-- OU ASSIM

if getPlayerLevel(cid) < 250 then
doSendAnimatedText(getPlayerPosition(cid), "Bless!", COLOR_ORANGE)
for i = 1, 5 do 
    doPlayerAddBlessing(cid, i)
end
end

 

 

 

 

Contato:

 

Link para o post
Compartilhar em outros sites
59 minutos atrás, Dwarfer disse:

-- ASSIM

if getPlayerLevel(cid) < 250 then
doPlayerSendTextMessage(cid, 20, "Blessings free up to level 250.")
for i = 1, 5 do 
    doPlayerAddBlessing(cid, i)
end
end

-- OU ASSIM

if getPlayerLevel(cid) < 250 then
doSendAnimatedText(getPlayerPosition(cid), "Bless!", COLOR_ORANGE)
for i = 1, 5 do 
    doPlayerAddBlessing(cid, i)
end
end

 

 

 

 

 

obrigado, eu so fiz uma pequena adaptação q n comentei

 

if (string.find(tostring(getCreatureName(cid)),"Account Manager")) or getPlayerGroupId(cid) >= 3 then
    return true
    end
    	if getPlayerLevel(cid) < 250 then
        doCreatureSay(cid, "you have blessings free to level 250!", TALKTYPE_ORANGE_1)
for i = 1, 5 do 
    doPlayerAddBlessing(cid, i)
end
end

 

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.

×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo