> For the complete documentation index, see [llms.txt](https://alw.gitbook.io/documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://alw.gitbook.io/documentation/product-guides/alw1/lootcases.md).

# LootCases

<details>

<summary>Item Images</summary>

* Gather item images from your inventory

  <pre class="language-lua"><code class="lang-lua"><strong>ItemImageResource = 'ox_inventory',
  </strong>ItemImagePath = '/web/images/',
  </code></pre>

</details>

<details>

<summary>Chance System</summary>

* The lower the number the lower the chance

```lua
RarityChance = {
    ["Common"] = 80, -- Lowest Chance
    ["Uncommon"] = 50,
    ["Rare"] = 30,
    ["Epic"] = 15,
    ["Legendary"] = 1, --Rarity Chance
},
```

</details>

<details>

<summary>Case Setup</summary>

* Setup your case with custom item's, weapon's & money!

```lua
CaseList = {
    ["common_case"] = { -- Usable Item
        Title = "Common Case",
        Color = "#FFFFFF",
        Items = {
            {name = "9mm", item = "pistol_ammo", amount = 1, rarity = "Legendary", img = ""},
            {name = "DEEG", item = "WEAPON_REVOLVER", amount = 1, rarity = "Legendary", img = ""},
            {name = "$1,000,000", item = "money", amount = 1000000, rarity = "Legendary", img = ""},
        },
    },
},
```

</details>

<details>

<summary>Chat Notify</summary>

* Customizable notification for rare items won

```lua
ChatNotify = function(message) -- Notify used for rare items won
    TriggerClientEvent('chat:addMessage', -1, {
        template = '<div> <b>ALW Loot Cases</b> {0} </div>',
        args = {message}
    })
end
```

</details>

<figure><img src="https://3782184560-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FatGz6OlhBR644gbX4kud%2Fuploads%2F6cqn6Hg8Ub7qQW6FRPc4%2Fimage_2024-05-22_080154087.png?alt=media&amp;token=970fe6d3-eb83-4f67-860d-d4afee21435f" alt="" width="563"><figcaption><p>FrontEnd Work By @Miller-Dev1</p></figcaption></figure>
