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

Why doesn't this NPC work?

Muzzy

New Member
Joined
Jul 8, 2008
Messages
125
Reaction score
1
I'm really scratching my head here, and I've tried everything that my miniscule brain is capable of. I can buy all products off him, but he's buying nothing from me. I've tried editing other NPCs to buy what he does, and that works. Why only him?

Code:
<?xml version="1.0" encoding="UTF-8"?>
<npc name="Steve" script="data/npc/scripts/default.lua" walkinterval="2000" floorchange="0">
	<health now="100" max="100"/>
	<look type="132" head="78" body="101" legs="40" feet="132" addons="1"/>
	<parameters>
		<parameter value="Hungry, |PLAYERNAME|?" key="message_greet"/>
		<parameter value="I thought so!" key="message_sendtrade"/>
		<parameter value="Stay healthy." key="message_farewell"/>
		<parameter value="Hope you bought the rotten stock." key="message_walkaway"/>
		<parameter key="module_shop" value="1"/>
		<parameter key="shop_sellable" value="meat,2666,2;salmon,2668,2;ham,2671,4;blueberry,2677,1;cherry,2678,1;carrot,2684,1;cookie,2687,1;bread,2689,2;egg,2328,1;cheese,2696,2"/>
		<parameter key="shop_buyable" value="meat,2666,3;fish,2667,3;salmon,2668,4;ham,2671,5;dragon ham,2672,25;pear,2673,4;red apple,2674,3;orange,2675,5;banana,2676,2;blueberry,2677,1;cherry,2678,1;strawberry,2680,1;grapes,2681,3;melon,2682,8;pumpkin,2683,10;carrot,2684,2;tomato,2685,3;corncob,2686,3;cookie,2687,2;bread,2689,2;roll,2690,2;brown bread,2691,3;egg,2328,2;cheese,2696,4;white mushroom,2787,6;red mushroom,2788,12;brown mushroom,2789,10;mango,5097,8;cake,6278,50;valentine's cake,6393,30;potato,8838,4;plum,8839,3;raspberry,8840,1;lemon,8841,3;cucumber,8842,3;onion,8843,2;jalapeno pepper,8844,2;beetroot,8845,2"/>
	</parameters>
</npc>

This might also be useful to include:
2qtfn0k.png


Not sure why the shop_sellable looks like that, and not in a straight line like shop_buyable, but I can't change it, and it looks normal in the .doc.

Thanks in advance, this is really confusing to me,
~Muzzy
 
Hi Muzzy,

Not sure exactly why it's not working. I avoid the XML based buy/sell system.

One thing I think you might like to try is re-ordering your list. I don't know if it's going to be a problem or not but in your list 'bread' comes before 'brown bread'. As I can't see any other problems, try this instead;

Code:
<parameter key="shop_buyable" value="meat,2666,3;fish,2667,3;salmon,2668,4;dragon ham,2672,25;ham,2671,5;pear,2673,4;red apple,2674,3;orange,2675,5;banana,2676,2;blueberry,2677,1;cherry,2678,1;strawberry,2680,1;grapes,2681,3;melon,2682,8;pumpkin,2683,10;carrot,2684,2;tomato,2685,3;corncob,2686,3;cookie,2687,2;brown bread,2691,3;bread,2689,2;roll,2690,2;egg,2328,2;cheese,2696,4;white mushroom,2787,6;red mushroom,2788,12;brown mushroom,2789,10;mango,5097,8;valentine's cake,6393,30;cake,6278,50;potato,8838,4;plum,8839,3;raspberry,8840,1;lemon,8841,3;cucumber,8842,3;onion,8843,2;jalapeno pepper,8844,2;beetroot,8845,2"/>

In the above I have reordered items that share a common word. So Brown Bread is now before Bread, Dragon Ham now before Ham, and Valentine's Cake is now before Cake.

See how that goes.

Cheers,
Yodot.
 
Hi Muzzy,

Not sure exactly why it's not working. I avoid the XML based buy/sell system.

One thing I think you might like to try is re-ordering your list. I don't know if it's going to be a problem or not but in your list 'bread' comes before 'brown bread'. As I can't see any other problems, try this instead;

Code:
<parameter key="shop_buyable" value="meat,2666,3;fish,2667,3;salmon,2668,4;dragon ham,2672,25;ham,2671,5;pear,2673,4;red apple,2674,3;orange,2675,5;banana,2676,2;blueberry,2677,1;cherry,2678,1;strawberry,2680,1;grapes,2681,3;melon,2682,8;pumpkin,2683,10;carrot,2684,2;tomato,2685,3;corncob,2686,3;cookie,2687,2;brown bread,2691,3;bread,2689,2;roll,2690,2;egg,2328,2;cheese,2696,4;white mushroom,2787,6;red mushroom,2788,12;brown mushroom,2789,10;mango,5097,8;valentine's cake,6393,30;cake,6278,50;potato,8838,4;plum,8839,3;raspberry,8840,1;lemon,8841,3;cucumber,8842,3;onion,8843,2;jalapeno pepper,8844,2;beetroot,8845,2"/>

In the above I have reordered items that share a common word. So Brown Bread is now before Bread, Dragon Ham now before Ham, and Valentine's Cake is now before Cake.

See how that goes.

Cheers,
Yodot.

Sadly it did not, but I thank you for not only trying, but helping me see that there really isn't a problem with it.

I'll just make a separate NPC that buys the food, and make it fit in with the theme.

Thanks for the help.
 
Last edited:
Back
Top