# Configuration

Here is the full `config.lua` for **Imperium Selldrugs**.

Voice lines are available in both **English** and **French**. To use the French voices, please open a ticket on our Discord: <https://discord.gg/u5TxHBjQdS>-

```lua
--[[
  ___ __  __ ___  ___ ___ ___ _   _ __  __    ___  ___ ___ ___ ___ _____ ___ 
 |_ _|  \/  | _ \| __| _ \_ _| | | |  \/  |  / __|/ __| _ \_ _| _ \_   _/ __|
  | || |\/| |  _/| _||   /| || |_| | |\/| |  \__ \ (__|   /| ||  _/ | | \__ \
 |___|_|  |_|_|  |___|_|_\___|\___/|_|  |_|  |___/\___|_|_\___|_|   |_| |___/
                                                                           
  TEBEX   : https://imperium-scripts.tebex.io
  GITBOOK : https://imperiumscripts.gitbook.io/imperium-scripts/
  DISCORD : https://discord.gg/u5TxHBjQdS
--]]

Config = {}

-- ═══════════════════════════════════════════════════════════════
-- GENERAL CONFIGURATION
-- ═══════════════════════════════════════════════════════════════

Config.Debug = false -- Debug mode (console logs)

-- ═══════════════════════════════════════════════════════════════
-- LOCALIZATION
-- ═══════════════════════════════════════════════════════════════

Config.Locale = 'en'  -- Available: 'en' (English), 'fr' (Français)

-- ═══════════════════════════════════════════════════════════════
-- BRIDGE SYSTEM - Framework & Compatibility
-- ═══════════════════════════════════════════════════════════════

-- Framework: 'auto', 'ESX', or 'QBCore'
-- 'auto' will automatically detect your framework
Config.Framework = 'auto'

-- Notification System: 'auto', 'qbcore', 'mythic', 'okokNotify', 'ox_lib', 'esx', 'custom'
-- 'auto' will automatically detect available notification system
Config.NotificationSystem = 'auto'

-- Target System: 'auto', 'ox_target', 'qb-target', 'qtarget'
-- 'auto' will automatically detect available target system
Config.TargetSystem = 'auto'

-- Inventory System: 'auto', 'ox_inventory', 'qb-inventory', 'qs-inventory', 'esx_inventory'
-- 'auto' will automatically detect available inventory system
Config.InventorySystem = 'auto'

-- ═══════════════════════════════════════════════════════════════
-- ITEMS & PRICES
-- ═══════════════════════════════════════════════════════════════

Config.BlackMoneyItem = 'black_money' -- Item name for black money (e.g. 'black_money', 'markedbills', etc.)

Config.Items = {
    -- levelRequired = minimum reputation level required to sell this item
    -- minQuantity/maxQuantity = min/max quantity requested by clients (for missions)
    {
        item = 'weed',
        label = 'Weed',
        minPrice = 15,
        maxPrice = 25,
        minQuantity = 5,
        maxQuantity = 15,
        levelRequired = 1,
        icon = '🌿'
    },
    {
        item = 'weed_pooch',
        label = 'Weed Pouch',
        minPrice = 50,
        maxPrice = 80,
        minQuantity = 1,
        maxQuantity = 2,
        levelRequired = 2,
        icon = '🌿'
    },
    {
        item = 'coke',
        label = 'Cocaine',
        minPrice = 80,
        maxPrice = 120,
        minQuantity = 1,
        maxQuantity = 3,
        levelRequired = 4,
        icon = '❄️'
    },
    {
        item = 'coke_pooch',
        label = 'Cocaine Pouch',
        minPrice = 250,
        maxPrice = 350,
        minQuantity = 1,
        maxQuantity = 2,
        levelRequired = 6,
        icon = '❄️'
    },
    {
        item = 'meth',
        label = 'Methamphetamine',
        minPrice = 100,
        maxPrice = 150,
        minQuantity = 1,
        maxQuantity = 3,
        levelRequired = 5,
        icon = '💎'
    },
    {
        item = 'meth_pooch',
        label = 'Meth Pouch',
        minPrice = 300,
        maxPrice = 450,
        minQuantity = 1,
        maxQuantity = 2,
        levelRequired = 7,
        icon = '💎'
    },
    {
        item = 'opium',
        label = 'Opium',
        minPrice = 120,
        maxPrice = 180,
        minQuantity = 1,
        maxQuantity = 2,
        levelRequired = 8,
        icon = '🌺'
    },
    {
        item = 'opium_pooch',
        label = 'Opium Pouch',
        minPrice = 400,
        maxPrice = 600,
        minQuantity = 1,
        maxQuantity = 2,
        levelRequired = 10,
        icon = '🌺'
    }
}

-- ═══════════════════════════════════════════════════════════════
-- AUTHORIZED SELLING ZONES
-- ═══════════════════════════════════════════════════════════════

-- If useZoneRestriction = false, you can sell anywhere on the map
-- If useZoneRestriction = true, you can ONLY sell in the zones defined below
Config.useZoneRestriction = false

Config.SellZones = {
    {
        name = 'Grove Street',
        coords = vector3(127.93, -1930.23, 21.38),
        radius = 150.0,
        enabled = true
    },
    {
        name = 'Chamberlain Hills',
        coords = vector3(-60.09, -1449.45, 32.52),
        radius = 120.0,
        enabled = true
    },
    {
        name = 'Davis Avenue',
        coords = vector3(56.55, -1739.32, 29.37),
        radius = 100.0,
        enabled = true
    },
    {
        name = 'Strawberry',
        coords = vector3(282.36, -1881.37, 26.37),
        radius = 100.0,
        enabled = true
    },
    {
        name = 'Vespucci Canals',
        coords = vector3(-1172.91, -1571.98, 4.66),
        radius = 130.0,
        enabled = true
    },
    {
        name = 'Sandy Shores',
        coords = vector3(1561.95, 3587.63, 38.77),
        radius = 200.0,
        enabled = true
    },
    {
        name = 'Paleto Bay',
        coords = vector3(-378.03, 6062.44, 31.50),
        radius = 150.0,
        enabled = true
    }
}

-- ═══════════════════════════════════════════════════════════════
-- MISSION SPAWN POSITIONS
-- ═══════════════════════════════════════════════════════════════

-- Predefined positions for mission NPC spawns
Config.MissionSpawnPoints = {
    -- Grove Street Area
    vector4(97.82, -1954.01, 19.74, 334.38),
    vector4(115.79, -1948.31, 19.65, 55.11),
    vector4(108.96, -1927.75, 19.75, 170.24),
    
    -- Davis Avenue
    vector4(54.65, -1738.94, 28.59, 54.86),
    vector4(40.56, -1754.18, 28.30, 45.81),
    vector4(94.15, -1748.68, 28.31, 322.67),
    
    -- Downtown/Pillbox Area
    vector4(-602.23, -347.40, 34.24, 108.75),
    vector4(-786.96, 36.85, 47.23, 78.29),
    
    -- Rockford Hills/West Vinewood
    vector4(-1692.41, -288.83, 50.88, 150.13),
    vector4(-1849.07, -359.15, 48.39, 138.35),
    
    -- Del Perro/Vespucci Area
    vector4(-1817.62, -1200.59, 12.02, 248.35),
    vector4(-1640.44, -1069.55, 12.15, 234.51),
    vector4(-1607.22, -1026.71, 12.10, 232.40),
    vector4(-1114.10, -1069.27, 1.15, 33.03),
    vector4(-1021.35, -1019.84, 1.15, 33.10),
    vector4(-950.18, -905.23, 1.17, 306.96),
    
    -- Mirror Park/East Vinewood
    vector4(964.02, -595.98, 58.90, 74.61),
    vector4(920.15, -570.08, 57.37, 213.66),
    vector4(920.42, 40.11, 80.10, 63.31),
    
    -- Little Seoul/La Mesa
    vector4(-1412.65, -602.40, 29.52, 39.87),
    
    -- Great Ocean Highway (West)
    vector4(-3147.43, 1121.48, 19.87, 254.93),
    vector4(-1105.62, 2696.48, 17.61, 224.40),
    
    -- Sandy Shores Area
    vector4(1997.20, 3780.37, 31.18, 212.81),
    vector4(2482.33, 4125.47, 37.02, 249.65),
    
    -- Paleto Bay Area
    vector4(1706.14, 6425.51, 31.77, 157.26),
    vector4(-151.35, 6322.36, 30.56, 315.86)
}

-- ═══════════════════════════════════════════════════════════════
-- NPC CONFIGURATION
-- ═══════════════════════════════════════════════════════════════

Config.PedModels = {
    'a_m_y_stbla_01',
    'a_m_y_stwhi_01',
    'a_m_y_stlat_01',
    'a_m_y_soucent_01',
    'a_m_y_hipster_01',
    'a_m_y_skater_01',
    'a_m_y_vinewood_01',
    'a_m_y_beach_01',
    'a_m_y_methhead_01',
    'a_m_y_genstreet_01'
}

-- ═══════════════════════════════════════════════════════════════
-- TIMINGS & COOLDOWNS
-- ═══════════════════════════════════════════════════════════════

Config.Timings = {
    sellDuration = 5000,              -- Sell duration (ms) - progress bar
    missionTimeout = 600000,          -- Max time for a mission (10 min)
    missionCooldown = 120000,         -- Cooldown between missions (2 min)
    cornerSellCooldown = 10000,       -- Cooldown between corner sells (10 sec)
    smsInterval = {60000, 90000},   -- Random SMS interval (60-90 sec)
    callInterval = {300000, 600000}, -- Random call interval (5-10 min)
    policeAlertDelay = 3000           -- Delay before police alert (3 sec)
}

-- ═══════════════════════════════════════════════════════════════
-- CHANCES & PROBABILITIES
-- ═══════════════════════════════════════════════════════════════

Config.Chances = {
    -- Corner Sell (base + reputation bonus)
    cornerAccept = 50,        -- % chance of base acceptance
    cornerRefuse = 30,        -- % chance of refusal
    cornerPolice = 20,        -- % chance of police call
    
    -- Bonus per reputation level (%)
    reputationBonus = 2,      -- +2% per level
    
    -- Fast Mission
    missionSuccess = 95       -- % chance of mission success
}

-- ═══════════════════════════════════════════════════════════════
-- REPUTATION SYSTEM
-- ═══════════════════════════════════════════════════════════════

Config.Reputation = {
    autoCreateTables = true,      -- Automatically create SQL tables on startup
    
    -- XP required per level
    -- XP required to ADVANCE to the next level (Level X -> Level X+1)
    levels = {
        [1] = 100,    -- 1->2 (Total 100)
        [2] = 200,    -- 2->3 (Total 300)
        [3] = 400,    -- 3->4 (Total 700)
        [4] = 800,    -- 4->5 (Total 1500)
        [5] = 1500,   -- 5->6 (Total 3000)
        [6] = 2500,   -- 6->7 (Total 5500)
        [7] = 4000,   -- 7->8 (Total 9500)
        [8] = 6000,   -- 8->9 (Total 15500)
        [9] = 10000,  -- 9->10 (Total 25500)
        [10] = -1     -- Max Level
    },
    
    -- XP Gains
    xpGains = {
        cornerSell = 5,       -- XP per corner sell
        missionSell = 25,     -- XP per completed mission
        refusedSell = -2,     -- XP loss if refused
        policeCalled = -10    -- XP loss if police called
    },
    
    -- Price bonus per level (%)
    priceBonus = {
        [1] = 0,
        [2] = 5,
        [3] = 8,
        [4] = 12,
        [5] = 15,
        [6] = 20,
        [7] = 25,
        [8] = 30,
        [9] = 35,
        [10] = 50
    },
    
    -- Sales history
    historyEnabled = true,        -- Enable history
    historyMaxDays = 30,          -- Delete history after X days
    historyDisplayCount = 10      -- Number of sales displayed in UI
}

-- ═══════════════════════════════════════════════════════════════
-- POLICE SYSTEM
-- ═══════════════════════════════════════════════════════════════

Config.Police = {
    enabled = false,
    dispatchType = 'none',  -- 'ps-dispatch', 'cd_dispatch', 'custom', 'none'
    
    -- Jobs considered as police
    jobs = {
        'police',
        'sheriff'
    },
    
    -- Custom message if dispatchType = 'custom'
    customMessage = '~r~[POLICE ALERT]~s~\nSuspicious drug sale reported',
    blipTime = 30000,  -- Blip duration (30 sec)
    
    -- Blip configuration
    blip = {
        sprite = 161,
        color = 1,
        scale = 1.2,
        label = 'Drug sale reported'
    }
}

-- ═══════════════════════════════════════════════════════════════
-- ANIMATIONS
-- ═══════════════════════════════════════════════════════════════

Config.Animations = {
    phone = {
        dict = 'cellphone@',
        anim = 'cellphone_text_read_base',
        bone = 28422,  -- SKEL_R_Hand
        prop = 'prop_amb_phone',
        propPlacement = {
            xPos = 0.0,
            yPos = 0.0,
            zPos = 0.0,
            xRot = 0.0,
            yRot = 0.0,
            zRot = 0.0
        }
    },
    
    drugDeal = {
        dict = 'mp_common',
        anim = 'givetake1_a',
        duration = 3000,
        flag = 16
    }
}

-- ═══════════════════════════════════════════════════════════════
-- DISCORD WEBHOOKS
-- ═══════════════════════════════════════════════════════════════

Config.Webhooks = {
    enabled = false,
    url = '',  -- Your Discord webhook
    
    -- Enabled logs
    logCornerSell = true,
    logMissionSell = true,
    logPoliceAlert = true,
    logLevelUp = true
}

-- ═══════════════════════════════════════════════════════════════
-- LOCALE CONFIGURATION
-- ═══════════════════════════════════════════════════════════════

Config.Locales = {} -- Don't touch !! Edit your custom locales in locales folder.

-- ═══════════════════════════════════════════════════════════════
-- CONVERSATION SYSTEM
-- ═══════════════════════════════════════════════════════════════

Config.Conversations = {
    -- Timeout conversation (5 minutes)
    timeout = 300000, -- 5 minutes in milliseconds
    }

-- ═══════════════════════════════════════════════════════════════
-- PHONE CALLS SYSTEM
-- ═══════════════════════════════════════════════════════════════

Config.PhoneCalls = {
    enabled = true,
    
    -- Audio settings
    audioVolume = 0.6, -- 0.0 to 1.0
    audioFolder = 'nui://ImperiumSelldrugs/audio/calls/',
    
    -- Call duration settings
    ringDuration = 10000, -- Ring for 10 seconds before timeout
    
    -- Call scenarios
    scenarios = {
        {
            id = 'urgent_deal',
            callerName = 'VIP Client',
            callerNumber = '***-***-5847',
            audioFile = 'urgent_call.ogg',
            audioDuration = 15000, -- Duration in ms
            triggerChance = 30, -- % chance to trigger this scenario
            responses = {
                { id = 'accept', text = 'OK I\'m coming', icon = '✅', action = 'start_mission' },
                { id = 'refuse', text = 'Not available', icon = '❌', action = 'refuse' },
                { id = 'negotiate', text = 'Let\'s talk', icon = '💬', action = 'continue' }
            }
        },
        {
            id = 'new_client',
            callerName = 'Unknown Number',
            callerNumber = '***-***-????',
            audioFile = 'new_client.ogg',
            audioDuration = 16000,
            triggerChance = 20,
            responses = {
                { id = 'accept', text = 'Who are you?', icon = '❓', action = 'continue' },
                { id = 'refuse', text = 'Hang up', icon = '📵', action = 'refuse' }
            }
        },
        {
            id = 'check_availability',
            callerName = 'Regular Client',
            callerNumber = '***-***-3291',
            audioFile = 'check_availability.ogg',
            audioDuration = 12000,
            triggerChance = 25,
            responses = {
                { id = 'available', text = 'Yes available', icon = '✅', action = 'start_mission' },
                { id = 'busy', text = 'Busy now', icon = '🕒', action = 'refuse' },
                { id = 'later', text = 'Call back later', icon = '📞', action = 'refuse' }
            }
        },
        {
            id = 'large_order',
            callerName = 'Big Client',
            callerNumber = '***-***-7719',
            audioFile = 'large_order.ogg',
            audioDuration = 15000,
            triggerChance = 15,
            responses = {
                { id = 'accept', text = 'I got it', icon = '💪', action = 'start_mission' },
                { id = 'negotiate', text = 'What price?', icon = '💰', action = 'continue' },
                { id = 'refuse', text = 'Too big', icon = '🚫', action = 'refuse' }
            }
        },
        {
            id = 'suspicious_call',
            callerName = 'Hidden Number',
            callerNumber = 'PRIVATE',
            audioFile = 'suspicious_call.ogg',
            audioDuration = 7000,
            triggerChance = 10,
            responses = {
                { id = 'careful', text = 'Who is it?', icon = '⚠️', action = 'continue' },
                { id = 'hangup', text = 'Hang up', icon = '❌', action = 'refuse' }
            }
        }
    }
}

-- ═══════════════════════════════════════════════════════════════
-- ANTI-CHEAT SECURITY
-- ═══════════════════════════════════════════════════════════════

Config.AntiCheat = {
    enabled = true,
    maxDistance = 5.0,        -- Max distance between player and NPC
    checkInventory = true,    -- Check inventory server-side
    logSuspicious = true      -- Log suspicious actions
}


```


---

# 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://imperiumscripts.gitbook.io/imperium-scripts/scripts/imperium-selldrugs/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.
