#Deny being brought again
1 messages · Page 1 of 1 (latest)
Copy from #general-plugins
in the open commands add
- "[meta] set BoughtUpgrade BOOLEAN %deluxemenus_meta_BoughtUpgrade_BOOLEAN_false%"
Then in the item
requirements:
BoughtUpgrade:
type: has meta
key: BoughtUpgrade
meta_type: BOOLEAN
value: false
deny_commands:
- "[message] &cYou have already bought this upgrade!"
And lastly add
- "[meta] set BoughtUpgrade BOOLEAN true"
``` in the click commands
lets just stay here
im doing something wrong here
It still allows you to buy multiple times?
Try aligning the second deny_commands with amount
has_money:
type: has money
amount: 1000000
deny_commands:
- "[message] &cYou don't have enough money for this!"
just add two spaces before deny commands and the line below
now it just say idont have enough money
sorry no
it say i already brought this upgrade
alright can you do /papi parse me %deluxemenus_meta_BoughtUpgrade_BOOLEAN_false%
done
what does it say?
false
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
this is on my test server btw before i implement into main
https://pastes.dev/nNDAU2kgAa Try this, there's a difference between open_command and open_commands :D
Great! glad it works now
thanks mate!!
now i gotta go understand what all that means so i can implement it in other aspects later on
lol
Np, basically the open command is making sure the BoughtUpgrade value is not null, so it's either true or false. The rest is just checking if it's false, it runs the deny command (so it's true, which means you've bought it)
nice thanks, yeah i tried to buy it again and told me i already brought it.
You can also do
BoughtUpgrade:
type: has meta
key: BoughtUpgrade
meta_type: BOOLEAN
value: true
success_commands:
- "[message] &cYou have already bought this upgrade!"
which is probably easier to read and understand. This way the open command isn't even necessary I think
value: false
deny_commands
is the same as
value: true
success_commands
just the same but reverse
yep
nice
the true way gives the dont have money for this
instead of already brought message
the other way is good for now
i can do some more reading and understand a bit better
appreciate the help
np
what about if i wanted to turn the brought upgrade to stone once its brought so its not even an option
or something along those lines
Maybe something like so
https://paste.helpch.at/hesecotaxa.yaml
@formal siren I don't have time to read the entire conversation but can you please make a summary of all that happened? Basically I want to know what your current menu is, how the menu is supposed to work and how it actually works.
my bad, try this: https://paste.helpch.at/foxugojizo.yaml
that worked good, now i gotta figure out how to make it check that the player has an island before they can use it, also check to make sure that they have brought the previous upgrade to be able to get the next.
Here's a version where upgrade 1 has to be bought before upgrade 2: https://paste.helpch.at/ulafusuhis.yaml
and here's one where it checks if the player has an island before opening: https://paste.helpch.at/yizevakixa.yaml. Note that this placeholder doesn't exist, it's just an example
Sweet I’ll check it out after work thanks
how do i make id so if they click on something in the GUI it will give them a link to go somewhere on the web, like a webstore ?
use [minimessage] or [json]
not too sure how to do that, ive looked at the generator for a json text but confusing
like i want once they click on say a rank in the gui it pops up like this
im prefer minimessage
this is a example
[minimessage] <click:open_url:https://your.link/>Click here
It's not possible to do it without sending a message in the chat and having the player to click it first