#Don't get Comparators working correct

1 messages · Page 1 of 1 (latest)

cobalt sphinx
#

I'm making quest for my private server where they can claim a title when they complete the quest.
But people can now always claim the price even when they don't have the requirement's complete.

When you have claimed the title you get to see the correct item. Tried a lot of different things or i can claim the price of i can't. When i claimed it I always see the Claimed item.

Got newest version of deluxemenus

'RobinClaimed':
material: minecart
slot: 9
priority: 1
display_name: '&aArchery Quest &f[&aClaimed&f]'
lore:
- '&eTitle: %deluxetags_tag_Hood%'
- ''
- '&eYou already claimed this title.'
view_requirement:
requirements:
Perm: #Show's up when requirments are okay
type: 'string equals ignorecase'
input: '%luckperms_has_permission_deluxetags.tag.hood%'
output: 'yes'
left_click_commands:
- '[message] §6You already claimed this'
right_click_commands:
- '[message] §6You already claimed this'
'RobinClaim':
material: chest_minecart
slot: 9
priority: 2
display_name: '&aArchery Quest &f[&2Claim&f]'
enchantments:
- mending;1
hide_enchantments: true
lore:
- '&eTitle: %deluxetags_tag_Hood%'
- ''
- '&eYour Archery level: &a%ajlb_value_mcmmo_level_archery_alltime%/1.000'
view_requirement:
requirement:
Perm1:
type: '>='
input: '%ajlb_value_mcmmo_level_archery_alltime%'
output: '1000'
click_requirement:
requirment:
Perm2:
type: '>='
input: '%ajlb_value_mcmmo_level_archery_alltime%'
output: '1000'
left_click_commands:
- '[console] lp user %player_name% permission set deluxetags.tag.hood true'
- '[message] §aYou claimed your new title.'
- '[close]'
right_click_commands:
- '[console] lp user %player_name% permission set deluxetags.tag.hood true'
- '[message] §aYou claimed your new title.'
- '[close]'
'RobinUnclaim':
material: bow
slot: 9
priority: 3
display_name: '&aArchery Quest &f[&cUnclaimable&f]'
lore:
- '&eTitle: %deluxetags_tag_Hood%'
- ''
- '&eYour Archery level: &c%ajlb_value_mcmmo_level_archery_alltime%/1.000'
left_click_commands:
- '[message] §cYou do not have the requirment to claim this.'
right_click_commands:
- '[message] §cYou do not have the requirment to claim this.'

ripe rain
#

Can you repost this in a paste?

oblique prismBOT
#
FAQ Answer:

Paste Services
When asking for help with a config/menu/code issue please use our paste bin:
(we prefer it over pastebin.com)
HelpChat Paste - How To Use

cobalt sphinx
ripe rain
#

Ah, right here

    click_requirement: #'%ajlb_value_mcmmo_level_archery_alltime% > 1001'
      requirment: 
        Perm2:
          type: 'Comparators >='
          input: '%ajlb_value_mcmmo_level_archery_alltime%'
          output: '1001'
    left_click_commands:
      - '[console] lp user %player_name% permission set deluxetags.tag.hood true'
      - '[message] §aYou claimed your new title.'
      - '[close]'
    right_click_commands:
      - '[console] lp user %player_name% permission set deluxetags.tag.hood true'
      - '[message] §aYou claimed your new title.'
      - '[close]'
#

click_requirement is for click_commands
left_click_requirement is for left_click_commands
right_click_requirement is for right_click_commands

#

since they both do the same thing, just get rid of one and make it click_commands

ripe rain
#

also just saw, switch your type back to type: '>=' instead of type: 'Comparators >='

cobalt sphinx
#

It's still not working made click commads short that helps 🙂

The feedback what i get when i do /papi parse Oekepoek %mcmmo_level_archery% get now the feedback back for 125 but still i can claim the title.

https://paste.helpch.at/ukadahasov.yaml

ripe rain
#

it should be requirements

cobalt sphinx
#

I'm not sure what is wrong but it works fine now.

But what you send there is somewhere a differents between Perm1 and Perm2. Because i couldn't click the item but i could see it. When i paste the requirement from the command to the view it worked.

So thank you very much