Dynamic Prices
Dynamic Prices creates a server-wide shop with changing prices. It is similar to DynamicEconomy, but aims to be more simple and easier to understand.
How It Works
- Starting prices are configurable.
- Each time a user buys an item, its price increases by 1.
- A user can sell an item for one less than the buying price.
- Each time a user sells an item, its price decreases by 1.
Features
- Uses Vault.
- Allows for custom damage values. (For example, birch wood would have a different price than oak wood.)
Video
Thanks to IngrownPenguin!
Configuration (Changed with 0.2.1!)
There are three configuration files: config.yml, prices.yml, and signs.yml Example prices.yml:
emerald: id: 388 price: 1 static: true stone: id: 1 price: -64 oak-wood: id: 17 price: -96 spruce-wood: id: 17 data: 1 price: -95 birch-wood: id: 17 data: 2 price: -97 jungle-wood: id: 17 data: 3 price: -96 diamond: id: 264 price: 2
- In the above example, users can buy/sell emerald, stone, all types of wood, and diamond.
- Diamond's price is 2. That means that users can buy 1 diamond for 2 currency, and can sell it for 1 currency.
- Stone's price is -64. That means that users can buy 64 stone for 1 currency, and can sell 65 stone for 1 currency.
- The name you see is the name users will see. It is recommended to make it clear what the item is.
- Notice how the data is set for each of the types of wood. The prices for each type are independent.
- For emerald, "static" is set to true. This means that the price will not change when users buy/sell emeralds. This is useful if your economy has a "base unit." For example, some admins may want to make it so that gold ingots are always worth 100 currency. Note: Item names currently cannot have spaces. That's why dashes are used above.
example config.yml:
buy-sell-difference: 1 price-change: 1
- This means that the difference between the buy and sell prices will always be one (unless the item is static)
- Every time the item is bought or sold, its price will change by 1 currency.
You should not change the signs.yml. It has the signshop locations and will change automatically.
Commands
- /buy: Gives the user a list of items currently available to buy, along with their prices
- /buy <item>: Buys the item for the current price.
- /sell: Gives the user a list of items currently available to sell, along with their prices
- /sell: <item> Sells the item for the current price.
- /shop reload: reloads prices from prices.yml
Permissions
- dynamicprices.buy: Allows the /buy command
- dynamicprices.sell: Allows the /sell command
- dynamicprices.shop: Allows the /shop command
SignShops
- On the first line, add: "[shop]"
- On the second line, add the item name. Prices will automatically be displayed.
- Left click on the sign to buy.
- Right click to sell.
Todo
- Add a command to manually change prices
- Add more config settings (suggestions?)
Keep getting a PlayerInteractEvent error when buying/selling from signs. Running BukkitForge-1.5.2-301, Essentials 2.11 and Vault 2.1.26
http://pastebin.com/etJj9akS
does this go back to its normal price at some point .. and is there a bottom and top price?
Can you set it up to only sell or to only buy?
I havnt put in this plugin yet im still trying to figure out the config but I have a suggestion. Make the config a little easier. for example
SUGGESTION: Check the block break event and see if this is a sale sign if it is cancel the event. if not event.setCanelled(false); If the player has a certain permission allow them to break the sign.
Oh man.. I had so high hopes for this plugin. But it seems you lose the new prices when you restart the server. I can't see myself using this plugin until it saves the modified prices.. Maybe I'll try making my own first Bukkit plugin for this.
Each sell or buy make an error in the console :/
Please update =D
wont give me any money while selling, everything else works perfect :( would love to use it
I'm sad that the signs will not give me items, no matter how I word them when creating the signs. (ex. iron-sword, ironsword, iron sword) MC 1.5.2, Dynamic Prices 0.2.1
I love this plugin! just switched from chestshop Could you please add a feature were if overtime the item isn't bought it goes down in price
Prices will not update regardless of what the prices.yml say, when I make a sign for a Diamond it still starts at 1 when I have it set at 3000. It also doesn't upload with any of the new settings, I used the prices.yml posted in the comments and it still only shows the stock items and prices with /buy
http://pastebin.com/z5k3VtuL
No commands are working, signs seem to be glitchy as well.
CB: 1.5.1 R0.1
Dynamic Prices: 0.2.1
Economy: Boseconomy
I have vault, no startup errors
@jwwilson21146
Hmm... I haven't had this issue. Are you sure the id is correct in the config? Can you buy/sell to/from the signshop?
Has anyone else had this issue?
hey this plugin seems cool but i am having trouble with it... i am using giggaflops config. file for the configuration.. so i placed down a sign for stone (it worked, Shop was in green) but when i used /sell Stone it says You don't have any Stone! when i clearly have 64 stone..i dont know what the problem is. i am Op but i gave my self the permissions anyways for dynamicprices. i am using PEX for my manager and i have vault installed. Thanks
note i am on version .2 running CB-1.4.7
I just added 0.2.1 today. Make sure you change your configs accordingly.
Hi, sorry to bother, but could You answer my PM? I was asking something about Your plugin. Thanks
Hi. I really like your plugin, but can you please replace /buy with something like /buyd or even a shortcut like /b because /buy is interfering with buycraft, and I really need that plugin. Thanks
Thanks everyone for the great suggestions! I have been busy lately, so I apologize for taking so long.
I just added signshops. I'm not sure if I should still add a "quantity" argument to the command (with signshops, it is easy to buy/sell many at once). I do not plan to add a cap on prices. For the prices to get insanely low or high, people would have to sell for insanely low prices, or buy for insanely high prices, which I doubt will happen. I also do not plan to add a bank. I understand the concern about infinite items in the game, but once the prices get high enough, people will not buy anymore. If they do, it will be for an insanely high price, at which point another person will sell that item, removing some of that item from the game. It will be as if the first person is buying from the second.
I still plan to add commands for changing and reloading the config.
Thanks, giggaflop, for your Big Sample Config! You saved everyone a lot of work. I would recommend, however, that everyone's economy has an item with "static" set to "true." This will prevent the value of currency from changing to drastically.
Suggestions:
- Add a cap for prices, so diamonds don't sell for $1
- Add a /sellall and /worth command.
Hey, AMAZING PLUGIN btw. But, what would make it so much better is if you could put each item on a sign that updates automatically.. If you know what I mean... (no its not meant to be sick)