Ziggy
Member
- Joined
- Aug 11, 2007
- Messages
- 49
- Reaction score
- 6
I am using TFS 0.3.6pl1 and all my shop npcs wont sell me anything, no matter if i have a bag or a backpack in my hand or if i put the money in my hand or what, i have enough money but everything is greyed out and when clicked nothing happens, ive tried putting the items in the xml file a few different ways and in the lua file a few different ways, here is an example of my rook armor shop keeper
xml file
the studded shield does not even show up in the list
heres the lua file
and the wooden shield does not even show up either on the list of buyable or sellable items, just like the studded shield
so it seems like the only way to do it is to do it like
thats the only way to get the items to actually show up on the list but i cant buy them
and in config.lua i have banksystem set to false so its not that
EDIT--The shopkeepers wont buy anything off of me either, even though I have it
i can do this though, i have over 8 gold but
i can do this though
18:52 Tommy [4]: buy coat
18:52 Shay: Do you want to buy 1 coat for 8 gold coins?
18:52 Tommy [4]: yes
18:52 Shay: Sorry, you don't have enough money.
EDIT--I figured it out, my items.xml file was bad somehow.
xml file
Code:
<?xml version="1.0" encoding="UTF-8"?>
<npc name="Shay" script="data/npc/scripts/default.lua" walkinterval="2000" floorchange="0">
<health now="150" max="150"/>
<look type="143" head="114" body="82" legs="43" feet="114" addons="3" corpse="2212"/>
<parameters>
<parameter key="module_shop" value="1"/>
<parameter key="shop_sellable" value="chain armor,2464,40;doublet,2485,3;leather armor,2467,5;studded armor,2484,10;leather boots,2643,2;brass helmet,2460,22;chain helmet,2458,12;leather helmet,2461,3;legion helmet,2480,22;studded helmet,2482,20;viking helmet,2473,25;leather legs,2649,2;studded legs,2468,15;brass shield,2511,25;copper shield,2530,50;plate shield,2510,40;"/>
<parameter key="shop_buyable" value="coat,2651,8;doublet,2485,16;jacket,2650,10;leather armor,2467,25;chain helmet,2458,52;leather helmet,2461,12;studded helmet,2482,63;leather legs,2649,10"/>
<parameter key="message_greet" value="Hello |PLAYERNAME|. Take a look at my wares, I have much to {offer}."/>
<parameter key="message_sendtrade" value="Go ahead and have a look at the list!"/>
<parameter key="message_oncloseshop" value="I hope you found what you wanted! Come back again!"/>
</parameters>
<interaction>
<!--armor list-->
<item keywords="studded shield" id="2526" sellprice="50" buyprice="16"/>
</interaction>
</npc>
the studded shield does not even show up in the list
heres the lua file
Code:
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
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({'wooden shield'}, 2512, 15, 'wooden shield')
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())
and the wooden shield does not even show up either on the list of buyable or sellable items, just like the studded shield
so it seems like the only way to do it is to do it like
Code:
parameter key="module_shop" value="1"/>
<parameter key="shop_sellable" value="chain armor,2464,40
thats the only way to get the items to actually show up on the list but i cant buy them
and in config.lua i have banksystem set to false so its not that
EDIT--The shopkeepers wont buy anything off of me either, even though I have it
i can do this though, i have over 8 gold but
i can do this though
18:52 Tommy [4]: buy coat
18:52 Shay: Do you want to buy 1 coat for 8 gold coins?
18:52 Tommy [4]: yes
18:52 Shay: Sorry, you don't have enough money.
EDIT--I figured it out, my items.xml file was bad somehow.
Last edited: