antiblock
Elveron
  • Chatbox

    Did you check out our Discord? https://discord.gg/FFdvMjk9xA
    You don't have permission to chat.
    Load More
Sign in to follow this  
Art2

Ajuda Quest Função

4 posts in this topic

Olá, alguém poderia me ajudar com uma quest que o npc pede 5 itens destintos e em troca ele te dar um outro item.

 

Ex: Você tem que entregar ao npc os seguintes itens (id): 19, 18, 17, 16, 15 e em troca ele te da o item (id): 21

 

alguem poderia me ajudar? +1+1+1+1+1 

Share this post


Link to post
Share on other sites
antiblock
Rodnia | Alpha & Omega
quest trocar begin	state start begin				when xxx.chat."Trocar" begin			say("texto")					local esc = select ("sim" , "Nao")                  if esc == 1 then                       pc.remove_item(item1, 1)                       pc.remove_item(item2, 1)                       pc.remove_item(item3, 1)                       pc.remove_item(item4, 1)                       pc.remove_item(item5, 1)                       pc.give_item2("item_dar", 1)                  else                      say("texto")			endendend

Experimenta feita agora não testei.

Share this post


Link to post
Share on other sites

Xingy12 nessa quest ele so entrega o item_dar, se o player tiver todos os 5itens né ?

Share this post


Link to post
Share on other sites

Xingy12 nessa quest ele so entrega o item_dar, se o player tiver todos os 5itens né ?

 

 

Para isso é mais isto:

quest trocar begin	state start begin				when xxx.chat."Trocar" begin			say("texto")					local esc = select ("sim" , "Nao")                  if esc == 1 then                           if pc.count_item(xxxx)==0 or pc.count_item(xxxx)==0 or pc.count_item(xxxx)==0 or pc.count_item(xxxx)==0 or pc.count_item(xxxx)==0 then                           say("Estão items em falta")                         else                                                      pc.remove_item(item1, 1)                       pc.remove_item(item2, 1)                       pc.remove_item(item3, 1)                       pc.remove_item(item4, 1)                       pc.remove_item(item5, 1)                       pc.give_item2("item_dar", 1)                  endelse                      say("texto")			endendend

se for preciso entregar os 5 itens para ganhar o prêmio é preciso colocar and no lugar de or

Share this post


Link to post
Share on other sites
Sign in to follow this