#delux menus

1 messages · Page 1 of 1 (latest)

lament walrus
#

hello im trying to make When the player first opens the menu, the item should show as Locked with a lore saying LOCKED + price.

If the player clicks it:

Check if they have enough money.

If they don’t → deny the purchase and send a chat message: “You don’t have enough money”.

If they do → take the money, and refresh/close the menu.

After purchase, when they open the menu again, the item should now show as Unlocked with lore saying UNLOCKED.

When they click the Unlocked item, it should teleport the player
idk whats error in my gui now its only take money with out do anythings

menu_title: ':offset_-48::warp:'
open_command: war
register_command: true
size: 54

items:
  'warp_s_unlocked':
    material: paper
    slot: 0
    amount: 1
    display_name: '&aWarp S'
    lore:
      - "&a✔ UNLOCKED"
      - "&7Click to teleport!"
    view_requirements:
      has_perm:
        type: has_permission
        permission: warp.s.unlocked
    left_click_commands:
      - '[player] warp s'
      - '[message] &aTeleporting to warp s...'

  'warp_s_locked':
    material: paper
    slot: 0
    amount: 1
    display_name: '&cWarp S'
    lore:
      - "&c✖ LOCKED"
      - "&7Price: &6100$"
      - "&eClick to purchase!"
    view_requirements:
      no_perm:
        type: "!has_permission"
        permission: warp.s.unlocked
    left_click_requirements:
      has_money:
        type: ">="
        input: "%vault_eco_balance%"
        output: 100
    left_click_commands:
      - '[console] eco take %player_name% 100'
      - '[console] lp user %player_name% permission set warp.s.unlocked true'
      - '[message] &a✔ Successfully purchased warp s!'
      - '[sound] ENTITY_PLAYER_LEVELUP'
      - '[refresh]'
    left_click_requirement_fail_commands:
      - '[message] &c✖ Insufficient funds! You need 100$'
      - '[sound] ENTITY_VILLAGER_NO'

can anyone help me please?

modest pulsar
#

oh wait

lament walrus
#

only take money and dont close menu to set unlocked and tp

modest pulsar
#
menu_title: ':offset_-48::warp:'
open_command: war
register_command: true
size: 54

items:
  'warp_s_unlocked':
    material: paper
    slot: 0
    amount: 1
    priority: 1
    display_name: '&aWarp S'
    lore:
      - "&a✔ UNLOCKED"
      - "&7Click to teleport!"
    view_requirements:
      has_perm:
        type: has permission
        permission: warp.s.unlocked
    left_click_commands:
      - '[player] warp s'
      - '[message] &aTeleporting to warp s...'

  'warp_s_locked':
    material: paper
    slot: 0
    amount: 1
    priority: 2
    display_name: '&cWarp S'
    lore:
      - "&c✖ LOCKED"
      - "&7Price: &6100$"
      - "&eClick to purchase!"
    left_click_requirements:
      has_money:
        type: ">="
        input: "%vault_eco_balance%"
        output: 100
        deny_commands:
        - '[message] &c✖ Insufficient funds! You need 100$'
        - '[sound] ENTITY_VILLAGER_NO'
    left_click_commands:
      - '[console] eco take %player_name% 100'
      - '[console] lp user %player_name% permission set warp.s.unlocked true'
      - '[message] &a✔ Successfully purchased warp s!'
      - '[sound] ENTITY_PLAYER_LEVELUP'
      - '[refresh]'

there that

#

i didnt touch ur cmds, only adjusted view requirement and move ur deny command bc it was in the wrong place

#

added priorities too bc if its on the same slot u need that

lament walrus
#

not working only warp now

modest pulsar
#

only warp?

#

theyre both warp

#

which one

#

lol

lament walrus
#

i mean i dont see locked only unlocked

modest pulsar
#

got it

#

do you have the permission warp.s.unlocked added to yourself?

#

and/or opped?

lament walrus
#

remove this permission if you can i want all players do this
locked = take money and refrsh the menu
unlocked = only warp
that what i need

modest pulsar
#

