antiblock
Rodnia | Alpha & Omega
  • Chatbox

    You don't have permission to chat.
    Load More
  • 0
Sign in to follow this  
βŁά©Ќ§†ŏ®ε™

Quest De Item.

Question

Olá queria pedir se voces tem uma quest que funciona da seguinte maneira.

 

 Que ao entregar por exemplo 2 flores desse um item alternativo de uma lista.

Lista: 1 pérola , 1 Ostra , 1 Arma , 1 armadura

Ao entregar 2 flores a recompensa seria um item alternativo dito em cima.

Agradecia imenso a quem me pudesse ajudar!

Cumprimentos.

:like:  :+1:

 

Share this post


Link to post
Share on other sites

7 answers to this question

  • 0
when NPC_ID.take with item == VNUM    local takeCount = pc.getqf("entregues") + 1    pc.setqf("entregues", takeCount)    if takeCount < 2 then        return    end        pc.setqf("entregues", 0)    local lista = { ID1, ID2, ID3, ID4 }    local rand = number(1, table.getn(lista))        pc.give_item2(lista[rand], 1)end

Share this post


Link to post
Share on other sites
antiblock
https://arwen2.global/
  • 0
when NPC_ID.take with item == VNUM    local takeCount = pc.getqf("entregues") + 1    pc.setqf("entregues", takeCount)    if takeCount < 2 then        return    end        pc.setqf("entregues", 0)    local lista = { ID1, ID2, ID3, ID4 }    local rand = number(1, table.getn(lista))        pc.give_item2(lista[rand], 1)end

Da core dumped

Share this post


Link to post
Share on other sites
  • 0
quest rand begin	state start begin		when NPC_ID.take with item == ID_VNUM begin			local takeCount = pc.getqf("entregues") + 1			pc.setqf("entregues", takeCount)			if takeCount < 2 then				return			end			pc.setqf("entregues", 0)			local lista = { ID1, ID2, ID3, ID4 }			local rand = number(1, table.getn(lista))			pc.give_item2(lista[rand], 1)		end	endend

Share this post


Link to post
Share on other sites
  • 0
quest rand begin	state start begin		when NPC_ID.take with item == ID_VNUM begin			local takeCount = pc.getqf("entregues") + 1			pc.setqf("entregues", takeCount)			if takeCount < 2 then				return			end			pc.setqf("entregues", 0)			local lista = { ID1, ID2, ID3, ID4 }			local rand = number(1, table.getn(lista))			pc.give_item2(lista[rand], 1)		end	endend

 

Modifico como? e que continua a não dar.

NPC_ID = Id no npc

ID_VNUM deixo ou meto o id do item.

"entregues" deixo ou meto o id do item?

{ ID1, ID2, ID3, ID4 } meto o id dos itens que quero por como random

Share this post


Link to post
Share on other sites
  • 0

NPC_ID = Id do NPC

ID_VNUM = ID das flores, ou que quiseres

{ ID1, ID2, ID3, ID4 } = IDs dos itens a serem dados

Share this post


Link to post
Share on other sites
  • 0
quest rand beginstate start beginwhen 30129.take with item == 50160 beginlocal takeCount = pc.getqf("entregues") + 1pc.setqf("entregues", takeCount)if takeCount < 2 thenreturnendpc.setqf("entregues", 0)local lista = { 27992, 27993, 27994, 27991 }local rand = number(1, table.getn(lista))pc.give_item2(lista[rand], 1)endendend

Adicionei tal igual assim e continua-me a não fazer nada ou seja eu a meter o item no npc ele não faz nada.

Ao menos já não dá core dumped ... Mas continua a não estar funcional.

Share this post


Link to post
Share on other sites
  • 0
quest rand beginstate start beginwhen 30129.take with item == 50160 beginlocal takeCount = pc.getqf("entregues") + 1pc.setqf("entregues", takeCount)if takeCount < 2 thenreturnendpc.setqf("entregues", 0)local lista = { 27992, 27993, 27994, 27991 }local rand = number(1, table.getn(lista))pc.give_item2(lista[rand], 1)endendend

Adicionei tal igual assim e continua-me a não fazer nada ou seja eu a meter o item no npc ele não faz nada.

Ao menos já não dá core dumped ... Mas continua a não estar funcional.

 

Substitui item == 50160 por item.vnum == 50160

e antes de pc.setqf("entregues", 0) mete pc.remove_item(item.vnum)

 

 

Cumprimentos.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this