# Configuration

#### **Main Config (**<mark style="color:red;">**`config.lua`**</mark>**)**

```lua
RS = {}

RS.Language = 'en'          -- or 'de', etc.
RS.Framework = "auto"       -- "auto", "esx", or "qbcore"

-- Functions for notifications & help text
RS.notify = function(msg)
    TriggerEvent("delta_hud:notification", "info", "info", msg, 5000)
end

RS.DisplayHelpText = function(str)
    TriggerEvent("revolution_helpnotify:showHelpNotify", str, "E")
end

-- Marker configuration
RS.marker = {
    enabled = true,
    bobUpAndDown = true,
    faceCamera = true,
    rotate = false,
    drawDistance = 50,
    type = 21,
    color = { r=0, g=182, b=242, a=150 },
    scale = { x=1.0, y=1.0, z=1.0 }
}

-- Locales & function
Locales = { ... }  -- Contains 'en', 'de', etc.

RS.UseCustomProgressBar = false
RS.CustomProgressBar = {
    PushProgressbar = function(msg, time) ... end,
    CancelProgressbar = function() ... end
}

-- DetectFramework() helper function, etc.
```

<mark style="color:red;">**Key Points**</mark>

* <mark style="color:red;">**`RS.Language`**</mark>: Which language to pull from the <mark style="color:red;">`Locales`</mark> table (<mark style="color:red;">`en`</mark>, <mark style="color:red;">`de`</mark>, etc.).
* <mark style="color:red;">**`RS.Framework`**</mark>: Allows auto-detection of ESX/QBCore or manual selection.
* <mark style="color:red;">**`RS.marker`**</mark>: Settings for markers (e.g., color, scale, draw distance).
* <mark style="color:red;">**`RS.notify`**</mark> <mark style="color:red;"></mark><mark style="color:red;">/</mark> <mark style="color:red;"></mark><mark style="color:red;">**`RS.DisplayHelpText`**</mark>: Replace these with your server’s preferred notification/help display events if needed.
* <mark style="color:red;">**`RS.UseCustomProgressBar`**</mark>: If <mark style="color:red;">`true`</mark>, uses <mark style="color:red;">`RS.CustomProgressBar`</mark> methods instead of default progress bars.

#### **Discord Config (**<mark style="color:red;">**`dicsordconfig.lua`**</mark>**&#x20;or similar)**

```lua
DCConfig = {
  WebhookURL = "https://discord.com/api/webhooks/yourapihere",
  AdminWebhookURL = "https://discord.com/api/webhooks/yourapihere",
  PriceUpdateEmbed = {
    title = "» **New Selling Prices After Server Restart** «",
    color = 3447003,
    includeTimestamp = true,
    footer = {
      text = "RISK SCRIPTS",
      icon_url = "https://files.catbox.moe/37ed2b.png"
    },
    author = {
      name = "FARMING PRICE",
      icon_url = "https://files.catbox.moe/37ed2b.png"
    },
    fields = {
      {
        name = "Note",
        value = "Prices change every server restart.",
        inline = false
      }
    }
  }
}
```

<mark style="color:red;">**Key Points**</mark>

* <mark style="color:red;">**`WebhookURL`**</mark>: For general notifications (e.g., price updates).
* <mark style="color:red;">**`AdminWebhookURL`**</mark>: For logging sales or admin-related events.
* <mark style="color:red;">**`PriceUpdateEmbed`**</mark>: Controls how price update messages appear in the Discord embed.

#### **Farm Config (**<mark style="color:red;">**`farmConfig.lua`**</mark>**)**

```lua
RS.FarmingConfig = {
  farmingPoints = {
    {
      name = 'Kiesel',
      type = 'regular',
      location = vector3(1140.9744, 1978.5764, 60.7245),
      radius = 9,
      cycleTime = 10,
      afkFarmingEnabled = true,
      afkCycleTime = 10,
      itemsToFarm = {
        { name='kiesel', label='Kiesel', amount=1, rarity=1.0 },
        { name='wasser', label='Wasser', amount=1, rarity=1.0 },
        { name='sand', label='Sand', amount=1, rarity=0.05 },
      },
      requireVehicle = true,
      allowedVehicle = 'tractor2',
      allowedVehicleLabel = 'Tractor',
      -- more settings...
    },
    -- more farming points...
  },
  enableToolRequirement = false,
  requiredTool = { name='farm_tool', label='Farming Tool' }
}
```

<mark style="color:red;">**Key Points**</mark>

* <mark style="color:red;">**`farmingPoints`**</mark>: Each table entry is a separate “farming area” on the map.
* <mark style="color:red;">**`type`**</mark>: `"`<mark style="color:red;">`regular`</mark>`"` or `"`<mark style="color:red;">`prop`</mark>`"`. In `"`<mark style="color:red;">`prop`</mark>`"` mode, you specify prop models to spawn.
* <mark style="color:red;">**`afkFarmingEnabled`**</mark>: Whether players can let the script repeatedly farm for them until cancelled.
* <mark style="color:red;">**`itemsToFarm`**</mark>: A list of potential items, each with an <mark style="color:red;">`amount`</mark> and a <mark style="color:red;">`rarity`</mark>.
* <mark style="color:red;">**`requireVehicle`**</mark> / `a`<mark style="color:red;">`llowedVehicle`</mark>: If <mark style="color:red;">`true`</mark>, players must be in or near a specified vehicle model (e.g., <mark style="color:red;">`tractor2`</mark>).
* <mark style="color:red;">**`enableToolRequirement`**</mark>: If <mark style="color:red;">`true`</mark>, players need a specified item/tool in their inventory to farm.

#### **Processor & Seller (**<mark style="color:red;">**`RS.processor`**</mark>**,&#x20;**<mark style="color:red;">**`RS.seller`**</mark>**)**

```lua
RS.processor = {
  {
    name='Kiesel',
    location=vector3(1211.1456,1857.8119,78.9115),
    required={ name='kiesel', amount=10 },
    receive={ name='sand', amount=1 },
    processing_time=20,
    allowed_jobs={'police'},-- or all
    -- more settings...
  },
  -- more processing stations...
}

RS.seller = {
  {
    name='Sand',
    location=vector3(1708.4001, -1610.4089, 113.814),
    item={ name='sand', label='Sand', min_price=150, max_price=250 },
    sell_time=10,
    payment_type='black_money',
    allowed_jobs={'police'},-- or all
    -- more seller stations...
  },
  -- more selling points...
}
```

<mark style="color:red;">**Key Points**</mark>

* <mark style="color:red;">**`RS.processor`**</mark>: Where raw items (e.g., <mark style="color:red;">`kiesel`</mark>) get turned into processed items (<mark style="color:red;">`sand`</mark>).
  * <mark style="color:red;">`processing_time`</mark>: how many seconds it takes to process.
  * <mark style="color:red;">`allowed_jobs`</mark>: only these jobs can use this station.
* <mark style="color:red;">**`RS.seller`**</mark>: NPC or location to sell processed items.
  * <mark style="color:red;">`min_price`</mark><mark style="color:red;">/</mark><mark style="color:red;">`max_price`</mark>: dynamic price range.
  * <mark style="color:red;">`sell_time`</mark>: how long it takes to sell a batch.
  * <mark style="color:red;">`payment_type`</mark>: whether players get paid in cash, black money, or bank.


---

# 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://risk-scripts.gitbook.io/risk-scripts/scripts/farming-system/configuration.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.
