> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cc-scripts.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Introduction

> Heist module: registers the Fleeca Bank contract with cc_heistcontracts.

`cc_fleecaheist` is a heist module that plugs into [cc\_heistcontracts](/cc_heistcontracts/index). It registers a single contract — **Fleeca Bank Heist** — with six branch locations and hands runtime control of the run to cc\_heistcontracts (slot economy, marketplace listing, VICE/XP rewards).

Everything in this page is a **default**. All of it lives in plain Lua files in `shared/` and is meant to be edited.

## Required items

Players need these in their inventory before the dashboard will let them press **Start**. The list lives in `shared/contract.lua` under `itemsRequired` — add, remove, or change quantities freely.

| Item id                  | Inventory label | Default role in the run       |
| ------------------------ | --------------- | ----------------------------- |
| `hacking_device`         | DataJack        | Power box, cameras, computers |
| `laptop_cheap`           | Refurb LiteBook | Vault panel                   |
| `electric_drill`         | Cordless Drill  | Lockers & trolleys            |
| `weapon_pistol` (weapon) | Pistol          | Required loadout              |

These items all need to exist in your ox\_inventory (or equivalent) items list — see the [installation guide](/cc_fleecaheist/installation).

## Contract defaults

Defined in `shared/contract.lua`. Every field is editable.

| Field            | Default                              | What it does                                                         |
| ---------------- | ------------------------------------ | -------------------------------------------------------------------- |
| `id`             | `fleeca_heist`                       | Internal contract id (don't rename mid-season)                       |
| `difficulty`     | `easy`                               | Display tag in the dashboard                                         |
| `weight`         | `1.0`                                | Rarity weight when the marketplace drips new listings                |
| `levelRequired`  | `1`                                  | Minimum heist level to purchase                                      |
| `price`          | `2500`                               | VICE cost to buy the slot                                            |
| `crewSize`       | `{ min = 2, max = 4 }`               | Crew size bounds                                                     |
| `duration`       | `1200`                               | Soft cap in seconds before the slot auto-fails                       |
| `cooldown`       | `1800`                               | Server-wide cooldown after each completion                           |
| `reward`         | `{ vice = 1500, xp = 250 }`          | Credited automatically on success                                    |
| `requiredPolice` | `{ jobs = { 'police' }, count = 2 }` | On-duty officer gate — set `count = 0` to disable                    |
| `locations`      | 6 branches                           | Pinkcage, Del Perro, Great Ocean Hwy, Harmony, Hawick, Legion Square |

Drop locations out of the `locations` array to disable specific branches. Per-branch coordinates and task points live in `shared/locations/<id>.lua`.

## Loot table

`shared/rewards.lua` defines the global loot. When `cfg.use_global_loot_table = true` (the default in `shared/config.lua`), each category's rolled total is split across every unit in that category — e.g. a `black_money` roll of 1,500 across 3 lockers gives 500 each.

```lua theme={null}
return {
    lockers = {
        { type = 'item', item = 'black_money', amount = { min = 1000, max = 2000 } },
        { type = 'money',                       amount = { min = 1000, max = 2000 } },
    },
    trolleys = {
        { type = 'item', item = 'black_money', amount = { min = 1000, max = 2000 } },
        { type = 'money',                       amount = { min = 1000, max = 2000 } },
    },
}
```

Set `cfg.use_global_loot_table = false` to define loot per-unit inside each branch file under `shared/locations/`.

## Other tunables

`shared/config.lua`:

| Field                       | Default                      | What it does                                                            |
| --------------------------- | ---------------------------- | ----------------------------------------------------------------------- |
| `cfg.use_global_loot_table` | `true`                       | If `false`, expects per-unit `rewards` on each loot point               |
| `cfg.enable_task_list`      | `true`                       | Show the TaskUI panel during the run                                    |
| `cfg.debug`                 | `false`                      | Bypasses gates (incl. police count) and logs verbosely                  |
| `cfg.dispatch`              | `function(location) ... end` | Police alert payload — replace to integrate with your dispatch resource |

## Dependencies

* [`cc_heistcontracts`](/cc_heistcontracts/index) — registers the contract and owns the slot economy
* [`cc_lib`](/cc_lib/index) — TaskUI, Groups, Inventory, Target, Notification, Dispatch wrappers
* `ox_lib`, `oxmysql`
* A police job framework that responds to `cc.Dispatch.Alert` (default jobs: `police`, `trooper`, `sheriff`)
