βŁά©Ќ§†ŏ®ε™ 145 Posted March 30, 2015 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: Share this post Link to post Share on other sites
0 NewWars 875 Posted March 30, 2015 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
0 βŁά©Ќ§†ŏ®ε™ 145 Posted March 30, 2015 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 Tyler Durden 556 Posted March 30, 2015 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 βŁά©Ќ§†ŏ®ε™ 145 Posted March 30, 2015 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 Tyler Durden 556 Posted March 30, 2015 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 βŁά©Ќ§†ŏ®ε™ 145 Posted March 30, 2015 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 NewWars 875 Posted March 30, 2015 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
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:
Share this post
Link to post
Share on other sites