#DeluxeMenus Shop GUI

1 messages · Page 1 of 1 (latest)

steep raptor
#

I have a few questions about the possibility of making a GUI for a shop with DeluxMenus, what i want is to place a wall with signs below item frames with the item selling/buying and when right clicking execute the menu command for that item, let's say right clicking a sign executes the comans /shop buy melon

Is there a way of making this with DeluxeMenus? Like on the open_command insert a variable of the item im buying?
The idea of the menu is to make a GUI for 1, 8, 16, 32, 64, or All Inventory Sell or buy. I don't really know the possibilities of these, im taking this idea from a server i used to play and im very sure that they use this for they selling and buying GUI. (Sorry if my english is not the best). And thanks if someone response this.

cursive hinge
cursive hinge
#

you can use arguments to accept item name, price, amount, etc.

#

The only thing is, if you accept the PRICE through arguments, then there is potential for somebody to abuse that

#

That's why I created DeluxeShop for my own purposes, to store item names to item prices

steep raptor
#

Yeah, users are not going to use the command they are going to right click on a sign and that sign will have the commands premade by me for using this menu so price is not a problem

cursive hinge
#

In the past I have helped somebody create a "password" system though, which would lower the chance of abuse

cursive hinge
steep raptor
#

to use arguments i need to put something like this: open_command: shop <item>?

cursive hinge
#

how would they find out the command and argument order? no idea, but 🤷‍♂️

#

just a thing to think about

steep raptor
#

I will think how to do that

cursive hinge
#

you can see which args it accepts

steep raptor
#

ooooh nice

cursive hinge
#

the thing is, if you define 4 arguments, all 4 are required

steep raptor
#

so args: and the list of args to use

cursive hinge
steep raptor
#

Niceee

#

Ok i will start doing this, and if i had any question i will ask, thank you so much for your help

cursive hinge
#

Sounds good to me

steep raptor
#

The only problem im having right now ecloud download Math is from a more recent version of Java im doing this on a 1.8.8 SkyBlock network server

cursive hinge
#

oh... that might cause some issues with deluxemenus as well

#

latest dm version for 1.8.8 is 1.10.5

#

missing quite a lot of features

#

I think arguments might be one of those features

willow veldtBOT
#
Deluxemenus - Version List
Spigot:

1.8.8
1.12.2
1.16.5
1.17.1
1.18.2

Version:

v1.10.5
v1.13.5 - Latest
v1.13.5 - Latest
v1.13.5 - Latest
1.13.5 - Latest

cursive hinge
#

You can try using the latest build on 1.8.8, but no guarantees that everything works as intended. in fact, things will most likely break

steep raptor
#

actually im using 1.13.3-Release

#

and it works fine

cursive hinge
#

Ya, it'll probably work fine till it doesn't

steep raptor
#

it doesnt give me any console error

cursive hinge
#

ykno

#

there are older versions you can download

#

different formatting of placeholder possibly though

#

also, multiple pages

#

gotta eat, o/

steep raptor
#

Okkk i will test and see if i get to something

steep raptor
#

Ok Math 1.2.4 working

#

i cant send a pic here right?

willow veldtBOT
steep raptor
#

nice

#

That's the idea, and im 80% sure they done that with this plugin

#

Maybe not, i dont find any plugin to sell and buy like that, maybe they develop it themselfs

steep raptor
#

Ok i see that args update was on 1.12.0 version, and im using 1.13.3 so actually they need to work

cursive hinge
#

Shopguiplus is the plugin I was replicating with deluxeshop

steep raptor
#

Yeah yours look good

#

ok, its almost working

#

'sell_1':
material: MELON
data: 0
slot: 19
display_name: "&c&lVender"
lore:
- "&6Cantidad: &71"
- "&aPrecio: &6$%math_1_1*{price}%"

'sell_4':
material: {item}
amount: 4
data: 0
slot: 29
display_name: "&c&lVender"
lore:
- "&6Cantidad: &74"
- "&aPrecio: &6$%math_1_4*{price}%"

#

open_command: shop
register_command: true
args:

  • item
  • price
#

when i put /shop melon 10 the material: {melon} doesnt recognize melon as the item

#

but if i put it with letter then yes

cursive hinge
#

What do you mean with letter

steep raptor
#

Like if i write material: melon

#

works

cursive hinge
#

try placeholder material

steep raptor
#

but if i put material: {item}

