> For the complete documentation index, see [llms.txt](https://kardasland.gitbook.io/aetherpotions/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://kardasland.gitbook.io/aetherpotions/getting-started/advanced-command-system/chance-system.md).

# Chance System

In chance system, you can give each command a certain chance. If total chance is less than 100, we are filling it with empty. For example:

| Command # | Chance |
| --------- | ------ |
| 1         | 20%    |
| 2         | 15%    |
| 3         | 25%    |

Total chances are 60%. AetherPotions will fill remaining 40% with empty command. When drawing some command form the probability list, there is a chance that nothing gets executed, because it hits the 40% empty instead of actual commands.

With this feature you can do random commands when consuming the potion. Do you want to give player a diamond with 5% chance? You can do that!

<pre class="language-yaml"><code class="lang-yaml">      drinkingCommands:
        '1':
          commands: 
           - give %player% diamond 5
           - msg %player% You got extra 5 diamonds!
<strong>          chance: 5
</strong>          executor: CONSOLE
        '2':
          commands: 
           - msg %player% You drank the potion!
          executor: CONSOLE
</code></pre>
