#Dm requirements help

1 messages · Page 1 of 1 (latest)

lost grail
#

Hey, I am trying to get my shop menu to work, I am trying to take money from player and give him the items, the menu works but the requirements and buying/giving items doesnt work
example of my try:
end_crystal:
display_name: "&bEnd Crystal &7| &a$1950"
material: END_CRYSTAL
amount: 2
slot: 10
left_click_requirement:
requirements:
money:
type: has money
ammount: 1950
succes_commands:

'[console] money take %player% 1950'
'[console] give %player% end_crystal 2'
deny_command:
"[message] Hey %player% you don´t have enough money to buy this item."

#

just tried it on the end crystal but it doesnt work

lost grail
#

anyone please?

ember moon
#

For example:

  end_crystal:
    display_name: "&bEnd Crystal &7| &a$1950"
    material: END_CRYSTAL
    amount: 2
    slot: 10
    left_click_commands:
      - '[console] money take %player% 1950'
      - '[console] give %player% end_crystal 2'
    left_click_requirement:
      requirements:
        money:
          type: has money
          ammount: 1950
      deny_command:
        - "[message] Hey %player% you don´t have enough money to buy this item."
lost grail
ember moon
#

Broken YAML

lost grail
#

it gives me this when I click on that item

ember moon
#

Ah. I didn't notice that part. You need to use %player_name%

#

If that still doesn't work, execute /papi parse me player and then /papi reload. After you execute these 2 commands, %player_name% should work.

lost grail
#

yes, it works, but when I buy end crystal with 0 money it still buys it

ember moon
#

ammount

#

typo

#

change it to amount

#

there should only be 1 m

#

in the requirement

lost grail
#

yea, that works

#

but the deny command not

ember moon
#
    left_click_requirement:
      requirements:
        money:
          type: has money
          amount: 1950
      deny_commands:
        - "[message] Hey %player% you don´t have enough money to buy this item."
#

It should be plural. deny_commands.

#

You were missing the s.

#

Try this