2 outputs with different chances command

Asked Jan 14, 2020·6 replies·Last activity 6 years ago·Open in Discord ↗
Archived from the original community forum
Things may have changed since it was written. Still stuck? Ask the community on Discord.

Hello,

I need a command wich is very similar to the russian roulette, but with different chances - 97 to 3 % instead of 50/50:

!123
message cooldown - 420 sec
1) activates description text123
2) then 97% output text456 or 3% output text789

Can someone help with the command code? Thanks!

6 replies

!addcom -cd=5 !123 text123 $(eval Math.ceil(Math.random()*100)<=97?`text456`:`text789`)

@Deft Penguin Thank you very much!
1 more question: your command code after typing !123 triggers only one message (text123 text456 OR text123 text789), is it possible to do 2 messgaes? !123 triggers message text123 and after 3 seconds triggers the second message in chat tex456 or text789?

Multiple message commands aren't possible without a urlfetch request to a custom API. I've set up a command that does just that:

!addcom -cd=5 !123 $(urlfetch https://rokbot.xyz/smm.php?msg=text123`$(eval Math.ceil(Math.random()*100)<=97?`text456`:`text789`))

@Deft Penguin It works! BUT...)) i was trying to change text123 and others into russian language symbols, and the bot met "error connecting to remote server" problem. I guess it works only with latin ones... any advice?)

I advise putting the Russian words into $(querystring) like so:

$(querystring Здравствуйте)

Everything worked! Thank you very much!

Didn't find your answer? The community is on Discord.

Ask on Discord