cursive hinge
#

material: placeholder-{item}

#

try

#

gotta game with the boys rn

steep raptor
#

appears as material: stone

#

hahaha

#

ok nvm

#

thanks for your help

#

i will try to look how to fix this

cursive hinge
#

might say the material it's trying to use

steep raptor
#

nop, no console message

cursive hinge
#

try using a blank palceholder maybe?

#

like string

#

use like

#

material: placeholder-%string_trim_{item}%

#

and download string expansion

steep raptor
#

it doesnt work cause string expansion its more recent version of java

cursive hinge
#

older version?

steep raptor
#

1.0.0 didnt work

#

i try both versions

cursive hinge
#

str?

steep raptor
#

if i place placeholder-melon dont work also

cursive hinge
#

changeoutput?

#

you might need the %% idk

steep raptor
#

none of those, all from newer versions

cursive hinge
steep raptor
#

Yeah 😦

steep raptor
#

There has to be a way, cause im pretty sure they did it with this plugin and they are using this version

cursive hinge
#

I did get it working by using a fake placeholder material: 'placeholder-%string_uppercase_{item}%'

#

there's probably a few you could use

#

ChangeOutput, str, parseother

steep raptor
#

Ok so using that and item beeing 'melon' it puts as material stone

#

material: 'placeholder-%string_uppercase_{item}%'

#

$STRING% its a placeholder api right?

cursive hinge
#

well remember you said string didn't work for you

#

it's a newer java version

cursive hinge
steep raptor
#

how can i see the java version of the placeholders, because last time i try it i need to reinstall de placeholderapi cause downloading a one not compatible make the plugin to bug everything

steep raptor
#

ok

cursive hinge
steep raptor
#

parseother

#

it works

cursive hinge
#

nice

steep raptor
#

how can i use it?

cursive hinge
#

o

#

%parseother_{}_{{item}}% maybe?

cursive hinge
steep raptor
#

ok its throwing stone always dont know why

cursive hinge
#

possible the version issue

#

what did you put exactly?

steep raptor
#

placeholder-%parseother_{s}_{{item}}%

#

./shop diamond 20

cursive hinge
#

use `` to escape formatting

#

like_this_

steep raptor
#

material: 'placeholder-%parseother_{s}_{{item}}%'

cursive hinge
#

type /papi parse me %parseother_{s}_{{item}}%

steep raptor
#

it throws {item}

#

in chat

#

if i put siamond throws diamond

cursive hinge
#

what if you typed MELON in your argument

#

err

#

DIAMOND ig

steep raptor
cursive hinge
#

just to test

#

sorry, your command

#

/shop DIAMOND 20

steep raptor
#

Oooooh

#

there

cursive hinge
#

there might've been a change

#

because i remember having to use string_uppercase before

steep raptor
#

So its uppercase

cursive hinge
#

you could try latest dm version

#

it would fix

#

but

#

is that too new java?

#

well it shouldn't matter though, right?

#

since it's your shop

#

you can pass the argument

steep raptor
#

Yeah

cursive hinge
#

so try it without parseother too

#

just in case

#

material: placeholder-{item}

#

maybe even material: {item} not sure

steep raptor
#

nop

#

hahaha

#

Theres a thing, that if i use melon as item when i use clear %player_name% {item} %checkitem_amount_mat:{item}%

#

It takes MELON as MELON_BLOCK

#

And not as MELONSLICE

#

But if use MELONSLICE the material is stone xd

#

is there a way to do this but with id?

cursive hinge
#

?materials

willow veldtBOT
cursive hinge
#

What if you tried MELON_SLICE

#

Weird it’s using latest materials

steep raptor
#

if i use MELON_SLICE it put stone

#

atleast i used another /clear plugin to take items from players

#

[14:46:58 INFO]: El jugador ByJuanii_44 no tiene 160 de melon_block.

#

Player ByJuanii_44 doesnt have 160 of melon_block

#

when using MELON only

#

but placeholder detects 160 of melon

#

like minecraft /clear command use another item list maybe?

#

i use - '[console] clear %player_name% {item} %checkitem_amount_mat:{item}%'

#

to take the items from the player

cursive hinge
#

What about LEGACY_MELON

#

Oh

steep raptor
#

thats why i was looking if there was like an ID thing, as IDs are unique for each item

cursive hinge
#

I have no idea how checkitem is using a different list of materials

#

And no, IDs are outdated

