Suggestion: Shop GUI for players to sell their reward heads
mrho225 opened this issue · 14 comments
Need shop API, so i suggested BossShop and BossShop is free too. Otherwise it will take Rocologo longer to add this function as what he/she told me.
I think I will start making a "MobHunting" Sign
Line0:[MH Shop]
Line1:Free text
Line2:Free text
Line3:Free text
If you click with an MobHunting Reward Head you will the the money.
Step two can be BossShop integration ... I dont know if that will work.
UPDATE:
I have been think about this task, but before making any Shop I need to find a way to store the value of the Item, which is persistent. Meaning: Currently I have this problem to solve: If you kill a mob and a bag of money is dropped on ground, if you the restart your server before picking up the item, and the try to pickup the item after the server restart, the you can actually pick up the item, as a normal item.
This is because the "value data" is not persistent on a server restart. Pt. I dont know any way to solve the problem.
The same problem would appear if a player had the bag of money in his inventory and the server was restarted.
Some of the data is Persistent (Ex. skin), but not the value. This is a Minecraft limitation, and currently I know no way to solve this issue.
I have thought about making a sign like this
Sign to convert the "bag of gold" to the players acount. The sign must be placed on a chest. Left click to sell, Right click to buy
Line1: [MH SHOP]
Line2: |
Line3: SELL|BUY
Line4: ALL|
Line 1: Is a TAG so the plugin can recognize the "Shop sign"
Line 2: If the line is owner the owner will get the money/bag of gold, but not more that the player has on his account/bag of gold. I havnt thought this through yet. Im not sure if it is a god idea or if it only can be an Admin sign.
Line 3: Tells if the sign can be used for trading both way. Left click to SELL, Right click to Buy
Line 4: could be ALL or a number, if ALL all "bag of gold" or "money" will be converted, and account will be updated.
What do you think?
But it would also be easy to use one of the mastermobhunter, and then you could click on the npc to sell the reward?
No it is unfortunately not easy to create a BossShop GUI. Its hard compared to a simple solution.
Is it easy to make a GUI when you open with a command? The GUI will display mob heads with prices, click on it to sell maybe. I will try to sell heads with boss shop soon see if it works.
@Stokykyle The changes I made in V4.5.x on MobHeads / Bag of gold is actually prepared to store a value on the mobheads/playerheads. The question is how to set / calculate the price per head?
maybe like this?
cave-spider: '10:20'
cave-spider-cmd: mh head give {player} Cave_Spider|give {player} iron_ingot 1
cave-spider-cmd-desc: You got a §4Cave Spider §1skull and an Iron ingot.
cave-spider-cmd-run-frequency: 100
cave-spider-cmd-run-frequency-base: 100
cave-spider-head-price: 10
And then I could make a sign like describe above, where the player can sell the head?
Or I could make a new command /mh head sell
I dont know ShopKeepers, but it is correct that each head/bag of gold is unique, because I store a random UUID on each item.
Is there anyway to be able allow players to sell heads for rewards because i previously used Shopkeepers to trade the heads for diamonds but this seems to no longer work since each head is slightly different to the last and these have to be exact.
I have made this in this final release.
You can enter a head prize per mob in config.yml. If the player wins a HEAD he will get the head directly in his inventory. Depending on your if you have chosen to use the rewards as a currency or not it will work in two ways.
Use_reward_as_a_ Currency: false
The player can drop the head, and gets money when picks up the head (and the loses the head) or he can place the head somewhere, if he then breaks the head he will get the money if he tries to pickup the head.
Use_reward_as_a_ Currency: true
The player can drop and pickup the head. And he can then use the "/mh money sell" command to get the the money.
Hi @mrho225,
Do you still use BossShop?
I have started adding support for BossShop usinf the API,in V4.8.2 , but I dont understand how to add new items to sell/buy. I would like to be able to add the "bag of gold" item to the shop. So far I can only open the shop using "/mh money shop" if the player has permission "mobhunting.money.shop"
I use Shop and I have just added the heads individually to sale . No need really to integrate or build one into MH unless you just want too .