Ir para conteúdo

Npc Nao Compra O Item


gabdi

Posts Recomendados

Alguem poderia me ajudar no seguinte problema???

meu NPC Fiona que compra pele de bichos (minoleather, ape fur, bat wing) nao esta conseguindo compra qualquer item q esteja com 2 ou mais...( se eu separar na bp somente 1 minoleather, ai sim consigo vende, mas se eu tiver 2 ou mais (tudo junto) ela nao consegue compra e diz q eu nao tenhu o item...

Abaixo meu Fiona.lua

 

<?xml version="1.0" encoding="UTF-8"?>

<npc name="Fiona" script="data/npc/scripts/default.lua" walkinterval="2000" floorchange="0">

<health now="200" max="200"/>

<look type="139" head="20" body="39" legs="45" feet="7" addons="2"/>

<parameters>

<parameter key="module_shop" value="1"/>

<parameter key="shop_sellable" value="

Ape Fur,5883,120;

Bat Wing,5894,100;

Bear Paw,5896,300;

Behemoth Claw,5930,1000;

Beholder Eye,5898,1000;

Blue Note,2349,1000;

Blue poc,5912,1000;

Brown poc,5913,100;

Brutus Bloodbeard's Hat,6099,1000000;

Burning Heart,2353,100000;

Cat's Paw,5480,100000;

Chicken Feather,5890,100;

Cobrafang Dagger,2351,100000;

Countess Sorrow's Frozen Tear,6536,5000;

Crystal Arrow,2352,5000;

Deadeye Devious'Eye Patch,6102,100000;

Demon Dust,5906,3000;

Demon Horn,5954,3000;

Demonic Essence,6500,1000;

Dracola's Eye,6546,100000;

Dragon Claw,5919,100000;

Energy Soil,8303,10000;

Eternal Flames,8304,5000;

Eye Patch,6102,500;

Ferumbras'Hat,5903,200000;

Fighting Spirit,5884,60000;

Fish Fin,5895,2000;

Flawless Ice Crystal,8300,1000;

Gear Wheel,9690,1000;

Giant Spider Silk,5879,5000;

Gland,8971,1000;

Glimmering Soil,8299,1000;

Glob of Acid Slime,9967,100;

Glob of Mercury,9966,100;

Glob of Tar,9968,100;

Green Dragon Leather,5877,120;

Green Dragon Scale,5920,100;

Green Piece of Cloth,5910,1000;

Gold Ingot,9971,10000;

Handmaiden's Protector,6539,50000;

Hardened Bone,5925,1000;

Heaven Blossom,5921,100;

Holy Orchid,5922,1000;

Honeycomb,5902,100;

Hook,6097,500;

Huge Chunk of Crude Iron,5892,10000;

Hydra Egg,4850,1000;

Iced Soil,8302,1000;

Imperor's Trident,6534,500000;

Iron Ore,5880,1000;

Lethal Lissy's Shirt,6100,50000;

Lizard Leather,5876,150;

Lizard Scale,5881,120;

Magic Sulphur,5904,12000;

Mandrake,5015,300000;

Minotaur Leather,5878,1000;

Morgaroth's Heart,5943,30000;

Mother Soil,8305,1000;

Mr. Punish's Handcuffs,6537,100000;

Nails,8309,100;

Natural Soil,8298,1000;

Nose Ring,5804,100000;

Ornamented Ankh,2354,5000;

Orshabaal's Brain,5808,50000;

Peg Leg,6126,500;

Perfect Behemoth Fang,5893,1000;

Piece of Draconian Steel,5889,10000;

Piece of Hell Steel,5888,10000;

Piece of Massacre's Shell,6540,500000;

Plasmother's Remains,6535,50000;

Pure Energy,8306,20000;

Red Dragon Leather,5948,100;

Red Dragon Scale,7314,200;

Red Piece of Cloth,5911,1000;

Ron the Ripper's Sabre,6101,100000;

Royal Steel,5887,10000;Seeds,7732,500;

Shard,7290,1000;

Sniper Gloves,5875,3000;

Soul Orb,5944,300;

Soul Stone,5809,100000;

Sword Hilt,2350,150000;

The Ring of the Count,8752,10000;

Turtle Shell,5899,150;

Vampire Dust,5905,1000;

Vampiric Crest,9955,10000;

Warrior's Sweat,5885,15000;

White Piece of Cloth,5909,1000;

Wolf Paw,5897,100;

Yellow Piece of Cloth,5914,1000;"/>

<parameter key="shop_buyable" value="obsidian knife,5908,20000;blessed wooden stake,5942,25000;rust remover,9930,500;"/>

</parameters>

</npc>

 

 

(OBS: o npc esta vendendo esses 3 itens normalmente... mas nada de compra os outros itens)

Editado por gabdi
Link para o comentário
Compartilhar em outros sites

  • 2 weeks later...

c ta flando issoo... pu tah??

os items relacionado a cima... estao para p npc comprar do player...

nao sou lerdo a ponto de inverter....

e outra

o npc so compra se for 1 carga.. (ex: 1 minoleather)

se for mais de 1 juntos... ele nao compra e fala q eu n tenhu o item..

--'

Link para o comentário
Compartilhar em outros sites

meu OTserver tinha o mesmo problema, ai achei o script do npc que compra vials e percebi que só ele comprava em + que um por vez.

 

Está aqui o Script

local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
-- OTServ event handling functions start
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
-- OTServ event handling functions end
npcHandler:addModule(FocusModule:new())

 

Não sei se ai vai mudar alguma coisa mas aqui funcionou só depois que mudei...

Se nao sabe adicionar copia e cola algum script la e poe no xml do npc em vez de default.lua poe o nome que voce quizer do codigo que te passei ^^

Link para o comentário
Compartilhar em outros sites

×
×
  • Criar Novo...