#Deluxe menu filter item with dynamic lore

1 messages · Page 1 of 1 (latest)

real canopy
#

Hi i have a little question with deluxemenu
How can i make an item that change the lore when i click.
I have an item with this lore:


      - "&f"
      - "&8▪ &fToday &r&f%img_accepted%"  
      - "&8▪ &7Weekly"  
      - "&8▪ &7Monthly"  
      - "&8▪ &7Alltime"  
      - "&f"

As you can see, the default lore have the first line "today" with white. But i would like to edit the lore when the player click to switch to weekly

shrewd crest
#
# I just edit how it work, dont just copy paste this config
'same item - today':
  priority: 4
  update: true
  slot: 0
  lore:
    - '> today'
    - 'weekly'
    - 'monthly'
    - 'all time'
  click_commands: # you can use one of these [meta], im using the second one
    #- '[meta] set change-the-lore STRING weekly'
    - '[meta] add change-the-lore INTEGER 1'
    - '[refresh]'
'same item - weekly':
  priority: 3
  update: true
  slot: 0
  lore:
    - 'today'
    - '> weekly'
    - 'monthly'
    - 'all time'
  view_requirement:
    requirements:
      'the number has change so this item will appear':
        type: '=='
        input: '%deluxemenus_meta_change-the-lore_INTEGER%'
        output: 1
  click_commands: # you can use one of these [meta], im using the second one
    #- '[meta] set change-the-lore STRING monthly'
    - '[meta] add change-the-lore INTEGER 1'
    - '[refresh]'
#
'same item - monthly':
  priority: 2
  update: true
  slot: 0
  lore:
    - 'today'
    - 'weekly'
    - '> monthly'
    - 'all time'
  view_requirement:
    requirements:
      'the number has change so this item will appear':
        type: '=='
        input: '%deluxemenus_meta_change-the-lore_INTEGER%'
        output: 3
  click_commands: # you can use one of these [meta], im using the second one
    #- '[meta] set change-the-lore STRING alltime'
    - '[meta] add change-the-lore INTEGER 1'
    - '[refresh]'
'same item - all time':
  priority: 1
  update: true
  slot: 0
  lore:
    - 'today'
    - 'weekly'
    - 'monthly'
    - '> all time'
  view_requirement:
    requirements:
      'the number has change so this item will appear':
        type: '=='
        input: '%deluxemenus_meta_change-the-lore_INTEGER%'
        output: 4
  click_commands: # you can use one of these [meta], im using the second one
    #- '[meta] set change-the-lore STRING today'
    - '[meta] set change-the-lore INTEGER null'
    - '[refresh]'