DreamScripts

Pickpocket Config

Feb 15th, 2025 (edited)
19
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 7.62 KB | Source Code | 0 0
  1. QBCore = exports['qb-core']:GetCoreObject()
  2.  
  3. Config = {
  4.     Debug = false,
  5.     Locale = 'en',
  6.     newQBinventory = true,
  7.     Progress = 'ox',  -- 'qb' or 'ox'
  8.     useXP = true,  -- Check editable/server_functions.lua to add your own skill system
  9.  
  10.     -- Pickpocket Configuration
  11.     pickpocket = {
  12.         pickpocket_key = 'E',  -- Changeable via Fivem Keybinds
  13.         distance = 1.5,        -- Recommended: 1.5
  14.         robberyChance = 20,    -- Chance to pickpocket
  15.         stumbleChance = 22,
  16.         fightBack = true,      -- Set to false to disable NPC fight back
  17.         fightChance = 11,      -- 8% chance NPC fights back
  18.         coolDown = 30 * 1000   -- In seconds
  19.     },
  20.  
  21.     -- Loot/Rewards Configuration
  22.     loot = {
  23.         -- If a wallet/purse is given, then players won't get item loot, only the wallet or purse
  24.         findLoot = 65,  -- Chance of finding anything while pickpocketing
  25.         walletChance = 33,  -- Chance of receiving `wallet` or `purse` item
  26.         findWalletCash = 68,  -- Chance of finding cash in wallet or purse
  27.         findWalletItems = 40,  -- Chance of finding cash in wallet or purse
  28.         itemAmount = { min = 1, max = 2 },
  29.         reward = { min = 60, max = 100 },
  30.         dirty = true,  -- Enable dirty money
  31.         dirtyItem = 'rolls',        
  32.         -- I recommend setting the item rewards for wallet/purses the same in all my resources if you use them
  33.         wallet = { "cokebaggy", "flush_cutter", "pocket_lint" },
  34.         purse = { "stolen_phone", "cokebaggy", "microfibercloth", "stolen_tablet", "wallet", "flush_cutter", "stolen_diamond_ring", "labkey", "rope", "drug_phone", "bandage", "pistol_mk2_barrel" },
  35.        
  36.         -- NPC Loot Tables
  37.         npcLootTables = {
  38.             ballas = { "cokebaggy", "lockpick", "drug_phone", "joint" },
  39.             vagos = { "meth", "lockpick", "stolen_phone", "bandage" },
  40.             lostmc = { "cokebaggy", "painkillers", "cryptostick", "joint" },
  41.             rich = { "cokebaggy", "crisps", "cryptostick", "stolen_rolex" },
  42.             civilians = { "crisps", "binoculars", "pocket_lint", "painkillers", "lighter" },
  43.             bums = { "lighter", "meth", "plastic", "cokebaggy", "water_bottle", "pocket_lint" },
  44.             default = { "lighter", "crisps", "binoculars", "pocket_lint" }  -- Fallback loot
  45.         },
  46.  
  47.         npcModels = {
  48.             ballas = { [`g_m_y_ballaeast_01`] = true, [`g_m_y_ballaorig_01`] = true, [`g_m_y_ballasout_01`] = true, [`csb_ballasog`] = true, [`g_f_y_ballas_01`] = true },
  49.             vagos = { [`g_m_y_mexgang_01`] = true, [`g_m_y_mexgoon_01`] = true, [`g_m_y_mexgoon_02`] = true, [`g_f_y_vagos_01`] = true, [`g_m_y_mexgoon_03`] = true },
  50.             lostmc = { [`g_m_y_lost_01`] = true, [`g_m_y_lost_02`] = true, [`g_m_y_lost_03`] = true },
  51.             rich = { [`s_m_m_bankman`] = true, [`u_m_m_bankman`] = true },
  52.             bums = { [`a_m_o_tramp_01`] = true, [`a_f_m_tramp_01`] = true, [`u_m_y_militarybum`] = true, [`a_m_m_tramp_01`] = true, [`a_m_y_stbla_02`] = true, [`a_f_m_skidrow_01`] = true, [`a_f_m_trampbeac_01`] = true, [`a_f_y_rurmeth_01`] = true, [`a_m_m_mexlabor_01`] = true, [`a_m_m_mexcntry_01`] = true, [`a_m_o_beach_01`] = true, [`a_m_o_acult_02`] = true, [`a_m_o_soucent_03`] = true, [`a_m_o_soucent_02`] = true },
  53.             civilians = { [`a_m_y_business_01`] = true, [`a_f_y_business_01`] = true, [`a_m_m_farmer_01`] = true }
  54.         }
  55.     },
  56.  
  57.     -- Alert Settings
  58.     alertInfo = {
  59.         alertChance = 70,  -- 70% chance of police being notified
  60.         dispatch = 'ps-dispatch'  -- Alert handler | Check `editable/cl_alert.lua` to add your own!
  61.     },
  62.  
  63.     -- Ped Settings
  64.     pedSettings = {
  65.         pedTypes = 'all',  -- 'all', 'allowed', or 'denied' for NPC types
  66.         pedList = {
  67.             allowed = {
  68.                 [`a_f_m_soucentmc_01`] = true,
  69.                 [`a_f_m_tourist_01`] = true,
  70.                 [`a_f_m_soucent_02`] = true,
  71.                 [`a_m_m_farmer_01`] = true,
  72.                 [`a_m_m_malibu_01`] = true,
  73.                 [`a_m_m_soucent_01`] = true,
  74.                 [`a_m_m_bevhills_01`] = true,
  75.             },
  76.             denied = {
  77.                 [`mp_m_shopkeep_01`] = false,
  78.                 [`csb_ballasog`] = false,
  79.                 [`ig_ballasog`] = false,
  80.                 [`g_f_y_ballas_01`] = false,
  81.                 [`g_m_y_ballaeast_01`] = false,
  82.                 [`g_m_y_ballaorig_01`] = false,
  83.                 [`g_m_y_ballasout_01`] = false
  84.             }
  85.         }
  86.     },
  87.    
  88.     -- Item Creation and Skill Learning
  89.     auto_add_items = false,  -- QB ONLY!
  90.     useWallet = false,  -- Set to false if you use my other theft resources and have this enabled in 1 of them. ONLY ENABLE ONCE!
  91.     npcWallet = {
  92.         wallet = { itemName = "wallet", label = "Wallet", weight = 100, type = 'item', image = 'wallet.png' },
  93.         purse = { itemName = "purse", label = "Purse", weight = 100, type = 'item', image = 'purse.png' }
  94.     },
  95.  
  96.     -- Pickpocket Skill Handling
  97.     learnSkill = {
  98.         enabled = true,
  99.         useQuestions = true,
  100.         ["pp_book_1"] = { model = "prop_novel_01", readingTime = 15000, correctAnswers = 10, learnskillChance = 3, label = "Pickpocket for Dummies Volume 1", weight = 200, type = "item", image = "pickpocket_book.png"},
  101.         ["pp_book_2"] = { model = "prop_novel_01", readingTime = 12000, correctAnswers = 9, learnskillChance = 5, label = "Pickpocket for Dummies Volume 2", weight = 200, type = "item", image = "pickpocket_book.png"},
  102.         ["pp_book_3"] = { model = "prop_novel_01", readingTime = 10000, correctAnswers = 8, learnskillChance = 8, label = "Pickpocket for Dummies Volume 3", weight = 200, type = "item", image = "pickpocket_book.png"}  
  103.     },
  104.  
  105.     -- Quiz Questions
  106.     questions = {
  107.         {question = "What do pickpockets look for first?", options = {"Wallets", "Keys", "Phones"}, correct = 1},
  108.         {question = "Best way to pickpocket unnoticed?", options = {"Quick distraction", "Stealthy approach", "Large crowd"}, correct = 2},
  109.         {question = "Easiest clothing for pickpocketing?", options = {"Loose pants", "Tight jeans", "Jackets with zippers"}, correct = 1},
  110.         {question = "Common pickpocket tool?", options = {"Disguises", "Crowbars", "Knives"}, correct = 1},
  111.         {question = "Best time for pickpocketing?", options = {"At night", "During a parade", "In a busy area"}, correct = 3},
  112.         {question = "Common distraction technique?", options = {"Shoving victim", "Engaging in conversation", "Setting off fireworks"}, correct = 2},
  113.         {question = "City known for pickpocketing?", options = {"Paris", "New York", "Tokyo"}, correct = 1},
  114.         {question = "What do pickpockets target?", options = {"Credit cards", "Jewelry", "Cash"}, correct = 3},
  115.         {question = "How do pickpockets avoid capture?", options = {"Hide items", "Run fast", "Blend in"}, correct = 3},
  116.         {question = "Best defense against pickpockets?", options = {"Stay alert", "Carry large bags", "Wear bulky clothing"}, correct = 1}
  117.     },
  118.  
  119.     -- Crouch Check
  120.     CrouchCheck = function()                                  
  121.         return exports['qb-smallresources']:isCrouching()
  122.         -- Add this to bottom of qb-smallresources `client/crouchprone.lua` or change to your own crouch check
  123.         -- exports('isCrouching', function()
  124.         --     return isCrouching
  125.         -- end)
  126.     end    
  127.  
  128.     -- Notification Function
  129.     Notification = function(title, message, length, type)
  130.         TriggerEvent('QBCore:Notify', { caption = title, text = message }, type, length)
  131.     end
  132. }
  133.  
  134. -- DO NOT ALTER OR REMOVE
  135. _U = function(entry)
  136.     return Locales[Config.Locale][entry]
  137. end
  138.  
Add Comment
Please, Sign In to add comment