Hello, I just created a store to buy ranks using the PlayerPoint plugin. Everything works perfectly, however I would like to know your opinion and know if there is another way to do it simpler and more optimized. I would also like to add a confirmation system to prevent a player from buying a rank by mistake, is it possible to make a universal confirmation.yml file? Without creating several confirmation files for each item?
#Shop system
1 messages · Page 1 of 1 (latest)
The menu looks decent. I can't think of a way to improve or simplify it.
Regarding a confirmation menu, it is possible to do if you use the Metadata feature.
If I remember, I'll try to create an example later
Thank you so much 🙂
In the meantime, I've sent an example a while ago to someone else that wanted a delete home confirmation. Maybe that can inspire you: #general-plugins message
Hi @slender girder. I had no time yesterday, but i got to it today.
I've taken the first rank in your menu and used it as an example.
Here is your menu: https://paste.helpch.at/lowalusuco.lua
And here is the confirmation menu: https://paste.helpch.at/otesewazew.less
The way it works:
- A player opens the rank purchase menu
- They click a rank which saves some data: rank name, rank display name and rank price
- The confirmation menu is used to then set the rank and remove the cost from the player balance.
I just looked at what you did for me and took the time to understand the code. It's actually a super simple system, but it's this kind of thing that I didn't know how to do to retrieve the name of the rank, the money, etc.
Yeah it isn't very complex. You just need to familiarize yourself with how meta works.
Btw, those open_commands are executed when the menu is opened. They are there so the values reset when a player opens the shop menu.
Hello, so I took the time to test the code you gave me and it works. However, is there not a simpler way than for example if we have the hero rank, all the ranks above it directly says that you have the ____ rank? I don't know if you see what I mean
Instead of doing it like this
This part doesn't work
Maybe, if your ranks are on the same track and inherit from eachother
Is it possible to create multiple folders to sort the menus?
That's what I thought, thanks 🙂
And besides, I want to create a cosmetics store and I would like for certain cosmetics we have the choice of being paid in credit or in coins, do you have any idea how to do that?
I already have 2 currency plugins, I have playerpoint and xconomy
okay then what's your question?
Maybe have 2 items in the same slot (in the confirmation menu), have different priorities and set view requirements. And based on what currency the player chooses (again using meta) show the item that removes the correct currency
I'll try to explain how I'd like to do this with a quick example.
or make a menu that opens when you select the item and it promts you with the option to use the currency you want
Here is the lore of an item for example, so that the person who chooses the best way to pay is to create a menu with 2 types of payment?
- ''
- ''
- '&aPrice : &2600 crédits ou 10000 coins'
- ''
- '&aClique pour acheter.' ```
Yeah thaty looks good
then make clicking the item open another menu
make two items for each currency
put for each currency a view requirement so only the currency that you actually have funds for shows
then make another item in the same place (this item will show if the view requirement of the previous item wasn't met)
you call this item something like "You don't have enough credits" or just gray out the text so it indicates you cant purchase it. make the click action give you a message that you dont have enough of x. and do nothing else so it stays in the same menu
If you have a question lmk
For clarity:
1. Clicking the item → opens another menu.
2. Add two items in that menu (one for each currency).
3. Set a view requirement for each item, so it only shows if the player has enough of that currency.
4. Fallback item → if the requirement isn’t met, show another item in the same slot.
Example: a grayed-out version, or an item that says “You don’t have enough credits.”
Make the click action on this just send a message like “Not enough [currency]” and do nothing else (so the menu stays open).
I can use this method in the menu where you choose the type of payment
- '[meta] remove RANK-NAME STRING'
- '[meta] remove RANK-DISPLAY-NAME STRING'
- '[meta] remove RANK-POINTS-COST INTEGER'```
When they buy an item, it will give them permission. Is that how they should do it?
requirements:
TEST:
type: string equals ignorecase
input: '%luckperms_check_permission%'
output: 'no'```
explain to me in words what you want to achieve for an item
is it a rank
a cosmetic
?
I just did this quickly to test
'poisson':
material: DIAMOND
slot: 1
priority: 1
display_name: '&6Poisson'
lore:
- ''
- '&aPrix : ABA6F200 &f&r &aou &#F9E4541000 &f&r'
- ''
- '&eClique pour acheter.'
click_commands:
- '[meta] set COSMETIC-NAME STRING poisson'
- '[meta] set COSMETIC-DISPLAY-NAME STRING Poisson'
- '[meta] set COSMETIC-POINTS-COST INTEGER 600'
- '[meta] set COSMETIC-COINS-COST INTEGER 10000'
- '[openguimenu] multiple_device'```
A cosmetic
I know how I'm going to do it, I'll show you my system as soon as I'm finished 🙂
alright m8
Is it possible to make it so that if the player has purchased the cosmetic, they no longer see the item in the shop?
yeah just add a placeholder that only returns a value if the cosmetic is bought to the view requirements
Yes. You can use view requirements. And either use placeholders from your cosmtics plugin if they have one, or give players a permission (or meta value) when they purchase an item. If that player has the permission or meta value, don't allow them to buy again
Eh bien, voici ce que j'ai fait :
https://paste.helpch.at/ofosugomad.less
multiple device : https://paste.helpch.at/