steep raptor
#

oooh

cursive hinge
#

Materials are unique per each item

#

I’m not home now so I can see more later

steep raptor
#

Yeahhh no problem bro, its almost there i will keep looking for this

#

at least material thing is now fixed

#

`open_command: shop
register_command: true
args:

  • item
  • data
  • minecraft_item
  • price`
#

by the moment i did this

#

and /shop MELON 0 melonslice 4.64

#

or the ID also

cursive hinge
#

you can use checkitem to clear items as well

#

that's what I thought you were doing

#

you can just do %checkitem_remove_mat:{item}% to remove all melons

#

as for the clear command: if it's the vanilla command, then it will use vanilla item names/ids not the spigot materials

steep raptor
#

ooooh nice

#

so i put - '[console] %checkitem_remove_mat:{item}%'

#

??

#

or something like that

#

niceee

#

it works

#

now, i use these

click_requirement:
      requirement_1:
         type: javascript
         expression: '%checkitem_amount_mat:{item}% > 0'
         deny_commands:
            - '[close]'
            - '[message] &b&lTIENDA &a»&7 No tienes &a%checkitem_amount_mat:{item}% para vender.'```
#

But for some reason if i have 0 melons it do the click_commands anyways

cursive hinge
#

no no

cursive hinge
#

also

#

?codeblocks

willow veldtBOT
#
FAQ Answer:

Use codeblocks for formatting code or configuration files:
```<language name>
<your code here>
```

For example:
```yaml
test:

  • “hi”
  • “there”
    ```

Produces:

test:
- “hi”
- “there”```
cursive hinge
#
click_requirement:
  requirement_1:
    type: '>'
    input: '%checkitem_amount_mat:{item}%'
    output: 0
    deny_commands:
    - '[close]'
    - '[message] &b&lTIENDA &a»&7 No tienes &a%checkitem_amount_mat:{item}% para vender.'

Or, instead of using the amount placeholder, you can use the regular placeholder it returns yes or no

click_requirement:
  requirement_1:
    type: 'string equals'
    input: '%checkitem_mat:{item}%'
    output: 'yes'
    deny_commands:
    - '[close]'
    - '[message] &b&lTIENDA &a»&7 No tienes &a%checkitem_amount_mat:{item}% para vender.'
#

The top one uses comparator instead of javascript

#

more recommended

#

I changed the type to > instead of == my bad

#

I would recommend the boolean

steep raptor
#

Nicee, yeah i forgot there was that yes or no return value on that placeholder

cursive hinge
#

yep, I think if it finds any it returns right away instead of counting them all

#

iirc

steep raptor
#

Yeahhh you're right

#

i will use the bottom one then

#

do i have to use the success_commands also?

#

cause its not working there

#

it just access to this:

