#please help

1 messages · Page 1 of 1 (latest)

wooden finch
#

Does anyone know how to make sure there is only 1 drop per chance?

wooden finch
#

in the sense of how to set a maximum of 1 drop

reef ermine
#

basically you want the actions to stop after one executes. that too should be randomized

#

well from the wiki, i dont think so its possible easily

#

though, what are you trying to do with this. i mean like is it something like a lottery menu or what

wooden finch
#

yes my idea is to randomly drop custom items with different chances but only one dropped out or not at all, I'm 100% sure it s possible because I was on one server where it always dropped and there was only one drop and it was done in this plugin

#

my current config

#

'1':
material: TRIPWIRE_HOOK
slot: 20
amount: 1
enchantments:
- DURABILITY;10
hide_enchantments: true
display_name: '&#C218CC&lL&#C51DC6&lo&#C823BF&ls&#CB28B9&lo&#CE2EB3&lw&#D133AD&la&#D439A6&ln&#D73EA0&li&#DB449A&le &#E14F8D&lK&#E45487&ll&#E75A81&lu&#EA5F7B&lc&#ED6574&lz&#F06A6E&la'
lore:
- ''
- '&7Koszt : &6&l3 &#B0B7FF&lŚ&#A5BCFD&lw&#9AC0FA&li&#8FC5F8&le&#84C9F5&lc&#79CEF3&lą&#6ED2F0&lc&#63D7EE&le &#58DBEC&lK&#4DE0E9&lr&#42E4E7&ly&#37E9E4&ls&#2CEDE2&lz&#21F2DF&lt&#16F6DD&la&#0BFBDA&lł&#00FFD8&ly'
- ''
- '&7Szansa na &7&lZwykły Klucz &650%'
- '&7Szansa na &b&lRzadki Klucz &630%'
- '&7Szansa na &d&lEpicki Klucz &610%'
- '&7Szansa na &#FFB826&lL&#FDB929&le&#FCBA2D&lg&#FABB30&le&#F9BD33&ln&#F7BE37&ld&#F6BF3A&la&#F4C03E&lr&#F2C141&ln&#F1C244&ly &#EFC348&lK&#EEC54B&ll&#ECC64E&lu&#EBC752&lc&#E9C855&lz &63%'
left_click_requirement:
requirements:
item_check:
type: has item
material: PRISMARINE_CRYSTALS
amount: 3
enchantments:
- DURABILITY;10
deny_commands:
- '[message]'
- '[message]&c Nie masz Odłamku aby go sprzedać!'
- '[message]'
left_click_commands:
- '[refresh]'
- '[message]'
- '[message]&a&l Wylosowałeś jakąś nagrode!'
- '[message]'
- '[console] getcase give %player_name% Epicka 1 <chance=10>'
- '[console] getcase give %player_name% Legendarna 1 <chance=3>'
- '[console] getcase give %player_name% Rzadka 1 <chance=30>'
- '[console] getcase give %player_name% Zwykla 1 <chance=50>'
- '[player] usuwaczodłamków'

low cloud
#

well ig it seems easy enough to do now

#

i'll have to adjust your numbers since they don't add up to 100% chance

#
open_commands:
- '[meta] set randomnum INTEGER %rng_1,100%'


items:
  rollthedie:
    material: STONE
    slot: 22
    display_name: "&aTake your chances!"
    click_requirement:
      minimum_requirements: 1
      stop_at_success: true #Will stop once the first requirement is met
      requirements:
        random1: # 10% chance, rng needs to be 1-10
          type: '<='
          input: '%deluxemenus_meta_randomnum_INTEGER_0%'
          output: '10'
          optional: true
          success_commands:
          - '[message] You got random option 1!<delay=1>' #Delay not required, only so messages show nicely in chat
        random2: #30% chance, rng needs to be 11-40
          type: '<='
          input: '%deluxemenus_meta_randomnum_INTEGER_0%'
          output: '40'
          optional: true
          success_commands:
          - '[message] You got random option 2!<delay=1>'
        random3: # 57% chance, rng needs to be 41-97
          type: '<='
          input: '%deluxemenus_meta_randomnum_INTEGER_0%'
          output: '97'
          optional: true
          success_commands:
          - '[message] You got random option 2!<delay=1>'
        random4: # 3% chance, rng needs to be 98-100
          type: '<='
          input: '%deluxemenus_meta_randomnum_INTEGER_0%'
          output: '100'
          optional: true
          success_commands:
          - '[message] You got random option 2!<delay=1>'
    click_commands:
    - '[message] Rolling the die..."
