Is it possible to track/check which(and how much) X item was sold?
checking if item was sold?
Learning JavascriptI think you can track it with event commands before open the shop and after close the shop.
before: Check the items that party already have, and record it somehow(in a variable, for example)
Open the shop.
After the player leaves the shop: Compare the items that the player has with the items that the player had before opening the shop.
Through this, you can compare the items the player had before entering the shop with the items he has after leaving the shop.
before: Check the items that party already have, and record it somehow(in a variable, for example)
Open the shop.
After the player leaves the shop: Compare the items that the player has with the items that the player had before opening the shop.
Through this, you can compare the items the player had before entering the shop with the items he has after leaving the shop.
Thats pretty clever! Thank you, can't believe myself that the solution was so easy...
This works if you only have a few items... but what if you have 100's of different items? You'd need to check and store the number of each item you have in your inventory for each and every item in the database...
Is there not a script/plugin based way to do this? Just a simple plugin that counts the number of each item sold and stores it, rather than having to set up the variables yourself?
Is there not a script/plugin based way to do this? Just a simple plugin that counts the number of each item sold and stores it, rather than having to set up the variables yourself?
A little script call can do the trick to compare the items player have before and after, and use a code to catch the exceptions.
But I'm busy right now, if no one appears, I see what I can do later.
But I'm busy right now, if no one appears, I see what I can do later.
I have a plugin that might help: view/download Cae_BuySellVar (Google Drive).
It lets you stick a notetag like
<sell var: 12> in an item's notebox; the game should then automatically add 1 to the value of game variable 12 every time the player sells one of those items. 😮💨This looks perfect thank you! I will give it a try and report back. Do you make a lot of custom plugins caethyril?
Great! And yes, you can find my RMMV plugins over here~
Caethyril's Plugins
Caethyril's RMMV Plugins Updated 2026-01-20: General - Cae_Drawing v0.95 Looking for my RPG Maker MZ plugins? Click here! Features :kaohi: I've made a variety of plugins for RPG Maker MV but most of them are quite small/simple, so don't really merit their own thread. This is a intended as a...
forums.rpgmakerweb.com
You're welcome!
This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.
Original thread: https://forums.rpgmakerweb.com/threads/checking-if-item-was-sold.121190/