That unfortunately doesnt answer my question, do you have the permission added to yourself? Because if so- you'd need to negate that

lament walrus
#

yes i have

modest pulsar
#

Thats your problem then

#

If you remove that from yourself that menu should work :)

lament walrus
#

i remove it but same

#

only warp and unlocked

#

you can help me with this? @modest pulsar

modest pulsar
#

You dont need to ping im already looking 😂

lament walrus
#

okay sorry 🙂

#

you can edit cmds just need to fix what i need

modest pulsar
#

nw im in the middle of a phas game so itll be a few mins

lament walrus
#

ok

modest pulsar
#

didnt see that at first

#

oh wait youll have to add more 1 sec

#
    view_requirement:
      requirements:
        has_perm:
          type: has permission
          permission: warp.s.unlocked
#

there

lament walrus
#

can you see this forget the first code
i set now for money just now need to change lore of locked to unlocked ichange the perm to meta

menu_title: ':offset_-48::warp:'
open_command: war
register_command: true
size: 54
items:
  "LOCKED_SWORD":
    slot: 13
    priority: 0
    material: DIAMOND_SWORD
    display_name: "&cLocked Sword"
    lore:
      - "&7Status: &cLOCKED"
      - "&7Price: &6$100"
    view_requirement:
      requirements:
        not_bought:
          type: "!has meta"
          key: bought_sword
          meta_type: STRING
    left_click_requirement:
      requirements:
        has_money:
          type: has money
          amount: 100
      deny_commands:
        - "[message] &cYou don’t have enough money!"
    left_click_commands:
      - "[console] eco take %player_name% 100"
      - "[meta] set bought_sword STRING true"
      - "[message] &aYou purchased the Sword!"
      - "[refresh]"   # refresh menu to swap item

  "UNLOCKED_SWORD":
    slot: 13
    priority: 1
    material: DIAMOND_SWORD
    display_name: "&aUnlocked Sword"
    lore:
      - "&7Status: &aUNLOCKED"
    view_requirement:
      requirements:
        bought:
          type: has meta
          key: bought_sword
          meta_type: STRING
modest pulsar
#

replace the whole view req section with that

lament walrus
#

im just trying for new code

modest pulsar
#

remove view req from the locked section you dont need it there. Only on unlocked

#

Are you asking me to change it to meta?

lament walrus
#

yes

modest pulsar
#

you need a "value: true" in ur unlocked sections view requirement

#

because you have it set here to true
- "[meta] set bought_sword STRING true"

lament walrus
#

can you make it 🙂 im new in deluxe \

modest pulsar
#

best way to learn is by doing im afraid. I can it just wont help you in the long run

#

DM wiki is ur best friend starting out

lament walrus
#

i do but i cant send the long code to wiki 🙂

modest pulsar
#
menu_title: ':offset_-48::warp:'
open_command: war
register_command: true
size: 54
items:
  "LOCKED_SWORD":
    slot: 13
    priority: 0
    material: DIAMOND_SWORD
    display_name: "&cLocked Sword"
    lore:
      - "&7Status: &cLOCKED"
      - "&7Price: &6$100"
    left_click_requirement:
      requirements:
        has_money:
          type: has money
          amount: 100
      deny_commands:
        - "[message] &cYou don’t have enough money!"
    left_click_commands:
      - "[console] eco take %player_name% 100"
      - "[meta] set bought_sword STRING true"
      - "[message] &aYou purchased the Sword!"
      - "[refresh]"   # refresh menu to swap item

  "UNLOCKED_SWORD":
    slot: 13
    priority: 1
    material: DIAMOND_SWORD
    display_name: "&aUnlocked Sword"
    lore:
      - "&7Status: &aUNLOCKED"
    view_requirement:
      requirements:
        bought:
          type: has meta
          key: "bought_sword"
          meta_type: STRING
          value: "true"

try that, i cant get on a test server to play with it so im flying blind

#

i also dont use meta much

lament walrus
#

only locked and take money without unlocked

lament walrus
lament walrus
#

i want to reset all players meta how ? @modest pulsar 🙂 sorry for ping