• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Shop npc is out of stock?

TibiaFanatic

New Member
Joined
Sep 14, 2020
Messages
22
Reaction score
3
Location
Sweden
I just noticed my npc that sells armor has 0 of an item in stock, does anyone know how to keep the npc's well stocked?
npc script:
Lua:
<?xml version="1.0" encoding="UTF-8"?>
<npc name="Bjorn the Blacksmith" script="default.lua" walkinterval="1500" speed="100" walkradius="2" floorchange="0">
    <health max="100" now="100"/>
    <look type="289" head="38" body="116" legs="97" feet="114" addons="0" mount="0"/>
    <parameters>
        <!--KEYWORDS-->
        <parameter key="module_keywords" value="1"/>
        <parameter key="keywords" value="hi"/>
        <parameter key="keyword_reply1" value="Greetings!"/>
        <!--SHOP-->
        <parameter key="module_shop" value="1"/>
        <parameter key="shop_buyable" value="chainarmor,2464,200;brassarmor,2465,450;soldierhelmet,2481,110;coppershield,2530,50;plateshield,2510,125;steelshield,2509,240;woodenshield,2512,15;broadsword,2413,500;dagger,2379,10;longsword,2397,160;axe,2386,20;mace,2398,90"/>
    </parameters>
</npc>
 
It seems they are all like this. Hm, I think I figured it out, if my hunch is correct, I change this value to a higher one to increase the stock?
Lua:
 <parameter key="module_shop" value="1"/>

My reasoning being that the npc's only have 1 of each item.
 
Only 1 way to find out. Just try changing it to 999 or something and see.

Sorry, I use the Nostalrius distro, so it has the old format for NPCs, doesn't consider stock.
 
I just noticed my npc that sells armor has 0 of an item in stock, does anyone know how to keep the npc's well stocked?
npc script:
Lua:
<?xml version="1.0" encoding="UTF-8"?>
<npc name="Bjorn the Blacksmith" script="default.lua" walkinterval="1500" speed="100" walkradius="2" floorchange="0">
    <health max="100" now="100"/>
    <look type="289" head="38" body="116" legs="97" feet="114" addons="0" mount="0"/>
    <parameters>
        <!--KEYWORDS-->
        <parameter key="module_keywords" value="1"/>
        <parameter key="keywords" value="hi"/>
        <parameter key="keyword_reply1" value="Greetings!"/>
        <!--SHOP-->
        <parameter key="module_shop" value="1"/>
        <parameter key="shop_buyable" value="chainarmor,2464,200;brassarmor,2465,450;soldierhelmet,2481,110;coppershield,2530,50;plateshield,2510,125;steelshield,2509,240;woodenshield,2512,15;broadsword,2413,500;dagger,2379,10;longsword,2397,160;axe,2386,20;mace,2398,90"/>
    </parameters>
</npc>

Item stock is not a feature by default in TFS, unless you are using some modified distro or something has gone terribly wrong in the NPC system, I don't see how this could happen.

Could you post which distro you are using, your scripts/default.lua script, as well as maybe show a screenshot of this (just cuz i'm curious, never heard about this problem before)?
 
shop.PNG

shop2.PNG

Disto? I'm using TFS v:1.2, and the version of Tibia I'm using is 10.98
Post automatically merged:

I figured it out...Turns out, it was me being really stupid. The problem was that I was stressed and as it turned out, I couldn't buy anything because the items weighted to much for the character. Everything works as it should now.
 

Attachments

Last edited:

Similar threads

Back
Top