> 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/weight-system.md).

# Weight System

In chance system, you can give each command a certain weight. There is no cap, no limit, nothing. But the caveat is <mark style="color:orange;">one command will be guaranteed to execute</mark>. Example:

<table><thead><tr><th width="158">Command #</th><th>Weight</th></tr></thead><tbody><tr><td>1</td><td>60</td></tr><tr><td>2</td><td>50</td></tr><tr><td>3</td><td>20</td></tr></tbody></table>

In this example, weight is well over 100 unlike chance system. But in the end, since there is no empty value, one command is guaranteed to be selected.

You can use it if you want people to get a compensation even if they don't get the grand prize etc...

{% code title="" %}

```yaml
drinkingCommands:
 '1':
   commands: 
    - give %player% diamond 20
    - msg %player% You got extra 20 diamonds!
   weight: 5
   executor: CONSOLE
 '2':
   commands: 
    - give %player% diamond 7
    - msg %player% You got extra 7 diamonds!
   weight: 50
   executor: CONSOLE
 '3':
   commands: 
    - give %player% diamond 5
    - msg %player% You got extra 5 diamonds!
   weight: 60
   executor: CONSOLE
 '3':
   commands: 
    - msg %player% You drank the potion!
   executor: CONSOLE
```

{% endcode %}
