> For the complete documentation index, see [llms.txt](https://mamang-irgi-scrips.gitbook.io/mamang-irgi-scripts/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mamang-irgi-scrips.gitbook.io/mamang-irgi-scripts/mining/config.md).

# Config

```lua
return {
    framework = 'qb', -- esx/qb/custom (check folder bridge | if you using qbox, insert qb!)

    notification = 'ox', -- esx/qb/ox/custom (check folder bridge | if you using qbox, insert qb/ox!)

    inventory = 'ox', -- esx/qb/ox/custom (check folder bridge | if you using qbox, insert ox!)

    target = false, -- boolean | only support ox_target

    progressbar = 'ox', -- ox/qb (check folder bridge)

    expthresholds = {
        [1] = 0, -- dont touch this!
        [2] = 5000,
        [3] = 12500,
        [4] = 20000,
        [5] = 40000,
        [6] = 70000,
        [7] = 100000,
        [8] = 150000,
        [9] = 220000,
        [10] = 300000,
        -- add more!
    },

    shopmining = {
        peds = {
            {
                model = 'cs_floyd', -- model for npc
                scenario = 'WORLD_HUMAN_STAND_MOBILE', -- some scenario for npc
                coords = vec4(2943.42, 2746.32, 42.35, 285.14), -- coordinate peds | -1 z for flying peds
                zoneOptions = { -- when usetarget is false
                    length = 3.0,
                    width = 3.0,
                    debug = true,
                },
            },
            {
                model = 'cs_floyd',
                scenario = 'WORLD_HUMAN_STAND_MOBILE',
                coords = vec4(2952.2, 2752.51, 43.42, 189.6),
                zoneOptions = { 
                    length = 3.0,
                    width = 3.0,
                    debug = true,
                },
            },
            -- add more with same template as above
        },
        blip = {
            showBlip = true, -- boolean | toggle blip
            label = 'Mining Shop', -- label
            shortRange = true,  -- SetBlipAsShortRange
            sprite = 52, -- https://docs.fivem.net/docs/game-references/blips/
            display = 4, -- https://docs.fivem.net/docs/game-references/blips/
            scale = 0.65, -- https://docs.fivem.net/docs/game-references/blips/
            colour = 0, -- https://docs.fivem.net/docs/game-references/blips/
        },
        buyitem = {
            pickaxe = { -- item name
                label = "Pickaxe", -- label name
                level = 1, -- minimun level
                price = 10, -- price for item
            },
            copper_pickaxe = {
                label = "Copper pickaxe",
                level = 2,
                price = 20,
            },
            metal_pickaxe = {
                label = "Metal pickaxe",
                level = 4,
                price = 30,
            },
            gold_pickaxe = {
                label = "Gold pickaxe",
                level = 8,
                price = 40,
            },
            platinum_pickaxe = {
                label = "Platinum pickaxe",
                level = 10,
                price = 50,
            },
            -- add more with same template as above
        },
        toggleselling = true, -- boolean | enable/disable selling function
        sellitem = {
            stone = { -- item name
                label = "Stone", -- label name
                level = 1, -- level
                price = 1, -- price
            },
            copper = {
                label = "Copper",
                level = 1,
                price = 5,
            },
            silver = {
                label = "Silver",
                level = 2,
                price = 10,
            },
            gold = {
                label = "Gold",
                level = 3,
                price = 20,
            },
            diamond = {
                label = "Diamond",
                level = 4,
                price = 40,
            },
            -- add more with same template as above
        },
        toggledaily = true,  -- boolean | enable/disable daily challenge function
        challengecountmin = 1, -- generate minimum task for daily challenge | math random(challengecountmin, challengecountmax)
        challengecountmax = 3, -- generate maximum task for daily challenge | math random(challengecountmin, challengecountmax)
        dailychallenge = {
            {
                id = "mine_15_stone", -- id for daily challenge
                description = "Mine 15 Stone", -- description for daily challenge
                requiredAmount = 15, -- amount for daily challenge to complete
                type = "mining", -- mining/smelting
                target = "stone", -- you can add more depends on mining/smelting reward item
                reward = {
                    { type = "money", amount = 150, chance = 100 },
                    --{ type = "item", item = "iron_ingot", amount = 3, chance = 50 }
                }
            },
            {
                id = "mine_45_stone",
                description = "Mine 45 Stone",
                requiredAmount = 45,
                type = "mining",
                target = "stone",
                reward = {
                    { type = "money", amount = 250, chance = 100 },
                    --{ type = "item", item = "iron_ingot", amount = 3, chance = 50 }
                }
            },
            {
                id = "mine_200_stone",
                description = "Mine 200 Stone",
                requiredAmount = 200,
                type = "mining",
                target = "stone",
                reward = {
                    { type = "money", amount = 450, chance = 100 },
                    --{ type = "item", item = "iron_ingot", amount = 3, chance = 50 }
                }
            },
            {
                id = "smelting_10_copper",
                description = "Smelting 10 copper",
                requiredAmount = 10,
                type = "smelting",
                target = "copper",
                reward = {
                    { type = "money", amount = 150, chance = 100 },
                    --{ type = "item", item = "iron_ingot", amount = 3, chance = 50 }
                }
            },
            -- add more with same template as above
        },
    },

    mining = {
        anims = {
            label = 'Mining..',
            position = 'right',
            useWhileDead = false,
            canCancel = true,
            disable = { car = true, move = true, combat = true },
            anim = { dict = 'melee@hatchet@streamed_core', clip = 'plyr_rear_takedown_b', flag = 1 },
            prop = { bone = 28422, model = 'prop_tool_pickaxe', pos = vec3(0.09, -0.05, -0.02), rot = vec3(-78.0, 13.0, 28.0) }
        },

        blip = {
            showBlip = true,
            label = 'Mining Area',
            shortRange = true,
            sprite = 762,
            display = 4,
            scale = 0.65,
            colour = 0,
        },

        location = {
            {
                coords = vec3(2957.83, 2851.54, 47.79), -- location mining
                level = 1, -- minimum level mining
                item = 'pickaxe', -- item for mining
                breakpickaxe = true, -- toggle chance for break pickaxe
                chancebreak = 2, -- chance break pickaxe | math.random(1, 100) <= (value) | <-- example for 2%
                usingminigame = false, -- use minigame for smleting? change minigame on bridge/client.lua 
                animationduration = { min = 1500, max = 2500 }, -- duration animation | math.random(min, max)
                exp = { min = 1, max = 2 }, -- exp per mining | math.random(min, max)
                reward = {
                    { item = 'stone', min = 1, max = 2 },
                    -- { item = 'some_rare_item', min = 1, max = 1, chance = 5 },
                },
                repeatmining = true, -- make this repeat instead press E several times
            },
            {
                coords = vec3(2966.27, 2848.31, 47.83),
                level = 1,
                item = 'pickaxe',
                breakpickaxe = true,
                chancebreak = 2, -- math.random(1, 100) <= (value)
                usingminigame = false,
                animationduration = { min = 1500, max = 2500 },
                exp = { min = 1, max = 2 },
                reward = {
                    { item = 'stone', min = 1, max = 2 },
                    -- { item = 'some_rare_item', min = 1, max = 1, chance = 5 },
                },
                repeatmining = true,
            },
            {
                coords = vec3(2972.98, 2840.32, 46.08),
                level = 1,
                item = 'pickaxe',
                breakpickaxe = true,
                chancebreak = 2, -- math.random(1, 100) <= (value)
                usingminigame = false,
                animationduration = { min = 1500, max = 2500 },
                exp = { min = 1, max = 2 },
                reward = {
                    { item = 'stone', min = 1, max = 2 },
                    -- { item = 'some_rare_item', min = 1, max = 1, chance = 5 },
                },
                repeatmining = true,
            },
            {
                coords = vec3(2981.33, 2824.48, 46.28),
                level = 2,
                item = 'copper_pickaxe',
                breakpickaxe = true,
                chancebreak = 2, -- math.random(1, 100) <= (value)
                usingminigame = false,
                animationduration = { min = 1400, max = 2400 },
                exp = { min = 2, max = 4 },
                reward = {
                    { item = 'stone', min = 2, max = 3 },
                    -- { item = 'some_rare_item', min = 1, max = 1, chance = 5 },
                },
                repeatmining = true,
            },
            {
                coords = vec3(2986.22, 2816.29, 45.8),
                level = 2,
                item = 'copper_pickaxe',
                breakpickaxe = true,
                chancebreak = 2, -- math.random(1, 100) <= (value)
                usingminigame = false,
                animationduration = { min = 1400, max = 2400 },
                exp = { min = 2, max = 4 },
                reward = {
                    { item = 'stone', min = 2, max = 3 },
                    -- { item = 'some_rare_item', min = 1, max = 1, chance = 5 },
                },
                repeatmining = true,
            },
            {
                coords = vec3(2998.46, 2795.81, 44.96),
                level = 2,
                item = 'copper_pickaxe',
                breakpickaxe = true,
                chancebreak = 2, -- math.random(1, 100) <= (value)
                usingminigame = false,
                animationduration = { min = 1400, max = 2400 },
                exp = { min = 2, max = 4 },
                reward = {
                    { item = 'stone', min = 2, max = 3 },
                    -- { item = 'some_rare_item', min = 1, max = 1, chance = 5 },
                },
                repeatmining = true,
            },
            {
                coords = vec3(3004.06, 2784.97, 44.6),
                level = 3,
                item = 'metal_pickaxe',
                breakpickaxe = true,
                chancebreak = 2, -- math.random(1, 100) <= (value)
                usingminigame = false,
                animationduration = { min = 1300, max = 2300 },
                exp = { min = 5, max = 10 },
                reward = {
                    { item = 'stone', min = 3, max = 4 },
                    -- { item = 'some_rare_item', min = 1, max = 1, chance = 5 },
                },
                repeatmining = true,
            },
            {
                coords = vec3(3004.55, 2764.25, 43.58),
                level = 3,
                item = 'metal_pickaxe',
                breakpickaxe = true,
                chancebreak = 2, -- math.random(1, 100) <= (value)
                usingminigame = false,
                animationduration = { min = 1300, max = 2300 },
                exp = { min = 5, max = 10 },
                reward = {
                    { item = 'stone', min = 3, max = 4 },
                    -- { item = 'some_rare_item', min = 1, max = 1, chance = 5 },
                },
                repeatmining = true,
            },
            {
                coords = vec3(3000.91, 2754.31, 44.26),
                level = 3,
                item = 'metal_pickaxe',
                breakpickaxe = true,
                chancebreak = 2, -- math.random(1, 100) <= (value)
                usingminigame = false,
                animationduration = { min = 1300, max = 2300 },
                exp = { min = 5, max = 10 },
                reward = {
                    { item = 'stone', min = 3, max = 4 },
                    -- { item = 'some_rare_item', min = 1, max = 1, chance = 5 },
                },
                repeatmining = true,
            },
            {
                coords = vec3(2934.17, 2743.19, 44.06),
                level = 4,
                item = 'gold_pickaxe',
                breakpickaxe = true,
                chancebreak = 2, -- math.random(1, 100) <= (value)
                usingminigame = false,
                animationduration = { min = 1200, max = 2200 },
                exp = { min = 15, max = 20 },
                reward = {
                    { item = 'stone', min = 4, max = 5 },
                    -- { item = 'some_rare_item', min = 1, max = 1, chance = 5 },
                },
                repeatmining = true,
            },
            {
                coords = vec3(2933.61, 2757.39, 45.35),
                level = 4,
                item = 'gold_pickaxe',
                breakpickaxe = true,
                chancebreak = 2, -- math.random(1, 100) <= (value)
                usingminigame = false,
                animationduration = { min = 1200, max = 2200 },
                exp = { min = 15, max = 20 },
                reward = {
                    { item = 'stone', min = 4, max = 5 },
                    -- { item = 'some_rare_item', min = 1, max = 1, chance = 5 },
                },
                repeatmining = true,
            },
            {
                coords = vec3(2926.36, 2767.93, 44.81),
                level = 4,
                item = 'gold_pickaxe',
                breakpickaxe = true,
                chancebreak = 2, -- math.random(1, 100) <= (value)
                usingminigame = false,
                animationduration = { min = 1200, max = 2200 },
                exp = { min = 15, max = 20 },
                reward = {
                    { item = 'stone', min = 4, max = 5 },
                    -- { item = 'some_rare_item', min = 1, max = 1, chance = 5 },
                },
                repeatmining = true,
            },
            {
                coords = vec3(2916.41, 2776.12, 44.29),
                level = 5,
                item = 'platinum_pickaxe',
                breakpickaxe = true,
                chancebreak = 2, -- math.random(1, 100) <= (value)
                usingminigame = false,
                animationduration = { min = 1200, max = 2200 },
                exp = { min = 25, max = 50 },
                reward = {
                    { item = 'stone', min = 4, max = 5 },
                    -- { item = 'some_rare_item', min = 1, max = 1, chance = 5 },
                },
                repeatmining = true,
            },
            {
                coords = vec3(2907.23, 2788.1, 46.42),
                level = 5,
                item = 'platinum_pickaxe',
                breakpickaxe = true,
                chancebreak = 2, -- math.random(1, 100) <= (value)
                usingminigame = false,
                animationduration = { min = 1200, max = 2200 },
                exp = { min = 25, max = 50 },
                reward = {
                    { item = 'stone', min = 4, max = 5 },
                    -- { item = 'some_rare_item', min = 1, max = 1, chance = 5 },
                },
                repeatmining = true,
            },
            {
                coords = vec3(2913.72, 2800.96, 44.36),
                level = 5,
                item = 'platinum_pickaxe',
                breakpickaxe = true,
                chancebreak = 2, -- math.random(1, 100) <= (value)
                usingminigame = false,
                animationduration = { min = 1200, max = 2200 },
                exp = { min = 25, max = 50 },
                reward = {
                    { item = 'stone', min = 4, max = 5 },
                    -- { item = 'some_rare_item', min = 1, max = 1, chance = 5 },
                },
                repeatmining = true,
            },
            -- add more with same template as above
        }
    },

    smelting = {
        coords = {
            vec3(1087.88, -2001.98, 30.88), -- smelting location
            vec3(1109.88, -2008.37, 31.06),
            -- add more with same template as above
        },

        anims = {
            label = 'Smelting..',
            position = 'right',
            useWhileDead = false,
            canCancel = true,
            disable = { car = true, move = true, combat = true },
            anim = { dict = 'mini@repair', clip = 'fixing_a_ped', flag = 1 },
            prop = {},
        },

        blip = {
            showBlip = true,
            label = 'Smelting Area',
            shortRange = true,
            sprite = 648,
            display = 4,
            scale = 0.65,
            colour = 0,
        },

        items = {
            [1] = {
                name = 'Copper', -- label name
                icon = 'fas fa-fire', -- icon for menu
                level = 1, -- minimum level
                animationduration = { min = 2500, max = 5000 }, -- duration per animation | math.random(min, max)
                exp = { min = 5, max = 10 }, -- exp per smelting | math.random(min, max)
                usingminigame = false, -- use minigame for smleting? change minigame on bridge/client.lua 
                repeatsmelting = true, -- make this repeat instead press E several times
                required = {
                    { item = 'stone', amount = 5 },
                },
                reward = {
                    { item = 'copper', min = 1, max = 2 },
                    -- { item = 'silver', min = 1, max = 1, chance = 80 },
                    -- { item = 'some_rare_item', min = 1, max = 1, chance = 5 },
                },
            },
            [2] = {
                name = 'Silver',
                icon = 'fas fa-fire',
                level = 2,
                animationduration = { min = 2500, max = 5000 },
                exp = { min = 10, max = 15 },
                usingminigame = false,
                repeatsmelting = true,
                required = {
                    { item = 'stone', amount = 10 },
                },
                reward = {
                    { item = 'silver', min = 1, max = 2 },
                    -- { item = 'some_rare_item', min = 1, max = 1, chance = 5 },
                },
            },
            [3] = {
                name = 'Gold',
                level = 4,
                animationduration = { min = 2500, max = 5000 },
                icon = 'fas fa-fire',
                exp = { min = 15, max = 25 },
                usingminigame = false,
                repeatsmelting = true,
                required = {
                    { item = 'stone', amount = 20 },
                },
                reward = {
                    { item = 'gold', min = 1, max = 2 },
                    -- { item = 'some_rare_item', min = 1, max = 1, chance = 5 },
                },
            },
            [4] = {
                name = 'Diamond',
                level = 5,
                animationduration = { min = 2500, max = 5000 },
                icon = 'fas fa-fire',
                exp = { min = 25, max = 40 },
                usingminigame = false,
                repeatsmelting = true,
                required = {
                    { item = 'stone', amount = 25 },
                },
                reward = {
                    { item = 'diamond', min = 1, max = 2 },
                    -- { item = 'some_rare_item', min = 1, max = 1, chance = 5 },
                },
            },
            -- add more with same template as above
        },
    },

    logging = {
        mining = false, -- boolean | i think false is better cuz ox_inventory already have logging for this
        smelting = false, -- boolean | i think false is better cuz ox_inventory already have logging for this
        shop = true, -- boolean 
        anticheat = true, -- boolean 
        type = 'discord', -- discord/ox edit that on server/function.lua
        discord = {
            botname = 'Logs Mining', -- name for bot
            webhook = '', -- webhook
            botimage = '' or nil -- using imgur or something else
        }
    },
}
```