#

@wooden finch

reef ermine
wooden finch
#

ok so far the test menu doesn t seem to be working maybe I m doing something wrong

reef ermine
#

and it doesnt show you the click_commands message, right?

#

what's your plugin version

wooden finch
#

open_commands:
- '[meta] set randomnum INTEGER %rng_1,100%'
menu_title: 'test'
size: 27
items:
rollthedie:
material: STONE
slot: 22
display_name: "&aTake your chances!"
click_requirement:
minimum_requirements: 1
stop_at_success: true #Will stop once the first requirement is met
requirements:
random1: # 10% chance, rng needs to be 1-10
type: '<='
input: '%deluxemenus_meta_randomnum_INTEGER_0%'
output: '10'
optional: true
success_commands:
- '[message] You got random option 1!<delay=1>' #Delay not required, only so messages show nicely in chat
random2: #30% chance, rng needs to be 11-40
type: '<='
input: '%deluxemenus_meta_randomnum_INTEGER_0%'
output: '40'
optional: true
success_commands:
- '[message] You got random option 2!<delay=1>'
random3: # 57% chance, rng needs to be 41-97
type: '<='
input: '%deluxemenus_meta_randomnum_INTEGER_0%'
output: '97'
optional: true
success_commands:
- '[message] You got random option 2!<delay=1>'
random4: # 3% chance, rng needs to be 98-100
type: '<='
input: '%deluxemenus_meta_randomnum_INTEGER_0%'
output: '100'
optional: true
success_commands:
- '[message] You got random option 2!<delay=1>'``

#

my config

wooden finch
#

sorry

#

DeluxeMenus-1.14.0-Release.jar

royal meadowBOT
#
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

wooden finch
#

ok

#

moment

#

I forgot to add that I removed click_commands:
- '[message] Rolling the die...' because the menu didn't work because it was click command twice

reef ermine
#

wdym

#

anyway

#

i'd recommend you to wait for prestley

#

i dont know much about deluxemenu's meta

#

i would actually like seeing this one work lol

wooden finch
wooden finch
low cloud
#

do you have the rng expansion?

royal meadowBOT
#
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”```
wooden finch
low cloud
#

/papi ecloud download rng

#

/papi reload

wooden finch
#

ok

#

still the same unfortunately /:

low cloud
#

what is your current menu

royal meadowBOT
#
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

wooden finch
#

moment

low cloud
#

you need click_commands

#

seems you removed them

wooden finch
#

ok

#

still no message

#

current configuration

low cloud
#

type /papi parse me %rng_1,100%

#

what does it return

wooden finch
#

random digit

low cloud
#

hmmm, /papi parse me %deluxemenus_meta_randomnum_INTEGER_0%

wooden finch
#

keeps giving 1

low cloud
#

?dm-builds

royal meadowBOT
low cloud
#

try dev build

wooden finch
#

ok

#

I have already updated

low cloud
#

hmm

#

can you provide a log after trying to click it

royal meadowBOT
#
FAQ Answer:

Startup Log Location
Your latest startup log can be found in the logs folder of your
server directory, labeled as latest.log.
Please copy the contents and paste them to a paste service.
Type ?paste for more information.

wooden finch
low cloud
#

that wasn't with the dev build

#

and it's not a log

#

@wooden finch

wooden finch
#

ok I have already uploaded the official version because the menu didn t work on the developer version anyway

low cloud
#

please try using the dev build and send the log

wooden finch
#

ok

low cloud
#

ahhhhhhhhh

#

my mistake from long ago

#

from the og post

#

I had a " at the end instead of a '

#

so now give that a go

wooden finch
#

thanks it already works when it comes to messages now I have a different problem I keep selecting the same option

#

only after resetting the menu will a different option be selected

low cloud
#

normally it would be closed upon click

#

or, you can change the meta value with the click commands too

wooden finch
#

These chances work strangely I can t understand them

#

and it still gives the same thing

low cloud
#

what's the current menu look like

wooden finch
low cloud
#

you removed the open_commands

#

that is what changes the rng value

wooden finch
#

ok

#

still the same thing happens even with

low cloud
#

open_commands are different from open_command

#

you can have both

#

@wooden finch