felipedorgas 25 Postado Setembro 1, 2010 Share Postado Setembro 1, 2010 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()) Link para o comentário https://xtibia.com/forum/topic/140500-probleminha-no-npc/ Compartilhar em outros sites More sharing options...
Vodkart 1515 Postado Setembro 1, 2010 Share Postado Setembro 1, 2010 creio que seu npc não tenha nenhum erro... já testou com outro distro? Link para o comentário https://xtibia.com/forum/topic/140500-probleminha-no-npc/#findComment-927471 Compartilhar em outros sites More sharing options...
felipedorgas 25 Postado Setembro 1, 2010 Autor Share Postado Setembro 1, 2010 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()) Link para o comentário https://xtibia.com/forum/topic/140500-probleminha-no-npc/#findComment-927474 Compartilhar em outros sites More sharing options...
Vodkart 1515 Postado Setembro 1, 2010 Share Postado Setembro 1, 2010 mais esses outros npc não tem nenhum suporte pelo xml? muito estranho mesmo Link para o comentário https://xtibia.com/forum/topic/140500-probleminha-no-npc/#findComment-927482 Compartilhar em outros sites More sharing options...
felipedorgas 25 Postado Setembro 1, 2010 Autor Share Postado Setembro 1, 2010 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 Link para o comentário https://xtibia.com/forum/topic/140500-probleminha-no-npc/#findComment-927490 Compartilhar em outros sites More sharing options...
Posts Recomendados