Magic

Magic

190k Downloads

Option to charge an economy amount to spawn in a wand.

mibby opened this issue ยท 5 comments

commented

Would it be possible to add an option to charge an economy amount for the ability to spawn in a wand? i.e. if a person has permission to spawn in a specific wand name with /mgive, charge them $500 so they can't spam the command over and over again?

As well as a permission node to bypass the economy charge.

commented

I'm not really big on having players use commands. Can you just set up a shop and sell the wands? You can limit shops by permission. Or just give them the shop spell to have on their wands, or on a separate item.

commented

Well the idea behind it is because I provide specific wands to players for cosmetics through various unlock systems - i.e. voter crates. If a player loses their hat wand, they can't get it back. But if I provided the wand and the permission node to spawn it back with a $500 in-game charge, then players will always have a way to get their unlocked cosmetic wand back without being able to spam the command over and over again.

This is also assuming giving the individual wand spawn permission doesn't also grant them the ability to spawn it in for others.

You can limit shops by permission.

Is it possible to only display specific items in the shop if they have permission to buy that item? As a re-buy lost cosmetic wands type shop could work as well.

commented

Unfortunately no to your last question, you'd have to make a wand shop for each appearance...

I think the best options here would be:

  • A system that lets players have unlocked wand appearances, and an easy way to get them (either by spawning a new wand, or changing their existing wand, etc). Where you could charge each time this happens.

  • A way to add a permission node to each item in a shop.

Both of these things are something I'd like to do, so let me know if either of them suits you.

I don't forsee adding something that charges for command use, though I'd wager there are other plugins out there already that would do that if that's the route you want to take.

commented

I personally would like each cosmetic item to be a separate item with its own name / lore instead of being able to change the appearance (damage value). But the 2nd option could work for me unless the implementation for saved database uuid-tied unlocked wands allowed spawning them back still attached to that user only with a cooldown.

For option 2, either by only showing items in the shop players have permission for or showing all items configured to be in the shop but display a red stained glass icon instead of the wand icon for items players don't have permission to buy would be nice.

commented

Added in latest dev build- here's an example of use:

https://github.com/elBukkit/MagicPlugin/blob/master/Magic/src/examples/elworld/spells.yml#L2221

unlockedwandshop:
  inherit: buyshop
  parameters:
      confirm: true
      confirm_filler: stained_glass:3
      items:
      - item: wand|default
        cost: 500
        permission: unlocked.beginner
      - item: wand|student
        cost: 500
        permission: unlocked.student
      - item: wand|apprentice
        cost: 500
        permission: unlocked.apprentice
      - item: wand|master
        cost: 500
        permission: unlocked.master

Hope that works for you!