2 outputs with different chances command


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

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!

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

@RokettoJanpu 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`))

@RokettoJanpu 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!

This topic was automatically closed after 14 days. New replies are no longer allowed.