Skip to content

atmskimmer.lua

The complete default atmskimmer.lua for Petty Crime (sd-pettycrime). Use this as a reference or a starting point for your own configuration.

TIP

This is the full, unedited config file. For a detailed explanation of each option, see the Configuration page.

Download atmskimmer.lua

lua
return {
    -- ============================================================================
    -- The first delayed-payoff crime in the resource. Two phases:
    --   1. Install:  player attaches a `skimmer` item to an ATM (~3s).
    --   2. Harvest:  after `HarvestDelay` minutes the same player can come back,
    --                pull the skimmer, and receive `card_data` items.
    --
    -- One skimmer per ATM at a time. Multiple players can each have their own
    -- pending skimmers across different ATMs simultaneously, capped per-player
    -- by `MaxPerPlayer`.
    -- ============================================================================

    -- Skill-check minigame run while installing the skimmer. Enable = false to
    -- skip it. Swap `code` for any other minigame.* (see client/minigame.lua) or
    -- your own function returning true/false.
    Minigame = {
        Enable = true,
        Start = function()
            return require('client.minigame').code({
                length       = 5, -- characters in the code
                timeLimitSec = 7, -- seconds before caught; 0 = no limit
            }).success
        end,
    },

    HarvestDelay = 30,                       -- Minutes between install and earliest harvest.
    MaxPerPlayer = 5,                        -- Hard cap on simultaneously-installed skimmers per character.

    InstallItem  = 'skimmer',                -- Inventory item required (and consumed) at install.
    HarvestItem  = 'card_data',              -- Inventory item received at harvest. Each successful harvest rolls qty against the level table below.

    InstallTime = 3,                         -- Seconds for the install progress bar.
    HarvestTime = 10,                        -- Seconds for the harvest progress bar.

    BaseXP        = 18,                      -- XP awarded on a successful harvest (not on install).
    GiveXPForCash = false,
    Logging       = true,

    -- ATM prop hashes — the standard fleeca + generic ATMs that show up
    -- across LS. addModel attaches our options to every world ATM.
    Models = {
        'prop_atm_01',
        'prop_atm_02',
        'prop_atm_03',
        'prop_fleeca_atm',
    },

    PoliceAlert = {
        Enable = true,
        Chance = 22, -- Skimmer install is quiet; harvest is even quieter. Single alert chance covers both phases.
        Send = function()
            local alertMessage = 'Suspicious activity at an ATM'
            print('Police Alert: ' .. alertMessage)

            -- Example: cd_dispatch integration (uncomment to use)
            --[[
            local data = exports['cd_dispatch']:GetPlayerInfo()
            TriggerServerEvent('cd_dispatch:AddNotification', {
                job_table = {'police'},
                coords = data.coords,
                title = '10-21A - ATM Tampering',
                message = ('A %s tampering with an ATM at %s'):format(data.sex, data.street),
                flash = 0,
                unique_id = data.unique_id,
                sound = 1,
                blip = {
                    sprite = 431,
                    scale = 1.1,
                    colour = 1,
                    flashes = false,
                    text = '911 - ATM Tampering',
                    time = 5,
                    radius = 0,
                }
            })
            --]]
        end,
    },

    -- Per-level harvest yield. Each successful harvest rolls a single weighted
    -- pick from the matching bucket — `card_data` is the standard, with
    -- bigger amounts and rare bonus items at higher levels.
    Rewards = {
        [1] = {
            { item = 'card_data', chance = 70, min = 1, max = 2, xp = 6 },
            { item = 'cash',      chance = 30, min = 5, max = 15, xp = 0 },
        },
        [2] = {
            { item = 'card_data', chance = 65, min = 2, max = 4, xp = 6 },
            { item = 'cash',      chance = 25, min = 15, max = 30, xp = 0 },
            { item = 'phone',     chance = 12, min = 1, max = 1, xp = 6 },
        },
        [3] = {
            { item = 'card_data', chance = 60, min = 3, max = 6, xp = 6 },
            { item = 'cash',      chance = 25, min = 30, max = 60, xp = 0 },
            { item = 'phone',     chance = 15, min = 1, max = 2, xp = 6 },
            { item = 'laptop',    chance = 8,  min = 1, max = 1, xp = 12 },
        },
    },
}