click_commands:
      - '[givemoney] %math_1_{checkitem_amount_mat:{item}}*{price}%'
      - '[message] &b&lTIENDA &a»&7 Vendiste &a%checkitem_amount_mat:{item}% &7de &e{item} &7por &a$%math_1_{checkitem_amount_mat:{item}}*{price}%'
      - '[console] %checkitem_remove_mat:{item}%'
      - '[refesh]'```
cursive hinge
#

send your menu

#

?paste

willow veldtBOT
#
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

steep raptor
#

Sorry i had a problem with a hacker? in my server

#

suddenly get in and makes himself owner

#

dont know how

cursive hinge
#

?dm-requirements

willow veldtBOT
#
FAQ Answer:
view_requirement:
  requirements:
    requirement_name:
      type: TYPE

More info on the Wiki

cursive hinge
#

formatting is a bit off

#

you're forgetting requirements: and also the type and stuff is indented wrong

cursive hinge
steep raptor
#

Oooh no problem

#

thing is i cant use tab i think

#

and i do it with spaces

cursive hinge
#
click_requirement:
  requirements:
    requirement_1:
      type: 'string equals'
      input: '%checkitem_mat:{item}%'
      output: 'yes'
      deny_commands:
      - '[close]'
      - '[message] &b&lTIENDA &a»&7 No tienes &a%checkitem_amount_mat:{item}% para vender.'
steep raptor
#

tabs give problems in console then

cursive hinge
#

yes never tab

#

what text editor do you use?

#

I recommend something that has support for yml formatting

steep raptor
#

The one on the hosting panel thats why haha

cursive hinge
#

ah

#

saj

steep raptor
#

ok there we go

#

now its working

cursive hinge
#

nice

steep raptor
#

Yeaaaaah

#

and if i want to remove 64 lets say with the checkitem_remove i can adjust the amount of items i want to remove?

#

cause theres a sell all option and 64, 32, 16, 8 and 1

cursive hinge
#

yes you use modifiers

#

amt:64

#

?checkitem

willow veldtBOT
#
FAQ Answer:

Command:

/papi ecloud download checkitem
/papi reload

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

cursive hinge
#

click here

steep raptor
#

Okkkk i think its finished

steep raptor
#

is there a way to format a number as economy numbers like transform 12000 to 12.0K?

cursive hinge
#

hmm

#

there is a numberformatter expansion

#

but i don't know quite how to format it

#

4.0X maybe?
4X.0?
i got no idea

#

aha

the best is to use %tokenenchant_tokens% in NumberFormatter placeholder %nf_<format>tokenenchant_tokens%
you can specify any format you want in <format> section.
if you want to show something like 4M, 15B, then you can do %nf_4X_tokenenchant_tokens%
"4X" means up to 4 digits showing and 'X' will be replaced by NumericPrefix such as M, B, etc
if you want to show actual numbers you can do like %nf
#,##0.#tokenenchant_tokens%
this shoudl show number with up to one decimal point and numbers includes ',' like 345,678,234.0
if you don't want decimal: %nf
#,##0.tokenenchant_tokens%
with %nf
....% you can format any number produced by other placeholders.

cursive hinge
steep raptor
#

Niceee i will test it

cursive hinge
#

oh wait no {}

steep raptor
#

%nf_3.2X_{math_1_{checkitem_amount_mat:{item}}*{price}}%

cursive hinge
#

i edited

steep raptor
#

trying something like that

cursive hinge
#

o you're nesting

steep raptor
#

yeah

cursive hinge
#

good thing it doesn't need the {} on the outside

#

or that wouldn't work

#

remove it

steep raptor
#

yeah yeah

#

i multiply the items * price

#

so i get the amount that it cost

#

like Amount: 64
Price: 4.5k (idk)

cursive hinge
#

%nf_3.2X_math_1_{checkitem_amount_mat:{item}}*{price}%
/papi parse me %nf_3.2X_math_1_{checkitem_amount_mat:stone}*{500}%

steep raptor
#

format error

cursive hinge
#

hmm

#

if you do 3X instead does it work

steep raptor
#

nop 😦

cursive hinge
#

4X?

#

oh wait

#

/papi parse me %nf_3.2X_math_1_{checkitem_amount_mat:stone}*500%

#

is it a math formatting error?

steep raptor
#

332000.2X

cursive hinge
#

o

#

O.o

steep raptor
#

sincerely i dont understand hahaha

cursive hinge
steep raptor
#

yep

cursive hinge
#

how much stone do you have

steep raptor
#

64

cursive hinge
#

bruh thats 32000

#

that's wild

#

how trippy

steep raptor
#

HAHAHA

#

strange

cursive hinge
#

so it's 333200.2X

#

hmm

steep raptor
#

yep

cursive hinge
#

and if you put 4X instead of 3.2X?

steep raptor
#

oooh there we go

#

32K

#

is there a way to put 32.0k?

#

to add 1 decimal

cursive hinge
#

tring

#

trying

steep raptor
#

oooh ok srry

cursive hinge
#

oh wait it will never be more than 4 i see

#

or else it will cap out

#

icic

#

ok

#

so

#

4.##X

#

?

#

o wait

#

1 decimal

#

4.#X

steep raptor
#

432000.0K

cursive hinge
#

####.#X?

steep raptor
#

32000X

cursive hinge
#

does 3X work

steep raptor
#

yep

#

throws 32k

#

also

cursive hinge
#

and 1X?

#

just curious

steep raptor
#

k

#

hahaha

cursive hinge
#

o

#

ooooohh

steep raptor
#

only k

cursive hinge
#

so

#

hmm

#

idk if you can do 32.0k

#

i'll ask in vk2 discord

#

but in the meantime

steep raptor
#

yeaah sure no problem

cursive hinge
#

can you use the javascript expansion or no

#

java might be too new idk

steep raptor
#

The thing is papi ecloud download javascript is not doing anything

#

like it doesnt exists

#

Failed to find an expansion named: Javascript

steep raptor
#

ooh manually

cursive hinge
#

so I found out it's just normal java NumberFormat ig

#

so im reading ont hat

steep raptor
#

Okkk nice

cursive hinge
#

hmm I feel that 4.1X should work but it's not

#

what are you trying exactly?

steep raptor
#

/papi parse me %nf_4.1X_math_1_{checkitem_amount_mat:stone}*500%

cursive hinge
steep raptor
#

43200.1X

steep raptor
#

ok it loads

#

oooh

#

nop

#

it gives error on console

cursive hinge
#

oof

#

nvm

#

i asked vk2 discord

steep raptor
#

Niceee

#

thank you for all your help

#

i will leave the menu code for you too when its finished

cursive hinge
#

not possible at the moment @steep raptor

#

might get added, but

#

for now idk

steep raptor
#

No problem

cursive hinge
#

because I have a javascript that works

#

but

steep raptor
#

i will leave it as this

cursive hinge
#

nice

steep raptor
#

thats the code if u want it bro

#

thank you so much

cursive hinge
#

v nice, good to see

#

might keep for example purposes

steep raptor
#

yeah sure

#

np

cursive hinge
#

also fyi @steep raptor

#

you don't actually check the data

#

and probably remove the wrong item too

#

have you tested oak log vs birch log?

#

%checkitem_mat:{item},data:{data}%

steep raptor
#

oooh your right

#

there we go

cursive hinge
#

great job, shop looks real good!

#

fyi here's that password idea fleshed out

args:
- pass
open_requirement:
  requirements:
    password:
      type: string equals
      input: '{pass}'
      output: 'pineapple juice'
cursive hinge
steep raptor
steep raptor
#

That's a good idea

cursive hinge
steep raptor
#

I will implement it

cursive hinge
#

v nice

steep raptor
#

with CheckItem can i check how many spaces are empty on a player inventory?

#

just to do a buy all part, wher you can click and fill all your empty spaces with the item

cursive hinge
#

I think you can check for the air material, or use the player expansion I think it has one

#

%player_empty_slots%

steep raptor
#

thank you so much bro

#

is there a way to put 2 maths expressions together? Cause this i not working %math_1_{math_1_{player_empty_slots}*64}*{price}%

#

%math_1_{{player_empty_slots}*64}*{price}%

#

nevermind i got it

#

%math_1_({player_empty_slots}*64)*{price}%

steep raptor
#

Can i put something in a variable?

#

i want to multiply this: %nf_#,##0.#_math_0:floor_{vault_eco_balance}/{price}% by the price, but first i need to do the floor rounding to then multiply it by the {price}

#

the main idea is to get how many money the player has, and divide it by the price, but i also need to check the player_empty_slots ok this is difficult

cursive hinge
#

only way would be using the javascript expansion or making a full java expansion

#

that's another one of the limits I ran into, hence DeluxeShop

#

||Don't tell anybody, but deluxeshop has a specific math placeholder detected to use and abuse it instead of doing the math inside DeluxeShop||

steep raptor
steep raptor
cursive hinge
#

no lol

#

not at all

steep raptor
#

oooh hahhaa

#

nvm

cursive hinge
#

ye saj

steep raptor
#

so i will use the player_empty_slots only

#

- '[console] %checkitem_give_mat:{item},amt:player_empty_slots*64%'

#

is that possible?

#

cause maths placeholder dont work inside

cursive hinge
#

you need math for any math being done

steep raptor
#

- '[console] %checkitem_give_mat:{item},amt:math_0_{player_empty_slots}*64%' this dont work

cursive hinge
#

and also the player_empty_slots should be surrounded by {}

cursive hinge
steep raptor
#

oooh

cursive hinge
#

but then the player one needs to be surrounded by {} for the math expansion to parse it

#

so it won't work

#

you'll have {math_0_{player_empty_slots} the rest will be ignored as it will parse everything between the first { and the first }

#

nesting placeholders as such isn't really possible :L

steep raptor
#

oooh ok, so its not possible

#

- '[console] %checkitem_give_mat:{item},amt:{math_0_{player_empty_slots}*64}%'

cursive hinge
#

correct, not possible

steep raptor
#

ok thankssss

steep raptor
#

||how i import that placeholder?||

cursive hinge
#

added in 1.13.2

steep raptor
#

yeah i use 1.13.3 soit should be

cursive hinge
#

This meta feature is only available for server versions 1.14 or higher

#

damn