# Config

{% tabs %}
{% tab title="ESX" %}

````lua
```lua
AK4Y = {}

AK4Y.Framework = "esx" -- esx / newEsx | newEsx = export system | esx = triggerevent system
AK4Y.Mysql = "oxmysql" -- Check fxmanifest.lua when you change it! | ghmattimysql / oxmysql / mysql-async

AK4Y.OpenMenuCommand = "treasure"

AK4Y.AutoRerollTime = 1 * 60 * 60 -- 1 hours |>|<| 1 means = 1 hour

AK4Y.WeaponsAreItem = false -- true : if your weapons are item

AK4Y.RerollPrice = 5000
AK4Y.RerollPaymentType = "bank" -- money or bank

AK4Y.BlipName = "TREASURE"
AK4Y.BlipSize = 0.5
AK4Y.BlipType = 161
AK4Y.BlipColour = 5

AK4Y.DrawText = "[E] - Collect Treasure"

AK4Y.Locations = { -- YOU CAN ADD MORE LOCATIONS, THERE ARE JUST EXAMPLE :)
    { locationId = 1, coords = vector3(-601.83, -1039.32, 22.54), image = "https://cdn.discordapp.com/attachments/1020357813106642964/1046533710046040127/image.png" },
    { locationId = 2, coords = vector3(-845.32, -1088.41, 11.64), image = "https://cdn.discordapp.com/attachments/1020357813106642964/1046534205217189908/image.png" },
    { locationId = 3, coords = vector3(-696.22, -1386.85, 5.5), image = "https://cdn.discordapp.com/attachments/1020357813106642964/1046534604074537020/image.png" },
    { locationId = 4, coords = vector3(-326.21, -1295.86, 31.38), image = "https://cdn.discordapp.com/attachments/1020357813106642964/1046534854520623124/image.png" },
    { locationId = 5, coords = vector3(-688.71, -141.74, 37.83), image = "https://cdn.discordapp.com/attachments/1020357813106642964/1046535399104847943/image.png" },
    { locationId = 6, coords = vector3(572.18, 113.93, 98.41), image = "https://cdn.discordapp.com/attachments/1020357813106642964/1046535968905244884/image.png" },
    { locationId = 7, coords = vector3(1113.3, -645.08, 57.68), image = "https://cdn.discordapp.com/attachments/1020357813106642964/1046536515867639859/image.png" },
    { locationId = 8, coords = vector3(1082.64, -787.55, 58.33), image = "https://cdn.discordapp.com/attachments/1020357813106642964/1046536732226621440/image.png" },
    { locationId = 9, coords = vector3(1001.58, 101.38, 81.19), image = "https://cdn.discordapp.com/attachments/1020357813106642964/1046537059562688543/image.png" },
    { locationId = 10, coords = vector3(-975.88, 389.52, 74.73), image = "https://cdn.discordapp.com/attachments/1020357813106642964/1046537478842101780/image.png" },
    { locationId = 11, coords = vector3(-1354.07, -139.43, 49.57), image = "https://cdn.discordapp.com/attachments/1020357813106642964/1046537657192300584/image.png" },
    { locationId = 12, coords = vector3(-1977.17, -309.92, 38.1), image = "https://cdn.discordapp.com/attachments/1020357813106642964/1046537890353659904/image.png" },
}

-- giveItemType's = "item", "vehicle", "money", "weapon"
-- should have a chance total of 100 !! IMPORTANT !! IMPORTANT !! IMPORTANT !!
AK4Y.RandomRewardItems = {                
    { itemName = "lockpick", label = "LOCKPICK", chance = 7.5, itemCount = 1, giveItemType = "item" },
    { itemName = "advancedlockpick", label = "LOCKPICK", chance = 7.5, itemCount = 1, giveItemType = "item" },
    { itemName = "firstaid", label = "AID KIT", chance = 7.5, itemCount = 1, giveItemType = "item" },
    { itemName = "joint", label = "JOINT", chance = 7.5, itemCount = 1, giveItemType = "item" },
    { itemName = "pistol_ammo", label = "PISTOL AMMO", chance = 7.5, itemCount = 1, giveItemType = "item" },
    { itemName = "radio", label = "RADIO", chance = 7.5, itemCount = 1, giveItemType = "item" },
    { itemName = "pistol_extendedclip", label = "EXTENDED CLIP", chance = 7.5, itemCount = 1, giveItemType = "item" },
    { itemName = "security_card_02", label = "SECURITY CARD", chance = 7.5, itemCount = 1, giveItemType = "item" },
    { itemName = "weapon_knife", label = "KNIFE", chance = 5, itemCount = 1, giveItemType = "item" },
    { itemName = "weapon_crowbar", label = "CROWBAR", chance = 5, itemCount = 1, giveItemType = "item" },
    { itemName = "weapon_knuckle", label = "KNUCKLE", chance = 5, itemCount = 1, giveItemType = "item" },
    { itemName = "armor", label = "ARMOR", chance = 5, itemCount = 1, giveItemType = "item" },
    { itemName = "weapon_combatpistol", label = "COMBAT PISTOL", chance = 5, itemCount = 1, giveItemType = "item" },
    { itemName = "weapon_heavypistol", label = "HEAVY PISTOL", chance = 5, itemCount = 1, giveItemType = "item"},
    { itemName = "weapon_appistol", label = "AP PISTOL", chance = 5, itemCount = 1, giveItemType = "item" },
    { itemName = "weapon_smg", label = "SMG", chance = 2, sellCredit = 150, giveItemType = "item"},
    { itemName = "weapon_combatpdw", label = "COMBAT PDW", chance = 2, sellCredit = 150,  giveItemType = "item" },
    { itemName = "zentorno", label = "ZENTORNO", chance = 1, sellCredit = 250, giveItemType = "vehicle" },
}

AK4Y.Language = {
    received = "RECEIVED",
    treasury = "TREASURY",
    treasure = "TREASURE",
    location = "LOCATION",
    description = "When the time above resets, the treasure space currently shown to you will reset and you will need to find a new space. Therefore, you must go to this area and get the treasure reward before the time resets.",
    awardReceived = "AWARD RECEIVED",
    youWon = "YOU WON",
}
```
````

