AutoPrice
AutoPrice Bukkit plugin
A shop plugin with GUI and dynamic prices.
Features
- Highly configurable.
- Good default configuration for lazy server owners (like myself).
- Designed to require minimum input from server owner.
- Commands and GUI (Graphical User Interface).
- Prices will automatically be adjusted based on supply and demand of each material.
- The shop can be accessed by any player at any location.
- The plugin keeps track of each material's stock, players can't buy more than has been sold.
- Item damage/condition is considered in price paid and stock increased. For example selling two items in 50% condition will earn you total 100% of normal price and add total one item to the stock.
Known limitations
- It takes a while for the plugin to learn the true value of each material.
- The plugin automatically saves the changed information to configuration file, so it's best to stop the server if you plan to work on the configuration file. You can however try to edit it quickly and use /ap reload.
- Materials in shop can only be rearranged by editing the configuration file. Renaming an item will however move it to the end.
- Each purchase is added to player's inventory as a new stack.
- Does not support the wildcards in permission nodes of PermissionsBukkit
Shop GUI usage
The shop GUI looks like a chest, but there are couple differences. The top window shows the items you can buy and bottom shows items you can sell. When hovering over any item, information about that material is displayed (price for example).
The amount you sell/buy depends on the type of click
- Left click = 1 unit
- Right click = 4 units
- Shift + left click = 16 unit
- Shift + right click = 64 units
To change page on top/buying part click the empty slot
- Left click = next page
- Right click = previous page
Requirements
AutoPrice is just a shop plugin. For AP to work you will also need to install an economy plugin like Essentials economy. AP does not directly support any economy plugins so you need to install Vault that works as an adapter between AP and the economy plugin of your choice.
Infinite stock
Here's an example how to configure an item to have infinite stock. Here the purchase price is 0,55 and stock is infinite. The plugin normally adjusts prices based on purchases and sales, manually adjusting stocks can cause issues with dynamic prices.
APPLE: baseSalesPriceForPlayer: 0.5 mainMaterial: APPLE subMaterial: 0 stockPerPurchasePrice: 0,55: !!float 'Infinity'
Questions & answers
- How to get stock?
- Let players sell stuff (prices will slowly normalize) or set stock manually in the configuration file (but don't expect the plugin to learn the value of the item).
- How to increase the prices?
- Let players buy all the stock and wait for the prices to increase. If all prices raise too slow, decrease updateIntervalTicks in the configuration file. Low supply & high demand = high price.
- Why does the sales price of an item drop to 0.01 as soon as I sell the first one?
- Cause that item now has sales but no purchases. High supply & low demand = low price.
@Sprunkas
You have to add or replace this section for all materials in configuration:
0,55 here is the purchase price, which you may want to change. This plugin wasn't originally designed for servers to sell items to players, but players to sell items to each other (with the server in between). But it's not a problem, just takes some configuring.
How to set for example that every item have 1000 items in stock?
@sQuargz
Language can be customized in the configuration file of AutoPrice version 4.025. It should be out in couple days. :)
@MCFUser15985978
Here's an example how to configure an item to have infinite stock. Here the purchase price is 0,55 and stock is infinite.
Can i make it so it wont be out of stock? So i can just use it as a unlimited resources thing where i can just buy and sell without worrying it being out of stock? Thanks
@Delebird
MythicDrops will be supported by v4. It should be out in couple days. Configuration file does not limit what kind of information you can save. Using SQL would be a lot of work and not much use.
@nvr2punk33
MythicDrops will be supported by v4. It should be out in couple days.
@nvr2punk33
If you sell "socket stick" for example, it will just be sold as a normal stick. I guess it should be treated as a separate item. I need to think about how to implement that. Maybe I could set it so that items with different lores are treated as different items.
On the search for economic plugins'm here now time to test but it sounds very cool to
@tubelius
you should defiantly look at what it would take to make mythic drops compatible. Please let us know. That feature would be more than ideal.
@PhyreStormAZ
I'm not sure, but unfortunately it is unlikely.
Does this support MythicDrops items out of curiosity?
@nvr2punk33
Well the players originally sold them for 1-2 cents each. Everything is sold with profit (for server), unless you specifically configure the plugin not to do so.
@tubelius
Alright ill try it out. My issue was we already have an economy in place. I want to replace it so people where buying diamonds for like 2 cents XD. I can be having that. Thanks though. :D
@nvr2punk33
In any case the plugin will adjust the prices to whatever the players are willing to pay. But this takes time. If you want it to increase the prices faster for items that are not being sold, then that's probably a good way.
@tubelius
So essentially i should restart my config. Then lower the amount of time for price increase in ticks if i want my market to be well more, expensive.
@nvr2punk33
Here's an example of the issue: DIAMOND: '0': baseSalesPriceForPlayer: 100.1 stockPerPurchasePrice: 838,70: 1.0 0,10: 5.0 1010,20: 1.0 1010,00: 3.0 priceChecksSinceLastPlayerSale: 10 totalMoneyToPlayers: 483.1500051859766 priceChecksSinceLastPurchase: 11 totalMoneyFromPlayers: 0.4000000059604645
Purchase price (for player) is always locked the moment item is sold, based on the price it was sold for. These 5 diamonds can now be bought for 0,10 each, cause they were sold into the shop when the sales price (for player) was low. After these 5 diamonds have been bought or deleted from configuration the players have to pay 838,70 for the next diamond they buy.
Rising the sales price is slightly against the logic of the plugin. The plugin considers this very low sales price suitable, cause players decide to sell the diamonds for that price. If the players did refuse to sell diamonds at this price, the sales price would slowly increase (+0.01 every "ticksBetweenPriceUpdates" ticks).
I hope this helps. Let me know if you have further questions or comments.
@tubelius
My reasoning is i dont want everything pretty much to start out costing one dollar(or w.e). http://pastebin.com/kR3ecHH9
@nvr2punk33
Please copy-paste the content of plugins/autoprice/config.yml file into http://pastebin.com/ , submit and copy-paste the address as a reply to this comment. What are you trying to achieve by setting something to 100?
Hey im having a little issue with scaling. For some reason everything can be bought for way less than it can be sold. Im clearly missing something. I have my config set for 100 as the base minimum sale. I would like it to at the very least always purchase for more than that please help me out.