Advanced Shop
AdvancedShop - A dynamically priced server shop which is fairly intuitive and versatile; supporting both experience and money
~ Plugin requested by woebegone1 on http://forums.bukkit.org/
[Overview]
- A simple to use server shop where prices change when you buy/sell
- Buy/Sell signs
- Support for ListBuilder/WhatIsIt for modded item names (Forge)
- Supports experience or money
- Can have different formulas for buy and sell
- You can have the prices based on a configurable time period
- Allows multiple names per shop item
- Add or remove items from the shop
- Shops can have "Stock" and only sell if they are in stock.
- Can log transactions
[Commands|Permissions]
Command | Description | Permission |
---|---|---|
/advsell <item/hand> *<amount> | Sells a given amount of an item | advshop.sell |
/sellall | Sell everything in your inventory | advshop.sellall |
/advbuy <item> <amount> | Buys a given amount of an item | advshop.buy |
/value <item/hand> | Gives info on price/stock of item | advshop.value |
/hand | Tells you what item you are holding | advshop.hand |
/advshop help | Lists all the commands for the plugin | None |
/advshop reload | Reloads the plugin | advshop.reload |
See here for setting up command aliases (e.g. using /sell)
[Installation]
- Download AdvShop.jar as well as the dependencies below into your plugins directory
- Restart your server or load the plugins using a plugin manager
- Add the permissions that you see fit (listed above) to players
- See the configuration tutorial below for further information
For forge modded servers:
Use ListBuilder to generate a list of items for AdvShop.
- Simply copy the generated names.yml into the AdvShop folder and it will convert it on startup
- Remember to change the "idlist" setting the the config.yml
[Dependencies]
Click here for Vault which provides economy integration.
An economy plugin of some sort is also required
[Configuration Tutorial]
Most configuration can be done through the config.yml
[Buy/Sell Formula]
This dynamic shop plugin allows you to specify your own formula for buying and selling. The default formula does the following;
- Items are cheaper if a lot of that item has been sold, but not much has been bought
- Items are more expensive if not much of it has been sold compared to other items.
- The sell price is always half of the buy price
If you have "require-stock" set to true in the config.yml, here is an example formula:
constant/(sold-bought)
where constant is some number of your choice e.g. 1000
Placeholders:
- bought
- sold
- volume
- totalsold
- totalbought
- totalvolume
basic javascript will also work in the formula
The default-sold and default-bought values are the stock of an item after it has been sold/bought for the first time.
It is a good idea to have the buy formula return a larger value than the sell.
[Using EXP]
Simply change use-exp-instead to true in the config.yml
[Adding/Removing items]
If you want to have a custom item list, you will need to copy idlist.yml and modify it
Once you have done that, remember to change the idlist in the config to specify the new file.
[Logging transactions]
Transactions are automatically logged to history.yml.
TO DISABLE - set keep-history-days to 0
TO KEEP FOREVER - set keep-history-days to -1
[Disable auto item matching]
Set item-similarity-match to 0 (in config.yml)
[GUI shop]
There are many plugins out there which allow you to create your own GUI's:
- Chest Commands GUI
- Or do a search
With ChestCommandsGUI you can execute commands (e.g. /advsell) when a block is clicked.
[Signs]
The latest version of AdvShop allows for the creation of Buy and Sell signs, here is an example:
- The first line of the sign ([ADVBUY] or [ADVSELL]) is completely configurable through the language setting
- The last line shows the current stock levels for the item
- Shift+R-Click to trade a stack at a time
Portuguese Video by AbsintoJ
[Other Projects]
- SignRanks
- CompassModes
- WorldeditRegions
- VoxelSniperRegions
- InSigns+
- IndividualMessages
- IndividualHolograms
[TODO for v0.2.0]
Please tell me if you would like any additional features added
- Threaded buy and sell commands
- buy/sell sign protection
- Add option to set static prices for certain items
- Item min/max buy/sell values
- Search command
- Command to repair items based on shop value
- Command to smelt item based on shop values
- Enchantment books
- Fix exception with buying something with no stock
- Finish adding min/max prices for items
- List cheapest/most expensive items
- Cooldowns for buying certain items
- MySQL
- actions?
- player-player trading (rather than just player-server trading)
- buy entities
@McyD1
I added an option in v0.0.4 to have a minimum sell price. When I have more time I will allow you to do this per item, as well as set ceiling and floor prices for buy and sell.
@DivinityCraft
If they can't figure out /advsell and /advbuy they have bigger issues. If a player they can't add 3 letters to a command, how are they going to get the rest of the command...
And since /buy and /sell conflict with the most commonly installed plugin, if a default was done, it would make sense to default to /advsell and /advbuy not the other way around.
I strongly recommend using /buy and /sell instead and simply include instructions for people with conflicting plugins that you can change these commands yourself using WinRAR editing of the jar and editing plugins.yml. Many players are not good at reading or understanding instructions and they need commands to be what they are used to and as simple as possible.
Unfortunately the WinRAR method seems incompatible with AdvShop for some reason, so I'll have to stay on version 0.0.1 until you change the commands back to /sell and /buy or offer an option to switch in the config.
I have the same question as Hexnar... how do I set default values for different items?? I beacon cant be the same value as dirt...
nvm, fixed it.
Ok, I must be doing something wrong here, how do I change the prices, because a diamond sword cannot cost or sell for the same price as a torch. Everything else I like.
plz add a buy/sell sign so that i can get rid of chest shop!
@Empire92
I do understand how it works. I'm aware that the stock dictates the pricing scheme. This was not what I was getting at though. At the moment, you're the only one with a plugin close to what the old DynamicEconomy plugin does. That plugin was able to do everything I had needed it to back before it had stopped being maintained by the dev. Your plugin though is a lot more simple and I thank you for the stock addition. I wanted to be able to affect the pricing via stock and if possible, the pricing. Now this does that so for now, I'm quite happy with it.
@AegisZephyr It seems like you don't really understand how the plugin works. Regardless I added a command in v0.0.3 for setting the bought and sold stock.
The plugin however works on a formula to get the buy/sell value. The price doesn't simply drop or rise a fixed amount per transaction. As for stock, it has a bought/sold amount, however by default this is defined over a period of time so changing the stock will interfere with this.
@DivinityCraft I can't seem to replicate the bug with items only be sellable in the hotbar.
A sellall command was added in v0.0.3
As for enchantments, I am still unsure how this would work and look in the idlist.yml as enchantments are meta data rather than damage.
Love your plugin so far and it works now as intended. I have another request that I'm not sure if you're up to or not.
I'd like to be able to use command blocks to trigger events with this plugin by allowing a command block to make a price rise or fall. This would have to at least be usable via console as command blocks only output console commands. Something like the following could be good to start when you add pricing to the plugin.
Some idea commands:
@DivinityCraft
I'll look into the hotbar bug you mentioned. A sellall command can easily be added. As for enchantment books, I will try to allow specifying NBT data in the idlist.yml (somehow...)
Thanks for the ideas, I'll try to get around to them when I've got a bunch of free time. I really appreciate the feedback. :)
Video Tutorial on the Plugin
http://youtu.be/VNsFxBiaABU
Credits Video: (AbsintoJ/Advanced Shop)
My server has used 3 different global market plugins since we started 2011 and now we have finally found a good replacement for the ever more bloated and clunky Hyperconomy. The way you have combined simplicity and ease of management with giving us admins full control of the pricing method makes this plugin superior to any other global market I've seen over the years. I'll be keeping in touch to give advise on how to perfect it.
Here are some things you may want to look at:
@AegisZephyr
Sure, I'll add that. I'm not sure why I didn't do that in the first place.
Not sure if you're active or not but I do have a request. Using /buy currently conflicts with our buycraft command. Is there a way you can change the /buy and /sell commands to /advbuy and /advsell? This would more than likely increase compatibility with other plugins that may be using similiar commands.