Drug labs

Drug lab configuration (sh_labs.lua)

Lab electricity

Config.Labs.Electricity = {
    Price = {min = 50, max = 150}, --The price for interval for electricty. The price is refreshed every minute.
    BillInterval = 60, --How often should the labs get bills for electricity (in minutes). Preferably keep this number lower to account for server restarts and such.
    StartDisableAfterUnpaidBills = 1, --How much unpaid bills can accumulate so that the electricity is disabled. SET TO FALSE TO DISABLE
    TimeFromBills = 24, --How much time from the unpaid bill until power is disabled (in hours). For example, if the last bill the lab received was 09-12 at 12:00 power would be disabled at 09-13 12:00
}

Lab types and IPL interiors and their positions

Config.Labs.Types = {
    ["weed"] = {
        title = "Weed Lab",
        upgrades = {
            security = {
                [1] = {
                    price = 5000,
                    iplSets = {
                        "weed_low_security"
                    },
                }, 
                [2] = {
                    price = 10000,
                    iplSets = {
                        "weed_security_upgrade"
                    },
                },
                [3] = {
                    price = 15000,
                    iplSets = {
                        "weed_security_upgrade"
                    },
                },
            },
            storage = {
                [1] = {
                    price = 5000,
                    slots = 10,
                    weight = 100000,
                    iplSets = {
                        "weed_chairs"
                    }
                }, 
                [2] = {
                    price = 10000,
                    slots = 15,
                    weight = 150000,
                    iplSets = {
                        "weed_chairs"
                    }
                },
                [3] = {
                    price = 15000,
                    slots = 25,
                    weight = 250000,
                    iplSets = {
                        "weed_chairs"
                    }
                },
            },
            ventilation = {
                [0] = {
                    max = 25,
                    usage = 1.0
                },
                [1] = {
                    price = 5000,
                    max = 50,
                    usage = 1.0,
                    iplSets = {
                        "weed_set_up"
                    }
                }, 
                [2] = {
                    price = 10000,
                    max = 75,
                    usage = 1.0,
                    iplSets = {
                        "weed_standard_equip"
                    }
                },
                [3] = {
                    price = 15000,
                    max = 100,
                    usage = 1.0,
                    iplSets = {
                        "weed_upgrade_equip"
                    }
                },
            },
            heating = {
                [0] = {
                    max = 40,
                    usage = 1.0
                },
                [1] = {
                    price = 5000,
                    max = 60,
                    usage = 0.9,
                    iplSets = {
                        "light_growtha_stage23_standard",
                        "light_growthb_stage23_standard",
                        "light_growthc_stage23_standard",
                        "light_growthd_stage23_standard",
                        "light_growthe_stage23_standard",
                        "light_growthf_stage23_standard",
                        "light_growthg_stage23_standard",
                        "light_growthh_stage23_standard",
                        "light_growthi_stage23_standard",
                        "weed_standard_equip"
                    }
                }, 
                [2] = {
                    price = 10000,
                    max = 80,
                    usage = 0.7,
                    iplSets = {
                        "light_growtha_stage23_upgrade",
                        "light_growthb_stage23_upgrade",
                        "light_growthc_stage23_upgrade",
                        "light_growthd_stage23_upgrade",
                        "light_growthe_stage23_upgrade",
                        "light_growthf_stage23_upgrade",
                        "light_growthg_stage23_upgrade",
                        "light_growthh_stage23_upgrade",
                        "light_growthi_stage23_upgrade",
                        "weed_upgrade_equip"
                    }
                },
                [3] = {
                    price = 15000,
                    max = 80,
                    usage = 0.6,
                    iplSets = {
                        "light_growtha_stage23_upgrade",
                        "light_growthb_stage23_upgrade",
                        "light_growthc_stage23_upgrade",
                        "light_growthd_stage23_upgrade",
                        "light_growthe_stage23_upgrade",
                        "light_growthf_stage23_upgrade",
                        "light_growthg_stage23_upgrade",
                        "light_growthh_stage23_upgrade",
                        "light_growthi_stage23_upgrade",
                        "weed_upgrade_equip"
                    }
                },
            },
        },
        interiorId = 247297,
        ipl = "bkr_biker_interior_placement_interior_3_biker_dlc_int_ware02_milo",
        enterCoords = vector4(1066.2437, -3183.3809, -39.1636, 87.6660),
        leavePoly = {
            name = "weed_leave",
            coords = vector3(1067.56, -3183.44, -40.16),
            size = vec3(1.6, 2, 4),
            heading = 0,
        },
        laptopPoly = {
            name = "weed_laptop",
            coords = vector3(1045.7, -3194.82, -41.16),
            size = vec3(1.75, 2, 4),
            heading = 0,
        },
        stashPoly = {
            name = "weed_stash",
            coords = vec3(1036.7, -3194.5, -39.2),
            size = vec3(4.0, 5.0, 4.0),
            heading = 0.0,
        }
    },
    ["cocaine"] = {
        title = "Cocaine Lab",
        upgrades = {
            security = {
                [1] = {
                    price = 5000,
                    iplSets = {
                        "security_low"
                    },
                },
                [2] = {
                    price = 10000,
                    iplSets = {
                        "security_high"
                    },
                },
                [3] = {
                    price = 15000,
                    iplSets = {
                        "security_high"
                    },
                },
            },
            storage = {
                [1] = {
                    price = 5000,
                    slots = 10,
                    weight = 100000,
                },
                [2] = {
                    price = 10000,
                    slots = 15,
                    weight = 150000,
                },
                [3] = {
                    price = 15000,
                    slots = 25,
                    weight = 250000,
                },
            },
            boiler = {
                [1] = {
                    price = 5000,
                    timeToProduce = 60,
                },
                [2] = {
                    price = 10000,
                     timeToProduce = 45,
                },
                [3] = {
                    price = 15000,
                     timeToProduce = 30,
                },
            },
            microwave = {
                [1] = {
                    price = 5000,
                    timeToProduce = 70,
                },
                [2] = {
                    price = 10000,
                     timeToProduce = 50,
                },
                [3] = {
                    price = 15000,
                     timeToProduce = 35,
                },
            },
        },
        interiorId = 247553,
        ipl = "bkr_biker_interior_placement_interior_4_biker_dlc_int_ware03_milo",
        enterCoords = vector4(1088.6, -3187.5, -38.99, 180.04),
        leavePoly = {
            name = "cocaine_leave",
            coords = vec3(1088.7, -3186.7, -41.0),
            size = vec3(1.5, 2.0, 4.0),
            heading = 0.0,
        },
        laptopPoly = {
            name = "cocaine_laptop",
            coords = vec3(1086.5, -3194.5, -41.0),
            size = vec3(1.5, 2.0, 4.0),
            heading = 0.0,
        },
        stashPoly = {
            name = "cocaine_stash",
            coords = vec3(1104.0, -3196.0, -41.0),
            size = vec3(1, 3.3, 4.0),
            heading = 90.0,
        },
        interactions = {
            boilingPoly = {
                name = "boiling_cocaine",
                coords = vector3(1103.8, -3193.7, -39.99),
                size = vec3(1, 1, 4),
                heading = 0,
            },
            packagingPoly = {
                name = "packaging_cocaine",
                coords = vector3(1101.52, -3199.5, -39.99),
                size = vec3(1.0, 1.0, 4.0),
                heading = 270
            },
            microwavePoly = {
                name = "microwave_cocaine",
                coords = vector3(1099.07, -3200.05, -39.99),
                size = vec3(1.0, 1.0, 4.0),
                heading = 0
            },
        }
    },
    ["meth"] = {
        title = "Meth Lab",
        upgrades = {
            security = {
                [1] = {
                    price = 5000,
                    iplSets = {
                        "meth_lab_security_high"
                    },
                }, 
                [2] = {
                    price = 10000,
                    iplSets = {
                        "meth_lab_security_high"
                    },
                },
                [3] = {
                    price = 15000,
                    iplSets = {
                        "meth_lab_security_high"
                    },
                },
            },
            storage = {
                [1] = {
                    price = 5000,
                    slots = 10,
                    weight = 100000,
                }, 
                [2] = {
                    price = 10000,
                    slots = 15,
                    weight = 150000,
                },
                [3] = {
                    price = 15000,
                    slots = 25,
                    weight = 250000,
                },
            },
            processing = {
                [1] = {
                    price = 5000,
                     duration = 120,
                    ranges = { perfect = {173, 177}, good = {170, 180}, fail = {165, 185} },
                    change = { speed = 0.8, step = 0.8, max = 5 },
                    events = { frequency = 3, intensity = 10, chance = 0.7 },
                    quality = { perfect = 1.0, good = 0.7, poor = 0.4 },
                    failTime = 5,
                },
                [2] = {
                    price = 10000,
                     duration = 90,
                    ranges = { perfect = {173, 177}, good = {170, 180}, fail = {165, 185} },
                    change = { speed = 0.8, step = 0.8, max = 5 },
                    events = { frequency = 3, intensity = 10, chance = 0.7 },
                    quality = { perfect = 1.0, good = 0.7, poor = 0.4 },
                    failTime = 10,
                },
                [3] = {
                    price = 15000,
                    duration = 60,
                    ranges = { perfect = {173, 177}, good = {170, 180}, fail = {165, 185} },
                    change = { speed = 0.8, step = 0.8, max = 5 },
                    events = { frequency = 3, intensity = 10, chance = 0.7 },
                    quality = { perfect = 1.0, good = 0.7, poor = 0.4 },
                    failTime = 15,
                },
            },
            mixing = {
                [1] = {
                    price = 5000,
                    patternCount = 6,
                    timingWindow = {
                        acceptable = 15,
                    },
                    failureThreshold = 5,
                    spawnInterval = 3000,
                    minSpawnDelay = 800,
                    maxSpawnDelay = 1500,
                    gameTime = 30000,
                    targetPosition = 85,
                },
                [2] = {
                    price = 10000,
                    patternCount = 6,
                    timingWindow = {
                        acceptable = 15,
                    },
                    failureThreshold = 7,
                    spawnInterval = 3000,
                    minSpawnDelay = 800,
                    maxSpawnDelay = 1500,
                    gameTime = 20000,
                    targetPosition = 85,
                },
                [3] = {
                    price = 15000,
                    patternCount = 6,
                    timingWindow = {
                        acceptable = 15,
                    },
                    failureThreshold = 10,
                    spawnInterval = 3000,
                    minSpawnDelay = 800,
                    maxSpawnDelay = 1500,
                    gameTime = 10000,
                    targetPosition = 85,
                },
            },
            crystals = {
                [1] = {
                    price = 5000,
                    timePerSample = 10000,
                    extractionEnergyCost = 5,
                    extractionDrainRate = 0.2,
                    stabilityDecayRate = 0.1,
                    energyRegenRate = 8,
                    stabilizeEnergyCost = 10,
                    minQualityToWin = 70,
                    samplesRequired = 5
                },
                [2] = {
                    price = 10000,
                    timePerSample = 12500,
                    extractionEnergyCost = 5,
                    extractionDrainRate = 0.2,
                    stabilityDecayRate = 0.09,
                    energyRegenRate = 10,
                    stabilizeEnergyCost = 8,
                    minQualityToWin = 60,
                    samplesRequired = 5
                },
                [3] = {
                    price = 15000,
                    timePerSample = 15000,
                    extractionEnergyCost = 5,
                    extractionDrainRate = 0.2,
                    stabilityDecayRate = 0.08,
                    energyRegenRate = 12,
                    stabilizeEnergyCost = 6,
                    minQualityToWin = 50,
                    samplesRequired = 5
                }
            }
        },
        interiorId = 247041,
        ipl = "bkr_biker_interior_placement_interior_2_biker_dlc_int_ware01_milo",
        enterCoords = vector4(997.0085, -3200.6641, -36.3937, 267.9557),
        leavePoly = {
            name = "meth_leave",
            coords = vector3(996.66, -3200.67, -37.39),
            size = vec3(1.4, 1, 2),
            heading = 0,
        },
        laptopPoly = {
            name = "meth_laptop",
            coords = vector3(1001.93, -3193.99, -39.99),
            size = vec3(2, 2, 2),
            heading = 0,
        },
        stashPoly = {
            name = "meth_stash",
            coords = vec3(996.58, -3200.29, -39.99),
            size = vec3(3.0, 2.0, 2.0),
            heading = 0.0,
        },
        interactions = {
            processingPoly = {
                name = "processing_meth",
                coords = vector3(1005.81, -3201.47, -39.99),
                size = vec3(2, 2, 4),
                heading = 0,
            },
            mixingPoly = {
                name = "mixing_meth",
                coords = vector3(1010.14, -3198.74, -39.99),
                size = vec3(2, 2, 4),
                heading = 0,
            },
            crystalsPoly = {
                name = "crystals_meth",
                coords = vector3(1007.92, -3193.79, -39.99),
                size = vec3(2, 2, 3),
                heading = 0,
            },
            packagingPoly = {
                name = "packaging_meth",
                coords = vector3(1012.86, -3193.81, -39.99),
                size = vec3(7, 2, 3),
                heading = 270,
            }
        }
    },
}

