#Level Menu (Claim System)

1 messages · Page 1 of 1 (latest)

unique briar
#

Hello, so I made a level menu that rewards people if they meet the required playtime and money requirements. It works currently works fine as is. It gives its rewards but the problem is, it gives its rewards infinitely.

I wanted to make it so that when someone claims their reward that option will be replaced by a coal block (placeholder block for now). But I seem to be having some issues with it.

Additionally, the deny commands does not work on my menu.

I will send a snippet of my menu I would send the whole thing but I spent too much time and I don't want it to be taken.

https://paste.gg/p/anonymous/1c15f1c882494251950c810df5bffc17

#

I tried adding

  'level1-claimed':
    material: COAL_BLOCK
    display_name: '&c&lCLAIMED'
    priority: 0
    slot: 10
    view_requirement:
      reguirements:
        has_perm:
            type: has permission
            permission: meta.level.&f&l1

My logic is that, when they claim the reward, it sets their meta.level to whatever I put the command to and this will make it so that the level1-claimed item will show up instead of the level1 item.

flat oriole
#

Add another meta that stores the level as a number, and add a requirement for %luckperms_meta_level-number% >= level
E.g. if they are level 5, they will see level 1-5 as coal blocks and 6-max as normal blocks

unique briar
flat oriole
#

You can access the value of a meta key with %luckperms_meta_<key>%

#

And then compare the value to the level

unique briar
#

What I'm about to do is I'm going to make 2 different metas display-level - for the one with color codes and level for just the number?

flat oriole
#

Something like this

#

As long players need to claim the rewards in order, this will work fine

unique briar
#

and how about my deny-commands? they don't seem to work

#

when I click on them even without meeting the requirements they don't function.

flat oriole
#

Iirc they need to be inside click_requirement, move them two spaces to the right

#

You can also have deny commands per requirement

unique briar
#

so something like this? Click commands is not inside click_requirements?

flat oriole
#

Yeah iirc thats the format

#

Is been a while since ive used DM xD

near nacelleBOT
flat oriole
#

If it still doesnt work, check the wiki

unique briar
#

damn.. Do you know any tools that can help me indent stuff fast? Cause I have a lot of lines with deny commands formatted like this

#

I never knew of this

flat oriole
#

Not really, but depending on the editor you use, some (most?) let you select several lines and then press tab to add space and shift + tab to remove - or a similar shortcut

unique briar
flat oriole
#

Wdym too far?

unique briar
#

If I select them and press tab do not line with the click_requirements

flat oriole
#

Ahh, I see

#

That is unfortunate, you can look on google for a shortcut or, well, do it manually D:

unique briar
#

ah shit

flat oriole
#

First check the wiki to make sure how many spaces you need to add

unique briar
#

I checked.

#

I don't understand why there's two deny commands

#

I found a way to put indention for all the lines but it unfortunately didn't work

flat oriole
#

You can have one set of deny commands for all the requirements and also one for each individual requirement

unique briar
#

it works now. The deny command is inline with the requirements type

#

Okay, last problem.

I did the thing where it would show a coal block if it's already claimed but it just shows the coal block even if I haven't claimed it.

  'level1-claimed':
    material: COAL_BLOCK
    display_name: '&c&lCLAIMED'
    priority: 0
    slot: 10
    view_requirement:
      reguirements:
        has_perm:
          type: '>='
          input: '%luckperms_meta_level%%'
          output: '1'
    click_commands:
      - '[sound] ENTITY_VILLAGER_NO'
      - '[console] title %player_name% title {"text":"ALREADY CLAIMED!!", "color":"red", "bold":true}'
      - '[close]'
  'level2-claimed':
    material: COAL_BLOCK
    display_name: '&c&lCLAIMED'
    priority: 0
    slot: 11
    view_requirement:
      reguirements:
        has_perm:
          type: '>='
          input: '%luckperms_meta_level%%'
          output: '2'
    click_commands:
      - '[sound] ENTITY_VILLAGER_NO'
      - '[console] title %player_name% title {"text":"ALREADY CLAIMED!!", "color":"red", "bold":true}'
      - '[close]'
  'level3-claimed':
    material: COAL_BLOCK
    display_name: '&c&lCLAIMED'
    priority: 0
    slot: 12
    view_requirement:
      reguirements:
        has_perm:
          type: '>='
          input: '%luckperms_meta_level%%'
          output: '4'
    click_commands:
      - '[sound] ENTITY_VILLAGER_NO'
      - '[console] title %player_name% title {"text":"ALREADY CLAIMED!!", "color":"red", "bold":true}'
      - '[close]'
  'level4-claimed':
    material: COAL_BLOCK
    display_name: '&c&lCLAIMED'
    priority: 0
    slot: 13
    view_requirement:
      reguirements:
        has_perm:
          type: '>='
          input: '%luckperms_meta_level%%'
          output: '4'
    click_commands:
      - '[sound] ENTITY_VILLAGER_NO'
      - '[console] title %player_name% title {"text":"ALREADY CLAIMED!!", "color":"red", "bold":true}'
      - '[close]'
#

I gave myself meta.level.* false

magic hamlet
#

and do the /papi parse me %luckperms_meta_level%% returns something?

unique briar
magic hamlet
#

i m talking about the non claimed items :/

unique briar
#

ah

#

They don't have priority

#

doing /papi parse me %luckperms_meta_level% gives me blank

magic hamlet
#

issue 1 add priority: 1 to the non claimed items
issue 2 use deluxemenus meta instead o the luckperms meta which is more reliable i d say

unique briar
#

