# Installation and setup

## Installation and setup

Use this guide after purchase.

### Before you install

Confirm these basics first:

* Your server runs **QBCore** or **QBX**.
* You have the script's required dependencies installed.
* Your inventory matches the script config.

### Download the script

1. Sign in to **Tebex**.
2. Open your purchases.
3. Download the script files.
4. Extract the archive.

### Add the resource

1. Move the script folder into your server's `resources` directory.
2. Add the resource to `server.cfg`.

```cfg
ensure [script-name]
```

3. Restart the server.

You can also run:

```cfg
refresh
start [script-name]
```

### Configure the script

Open `config.lua` and update values to match your server.

Common settings include:

* Inventory type
* Job names
* Item names
* Reward values
* Cooldowns and timers

### Set the inventory type

Many scripts support `qb`, `ox`, or `qs`.

```lua
Config.Inventory = 'qb'
```

Use the exact value your script expects.

### Add required items

Some scripts need custom items.

Example for **qb-core** `items.lua`:

```lua
['treasure_map'] = {
    ['name'] = 'treasure_map',
    ['label'] = 'Treasure Map',
    ['weight'] = 100,
    ['type'] = 'item',
    ['image'] = 'treasure_map.png',
    ['unique'] = false,
    ['useable'] = true,
    ['shouldClose'] = true,
    ['combinable'] = nil,
    ['description'] = 'A mysterious map leading to hidden treasure.'
},
```

Example for **ox\_inventory** `data/items.lua`:

```lua
['treasure_map'] = {
    label = 'Treasure Map',
    weight = 100,
    stack = true,
    close = true,
    description = 'A mysterious map leading to hidden treasure.'
},
```

### Add your webhook

If the script supports Discord logging, paste your webhook into `config.lua`.

```lua
Config.Webhook = 'https://discord.com/api/webhooks/YOUR_WEBHOOK_HERE'
```

### Verify startup

After restart, check:

* The script starts without console errors.
* Required dependencies start first.
* Item names match your inventory.
* Job names match your framework data.

{% hint style="info" %}
If a script does not start, check dependency order first. That is the most common issue.
{% endhint %}

### Next steps

After setup, use these pages:

* Review the script list in the catalog.
* Check the compatibility matrix.
* Use the troubleshooting guide if startup fails.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://shocks-development.gitbook.io/shocks-development-docs/shocks-scripts-doc/installation-and-setup.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