Lab locations and prices

Config.Labs.List = {
    ["weed_1"] = {
        type = "weed",
        price = 50000,
        canPurchase = function(player)
            return true
        end,

        enterPoly = {
            name = "weed_lab_enter",
            coords = vector3(1036.41, -2173.09, 30.56),
            size = { x = 1.4, y = 2, z = 2.4 },
            heading = 355,
        },
    },
    ["weed_2"] = {
        type = "weed",
        price = 50000,
        canPurchase = function(player)
            return true
        end,
        enterPoly = {
            name = "weed_lab_2_enter",
            coords = vector3(869.6990, -2326.9189, 29.6029),
            size = { x = 1.4, y = 2, z = 2.4 },
            heading = 0,
        },
    },
    ["weed_3"] = {
        type = "weed",
        price = 50000,
        canPurchase = function(player)
            return true
        end,
        enterPoly = {
            name = "weed_lab_3_enter",
            coords = vector3(184.0153, -1836.4945, 27.1028),
            size = { x = 1.4, y = 2, z = 2.4 },
            heading = 355,
        },
    },
    ["cocaine_1"] = {
        type = "cocaine",
        price = 50000,
        canPurchase = function(player)
            return true
        end,
        enterPoly = {
            name = "cocaine_lab_1_enter",
            coords = vector3(434.7914, -1906.6992, 24.9415),
            size = { x = 1.4, y = 2, z = 2.4 },
            heading = 35,
        },
    },
    ["cocaine_2"] = {
        type = "cocaine",
        price = 50000,
        canPurchase = function(player)

            return true
        end,
        enterPoly = {
            name = "cocaine_lab_2_enter",
            coords = vector3(1384.6748, -2080.0859, 51.6088),
            size = { x = 1.4, y = 2, z = 2.4 },
            heading = 35,
        },
    },

    ["cocaine_3"] = {
        type = "cocaine",
        price = 50000,
        canPurchase = function(player)
            return true
        end,
        enterPoly = {
            name = "cocaine_lab_3_enter",
            coords = vector3(197.9383, -2201.7092, 5.9709),
            size = { x = 1.4, y = 2, z = 2.4 },
            heading = 177,
        },
    },

    ["cocaine_4"] = {
        type = "cocaine",
        price = 50000,
        canPurchase = function(player)
            return true
        end,
        enterPoly = {
            name = "cocaine_lab_4_enter",
            coords = vector3(415.3056, -2051.9636, 21.2287),
            size = { x = 1.4, y = 2, z = 2.4 },
            heading = 319,
        },
    },
    ["meth_1"] = {
        type = "meth",
        price = 50000,
        canPurchase = function(player)
            return true
        end,
        enterPoly = {
            name = "meth_lab_1_enter",
            coords = vector3(743.8967, -1905.9309, 28.4125),
            size = { x = 1.4, y = 2, z = 2.4 },
            heading = 180,
        },
    },

    ["meth_2"] = {
        type = "meth",
        price = 50000,
        canPurchase = function(player)
            return true
        end,
        enterPoly = {
            name = "meth_lab_2_enter",
            coords = vector3(968.5609, -1227.0531, 26.0658),
            size = { x = 1.4, y = 2, z = 2.4 },
            heading = 120,
        },
    },

    ["meth_3"] = {
        type = "meth",
        price = 50000,
        canPurchase = function(player)
            return true
        end,
        enterPoly = {
            name = "meth_lab_3_enter",
            coords = vector3(189.8609, 309.0824, 104.3894),
            size = { x = 1.4, y = 2, z = 2.4 },
            heading = 0,
        },
    },
    ["meth_4"] = {
        type = "meth",
        price = 50000,
        canPurchase = function(player)
            return true
        end,
        enterPoly = {
            name = "meth_lab_4_enter",
            coords = vector3(366.3114, -1250.9524, 31.6999),
            size = { x = 1.4, y = 2, z = 2.4 },
            heading = 138,
        },
    },
}

