HOW TO MAKE A NPC ONLY BUY FROM ME SPECIFIC ITEMS?

Hi, I am making a game IN RPG MAKER MV. Im quite a begginer. In my game monsters don't give you money. They give you loots. Like ff12. But I want to sell the loots to the propper buyers, how can I do that?

The npc says: I only buy cloth, bat wings and magic herbs.

For example: I have "15 Bat wings" and I can only sell this to the person that pays for it. and I'd like to sell all of them in one time and get the right ammount of gold.

THe result I want: I can't sell these in a common store. Only for the right npcs and they buy the number of that Item I select to sell to them.

How can I do that?

Thanks a lot in advance guys!
I’ve moved this to RPG Maker MV Support.
Okay, so this is probably just an event. You'll make it once, and copy it several times to modify slightly for different vendors. Start with a basic action button event and for the graphic choose your vendor. It's traditional, but optional, to stick them behind a designated counter/table tile.
When they click on the event, they get some dialog. You ask them what to sell (Input choice), with each choice being a type of item. Under each branch, if they have the item, you do some dialog, increase their wealth by some value times the number of items, then reduce the number of items to 0. If they don't have it, they get dialog that says, "you don't have any."
EDIT: Doing this elegantly will probably require some skills with variables. However, you can do it a brutal and simple way by using a Loop to just increase their gold by the value of the item repeatedly, one item at a time, until it's gone.
Okay, so this is probably just an event. You'll make it once, and copy it several times to modify slightly for different vendors. Start with a basic action button event and for the graphic choose your vendor. It's traditional, but optional, to stick them behind a designated counter/table tile.
When they click on the event, they get some dialog. You ask them what to sell (Input choice), with each choice being a type of item. Under each branch, if they have the item, you do some dialog, increase their wealth by some value times the number of items, then reduce the number of items to 0. If they don't have it, they get dialog that says, "you don't have any."
EDIT: Doing this elegantly will probably require some skills with variables. However, you can do it a brutal and simple way by using a Loop to just increase their gold by the value of the item repeatedly, one item at a time, until it's gone.
Thanks, I made the npc selling one item only per time. I'd like to choose the number I'd like do sell. If I had 10 I could choose 10 and then sell all of them. how do I make this?
Thanks, I made the npc selling one item only per time. I'd like to choose the number I'd like do sell. If I had 10 I could choose 10 and then sell all of them. how do I make this?

Is there really any circumstance where you wouldn't want to sell all of them? Do they have a functional use?

AquaEcho, that looks cool. How does it handle Cost 0 items, though? Can you still sell them to the special shop?
Here is a basic event chain I threw together in case you want to stick to the simple no-plugin route.

In this specific case, var 41 records how many items you're offering, 42 counts how many you currently have, then it does a comparison to check if you really have that many, then finally it calculates the price and stores it in var 43.

You could probably roll 42 and 43 into a single variable, since 42's data becomes useless past the initial check, but either path works.
@pawsplay It should be a single-line edit of code to allow shops (in default or with the plugin) buy 0-cost items if you want them to.
AquaEcho, that looks cool. How does it handle Cost 0 items, though? Can you still sell them to the special shop?
Ive never tried it but the documentation says you can set a multiplier (which would still be 0) or set an absolute sale value for the item to override the 0.


On the other hand, you can use the following Notetag to manually set the
Sell Shop price of an item:

<Sell Shop Price: x>

Set x to the price you wish to use.
Here is a basic event chain I threw together in case you want to stick to the simple no-plugin route.

In this specific case, var 41 records how many items you're offering, 42 counts how many you currently have, then it does a comparison to check if you really have that many, then finally it calculates the price and stores it in var 43.

You could probably roll 42 and 43 into a single variable, since 42's data becomes useless past the initial check, but either path works.
Thanks a lot. I will try to put it to work and let you know!
Thanks, I made the npc selling one item only per time. I'd like to choose the number I'd like do sell. If I had 10 I could choose 10 and then sell all of them. how do I make this?
I think this wil solve all the matter. Thanks. I'll test it and let you know!
I don't know why, but the plugin simply is not showing on my plugin list. I put it on the plugins folder but it doesn't show on the plugins menu inside rpg maker mv
I don't know why, but the plugin simply is not showing on my plugin list. I put it on the plugins folder but it doesn't show on the plugins menu inside rpg maker mv
Did you change the name of the file at all? The name should be exactly SRD_SellShop.js
Did you change the name of the file at all? The name should be exactly SRD_SellShop.js
I didn't rename it. I simply don't understand why the plugin is not showing on the list inside the software.

1689127498627.png
I don't know why, but the plugin simply is not showing on my plugin list. I put it on the plugins folder but it doesn't show on the plugins menu inside rpg maker mv
Ok now I managed to install it right.
@DiogoAsgard , please avoid double posting, as it is against the forum rules. You can use the "Edit" function on your posts to add additional information you've forgotten or respond to multiple people. You can review our forum rules here. Thank you.
I don't know why, but the plugin simply is not showing on my plugin list. I put it on the plugins folder but it doesn't show on the plugins menu inside rpg maker mv
OK now! Problem solved! Thanks for the help definitely solved the matter.
1689128463210.png

Original thread: https://forums.rpgmakerweb.com/threads/how-to-make-a-npc-only-buy-from-me-specific-items.159225/