creio que seu npc não tenha nenhum erro...
já testou com outro distro?
info
Grupo: Herói
Registrado: 20/05/10
Posts: 3.4k
Reputação: +1.5k
Gênero: Masculino

creio que seu npc não tenha nenhum erro...
já testou com outro distro?
info
Grupo: Barão
Registrado: 01/06/10
Posts: 230
Reputação: +25

não, + se for problema de source prefiro passa pro xml
tbm achei estranho, n vi nada errado, sendo q tem outros npc
do msm jeito, e funciona, exemplo:
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
local talkState = {}
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
local shopModule = ShopModule:new()
npcHandler:addModule(shopModule)
shopModule:addBuyableItem({'meat'}, 2666, 5, 'meat')
shopModule:addBuyableItem({'fish'}, 2667, 5, 'fish')
shopModule:addBuyableItem({'salmon'}, 2668, 5, 'salmon')
shopModule:addBuyableItem({'ham'}, 2671, 8, 'ham')
shopModule:addBuyableItem({'dragon ham'}, 2672, 20, 'dragon ham')
shopModule:addBuyableItem({'pear'}, 2673, 4, 'pear')
shopModule:addBuyableItem({'red apple'}, 2674, 3, 'red apple')
shopModule:addBuyableItem({'orange'}, 2675, 10, 'orange')
shopModule:addBuyableItem({'banana'}, 2676, 3, 'banana')
shopModule:addBuyableItem({'blueberry'}, 2677, 1, 'blueberry')
shopModule:addBuyableItem({'cherry'}, 2679, 1, 'cherry')
shopModule:addBuyableItem({'strawberry'}, 2680, 1, 'strawberry')
shopModule:addBuyableItem({'grape'}, 2680, 3, 'grape')
shopModule:addBuyableItem({'melon'}, 2682, 8, 'melon')
shopModule:addBuyableItem({'pumpkin'}, 2683, 10, 'pumpkin')
shopModule:addBuyableItem({'carrot'}, 2684, 3, 'carrot')
shopModule:addBuyableItem({'tomato'}, 2685, 5, 'tomato')
shopModule:addBuyableItem({'corncob'}, 2686, 3, 'corncob')
shopModule:addBuyableItem({'cookie'}, 2687, 2, 'cookie')
shopModule:addBuyableItem({'bread'}, 2689, 4, 'bread')
shopModule:addBuyableItem({'roll'}, 2690, 2, 'roll')
shopModule:addBuyableItem({'brown bread'}, 2691, 3, 'brown bread')
shopModule:addBuyableItem({'egg'}, 2695, 2, 'egg')
shopModule:addBuyableItem({'white mushroom'}, 2787, 6, 'white mushroom')
shopModule:addBuyableItem({'red mushroom'}, 2788, 12, 'red mushroom')
shopModule:addBuyableItem({'brown mushroom'}, 2789, 10, 'brown mushroom')
shopModule:addBuyableItem({'valentine cake'}, 6393, 6, 'valentine cake')
shopModule:addBuyableItem({'cookbook'}, 2347, 150, 'cookbook')
npcHandler:addModule(FocusModule:new())
info
Grupo: Herói
Registrado: 20/05/10
Posts: 3.4k
Reputação: +1.5k
Gênero: Masculino

mais esses outros npc não tem nenhum suporte pelo xml?
muito estranho mesmo
info
Grupo: Barão
Registrado: 01/06/10
Posts: 230
Reputação: +25

não, todos são iguais, e redireciona do msm jeito.
unica solução é passa pra xml,de todos npc q vende isso :withstupidsmiley:
obrigado pela atenção
info
Grupo: Barão
Registrado: 01/06/10
Posts: 230
Reputação: +25
bom, quando o player vai compra 1 item, somente 1, vem 2 item na backpack.
não quero usa só no XML, por que esse script é a base de todos npc de tools do meu ot.
local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) local talkState = {} 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 local shopModule = ShopModule:new() npcHandler:addModule(shopModule) shopModule:addBuyableItem({'Mecanical Fishing Rod'}, 10223, 5000, 'Mecanical Fishing Rod') shopModule:addBuyableItem({'Orange Backpack'}, 10519, 500, 'Orange Backpack') shopModule:addBuyableItem({'Orange Bag'}, 10520, 100, 'Orange Bag') shopModule:addBuyableItem({'brown bag'}, 1987, 20, 'brown bag') shopModule:addBuyableItem({'brown backpack'}, 1988, 20, 'brown backpack') shopModule:addBuyableItem({'brocade backpack'}, 9774, 20, 'brocade backpack') shopModule:addBuyableItem({'green bag'}, 1991, 5, 'green bag') shopModule:addBuyableItem({'yellow bag'}, 1992, 5, 'yellow bag') shopModule:addBuyableItem({'red bag'}, 1993, 5, 'red bag') shopModule:addBuyableItem({'purple bag'}, 1994, 5, 'purple bag') shopModule:addBuyableItem({'blue bag'}, 1995, 5, 'blue bag') shopModule:addBuyableItem({'grey bag'}, 1996, 5, 'grey bag') shopModule:addBuyableItem({'golden bag'}, 1997, 5, 'golden bag') shopModule:addBuyableItem({'green backpack'}, 1998, 20, 'green backpack') shopModule:addBuyableItem({'yellow backpack'}, 1999, 20, 'yellow backpack') shopModule:addBuyableItem({'red backpack'}, 2000, 20, 'red backpack') shopModule:addBuyableItem({'purple backpack'}, 2001, 20, 'purple backpack') shopModule:addBuyableItem({'blue backpack'}, 2002, 20, 'blue backpack') shopModule:addBuyableItem({'grey backpack'}, 2003, 20, 'grey backpack') shopModule:addBuyableItem({'golden backpack'}, 2004, 20, 'golden backpack') shopModule:addBuyableItem({'beach backpack'}, 5949, 20, 'beach backpack') shopModule:addBuyableItem({'beach bag'}, 5950, 20, 'beach bag') shopModule:addBuyableItem({'camouflage bag'}, 3939, 20, 'camouflage bag') shopModule:addBuyableItem({'camouflage backpack'}, 3940, 20, 'camouflage backpack') shopModule:addBuyableItem({'fur backpack'}, 7342, 20, 'fur backpack') shopModule:addBuyableItem({'fur bag'}, 7343, 20, 'fur bag') shopModule:addBuyableItem({'rope'}, 2120, 50, 'rope') shopModule:addBuyableItem({'scythe'}, 2550, 50, 'scythe') shopModule:addBuyableItem({'pick'}, 2553, 50, 'pick') shopModule:addBuyableItem({'shovel'}, 2554, 50, 'shovel') npcHandler:addModule(FocusModule:new())