hm really? How do I add deluxemenu's meta

magic hamlet
#

i ll give u an example give me a sec

unique briar
#

thankss

magic hamlet
#

to the non-claimed item add in the actions - '[meta] add levelmeta INTEGER 1 so when they claim the item they ll get +1 of that meta and in the view requirements of each meta u can use either the

        has_meta:
          type: '>='
          input: '%deluxemenus_meta_levelmeta_INTEGER%'
          output: '1'

@unique briar

unique briar
#

Do I add it on the click_commands?

magic hamlet
#

also idk if u already have it but in the end of the actions add either a [close] so the menu will close and prevent abusing the claims or a [refresh] to refresh the menu

#

no view requirements for the claimed items

#

oh ye

#

the click commands

unique briar
#

Like this?

magic hamlet
unique briar
#

what if I want to test it again but I already have a meta. How do I clear it on my account?

magic hamlet
#

/dm execute {yourname} [meta] set levelmeta INTEGER 0

#

u can run it as a simple command

unique briar
#

gotcha

#

lemme test

#

oh, another question, if I'm opped do I automatically have mt levelmeta integer to all?

magic hamlet
#

nop

unique briar
#

oh that's a plus

magic hamlet
#

also fyi the meta is stored in the worlds folder for the players

#

so if u delete the world rip the meta 😬

unique briar
#

im not gonna delete it lol

#

it's an old SMP

magic hamlet
#

well just wanted to let u know

unique briar
#

Thank you

#

testing it now

magic hamlet
#

does it work? OKK

unique briar
#

doing some fixes with my format atm lol it's a lot of lines

magic hamlet
#

oh oke oke

unique briar
magic hamlet
#

nothing just [meta] xd

#

only change the {yourname} to your name

#

its to execute deluxemenus actions out of the plugin

unique briar
#

Well, for some reason, it says I already claimed them

magic hamlet
#

send the whole menu

#

?paste

near nacelleBOT
#
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

unique briar
#

God I hope no one steals this shit lmao

magic hamlet
#

just delete it later lol

unique briar
#

the claimed items are at the bottom

magic hamlet
#

and u still see the coal by default?

unique briar
#

yes I do

magic hamlet
#

kk lemme test it a sec

unique briar
#

Tried doing with just default permissions and cleared permissions, while also deoppe'd samething

magic hamlet
#

what do the /papi parse me %deluxemenus_meta_levelmeta_INTEGER% returns to u

unique briar
#

0

magic hamlet
#

lmao

unique briar
magic hamlet
#

its for sure a small issue

#

nvm found it

#

u have reguirements and not requirementsOKK

unique briar
#

updated. Same thing :(

magic hamlet
#

ye your deny_commands r lil off

#

i ll make an updated menu of the menu and i ll send u it

unique briar
#

oh wow thanks

unique briar
magic hamlet
#

lool ye

#

try this

#

i tested it and it worked for me so ig its fine? lmk

unique briar
#

what did you change

magic hamlet
#

the deny commands removed some no needed things (hide attributes) did the slot of the glasses in a better way and changed the reguirements to requirements

unique briar
#

okey

#

oh wow it works now but the player info is gone

#

the barrier slot replaced it

magic hamlet
#

o.O oops

#

remove the barrier slot of the slots that is in the glass

magic hamlet
unique briar
#

slots inside the bracket?

magic hamlet
#

yee thats way better

#

oops i also missed the 9 😬

#

u can delete your menu link btw

unique briar
#

alrighty

unique briar
#

is it because there's no closing bracket?

#

,53]] ?

magic hamlet
#

oops

#

i added a [ before the slots 😬

#

i did it very fast and didnt rly pay much attention xd

unique briar
#

😂 yeah I asked if slots was supposed to be inside the bracket

magic hamlet
unique briar
#

okay it works perfectly but for some reason in level 3 I have to redeem it twice

magic hamlet
#

🤨

unique briar
#

yeah, I redeem it and it's still there, and when I redeem it again both level 3 and 4 is now blocked.

magic hamlet
#

ye cause u use 4 as a requirement

#

in the 3lvl claim

unique briar
#

ohhhh

magic hamlet
#

change it to 3

unique briar
#

yeah lmao

#

okay this is perfect

#

thank you very much for the help

#

if you want to use the menu you can. But tbh, i think you can make your own with no problem lol

magic hamlet
#

its fine i dont rly need it xd

#

thats an easy menu to make

unique briar
#

jesus christ dude

magic hamlet
#

hehe

unique briar
#

why do you even need that much. Did you make menus in replacements for actual plugins

magic hamlet
#

yeee i ve replaced almost the whole workbench

#

going for the furnace next

#

i have the recipes embeded rather than the players crafting em on their own

unique briar
#

wild lmao

unique briar
#

how it looks now

magic hamlet
#

but why u include in the screens the nbt too :/

unique briar
#

idk how to remove/hide it and I didn't want to cut screenshot

magic hamlet
#

f3 + H

unique briar
#

oh i didn't know that. i thought the info is just there permanently lol thanks

magic hamlet
#

xd

#

nah by default it's not there

unique briar
#

weird.

magic hamlet
#

r u gonna post it on market or smth?

unique briar
#

well not yet

#

i was planning on putting it for free but the design is heavily influenced by a different player levels config so I don't know if that's allowed

magic hamlet
#

🤷🏻‍♂️ well no idea

unique briar
#

this is their design

magic hamlet
#

😬

#

they look similar indeed

unique briar
#

yeah, maybe I'll just credit them in the description if I ever do add it in my bbb page

magic hamlet
#

ye ye