#chance function
1 messages · Page 1 of 1 (latest)
below is an example of what I mean exactly
left_click_commands:
- '[console] mmoitems give CONSUMABLE WHITE_POT_1 %player_name% 1 <chance=20>'
- '[console] mmoitems give CONSUMABLE WHITE_POT_2 %player_name% 1 <chance=20>'
- '[console] mmoitems give CONSUMABLE WHITE_POT_3 %player_name% 1 <chance=20>'
- '[console] mmoitems give CONSUMABLE WHITE_POT_4 %player_name% 1 <chance=20>'
- '[console] mmoitems give CONSUMABLE WHITE_POT_5 %player_name% 1 <chance=20>'
- '[console] mmoitems take MATERIAL EMPTY_BOTTLE %player_name% 1'
- '[console] mmoitems take MATERIAL KAMELIA %player_name% 1'
Is there no expansion that can give you a random element from a list ? @grave elbow
Or actually, you just need a random number between 1 and 5
mmoitems give CONSUMABLE WHITE_POT_%random_number_placeholder% %player_name% 1
Oh, I didn’t look into what was actually needed, but this is nice
String added this, but might be a really long placeholder lol
Ive seen worse
@glossy nacelle there's %string_random_<string1>,<string2>,<string3>,<etc>% in the string expansion as cj said, or you can implement my example using %rng_1,5% from the rng expansion
mmoitems give CONSUMABLE WHITE_POT_%rng_1,5% %player_name% 1
o I found what I m looking for but I don t know how to do it could you please do it using my example of drawing a key because I don t know exactly how it works I'd be very grateful
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>
I really need this if you can help
you have to use the string placeholder.
What are you needing help with?
getcase give %player_name% %string_random_Epicka 1,Legendarna 1,Rzadka 1,Zwykla 1% but this doesn't allow you to set a chance for each of the cases =/
yes, for something like that, this would work with slight modification #1138605974165397596 message
thanks for trying to help
Honestl I don t fully understand it I spent 30 minutes trying to do it and nothing
might be best to create your own topic to keep things organized, can help there
to start it off, maybe elaborate on what part(s) you don't understand, even if it's the whole thing
then I can help more from there