#DELUXEMENU requirement a item

1 messages · Page 1 of 1 (latest)

tame nebula
#

Hi there,

I would like some help with a deluxemenu gui.

I want to create a variable that, if the player has an item with the characteristics listed in the config, executes a command, otherwise sends a message. However, I'm not sure what's wrong with my code.

boost_1: material: PAPER nbt_int: CustomModelData:321 slot: 37 display_name: "&a&lғᴏʀᴛᴜɴᴀ" lore: - "&r" - "&bᴄʟɪᴄᴄᴀᴍɪ&7 ᴘᴇʀ &2ʀɪᴄᴇᴠᴇʀᴇ" - "&fᴛᴜᴛᴛɪ&7 ɪ &bᴄᴏᴍᴀɴᴅɪ ᴜᴛɪʟɪ" - "&7ᴘᴇʀ &6ɢɪᴏᴄᴀʀᴇ &7sᴜʟ &dsᴇʀᴠᴇʀ" - "&7" click_requirement: commands: type: has_item material: "TOTEM_OF_UNDYING" modeldata: 3 amount: 1 glow: true name: "&bᴛɪᴄᴋᴇᴛ" lore: - '&7' - '&7ᴜsᴀʟᴏ ᴀʟ &eᴡᴀʀᴘ &bᴛɪᴄᴋᴇᴛ' - '&7ᴘʀᴇsᴇɴᴛᴇ ᴀʟʟᴏ &asᴘᴀᴡɴ' - '&7' success_commands: - '[PLAYER] boost-luck' deny_commands: - '[message] Non hai abbastanza item' - '[message] Non hai abbastanza item'

hard orchid
#

Few things

#
click_requirement:
  commands:

this is incorrect syntax

#

for a click_requirement to be checked, you NEED click_commands defined

#

delete your success_commands and make click_commands (lined up with click_requirement)

#

As for the click_requirement, you're missing requirements and a requirement name

amber questBOT
#
FAQ Answer:
view_requirement:
  requirements:
    requirement_name:
      type: TYPE

More info on the Wiki

tame nebula
# hard orchid As for the `click_requirement`, you're missing `requirements` and a requirement ...

hi , like this?

`click_commands:

  • '[PLAYER] boost-luck'
    click_requirement:
    requirements:
    commands:
    type: has_item
    material: "TOTEM_OF_UNDYING"
    modeldata: 3
    amount: 1
    name: "&bᴛɪᴄᴋᴇᴛ"
    lore:
    - '&7'
    - '&7ᴜsᴀʟᴏ ᴀʟ &eᴡᴀʀᴘ &bᴛɪᴄᴋᴇᴛ'
    - '&7ᴘʀᴇsᴇɴᴛᴇ ᴀʟʟᴏ &asᴘᴀᴡɴ'
    - '&7'
    deny_commands:
    • '[message] Non hai abbastanza item'
    • '[message] Non hai abbastanza item'`
tame nebula
#

it's possible to require item is glow?

hard orchid
#

not with has item, but you honestly shouldn't need anything except modeldata, maybe lore, to confirm the item is the correct one

#

If you want to check enchantments you can use the checkitem expansion

#

?checkitem

amber questBOT
#
FAQ Answer:

Command:

/papi ecloud download checkitem
/papi reload

Manual Download:
Download
Click here for more information on how to use the CheckItem Expansion.

tame nebula
#

how i can implement placeholder for a requirement?

tame nebula
hard orchid
#

string equals type

tame nebula
#

so just "type"?

#

sorry im bad in this

tame nebula
#

for input?

#

what should i use?

hard orchid
#

the placeholder

tame nebula
#

oh ok thanks

#

i will try

hard orchid
#

again, you don't really need to

#

the item you have is most likely unique with material, modeldata, and lore alone

#

even lore alone I bet would be enough

#

can't really fake lore

#

names, maybe

#

modeldata no

#

but not sure if you use the same modeldata in other custom items, but lore seems unique

tame nebula
#

ok , so now this code is correct , sure?

`click_commands:

  • '[PLAYER] boost-luck'
    click_requirement:
    requirements:
    commands:
    type: string equals type
    output: 'yes'
    material: "TOTEM_OF_UNDYING"
    amount: 1
    name: "&bᴛɪᴄᴋᴇᴛ"
    lore:
    - '&7'
    - '&7ᴜsᴀʟᴏ ᴀʟ &eᴡᴀʀᴘ &bᴛɪᴄᴋᴇᴛ'
    - '&7ᴘʀᴇsᴇɴᴛᴇ ᴀʟʟᴏ &asᴘᴀᴡɴ'
    - '&7'
    deny_commands:
    • '[message] Non hai abbastanza item'
    • '[message] Non hai abbastanza item'`

just let me know if im stupid

hard orchid
#

no, you only need type, input, output...

#

and you have no checkitem placeholder

#

Can you explain why you want to do this?

#

Do you have multiple custom items using the same exact lore?

#

If not, then there is no reason to add extra steps

hard orchid
#

Then there is no need

#

Find what makes your item unique

#

do you ever use the CustomModelData 3 for the totem_of_undying for ANY other items?

hard orchid
#

Okay then I recommend just checking material and lore

#

those alone are unique to your ticket item

#

and can not be faked

#

no need for extras like modeldata, enchants, name, trying to deal with checkitem placeholders, etc.

tame nebula
#

so , rn i need to write input with placeholder?

hard orchid
#

no.

#

Use has item

#

with material and lore

hard orchid
tame nebula
#

oh ok thanks

#

