/shop item limiter

Discussion in 'Plugin Requests' started by MrBobblyBooks, Jun 12, 2022.

  1. Offline

    MrBobblyBooks

    Plugin category: (what does this mean?)

    Minecraft version: 1.17.1

    Suggested name: ShopLimiter

    What I want: So I have a skyblock server, and the theory behind this plugin is to prevent exponential buying of spawners.
    This is an example but fundamentally I want this:
    Villager spawners cost $1mil to buy in /shop
    After you have bought 100 spawners, I want the price to change to $2mil
    After 50 more bought, I want them to cost $3mil
    (for example)
    Currently, my spawner shop is made on a deluxemenu

    Ideas for commands: /shoplimiter reset {player} so you can put the player back to the beginning and they can buy another 100 spawners at $1mil

    Ideas for permissions: shoplimiter.bypass (would bypass the cost increments)
    shoplimiter.reset (for staff to be able to reset how many spawners have been bought and they could buy another 100 at $1mil each)

    When I'd like it by: As soon as possible, but I'm not in a great rush. Im happy to wait a couple of weeks
     
  2. Offline

    gochi9

    You need to provide the name of the shop plugin that you are using.

    There are dozens of shop plugins on the market both free and premium that can (and most probably) use the command /shop. We cannot make a universal plugin that works with all and every single other shop plugin.
     
  3. Offline

    MrBobblyBooks

    as stated in my request, my spawner shop is made with a deluxemenu
     
  4. Offline

    gochi9

    I am very sorry I have no idea how I managed to miss that.
    I know that DeluxeMenu has it's own file for each menu. And there is also no API for DeluxeMenu so what you want is not something easy to achieve. This might be achievable from the config but I'm unsure exactly since I never worked with it and just stared at some documentation but my theory is that you can assign different permissions like item1.bought.1 meaning he bought it one time than using the requirements section you can replace the item using that permission making it more expansive.
    A plugin will make the assignment of permissions more easy but you would still need to configure in DeluxeMenu yourself and I am unsure if there is a better workaround other than using another shop plugin
     
  5. Offline

    MrBobblyBooks

    yes I thought about the permissions way around, but I wasn't sure how I would assign a permission after the player has bought 100
     
  6. Offline

    mrsot

    Could you share your deluxemenus shop menu file?
    How do you validate if the player has enough money to buy the item, and supply it to him?
     
  7. Offline

    MrBobblyBooks

    Code:
    menu_title: '&bSpawner Shop'
    open_command:
      - spawners
    size: 54
    # as always, only cool people can open this menu :)
    items:
      'pig_unlocked':
        material: SPAWNER
        slot: 11
        priority: 1
        update: true
        hide_attributes: true
        display_name: '&6&lPig &e&lSpawner'
        lore:
          - '&a&lUnlocked: &850/50 &7blocks mined'
          - '&7Buy price: &c100,000$'
        view_requirement:
          requirements:
            unlocked:
              type: '>='
              input: '%statistic_mine_block%'
              output: 50
        left_click_requirement:
          requirements:
            money:
              type: '>'
              input: '%vault_eco_balance_fixed%'
              output: '100000'
          deny_commands:
            - '[message] &6&lSHOP &7» &fYou need &c100,000$ &fto buy this.'
        left_click_commands:
          - '[takemoney] 100000'
          - '[console] stacker give %player_name% spawner pig 1'
        right_click_requirement:
          requirements:
            money:
              type: '>'
              input: '%vault_eco_balance_fixed%'
              output: '100000'
          deny_commands:
            - '[message] &6&lSHOP &7» &fYou need &c100,000$ &fto buy this.'
        right_click_commands:
          - '[takemoney] 100000'
          - '[console] stacker give %player_name% spawner pig 1'
      'pig_locked':
        material: BEDROCK
        slot: 11
        priority: 2
        update: true
        hide_attributes: true
        display_name: '&6&lPig &e&lSpawner'
        lore:
          - '&c&lLocked: &8%statistic_mine_block%/50 &7blocks mined'
          - '&7Buy price: &c100,000$'
      'cow_unlocked':
        material: SPAWNER
        slot: 12
        priority: 1
        update: true
        hide_attributes: true
        display_name: '&6&lCow &e&lSpawner'
        lore:
          - '&a&lUnlocked: &8100/100 &7blocks mined'
          - '&7Buy price: &c100,000$'
        view_requirement:
          requirements:
            unlocked:
              type: '>'
              input: '%statistic_mine_block%'
              output: 100
        left_click_requirement:
          requirements:
            money:
              type: '>'
              input: '%vault_eco_balance_fixed%'
              output: '100000'
          deny_commands:
            - '[message] &6&lSHOP &7» &fYou need &c100,000$ &fto buy this.'
        left_click_commands:
          - '[takemoney] 100000'
          - '[console] stacker give %player_name% spawner cow 1'
        right_click_requirement:
          requirements:
            money:
              type: '>'
              input: '%vault_eco_balance_fixed%'
              output: '100000'
          deny_commands:
            - '[message] &6&lSHOP &7» &fYou need &c100,000$ &fto buy this.'
        right_click_commands:
          - '[takemoney] 100000'
          - '[console] stacker give %player_name% spawner cow 1'
      'cow_locked':
        material: BEDROCK
        slot: 12
        priority: 2
        update: true
        hide_attributes: true
        display_name: '&6&lCow &e&lSpawner'
        lore:
          - '&c&lLocked: &8%statistic_mine_block%/100 &7blocks mined'
          - '&7Buy price: &c100,000$'
      'chicken_unlocked':
        material: SPAWNER
        slot: 13
        priority: 1
        update: true
        hide_attributes: true
        display_name: '&6&lChicken &e&lSpawner'
        lore:
          - '&a&lUnlocked: &8150/150 &7blocks mined'
          - '&7Buy price: &c100,000$'
        view_requirement:
          requirements:
            unlocked:
              type: '>'
              input: '%statistic_mine_block%'
              output: 150
        left_click_requirement:
          requirements:
            money:
              type: '>'
              input: '%vault_eco_balance_fixed%'
              output: '100000'
          deny_commands:
            - '[message] &6&lSHOP &7» &fYou need &c100,000$ &fto buy this.'
        left_click_commands:
          - '[takemoney] 100000'
          - '[console] stacker give %player_name% chicken pig 1'
        right_click_requirement:
          requirements:
            money:
              type: '>'
              input: '%vault_eco_balance_fixed%'
              output: '100000'
          deny_commands:
            - '[message] &6&lSHOP &7» &fYou need &c100,000$ &fto buy this.'
        right_click_commands:
          - '[takemoney] 100000'
          - '[console] stacker give %player_name% spawner chicken 1'
      'chicken_locked':
        material: BEDROCK
        slot: 13
        priority: 2
        update: true
        hide_attributes: true
        display_name: '&6&lChicken &e&lSpawner'
        lore:
          - '&c&lLocked: &8%statistic_mine_block%/150 &7blocks mined'
          - '&7Buy price: &c100,000$'
      'sheep_unlocked':
        material: SPAWNER
        slot: 14
        priority: 1
        update: true
        hide_attributes: true
        display_name: '&6&lSheep &e&lSpawner'
        lore:
          - '&a&lUnlocked: &8200/200 &7blocks mined'
          - '&7Buy price: &c100,000$'
        view_requirement:
          requirements:
            unlocked:
              type: '>'
              input: '%statistic_mine_block%'
              output: 200
        left_click_requirement:
          requirements:
            money:
              type: '>'
              input: '%vault_eco_balance_fixed%'
              output: '100000'
          deny_commands:
            - '[message] &6&lSHOP &7» &fYou need &c100,000$ &fto buy this.'
        left_click_commands:
          - '[takemoney] 100000'
          - '[console] stacker give %player_name% spawner sheep 1'
        right_click_requirement:
          requirements:
            money:
              type: '>'
              input: '%vault_eco_balance_fixed%'
              output: '100000'
          deny_commands:
            - '[message] &6&lSHOP &7» &fYou need &c100,000$ &fto buy this.'
        right_click_commands:
          - '[takemoney] 100000'
          - '[console] stacker give %player_name% spawner sheep 1'
      'sheep_locked':
        material: BEDROCK
        slot: 14
        priority: 2
        update: true
        hide_attributes: true
        display_name: '&6&lSheep &e&lSpawner'
        lore:
          - '&c&lLocked: &8%statistic_mine_block%/200 &7blocks mined'
          - '&7Buy price: &c100,000$'
      'squid_unlocked':
        material: SPAWNER
        slot: 15
        priority: 1
        update: true
        hide_attributes: true
        display_name: '&6&lSquid &e&lSpawner'
        lore:
          - '&a&lUnlocked: &8250/250 &7blocks mined'
          - '&7Buy price: &c60,000$'
        view_requirement:
          requirements:
            unlocked:
              type: '>'
              input: '%statistic_mine_block%'
              output: 250
        left_click_requirement:
          requirements:
            money:
              type: '>'
              input: '%vault_eco_balance_fixed%'
              output: '60000'
          deny_commands:
            - '[message] &6&lSHOP &7» &fYou need &c600,000$ &fto buy this.'
        left_click_commands:
          - '[takemoney] 60000'
          - '[console] stacker give %player_name% spawner squid 1'
        right_click_requirement:
          requirements:
            money:
              type: '>'
              input: '%vault_eco_balance_fixed%'
              output: '60000'
          deny_commands:
            - '[message] &6&lSHOP &7» &fYou need &c600,000$ &fto buy this.'
        right_click_commands:
          - '[takemoney] 60000'
          - '[console] stacker give %player_name% spawner squid 1'
      'squid_locked':
        material: BEDROCK
        slot: 15
        priority: 2
        update: true
        hide_attributes: true
        display_name: '&6&lSquid &e&lSpawner'
        lore:
          - '&c&lLocked: &8%statistic_mine_block%/250 &7blocks mined'
          - '&7Buy price: &c60,000$'
      'zombie_unlocked':
        material: SPAWNER
        slot: 20
        priority: 1
        update: true
        hide_attributes: true
        display_name: '&6&lZombie &e&lSpawner'
        lore:
          - '&a&lUnlocked: &8500/500 &7blocks mined'
          - '&7Buy price: &c200,000$'
        view_requirement:
          requirements:
            unlocked:
              type: '>'
              input: '%statistic_mine_block%'
              output: 500
        left_click_requirement:
          requirements:
            money:
              type: '>'
              input: '%vault_eco_balance_fixed%'
              output: '200000'
          deny_commands:
            - '[message] &6&lSHOP &7» &fYou need &c200,000$ &fto buy this.'
        left_click_commands:
          - '[takemoney] 200000'
          - '[console] stacker give %player_name% spawner zombie 1'
        right_click_requirement:
          requirements:
            money:
              type: '>'
              input: '%vault_eco_balance_fixed%'
              output: '200000'
          deny_commands:
            - '[message] &6&lSHOP &7» &fYou need &c200,000$ &fto buy this.'
        right_click_commands:
          - '[takemoney] 200000'
          - '[console] stacker give %player_name% spawner zombie 1'
      'zombie_locked':
        material: BEDROCK
        slot: 20
        priority: 2
        update: true
        hide_attributes: true
        display_name: '&6&lZombie &e&lSpawner'
        lore:
          - '&c&lLocked: &8%statistic_mine_block%/500 &7blocks mined'
          - '&7Buy price: &c200,000$'
      'creeper_unlocked':
        material: SPAWNER
        slot: 21
        priority: 1
        update: true
        hide_attributes: true
        display_name: '&6&lCreeper &e&lSpawner'
        lore:
          - '&a&lUnlocked: &81000/1000 &7blocks mined'
          - '&7Buy price: &c200,000$'
        view_requirement:
          requirements:
            unlocked:
              type: '>'
              input: '%statistic_mine_block%'
              output: 1000
        left_click_requirement:
          requirements:
            money:
              type: '>'
              input: '%vault_eco_balance_fixed%'
              output: '200000'
          deny_commands:
            - '[message] &6&lSHOP &7» &fYou need &c200,000$ &fto buy this.'
        left_click_commands:
          - '[takemoney] 200000'
          - '[console] stacker give %player_name% spawner creeper 1'
        right_click_requirement:
          requirements:
            money:
              type: '>'
              input: '%vault_eco_balance_fixed%'
              output: '200000'
          deny_commands:
            - '[message] &6&lSHOP &7» &fYou need &c200,000$ &fto buy this.'
        right_click_commands:
          - '[takemoney] 200000'
          - '[console] stacker give %player_name% spawner creeper 1'
      'creeper_locked':
        material: BEDROCK
        slot: 21
        priority: 2
        update: true
        hide_attributes: true
        display_name: '&6&lCreeper &e&lSpawner'
        lore:
          - '&c&lLocked: &8%statistic_mine_block%/1000 &7blocks mined'
          - '&7Buy price: &c200,000$'
      'skeleton_unlocked':
        material: SPAWNER
        slot: 22
        priority: 1
        update: true
        hide_attributes: true
        display_name: '&6&lSkeleton &e&lSpawner'
        lore:
          - '&a&lUnlocked: &81500/1500 &7blocks mined'
          - '&7Buy price: &c200,000$'
        view_requirement:
          requirements:
            unlocked:
              type: '>'
              input: '%statistic_mine_block%'
              output: 1500
        left_click_requirement:
          requirements:
            money:
              type: '>'
              input: '%vault_eco_balance_fixed%'
              output: '200000'
          deny_commands:
            - '[message] &6&lSHOP &7» &fYou need &c200,000$ &fto buy this.'
        left_click_commands:
          - '[takemoney] 200000'
          - '[console] stacker give %player_name% spawner skeleton 1'
        right_click_requirement:
          requirements:
            money:
              type: '>'
              input: '%vault_eco_balance_fixed%'
              output: '200000'
          deny_commands:
            - '[message] &6&lSHOP &7» &fYou need &c200,000$ &fto buy this.'
        right_click_commands:
          - '[takemoney] 200000'
          - '[console] stacker give %player_name% spawner skeleton 1'
      'skeleton_locked':
        material: BEDROCK
        slot: 22
        priority: 2
        update: true
        hide_attributes: true
        display_name: '&6&lSkeleton &e&lSpawner'
        lore:
          - '&c&lLocked: &8%statistic_mine_block%/1500 &7blocks mined'
          - '&7Buy price: &c200,000$'
      'spider_unlocked':
        material: SPAWNER
        slot: 23
        priority: 1
        update: true
        hide_attributes: true
        display_name: '&6&lSpider &e&lSpawner'
        lore:
          - '&a&lUnlocked: &82000/2000 &7blocks mined'
          - '&7Buy price: &c200,000$'
        view_requirement:
          requirements:
            unlocked:
              type: '>'
              input: '%statistic_mine_block%'
              output: 2000
        left_click_requirement:
          requirements:
            money:
              type: '>'
              input: '%vault_eco_balance_fixed%'
              output: '200000'
          deny_commands:
            - '[message] &6&lSHOP &7» &fYou need &c200,000$ &fto buy this.'
        left_click_commands:
          - '[takemoney] 200000'
          - '[console] stacker give %player_name% spawner spider 1'
        right_click_requirement:
          requirements:
            money:
              type: '>'
              input: '%vault_eco_balance_fixed%'
              output: '200000'
          deny_commands:
            - '[message] &6&lSHOP &7» &fYou need &c200,000$ &fto buy this.'
        right_click_commands:
          - '[takemoney] 200000'
          - '[console] stacker give %player_name% spawner spider 1'
      'spider_locked':
        material: BEDROCK
        slot: 23
        priority: 2
        update: true
        hide_attributes: true
        display_name: '&6&lSpider &e&lSpawner'
        lore:
          - '&c&lLocked: &8%statistic_mine_block%/2000 &7blocks mined'
          - '&7Buy price: &c200,000$'
      'blaze_unlocked':
        material: SPAWNER
        slot: 24
        priority: 1
        update: true
        hide_attributes: true
        display_name: '&6&lBlaze &e&lSpawner'
        lore:
          - '&a&lUnlocked: &810000/10000 &7blocks mined'
          - '&7Buy price: &c500,000$'
        view_requirement:
          requirements:
            unlocked:
              type: '>'
              input: '%statistic_mine_block%'
              output: 10000
        left_click_requirement:
          requirements:
            money:
              type: '>'
              input: '%vault_eco_balance_fixed%'
              output: '500000'
          deny_commands:
            - '[message] &6&lSHOP &7» &fYou need &c500,000$ &fto buy this.'
        left_click_commands:
          - '[takemoney] 500000'
          - '[console] stacker give %player_name% spawner blaze 1'
        right_click_requirement:
          requirements:
            money:
              type: '>'
              input: '%vault_eco_balance_fixed%'
              output: '500000'
          deny_commands:
            - '[message] &6&lSHOP &7» &fYou need &c500,000$ &fto buy this.'
        right_click_commands:
          - '[takemoney] 500000'
          - '[console] stacker give %player_name% spawner blaze 1'
      'blaze_locked':
        material: BEDROCK
        slot: 24
        priority: 2
        update: true
        hide_attributes: true
        display_name: '&6&lBlaze &e&lSpawner'
        lore:
          - '&c&lLocked: &8%statistic_mine_block%/10000 &7blocks mined'
          - '&7Buy price: &c500,000$'
      'ig_unlocked':
        material: SPAWNER
        slot: 30
        priority: 1
        update: true
        hide_attributes: true
        display_name: '&f&lIron &6&lGolem &e&lSpawner'
        lore:
          - '&a&lUnlocked: &815000/15000 &7blocks mined'
          - '&7Buy price: &c850,000$'
        view_requirement:
          requirements:
            unlocked:
              type: '>'
              input: '%statistic_mine_block%'
              output: 15000
        left_click_requirement:
          requirements:
            money:
              type: '>'
              input: '%vault_eco_balance_fixed%'
              output: '850000'
          deny_commands:
            - '[message] &6&lSHOP &7» &fYou need &c850,000$ &fto buy this.'
        left_click_commands:
          - '[takemoney] 850000'
          - '[console] stacker give %player_name% spawner iron_golem 1'
        right_click_requirement:
          requirements:
            money:
              type: '>'
              input: '%vault_eco_balance_fixed%'
              output: '850000'
          deny_commands:
            - '[message] &6&lSHOP &7» &fYou need &c850,000$ &fto buy this.'
        right_click_commands:
          - '[takemoney] 850000'
          - '[console] stacker give %player_name% spawner iron_golem 1'
      'ig_locked':
        material: BEDROCK
        slot: 30
        priority: 2
        update: true
        hide_attributes: true
        display_name: '&f&lIron &6&lGolem &e&lSpawner'
        lore:
          - '&c&lLocked: &8%statistic_mine_block%/15000 &7blocks mined'
          - '&7Buy price: &c850,000$'
      'ghast_unlocked':
        material: SPAWNER
        slot: 31
        priority: 1
        update: true
        hide_attributes: true
        display_name: '&b&lDiamond &6&lGhast &e&lSpawner'
        lore:
          - '&a&lUnlocked: &825000/25000 &7blocks mined'
          - '&7Buy price: &c1,400,000$'
        view_requirement:
          requirements:
            unlocked:
              type: '>'
              input: '%statistic_mine_block%'
              output: 25000
        left_click_requirement:
          requirements:
            money:
              type: '>'
              input: '%vault_eco_balance_fixed%'
              output: '1400000'
          deny_commands:
            - '[message] &6&lSHOP &7» &fYou need &c1,400,000$ &fto buy this.'
        left_click_commands:
          - '[takemoney] 1400000'
          - '[console] stacker give %player_name% spawner ghast 1'
        right_click_requirement:
          requirements:
            money:
              type: '>'
              input: '%vault_eco_balance_fixed%'
              output: '1400000'
          deny_commands:
            - '[message] &6&lSHOP &7» &fYou need &c1,400,000$ &fto buy this.'
        right_click_commands:
          - '[takemoney] 1400000'
          - '[console] stacker give %player_name% spawner ghast 1'
      'ghast_locked':
        material: BEDROCK
        slot: 31
        priority: 2
        update: true
        hide_attributes: true
        display_name: '&b&lDiamond &6&lGhast &e&lSpawner'
        lore:
          - '&c&lLocked: &8%statistic_mine_block%/25000 &7blocks mined'
          - '&7Buy price: &c1,400,000$'
      'villager_unlocked':
        material: SPAWNER
        slot: 32
        priority: 1
        update: true
        hide_attributes: true
        display_name: '&a&lEmerald &6&lVillager &e&lSpawner'
        lore:
          - '&a&lUnlocked: &835000/35000 &7blocks mined'
          - '&7Buy price: &c2,000,000$'
        view_requirement:
          requirements:
            unlocked:
              type: '>'
              input: '%statistic_mine_block%'
              output: 35000
        left_click_requirement:
          requirements:
            money:
              type: '>'
              input: '%vault_eco_balance_fixed%'
              output: '2000000'
          deny_commands:
            - '[message] &6&lSHOP &7» &fYou need &c2,000,000$ &fto buy this.'
        left_click_commands:
          - '[takemoney] 2000000'
          - '[console] stacker give %player_name% spawner villager 1'
        right_click_requirement:
          requirements:
            money:
              type: '>'
              input: '%vault_eco_balance_fixed%'
              output: '2000000'
          deny_commands:
            - '[message] &6&lSHOP &7» &fYou need &c2,000,000$ &fto buy this.'
        right_click_commands:
          - '[takemoney] 2000000'
          - '[console] stacker give %player_name% spawner villager 1'
      'villager_locked':
        material: BEDROCK
        slot: 32
        priority: 2
        update: true
        hide_attributes: true
        display_name: '&a&lEmerald &6&lVillager &e&lSpawner'
        lore:
          - '&c&lLocked: &8%statistic_mine_block%/35000 &7blocks mined'
          - '&7Buy price: &c2,000,000$'
      'back':
          material: BARRIER
          display_name: "&c&lBack"
          lore:
            - "&7Press to return to categories"
          left_click_commands:
            - "[console] dm open shop %player_name%"
          slot: 49
     

Share This Page