#Shop system

1 messages · Page 1 of 1 (latest)

slender girder
#

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?

main mica
# slender girder

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

slender girder
main mica
#

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

main mica
#

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:

  1. A player opens the rank purchase menu
  2. They click a rank which saves some data: rank name, rank display name and rank price
  3. The confirmation menu is used to then set the rank and remove the cost from the player balance.
slender girder
main mica
#

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.

slender girder
#

Instead of doing it like this

slender girder
#

This part doesn't work

main mica
slender girder
main mica
#

Yes

#

In config.yml you would declare them as file: folder1/folder2/.../menu.yml

slender girder
#

That's what I thought, thanks 🙂

slender girder
slender girder
celest sonnet
main mica
slender girder
#

I'll try to explain how I'd like to do this with a quick example.

celest sonnet
#

or make a menu that opens when you select the item and it promts you with the option to use the currency you want

slender girder
celest sonnet
#

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).

slender girder
#

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'```
slender girder
celest sonnet
#

explain to me in words what you want to achieve for an item

#

is it a rank

#

a cosmetic

#

?

slender girder
#

I just did this quickly to test

  'poisson':
    material: DIAMOND
    slot: 1
    priority: 1
    display_name: '&6Poisson'
    lore:
    - ''
    - '&aPrix : &#3ABA6F200 &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'```
slender girder
slender girder
#

I know how I'm going to do it, I'll show you my system as soon as I'm finished 🙂

slender girder
# celest sonnet 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?

celest sonnet
#

yeah just add a placeholder that only returns a value if the cosmetic is bought to the view requirements

main mica
slender girder