but [041814 ERROR]: [DeluxeMenus] Failed to load menu items for menu: profile_ticket
Skipping menu: profile_ticket

hard orchid
#

?paste

amber questBOT
#
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

hard orchid
#

send menu

tame nebula
hard orchid
#

ah ya you're indentation is off

hard orchid
tame nebula
#

so it's a problem of space?

hard orchid
#

yes the spacing, the indentation

#

actually

#

your entire boost_1 item is also wrongly indented

#

as well as what I pointed out earlier

#

notice your other items

tame nebula
#

oh ok now it work(?)

menu loaded but , when i click on item it don't say anything

#

i tried to switch click_commands:

  • '[PLAYER] boost-luck'

with

click_commands:

  • '[message] boost-luck'

but don't say anything

hard orchid
#

?paste

amber questBOT
#
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

tame nebula
#

don't show errors

hard orchid
#

you need to further indent everything under click_commands

#

they should be lined up with lore

tame nebula
#

oh now it work :))

how i can do , if has item , take 1 and execute commands ?

hard orchid
#

What plugin does your item come from?

tame nebula
#

EI ( executable items )

hard orchid
#

I believe that EI has a remove command

#

/ei remove or /ei take?

tame nebula
#

oh yeah have a take command , i should write this in click commands?

hard orchid
#

yes

tame nebula
#

wait , another problem , when i click the item ( of gui ) and i haven't the "item" requirement , it say "its correct!" the same

tame nebula
hard orchid
#

%player_name%

tame nebula
#

thx

hard orchid
#

make sure you have the player expansion
/papi ecloud download player /papi reload

tame nebula
#

just let me know

#

@hard orchid ( sorry for ping )

hard orchid
#

send current menu

#

?paste

amber questBOT
#
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

hard orchid
#

ah requirement is still off

tame nebula
#

it work without requirement

hard orchid
#

might've gotten a message in console about it

tame nebula
hard orchid
#

what if you did

lore:
- "&eᴡᴀʀᴘ &bᴛɪᴄᴋᴇᴛ"
lore_contains: true
tame nebula
#

:((

tame nebula
#

@hard orchid

hard orchid
tame nebula
#

oh

#

so only this line for lore?

#

i will try

hard orchid
#

try using the checkitem expansion then

#
      type: string equals
      input: '%checkitem_mat:TOTEM_OF_UNDYING,custommodeldata:3,lorecontains:&eᴡᴀʀᴘ &bᴛɪᴄᴋᴇᴛ%'
      output: 'yes'

Type /papi parse me %checkitem_mat:TOTEM_OF_UNDYING,custommodeldata:3,lorecontains:&eᴡᴀʀᴘ &bᴛɪᴄᴋᴇᴛ% to test it

tame nebula
#

don't work 😦

#

say "no" when i have item in hand

hard orchid
#

/papi parse me %checkitem_mat:TOTEM_OF_UNDYING,custommodeldata:3,lorecontains:ᴛɪᴄᴋᴇᴛ%

#

?

tame nebula
#

ye

hard orchid
#

/papi parse me %checkitem_mat:TOTEM_OF_UNDYING,custommodeldata:3,lorecontains:&bᴛɪᴄᴋᴇᴛ%

#

?

tame nebula
#

don't work

hard orchid
#

/papi parse me %checkitem_mat:TOTEM_OF_UNDYING,custommodeldata:3,lorecontains:§bᴛɪᴄᴋᴇᴛ%

#

?

tame nebula
#

same problem

hard orchid
#

weird usually color doesn't have this issue

#

where is your item from

tame nebula
hard orchid
#

ei right

#

can you send your ei config

tame nebula
tame nebula
hard orchid
#

for the item*

amber questBOT
#
📋 Your paste: sussolino
https://paste.helpch.at/nuqetejuqi

A member of staff has requested I move your message to a paste,
Most likely because it contains a config/error/code snippet.

tame nebula
#

oh sorry

#

ah

#

im stupid

hard orchid
#

umm

tame nebula
#

that's a paper

#

not a totem

hard orchid
#

it's also cmd 1907

#

wrong one?

tame nebula
hard orchid
#

ah

tame nebula
#

any idea?

hard orchid
#

can you send the correct item?

tame nebula
hard orchid
#

?

tame nebula
hard orchid
#

that's paper

#

and cmd 1907

hard orchid
hard orchid
tame nebula
#

had been a paper from the beginning, I had the wrong item. sorry

hard orchid
#

I mean, I think you found your issue then...

#

you can try it with checkitem or with has item

tame nebula
#

papi parse me %checkitem_mat:PAPER,custommodeldata:1907,lorecontains:ᴛɪᴄᴋᴇᴛ% this work

hard orchid
#

so tell me

#

are you only using PAPER with CMD 1907 for THIS item?

#

or are you using it for other items as well?

hard orchid
#

Because I asked this before when you were using Totem/3

hard orchid
#

I would recommend not using checkitem, but again it won't really matter

#

just requires you to have the extra expansion installed

hard orchid
tame nebula
#

ok thx

#

but

#

output is a message when is correct sure?

#

how i can send a deny message with this check?

hard orchid
#

output is what you want it to equal

tame nebula
#

for messages what i would use?

hard orchid
#

you add what you want

#

like you had before you had deny_commands defined

tame nebula
#

ok thanks :))

#

have a nice day

tame nebula
hard orchid
#

type: has item not type: has_item

tame nebula
#

oh yeah , but first work "boost_1" , "boost_2" not

hard orchid
tame nebula
#

i have fixed