{% endtab %}

{% tab title="QBCore" %}

````lua
```lua
AK4Y = {}

AK4Y.Framework = "qb" -- qb / oldqb | qb = export system | oldqb = triggerevent system
AK4Y.Mysql = "oxmysql" -- Check fxmanifest.lua when you change it! | ghmattimysql / oxmysql / mysql-async

AK4Y.OpenMenuCommand = "treasure"

AK4Y.AutoRerollTime = 1 * 60 * 60 -- 1 hours |>|<| 1 means = 1 hour

AK4Y.RerollPrice = 5000
AK4Y.RerollPaymentType = "bank" -- cash or bank

AK4Y.BlipName = "TREASURE"
AK4Y.BlipSize = 0.5
AK4Y.BlipType = 161
AK4Y.BlipColour = 5

AK4Y.DrawText = "[E] - Collect Treasure"

AK4Y.Locations = { -- YOU CAN ADD MORE LOCATIONS, THERE ARE JUST EXAMPLE :)
    { locationId = 1, coords = vector3(-601.83, -1039.32, 22.54), image = "https://cdn.discordapp.com/attachments/1020357813106642964/1046533710046040127/image.png" },
    { locationId = 2, coords = vector3(-845.32, -1088.41, 11.64), image = "https://cdn.discordapp.com/attachments/1020357813106642964/1046534205217189908/image.png" },
    { locationId = 3, coords = vector3(-696.22, -1386.85, 5.5), image = "https://cdn.discordapp.com/attachments/1020357813106642964/1046534604074537020/image.png" },
    { locationId = 4, coords = vector3(-326.21, -1295.86, 31.38), image = "https://cdn.discordapp.com/attachments/1020357813106642964/1046534854520623124/image.png" },
    { locationId = 5, coords = vector3(-688.71, -141.74, 37.83), image = "https://cdn.discordapp.com/attachments/1020357813106642964/1046535399104847943/image.png" },
    { locationId = 6, coords = vector3(572.18, 113.93, 98.41), image = "https://cdn.discordapp.com/attachments/1020357813106642964/1046535968905244884/image.png" },
    { locationId = 7, coords = vector3(1113.3, -645.08, 57.68), image = "https://cdn.discordapp.com/attachments/1020357813106642964/1046536515867639859/image.png" },
    { locationId = 8, coords = vector3(1082.64, -787.55, 58.33), image = "https://cdn.discordapp.com/attachments/1020357813106642964/1046536732226621440/image.png" },
    { locationId = 9, coords = vector3(1001.58, 101.38, 81.19), image = "https://cdn.discordapp.com/attachments/1020357813106642964/1046537059562688543/image.png" },
    { locationId = 10, coords = vector3(-975.88, 389.52, 74.73), image = "https://cdn.discordapp.com/attachments/1020357813106642964/1046537478842101780/image.png" },
    { locationId = 11, coords = vector3(-1354.07, -139.43, 49.57), image = "https://cdn.discordapp.com/attachments/1020357813106642964/1046537657192300584/image.png" },
    { locationId = 12, coords = vector3(-1977.17, -309.92, 38.1), image = "https://cdn.discordapp.com/attachments/1020357813106642964/1046537890353659904/image.png" },
}

-- giveItemType's = "item", "vehicle", "money" 
-- should have a chance total of 100 !! IMPORTANT !! IMPORTANT !! IMPORTANT !!
AK4Y.RandomRewardItems = {                
    { itemName = "lockpick", label = "LOCKPICK", chance = 7.5, itemCount = 1, giveItemType = "item" },
    { itemName = "advancedlockpick", label = "LOCKPICK", chance = 7.5, itemCount = 1, giveItemType = "item" },
    { itemName = "firstaid", label = "AID KIT", chance = 7.5, itemCount = 1, giveItemType = "item" },
    { itemName = "joint", label = "JOINT", chance = 7.5, itemCount = 1, giveItemType = "item" },
    { itemName = "pistol_ammo", label = "PISTOL AMMO", chance = 7.5, itemCount = 1, giveItemType = "item" },
    { itemName = "radio", label = "RADIO", chance = 7.5, itemCount = 1, giveItemType = "item" },
    { itemName = "pistol_extendedclip", label = "EXTENDED CLIP", chance = 7.5, itemCount = 1, giveItemType = "item" },
    { itemName = "security_card_02", label = "SECURITY CARD", chance = 7.5, itemCount = 1, giveItemType = "item" },
    { itemName = "weapon_knife", label = "KNIFE", chance = 5, itemCount = 1, giveItemType = "item" },
    { itemName = "weapon_crowbar", label = "CROWBAR", chance = 5, itemCount = 1, giveItemType = "item" },
    { itemName = "weapon_knuckle", label = "KNUCKLE", chance = 5, itemCount = 1, giveItemType = "item" },
    { itemName = "armor", label = "ARMOR", chance = 5, itemCount = 1, giveItemType = "item" },
    { itemName = "weapon_combatpistol", label = "COMBAT PISTOL", chance = 5, itemCount = 1, giveItemType = "item" },
    { itemName = "weapon_heavypistol", label = "HEAVY PISTOL", chance = 5, itemCount = 1, giveItemType = "item"},
    { itemName = "weapon_appistol", label = "AP PISTOL", chance = 5, itemCount = 1, giveItemType = "item" },
    { itemName = "weapon_smg", label = "SMG", chance = 2, sellCredit = 150, giveItemType = "item"},
    { itemName = "weapon_combatpdw", label = "COMBAT PDW", chance = 2, sellCredit = 150,  giveItemType = "item" },
    { itemName = "zentorno", label = "ZENTORNO", chance = 1, sellCredit = 250, giveItemType = "vehicle" },
}

AK4Y.Language = {
    received = "RECEIVED",
    treasury = "TREASURY",
    treasure = "TREASURE",
    location = "LOCATION",
    description = "When the time above resets, the treasure space currently shown to you will reset and you will need to find a new space. Therefore, you must go to this area and get the treasure reward before the time resets.",
    awardReceived = "AWARD RECEIVED",
    youWon = "YOU WON",
}
```
````

{% endtab %}
{% endtabs %}


---

# 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://docs.ak4y.com/scripts/ak4y-treasurehunting/config.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.
