• 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 not buying some items

Snow

New Member
Joined
Jan 16, 2008
Messages
381
Reaction score
0
PHP:
<?xml version="1.0" encoding="UTF-8"?>
<npc name="Dufi" 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;ruby necklace,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>

He's not buying any item after the broken amulet.

I also have this bug....

Code:
[26/01/2010 13:58:11] [Error - Npc interface] 
[26/01/2010 13:58:11] data/npc/scripts/default.lua:onThink
[26/01/2010 13:58:11] Description: 
[26/01/2010 13:58:11] data/npc/scripts/default.lua:8: attempt to index a nil value
[26/01/2010 13:58:11] stack traceback:
[26/01/2010 13:58:11] 	data/npc/scripts/default.lua:8: in function <data/npc/scripts/default.lua:8>

[26/01/2010 13:58:11] [Error - Npc interface] 
[26/01/2010 13:58:11] data/npc/scripts/default.lua:onThink
 
Make sure that you added the correct itemIDs in the .xml script
and compare the ItemNames that you wrote here with the names in the
items.xml file. Could be a typing mistake.

Trying out some stuff to help you, be patient :P

UPDATE:

Sorry to dissapoint you, but I added your script and the NPC worked fine.
The trade window worked properly, he bought every single item, correct
amounts of money, everything's fine.

Post your %data/npc/scripts/default.lua , maybe you got a wrong line in there.
 
Last edited:
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())
 
Did you try to sell every item via "Sell itemX" "yes" command or did
you use the "trade" window?
By the way, what distro (server version) do you use?
(Looks like TFS0.3.X)

My last guess is that you modified the npcsystem/ files.
If so then please explain what you did.
 
Nope, the charges are unimportant (worked when I was testing it)

Try to drop and pick up the items again, maybe it will be identified
afterwards.

Seriously, could be anything wrong here :o
 
Back
Top