Config = {}

local StringCharset = {}
local NumberCharset = {}

for i = 48,  57 do table.insert(NumberCharset, string.char(i)) end
for i = 65,  90 do table.insert(StringCharset, string.char(i)) end
for i = 97, 122 do table.insert(StringCharset, string.char(i)) end

Config.RandomStr = function(length)
	if length > 0 then
		return Config.RandomStr(length-1) .. StringCharset[math.random(1, #StringCharset)]
	else
		return ''
	end
end

Config.RandomInt = function(length)
	if length > 0 then
		return Config.RandomInt(length-1) .. NumberCharset[math.random(1, #NumberCharset)]
	else
		return ''
	end
end

Config.VendingObjects = {
    "prop_vend_soda_01",
    "prop_vend_soda_02",
    "prop_vend_water_01"
}

Config.BinObjects = {
    "prop_bin_05a",
}

Config.VendingItem = {
    [1] = {
        name = "kurkakola",
        price = 4,
        amount = 50,
        info = {},
        type = "item",
        slot = 1,
    },
    [2] = {
        name = "water_bottle",
        price = 4,
        amount = 50,
        info = {},
        type = "item",
        slot = 2,
    },
}

-- Config.CraftingItems = {
--     [1] = {
--         name = "lockpick",
--         amount = 50,
--         info = {},
--         costs = {
--             ["metalscrap"] = 22,
--             ["plastic"] = 32,
--         },
--         type = "item",
--         slot = 1,
--         threshold = 0,
--         points = 1,
--     },
--     [2] = {
--         name = "screwdriverset",
--         amount = 50,
--         info = {},
--         costs = {
--             ["metalscrap"] = 30,
--             ["plastic"] = 42,
--         },
--         type = "item",
--         slot = 2,
--         threshold = 0,
--         points = 2,
--     },
--     [3] = {
--         name = "electronickit",
--         amount = 50,
--         info = {},
--         costs = {
--             ["metalscrap"] = 30,
--             ["plastic"] = 45,
--             ["aluminum"] = 28,
--         },
--         type = "item",
--         slot = 3,
--         threshold = 0,
--         points = 3,
--     },
--     [4] = {
--         name = "radioscanner",
--         amount = 50,
--         info = {},
--         costs = {
--             ["electronickit"] = 2,
--             ["plastic"] = 52,
--             ["steel"] = 40,
--         },
--         type = "item",
--         slot = 4,
--         threshold = 0,
--         points = 4,
--     },
--     [5] = {
--         name = "gatecrack",
--         amount = 50,
--         info = {},
--         costs = {
--             ["metalscrap"] = 10,
--             ["plastic"] = 50,
--             ["aluminum"] = 30,
--             ["iron"] = 17,
--             ["electronickit"] = 1,
--         },
--         type = "item",
--         slot = 5,
--         threshold = 120,
--         points = 5,
--     },
--     [6] = {
--         name = "handcuffs",
--         amount = 50,
--         info = {},
--         costs = {
--             ["metalscrap"] = 36,
--             ["steel"] = 24,
--             ["aluminum"] = 28,
--         },
--         type = "item",
--         slot = 6,
--         threshold = 160,
--         points = 6,
--     },
--     [7] = {
--         name = "repairkit",
--         amount = 50,
--         info = {},
--         costs = {
--             ["metalscrap"] = 32,
--             ["steel"] = 43,
--             ["plastic"] = 61,
--         },
--         type = "item",
--         slot = 7,
--         threshold = 200,
--         points = 7,
--     },
--     [8] = {
--         name = "pistol_ammo",
--         amount = 50,
--         info = {},
--         costs = {
--             ["metalscrap"] = 50,
--             ["steel"] = 37,
--             ["copper"] = 26,
--         },
--         type = "item",
--         slot = 8,
--         threshold = 250,
--         points = 8,
--     },
--     [9] = {
--         name = "ironoxide",
--         amount = 50,
--         info = {},
--         costs = {
--             ["iron"] = 60,
--             ["glass"] = 30,
--         },
--         type = "item",
--         slot = 9,
--         threshold = 300,
--         points = 9,
--     },
--     [10] = {
--         name = "aluminumoxide",
--         amount = 50,
--         info = {},
--         costs = {
--             ["aluminum"] = 60,
--             ["glass"] = 30,
--         },
--         type = "item",
--         slot = 10,
--         threshold = 300,
--         points = 10,
--     },
--     [11] = {
--         name = "armor",
--         amount = 50,
--         info = {},
--         costs = {
--             ["iron"] = 33,
--             ["steel"] = 44,
--             ["plastic"] = 55,
--             ["aluminum"] = 22,
--         },
--         type = "item",
--         slot = 11,
--         threshold = 350,
--         points = 11,
--     },
--     [12] = {
--         name = "drill",
--         amount = 50,
--         info = {},
--         costs = {
--             ["iron"] = 50,
--             ["steel"] = 50,
--             ["screwdriverset"] = 3,
--             ["advancedlockpick"] = 2,
--         },
--         type = "item",
--         slot = 12,
--         threshold = 1750,
--         points = 12,
--     },
-- }



Config.CraftingItems = {
    {
        name = "lockpick",
        amount = 10,
        info = {},
        costs = {
            ["metalscrap"] = 150,
            ["plastic"] = 80,
            ["steel"] = 100
        },
        type = "item",
        slot = 1,
        threshold = 0,
        points = 1,
    },
    {
        name = "trojan_usb",
        amount = 10,
        info = {},
        costs = {
            ["metalscrap"] = 215,
            ["plastic"] = 50,
            ["aluminum"] = 105,
            ["copper"] = 123,
            ["electronickit"] = 2
        },
        type = "item",
        slot = 2,
        threshold = 0,
        points = 2,
    },
    {
        name = "screwdriverset",
        amount = 10,
        info = {},
        costs = {
            ["metalscrap"] = 82,
            ["copper"] = 90,
            ["plastic"] = 142,
        },
        type = "item",
        slot = 3,
        threshold = 0,
        points = 3,
    },
    {
        name = "electronickit",
        amount = 10,
        info = {},
        costs = {
            ["metalscrap"] = 30,
            ["copper"] = 65,
            ["aluminum"] = 88,
            ["steel"] = 40
        },
        type = "item",
        slot =4,
        threshold = 0,
        points = 4,
    },
    {
        name = "advancedlockpick",
        amount = 10,
        info = {},
        costs = {
            ["metalscrap"] = 205,
            ["iron"] = 104,
            ["steel"] = 121
        },
        type = "item",
        slot = 5,
        threshold = 0,
        points = 5,
    },
    {
        name = "handcuffs",
        amount = 10,
        info = {},
        costs = {
            ["metalscrap"] = 36,
            ["steel"] = 24,
            ["aluminum"] = 28,
        },
        type = "item",
        slot = 6,
        threshold = 0,
        points = 6,
    },
    {
        name = "drill",
        amount = 10,
        info = {},
        costs = {
            ["iron"] = 110,
            ["steel"] = 90,
            ["screwdriverset"] = 2,
            ["advancedlockpick"] = 2,
            ["plastic"] = 50,
            ["copper"] = 50
        },
        type = "item",
        slot = 7,
        threshold = 0,
        points = 7,
    },
}

Config.AttachmentCrafting = {
    ["location"] = {x = 88.91, y = 3743.88, z = 40.77, h = 66.5, r = 1.0}, 
    ["items"] = {
        [1] = {
            name = "pistol_extendedclip",
            amount = 50,
            info = {},
            costs = {
                ["metalscrap"] = 140,
                ["steel"] = 250,
                ["rubber"] = 60,
            },
            type = "item",
            slot = 1,
            threshold = 0,
            points = 1,
        },
        [2] = {
            name = "pistol_suppressor",
            amount = 50,
            info = {},
            costs = {
                ["metalscrap"] = 165,
                ["steel"] = 285,
                ["rubber"] = 75,
            },
            type = "item",
            slot = 2,
            threshold = 10,
            points = 2,
        },
        [3] = {
            name = "rifle_extendedclip",
            amount = 50,
            info = {},
            costs = {
                ["metalscrap"] = 190,
                ["steel"] = 305,
                ["rubber"] = 85,
                ["smg_extendedclip"] = 1,
            },
            type = "item",
            slot = 7,
            threshold = 25,
            points = 8,
        },
        [4] = {
            name = "rifle_drummag",
            amount = 50,
            info = {},
            costs = {
                ["metalscrap"] = 205,
                ["steel"] = 340,
                ["rubber"] = 110,
                ["smg_extendedclip"] = 2,
            },
            type = "item",
            slot = 8,
            threshold = 50,
            points = 8,
        },
        [5] = {
            name = "smg_flashlight",
            amount = 50,
            info = {},
            costs = {
                ["metalscrap"] = 230,
                ["steel"] = 365,
                ["rubber"] = 130,
            },
            type = "item",
            slot = 3,
            threshold = 75,
            points = 3,
        },
        [6] = {
            name = "smg_extendedclip",
            amount = 50,
            info = {},
            costs = {
                ["metalscrap"] = 255,
                ["steel"] = 390,
                ["rubber"] = 145,
            },
            type = "item",
            slot = 4,
            threshold = 100,
            points = 4,
        },
        [7] = {
            name = "smg_suppressor",
            amount = 50,
            info = {},
            costs = {
                ["metalscrap"] = 270,
                ["steel"] = 435,
                ["rubber"] = 155,
            },
            type = "item",
            slot = 5,
            threshold = 150,
            points = 5,
        },
        [8] = {
            name = "smg_scope",
            amount = 50,
            info = {},
            costs = {
                ["metalscrap"] = 300,
                ["steel"] = 469,
                ["rubber"] = 170,
            },
            type = "item",
            slot = 6,
            threshold = 200,
            points = 6,
        },
    }
}

Keys = {
    ["ESC"] = 322, ["F1"] = 288, ["F2"] = 289, ["F3"] = 170, ["F5"] = 166, ["F6"] = 167, ["F7"] = 168, ["F8"] = 169, ["F9"] = 56, ["F10"] = 57,
    ["~"] = 243, ["1"] = 157, ["2"] = 158, ["3"] = 160, ["4"] = 164, ["5"] = 165, ["6"] = 159, ["7"] = 161, ["8"] = 162, ["9"] = 163, ["-"] = 84, ["="] = 83, ["BACKSPACE"] = 177,
    ["TAB"] = 37, ["Q"] = 44, ["W"] = 32, ["E"] = 38, ["R"] = 45, ["T"] = 245, ["Y"] = 246, ["U"] = 303, ["P"] = 199, ["["] = 39, ["]"] = 40, ["ENTER"] = 18,
    ["CAPS"] = 137, ["A"] = 34, ["S"] = 8, ["D"] = 9, ["F"] = 23, ["G"] = 47, ["H"] = 74, ["K"] = 311, ["L"] = 182,
    ["LEFTSHIFT"] = 21, ["Z"] = 20, ["X"] = 73, ["C"] = 26, ["V"] = 0, ["B"] = 29, ["N"] = 249, ["M"] = 244, [","] = 82, ["."] = 81,
    ["LEFTCTRL"] = 36, ["LEFTALT"] = 19, ["SPACE"] = 22, ["RIGHTCTRL"] = 70,
    ["HOME"] = 213, ["PAGEUP"] = 10, ["PAGEDOWN"] = 11, ["DELETE"] = 178,
    ["LEFT"] = 174, ["RIGHT"] = 175, ["TOP"] = 27, ["DOWN"] = 173,
}

MaxInventorySlots = 40

BackEngineVehicles = {
    'ninef',
    'adder',
    'vagner',
    't20',
    'infernus',
    'zentorno',
    'reaper',
    'comet2',
    'comet3',
    'jester',
    'jester2',
    'cheetah',
    'cheetah2',
    'prototipo',
    'turismor',
    'pfister811',
    'ardent',
    'nero',
    'nero2',
    'tempesta',
    'vacca',
    'bullet',
    'osiris',
    'entityxf',
    'turismo2',
    'fmj',
    're7b',
    'tyrus',
    'italigtb',
    'penetrator',
    'monroe',
    'ninef2',
    'stingergt',
    'surfer',
    'surfer2',
    'comet3',
}

Config.MaximumAmmoValues = {
    ["pistol"] = 250,
    ["smg"] = 250,
    ["shotgun"] = 200,
    ["rifle"] = 250,
}