#DeluxeMenu - Max usage per day
1 messages · Page 1 of 1 (latest)
okay so apparently I found a bug in deluxemenus, != comparatortype doesn't actually exist
this build will add the != comparator type
hopefully pushed to dev builds soon
Dude You Are AWESOME!
Looking through the file if I wanted to do multiple items would I need to change this:
stop_at_success: true
requirements:
nodate: # Needed to open the menu if the day is not set
type: '=='
input: '%deluxemenus_meta_DAILY-DATE_INTEGER_-1%'
output: '-1'
optional: true
success_commmands:
- '[meta] set DAILY-DATE INTEGER %server_time_D%'
- '[refresh]<delay=1>'
datechange:
type: '!='
input: '%deluxemenus_meta_DAILY-DATE_INTEGER_0%'
output: '%server_time_D%'
optional: true
success_commands:
- '[meta] set DAILY-DATE INTEGER %server_time_D%'
- '[meta] remove DAILY-PURCHASED-ITEM1 INTEGER 0'
- '[refresh]<delay=1>'
- '[message] &aDaily Limits Refreshed!'
datenotchange: # Needed to open the menu if the day doesn't change
type: '=='
input: '%deluxemenus_meta_DAILY-DATE_INTEGER_-1%'
output: '%server_time_D%'
optional: true```
To this:
``` minimum_requirements: 1
stop_at_success: true
requirements:
nodate: # Needed to open the menu if the day is not set
type: '=='
input: '%deluxemenus_meta_DAILY-DATE_INTEGER_-1%'
output: '-1'
optional: true
success_commmands:
- '[meta] set DAILY-DATE INTEGER %server_time_D%'
- '[refresh]<delay=1>'
datechange:
type: '!='
input: '%deluxemenus_meta_DAILY-DATE_INTEGER_0%'
output: '%server_time_D%'
optional: true
success_commands:
- '[meta] set DAILY-DATE INTEGER %server_time_D%'
- '[meta] remove DAILY-PURCHASED-ITEM1 INTEGER 0'
- '[meta] remove DAILY-PURCHASED-ITEM2 INTEGER 0'
- '[refresh]<delay=1>'
- '[message] &aDaily Limits Refreshed!'
datenotchange: # Needed to open the menu if the day doesn't change
type: '=='
input: '%deluxemenus_meta_DAILY-DATE_INTEGER_-1%'
output: '%server_time_D%'
optional: true```
Basically add another line to the Datechange Meta and to the click_requirement section for each item.
yep!
and the click_commands for each item
Hey man, Thanks for all the help. I tried to set it up and it sort of works. It does the 3 times but it doesn't seem to reset like it's suppose to. Any ideas what's wrong with my code?
open_command: moneyshop
size: 27
open_requirement:
minimum_requirements: 1
stop_at_success: true
requirements:
nodate: # Needed to open the menu if the day is not set
type: '=='
input: '%deluxemenus_meta_DAILY-DATE_INTEGER_-1%'
output: '-1'
optional: true
success_commmands:
- '[meta] set DAILY-DATE INTEGER %server_time_D%'
- '[refresh]<delay=1>'
datechange:
type: '!='
input: '%deluxemenus_meta_DAILY-DATE_INTEGER_0%'
output: '%server_time_D%'
optional: true
success_commands:
- '[meta] set DAILY-DATE INTEGER %server_time_D%'
- '[meta] remove DAILY-PURCHASED-ITEM1 INTEGER 0'
- '[refresh]<delay=1>'
- '[message] &aDaily Limits Refreshed!'
datenotchange: # Needed to open the menu if the day doesn't change
type: '=='
input: '%deluxemenus_meta_DAILY-DATE_INTEGER_-1%'
output: '%server_time_D%'
optional: true
items:
'glass':
material: WHITE_STAINED_GLASS_PANE
slots: [0-26]
hide_attributes: true
display_name: ' '
priority: 3
'Virtual_Spawners':
material: Spawner
slot: 10
display_name: 'Virtual Spawners'
priority: 1
lore:
- ' '
- 'Click here to access the Virtual Spawner Shop'
- ' '
- 'These spawners will not spawn entities but save all drops and experience virtually'
- ' '
click_commands:
- '[close]'
- '[player] vsmenu22234'
'Sell_Wand':
material: Stick
slot: 13
display_name: 'Sell Wand'
priority: 1
lore:
- ' '
- 'Click to buy a Sell Wand'
- 'Left click to see sell quantity and price'
- 'Right click to sell all items in the chest'
- ' '
- 'Cost: $400,000 for 100 uses!'
click_requirement:
requirements:
Econ:
type: has money
amount: 400000
deny_commands:
- '[close]'
- '[message]&#FF0040You Need More Money!'
click_commands:
- '[takemoney] 400000'
- '[console] sellwandgive %player_name% tier_1'
'Item1-Purchaseable':
material: TRIPWIRE_HOOK
slot: 16
priority: 2
display_name: 'Purchase A Legacy Cosmetic Key'
lore:
- ' '
- 'Cost: $5,000,000'
- 'Purchased: &6%deluxemenus_meta_DAILY-PURCHASED-ITEM1_INTEGER_0%'
- ' '
- 'Daily Limit: &c3'
click_requirement:
requirements:
limitnotreached: # Backup requirement, duplicate of the view requirement for Item1-LimitReached. Put in place to avoid seeing the Purchaseable item when the limit HAS been reached.
type: '!has meta'
key: DAILY-PURCHASED-ITEM1
meta_type: INTEGER
value: 3
deny_commands:
- '[message] You''ve already purchased 3 keys today!'
- '[refresh]'
hasmoney: # Checks that the user has $10,000
type: has money
amount: 5000000
deny_commands:
- '[message]&#FF0040You Need More Money!'
click_commands:
- '[meta] add DAILY-PURCHASED-ITEM1 INTEGER 1'
- '[console] ecrates key give %player_name% legacy 1'
- '[takemoney] 5000000'
- '[refresh]'
'Item1-LimitReached':
material: TRIPWIRE_HOOK
slot: 16
priority: 1
display_name: "&cDaily Limit Reached 3/3"
lore:
- "&cYou've already purchased 3 keys today!"
view_requirement:
requirements:
limitreached:
type: has meta
key: DAILY-PURCHASED-ITEM1
meta_type: INTEGER
value: 3
Or is there a way to reset when the server restarts?
it resets on the next day
i haven't checked your code yet tho
@fathom geode
is it not resetting on the next day?
No it's not
type /papi parse me %deluxemenus_meta_DAILY-PURCHASED-ITEM1_INTEGER_0% | %deluxemenus_meta_DAILY-DATE_INTEGER_-1% | %server_time_D%
what does it say
send a picture
3 | -1 | 324
seems the date was never set
hmm
lemme see
you don't have the permission to bypass open requirements by chance, do you?
deluxemenus.openrequirement.bypass.*
No, I tried it without OP commands
you should NOT have that perm
hmmmk
ahh
i see it
and it was my fault
I remember trying to find this mistake for AGES
glad it didn't take me as long this time
Yeah, that's the story of my life...
well
you can set your date to yesterday
/dm execute <player> [meta] set DAILY-DATE INTEGER 323
I did and it still says I used up all 3.
what if you open the menu again
just if the delay wasn't enough
it didn't send a message saying daily limits refreshed tho?
what version of deluxemenus are you on
I did. And I even went back another day and still doing the same thing. And no message.
the one i sent?
It is
type this
3 | 322 | 324
hmm maybe the version i sent wasn't working, change != to !string equals
at the top for datechange
Still the same issue
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

A real head scratcher.
I have players on right now. So when the server does it's automatic restart in about 6 hours and after I get off work I can report back to you.
ah
here
add success commands to datenotchange
https://paste.helpch.at/egegupiguh.yaml
@fathom geode
try that and see what message you're receiving
No messages
correct
I havent' changed any perms and I doubled check to ensure that I don't have any set up
using the command /moneyshop
/moneyshop1?
Yeah
what if you /dm open <player> <menu> ?
idrk
seems like it's not refreshing the menu or something
no console errors or anything?
no console errors, and no messages
Try that?
yeah
No errors, no messages
Nope, nothing.
okay i'm gonna just check once more on your perms
you have NO PERMS?
for this user?
Correct
I'll set myself to default player without op perms
op or * would do it
Ok, now I'm getting debug 1
so it's working now i bet
set your date to previous date
and reopen
earlier, when your date got set you must have been default no-op
then changed perms or opped in between
an it stopped working because you were bypassing
debug 2, but unable to buy
Ok, I did something wrong. Daily Limits refreshed appeared. but it still says I have purchased 3/3
after re-opening?
Reopened a second time and now it's working
yep the delay needs to be increased
go back to your original mmenu
without the debugs
or just remove them
I'll remove them
and increase the delay to 2 or 3 ticks
Alright
for datechange
and maybe for nodate too
idk if that really matters ngl
i feel that refresh is useless
can prob remove it
Alright, thank you very much for your help! You are awesome!
no problem
I would negate that bypass requirement from your perms just fyi
from the owner group or whatever
so set it to false?
