I need help with 50/50 commands (nightbot)

can you make a 50/50 command?

I want to make a command that lets you fight a certain user (!fightShacozzi for exampel), i want it to be a 50/50 so taht you win sometimes and loose sometimes. But i don’t know how to do it

!commands add !fight $(eval Math.random() >= 0.5 ? '$(user)' : '$(touser)') won the fight!

1 Like

I always seem to win with this

Are you typing another user after the command? For example !fight Nightbot will decide who ‘wins’ between you and Nightbot

I don’t quite understand what you mean here. I want a fight command that lets you fight specific mods and the streamer himself. Like !FightShacozzi or !FightDragon etc. But it has to be 50/50. it’s not fun if the same text comes up everytime you type the command.

I want so you you can win AND loose

Ok I see what you mean now, the command I gave above allows you to fight any user by just using a general !fight command followed by any username. This will select either the person that typed the command or the user they typed after !fight in the command.

For example, typing !fight Shacozzi would choose between you or Shacozzi to win the fight with a 50/50 chance, and this could be done with any username with only one command needing to be added.

To create a command to fight only a specific user you could do

!commands add !FightShacozzi $(eval Math.random() >= 0.5 ? '$(user)' : 'Shacozzi') won the fight!

Now, typing !FightShacozzi will return who won between only the user that typed the command and Shacozzi every time (again a 50/50 chance).

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