Configuration

The config.lua file allows full control over the behavior, visuals, reward logic, item values, and world interactions in the script.


πŸ”§ Core Settings

Config.Debug = true                -- Enables debug prints and visual zones
Config.Framework = "auto"         -- "qb", "esx", or "auto"
Config.Inventory = "auto"         -- "qb", "ox", "qs", or "auto"
Config.InventoryLink = 'qb-inventory/html/images/' -- Path to item images (used in NUI)
Config.Target = "auto"            -- "qb-target", "ox_target", or "auto"

πŸ” Trade Behavior

Config.MaxConsecutiveLowTrades = 3  -- After this many low trades, the wizard will temporarily refuse trade (fatigue mechanic)

🎯 Tier Requirements

Control how many items and how much value is needed for each reward tier.

Config.TierRequirements = {
    common =    { minItems = 2, minValue = 0 },
    uncommon =  { minItems = 3, minValue = 60 },
    rare =      { minItems = 4, minValue = 120 },
    epic =      { minItems = 5, minValue = 200 },
    legendary = { minItems = 6, minValue = 300 },
}

πŸ’Ž Hidden Item Values

These values are secretly assigned to items and used to calculate trade value.

Config.TradeItems = {
    aether_spark     = 10,
    glimmering_clay  = 8,
    phantom_feather  = 15,
    twilight_ember   = 12,
    arcane_shard     = 18,
    cinderroot_ash   = 14,
    dusty_teeth      = 5,
}

πŸ§ͺ Rarity Thresholds

Determine the value ranges for each rarity tier.

Config.RarityThresholds = {
    common =    { min = 0,   max = 29 },
    uncommon =  { min = 30,  max = 59 },
    rare =      { min = 60,  max = 99 },
    epic =      { min = 100, max = 149 },
    legendary = { min = 150, max = 300 },
}

🎁 Reward Pools

Each tier gives a random reward from its pool:

Config.Rewards = {
    common = {
        { name = "plastic", amount = 10 },
        { name = "metalscrap", amount = 8 },
        { name = "bandage", amount = 2 },
    },
    uncommon = {
        { name = "iron", amount = 5 },
        { name = "copper", amount = 6 },
        { name = "armor", amount = 1 },
    },
    rare = {
        { name = "advancedlockpick", amount = 1 },
        { name = "repairkit", amount = 1 },
        { name = "pistol_ammo", amount = 20 },
    },
    epic = {
        { name = "drill", amount = 1 },
        { name = "electronickit", amount = 1 },
        { name = "smg_ammo", amount = 30 },
    },
    legendary = {
        { name = "weapon_pistol_mk2", amount = 1 },
        { name = "weapon_smg", amount = 1 },
        { name = "vpn", amount = 1 },
    }
}

πŸŒ™ Night-Only Table Spawning

Control when the wizard appears.

Config.NightStartHour = 20   -- 8:00 PM
Config.NightEndHour = 5      -- 5:00 AM

πŸ§™ Wizard Table Props

Define where the wizard table and accompanying objects spawn, along with visual effects.

Config.Props = {
    {
        model = `v_club_vu_table`,
        coords = vector4(914.860, 3665.342, 31.656, 0.0),
        ptfx = {
            {
                dict = "scr_rcbarry2",
                name = "scr_clown_appears", -- Arcane swirl
                offset = vec3(0.0, 0.0, 1.0),
                scale = 0.8
            },
            {
                dict = "core",
                name = "exp_grd_bzgas_smoke", -- Smoke
                offset = vec3(0.0, 0.0, 0.9),
                scale = 0.5
            },
            {
                dict = "scr_xs_props",
                name = "scr_xs_money_rain", -- Floating glyphs
                offset = vec3(0.0, 0.0, 1.2),
                scale = 0.4
            }
        },
        interact = true  -- Enables target interaction
    },
    {
        model = `xs_prop_arena_trophy_single_01c`,
        coords = vector4(914.860, 3665.342, 32.370, 15.0),
        interact = false -- Decorative prop
    }
}

Last updated