Postado Abril 30, 2020 5 anos Olá, estou tendo um pequeno problema em meu npc, quando peço trade a ele, ele so aparece um Vial para vender, no caso itens de mesmo ID ele nao replica, como eu poderia estar fazendo para que ele vendesse mais de 1 vial? Citar local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) local talkState = {} local Topic = {} function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end function onThink() npcHandler:onThink() end function onPlayerEndTrade(cid) npcHandler:onPlayerEndTrade(cid) end function onPlayerCloseChannel(cid) npcHandler:onPlayerCloseChannel(cid) end local shopModule = ShopModule:new() npcHandler:addModule(shopModule) shopModule:addBuyableItem({'bread'}, 2689, 3, 1,'bread') shopModule:addBuyableItem({'cheese'}, 2696, 5, 1,'cheese') shopModule:addBuyableItem({'egg'}, 2328, 2, 1,'egg') shopModule:addBuyableItem({'beer'}, 2006, 3, 3, 'mug beer') shopModule:addBuyableItem({'lemonade'}, 2006, 3, 5, 'lemonade') shopModule:addBuyableItem({'milk'}, 2006, 2, 6, 'milk') shopModule:addBuyableItem({'wine'}, 2012, 3, 15, 'wine') shopModule:addBuyableItem({'party cake'}, 6280, 50, 1,'party cake') npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())
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.