Chance

Runs a command if an RNG roll succeeds

/goop chance <chance> <command...>

One may specify the chance as a fraction (0.32) or a percent (32%)

Args Breakdown (What everything does)

<Chance>

  • Probability of the <command...> running

  • It may be in fraction form (0.25)

    • Anything above or equal to 1 will always succeed

  • Or it may be in percentage form (25%)

    • Anything equal or above 100% will always succeed


<Command...>

  • The command that will be run

Tips

  • The exact procedure is the following:

    1. Get the number (ex 0.0432)

    2. If it doesnt end with a %, multiply it by 100 (ex 4.32)

    3. Multiply it by 100 (ex 432)

    4. Draw random integer between 0 and 10k (ex 2500)

    5. If the number is greater, run the next command.


  • Thus, this RNG Roll Chance has accuracy up to 0.01%

Simple Examples:

/goop chance 10% goop tell cocopad &aYou dropped something...

Might tell the player cocopad that he dropped something, only one tenth of the times this command runs.


/goop chance 10 goop tell cocopad &aYou dropped something...

Might tell the player cocopad that he dropped something, absolutely every time this command runs


/goop chance 0.1 goop tell cocopad &aYou dropped something...

Might tell the player cocopad that he dropped something, only one tenth of the times this command runs.