Could you add to this plugin a 'stock' on hand field. Such that
- any of that item a player '/esell's increases the 'stock' on hand,
- any item '/ebuy'd by player will be subtracted from the 'stock' on hand.
- If there is not enough 'amount' to fill a players '/ebuy' they will get an 'insufficient stock' message, and told the 'amount' that remains.
And with that addition, a setting/option server admin can enable/disable the 'stock on hand' feature. So if they want infinite amounts to buy/sell, they can disable the 'stock on hand' feature.
And if you are keen, also add in a price adjustment feature such that:
- Each item has a base value
- The buy/sell price is adjusted according to how much 'stock' on hand remains, due to supply and demand. This should result in self-regulating stock levels providing the 'price' is set to the 'market value'
- Zero/low 'stock': item is in high demand, not enough stock to sell.
- esell price is max/high - players are encouraged to sell the item for a high reward, and 'stock' will go up
- ebuy price is max/high - players are loath to buy the item at such a high price, and 'stock' won't reduce as fast
- Max/high 'stock': item is in low demand, more than enough stock to sell.
- esell price is min/low - player is loath to sell the item for a low reward, and 'stock' won't increase as much.
- ebuy price is min/low - player is encouraged to buy the item while it's cheap, and 'stock' will drop fast.
This might be a little complex, as tweaking the formulae will take time/testing to get right. But if coded in a way players can adjust prices/scaling, they'll find a workable scale themselves.
I notice you've made the source available, so if you're not interested, i could have a crack at it myself.
Thanks, and kind regards,
Scruffy