SpartacusWaR 2 Posted October 22, 2017 Estou colocando a quest do armazém mas preciso que ela apareça somente se o usuário tiver um item no inventario. if id_idem == id_idem.inventario then quest stash begin state start begin --Status when nothing is open .................. end -- end_of_state: use end -- end_of_quest end obs... só estou na dúvida no if para verificar se o usuário possui o item no inventario: caso ela tenha a quest vai aparecer! Alguém pode me ajudar? Share this post Link to post Share on other sites
…Los† 236 Posted October 22, 2017 if pc.count_item (ID DO ITEM) >= 1 then Usa essa linha de comando para verificar se tem o item. 1 SpartacusWaR reacted to this Share this post Link to post Share on other sites
SpartacusWaR 2 Posted October 22, 2017 Eu repensei e achei melhor criar ela para não funcionar se o usuário estiver no mapa vip. quest armazem_portatil begin state start begin when 40004.use begin say("Deseja abrir o Armazem?") local armazem = select("Sim","Fechar") if pc.get_map_index() != 215 then if armazem == 1 then syschat("Abriu o armazem") game.open_safebox() setskin(NOWINDOW) return end if armazem == 2 then return end else syschat("Não pode abrir o armazem no mapa vip") return end end end end pode verificar se estou fazendo corretamente? Share this post Link to post Share on other sites
…Los† 236 Posted October 23, 2017 Bom por partes.. na vdd essa quest não funciona.. ---------------------------------------------- --Nome: Armazem --Criador: Lost --Destinatário: CyberGamers --(Lua) Source Code ---------------------------------------------- quest armazem_portatil begin state start begin when 40004.use begin local map = pc.get_map_index() say("Deseja abrir o Armazem?") local armazem = select("Sim","Fechar") if armazem == 1 then if map == 21 then syschat("Você não pode abrir aqui.") return end syschat("Abriu o armazem") game.open_safebox() setskin(NOWINDOW) return end end -- w end -- s end -- q De nada... onde esta o 21 altera para o mapa que vc quiser. 1 SpartacusWaR reacted to this Share this post Link to post Share on other sites