Lab shop items

Config.Labs.Shop = {
    ["weed"] = { --Lab Type
        ["weed_pot"] = 150, --Item Name and Price
        ["weed_fertilizer"] = 150,
        ["weed_water"] = 150,   
        ["white_widow_seed"] = 150,
    },
    ["cocaine"] = { --Lab Type
        ["cocaine_barrel"] = 150, --Item Name and Price
        ["coco_leaves_batch"] = 150,
        ["gasoline"] = 150,
        ["ammonia"] = 150,
        ["hydrochloric_acid"] = 150,
        ["filter"] = 150,
        ["acetone"] = 150,
    },
    ["meth"] = { --Lab Type
        ["pseudoephedrine"] = 150,
        ["acetone"] = 150,
        ["hydrochloric_acid"] = 150,
        ["red_phosphorus"] = 150,
        ["sodium_hydroxide"] = 150,
        ["iodine"] = 150,
    },
}

Lab ordered shop item drop off's

Config.Labs.DropOffs = { --Drop Off Locations
    objectModel = "xm3_prop_xm3_crate_01a", -- Object model
    openObjectModel = "xm3_prop_xm3_crate_01b",
    openAnimation = true,
    blip = { -- Blip settings
        sprite = 478, -- Blip sprite
        color = 16, -- Blip color
        scale = 1.0, -- Blip scale
        shortRange = true, -- Short range blip
    },
    points = { -- Drop off points
        {pos = vec3(-42.2067, -1209.5046, 28.5033), busy = false}, -- Drop off point
        {pos = vec3(163.0087, -1254.0138, 28.2921), busy = false}, -- Drop off point
        {pos = vec3(182.4886, -1272.4475, 28.1985), busy = false}, -- Drop off point
        {pos = vec3(512.0781, -1950.5773, 23.9851), busy = false}, -- Drop off point
        {pos = vec3(906.5351, -1975.5754, 29.5535), busy = false}, -- Drop off point
        {pos = vec3(834.0175, -2311.2908, 29.4904), busy = false}, -- Drop off point
        {pos = vec3(1364.2108, -2102.1335, 50.9985), busy = false}, -- Drop off point
        {pos = vec3(1595.0118, -1695.9053, 87.1090), busy = false}, -- Drop off pointe
    }
}

Last updated