• 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!

NPC dosent work

Snach

Sensei
Joined
Aug 8, 2009
Messages
1,694
Reaction score
84
Location
Estonia
I can see what npc is selling in trade window but i can't buy anything.
Npc script:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<npc name="Dufi the amulet master" script="data/npc/scripts/default.lua" walkinterval="2000" floorchange="0">
    <health now="100" max="100"/>
    <look type="194" head="114" body="94" legs="94" feet="57"/>
    <parameters> 
        <parameter key="module_shop" value="1"/> 
        <parameter key="shop_buyable" value="amulet of loss,2173,20000;amulet of loss,2133,3560;dragon necklace,2201,400;garlic necklace,2199,400;golden amulet,2130,6600;scarf,2661,100;bronze amulet,2172,400;elven amulet,2198,500;protection amulet,2200,400;silver amulet,2170,400;stone skin amulet,2197,2500;strange talisman,2161,400"/>
        <parameter key="shop_sellable" value="amulet of loss,2173,20000;crystal necklace,2125,400;ruby necklace,2133,2000;wolf tooth chain,2129,100;dragon necklace,2201,100;garlic necklace,2199,100;ancient amulet,2142,1000;scarab amulet,2135,1000;demonbone amulet,2136,32000;golden amulet,2130,3000;star amulet,2131,1500;platinum amulet,2171,2500;scarf,2661,50;broken amulet,2196,50000;bronze amulet,2172,100;elven amulet,2198,200;terra amulet,7887,1500;glacier amulet,7888,1500;lightning pendant,7889,1500;magma amulet,7890,1500;amulet,10218,5000;scared tree amulet,10291,5000;leviathan's amulet,10220,5000;shockwave amulet,10221,5000;protection amulet,2200,100;silver amulet,2170,100;stone skin amulet,2197,1000;strange talisman,2161,100"/> 
    </parameters> 
</npc>

Maybe something is wrong in default?
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

npcHandler:addModule(FocusModule:new())
 
tfs version, what exactly you mean with " i can't buy anything "

i can see this when i trade with npc. i have eunogh money to buy everything but i just cant buy :D
tfs should be the latest version :)
bugy.png
 
Update coins in your items.xml
Code:
	<item id="2148" article="a" name="gold coin" plural="gold coins">
		<attribute key="weight" value="10" />
[B][COLOR="Red"]		<attribute key="worth" value="1" />[/COLOR][/B]
	</item>
...
	<item id="2152" article="a" name="platinum coin" plural="platinum coins">
		<attribute key="weight" value="10" />
[B][COLOR="Red"]		<attribute key="worth" value="100" />[/COLOR][/B]
	</item>
...	<item id="2160" article="a" name="crystal coin" plural="crystal coins">
		<attribute key="weight" value="10" />
[COLOR="Red"][B]		<attribute key="worth" value="10000" />[/B][/COLOR]
	</item>
 
Back
Top