AI Core

ai-robberies

Store, bank, jewelry and house robberies plus the armored truck job, all set in the admin panel and checked on the server.

ai-robberies lets players rob store registers and safes, bank lockers behind vault doors, jewelry vitrines and houses, and hit an armored truck. Each place has its own police requirement, cooldown and alert chance; each target has its tool, time, minigame and reward. The server checks every step.

What it does in the game

  • Places and targets. A place is a store, bank, jewelry store or house. A target is one thing to rob there: a register, safe, locker, vitrine, door, house door or search spot. Each target is an interaction point (Rob, or Emptied while it waits for its cooldown).
  • Robbing a target.
    1. The server checks the police on duty (the place's Police needed), the cooldown, the tool in the player's inventory, and that nobody else is working on the target.
    2. A minigame plays (lockpick or skill check, by kind or as set on the target). A lost game frees the target; a broken lockpick uses up one of the target's tool.
    3. A progress bar runs while the player faces the target and stays within 2.5 m.
    4. The server checks again, then pays the money into the panel's money account and gives the reward item.
  • Kinds.
    • Register, Safe, Locker: pay money and items.
    • Vitrine: needs a weapon in hand.
    • Door: opens a door until the place's cooldown ends instead of paying (an ai-doorlock door, or a vault object that swings open on every player's game).
    • House door (break in): takes the robber inside the house's interior. Other targets of the house (search spots) work only for players inside it.
    • Search spot: a place to search inside a house.
  • Cooldown. A robbed target stays empty for its place's cooldown. An opened door stays open as long.
  • Police alert. The first robbery of a visit may alert the police (the place's Alert chance), once per cooldown. The alert points to the place's alert point.
  • Houses. Each occupied house is a private world (a routing bucket): only robbers of that house are inside. A player who leaves the server inside a house comes back at its door.
  • Armored truck. At the job giver a robber pays the job price. A guarded truck parks at a random spawn. Guards attack players who come within 40 m. Plant the charge item on the rear doors, wait for the fuse, then loot the cash. An unrobbed truck goes away after its lifetime.

Installation

Installed by the AI Core recipe. By hand: ensure ai-robberies after ensure ai-core. It needs ai-core and OneSync.

  • Items used by the defaults: tools lockpick, drill, electronickit, c4; loot rolex, goldchain, diamond_ring. ai-inventory has them in its default item list; with another inventory, add them or change the targets.
  • Bank vault doors: targets with a Doorlock door id need ai-doorlock with that door. Without one, the vault object set on the target swings.
  • Police alerts go to the police alert script AI Core uses.

The defaults copy QBCore's robbery scripts: 21 stores (registers and a safe each), 6 Fleeca banks, Paleto Bay and Pacific Standard (vault doors and lockers), Vangelico (20 vitrines), 81 houses with search spots, and the armored truck. That is about 870 targets.

Panel settings

Admin panel > Robberies. Defaults come from data/places.json, data/targets.json and data/settings.json.

Places tab

SettingWhat it changesUnitDefault for a new place
NameThe place's name, shown on the alert and blip. 1-48 characters.empty
Alert pointWhere the police alert points to.0, 0, 0
Police neededOn-duty officers needed before anything here can be robbed. 0-32.0
CooldownHow long a robbed target stays empty (and an opened door open). 1-1440.min30
Alert chanceChance that the first robbery of a visit alerts the police (once per cooldown). 0-100.%100
Show on the mapShows the place with the Place blip look (Settings tab).off
Interior point (House card)Set an interior to make this place a house: where robbers appear inside (and leave from). Leave at 0, 0, 0 for places that are not houses.0, 0, 0

Default values by place type:

PlacesPolice neededCooldownAlert chance
Stores (store_1 to store_21)030 min70 %
Banks (bank_1 to bank_6, paleto, pacific)260 min100 %
Vangelico (vangelico)245 min100 %
Houses (house_1 to house_81)060 min30 %

Deleting a place stops its targets until they name another place.

Targets tab

Target

SettingWhat it changesUnitDefault for a new target
PlaceThe id of the place this target belongs to (store_1).empty
NameThe target's name ("Register 1").empty
KindRegister, Safe, Locker, Vitrine, Door, House door (break in) or Search spot. Decides the animation. Vitrines need a weapon in hand; doors open instead of paying; a house door breaks in (the place needs an interior).Register
SpotWhere the robber works. The robber must stand within 2.5 m of it.0, 0, 0
DurationHow long the progress bar runs. 1-600.s20
Needed toolItem the robber must carry. Empty: none.empty
The tool is used upOn: one of the tool is taken when the robbery succeeds.off
MinigamePlayed before the progress bar. Automatic (by kind): lockpick for registers and house doors, skill check for safes, lockers and doors, none for vitrines and search spots. Or None, Skill check, Lockpick. A lockpick that breaks takes one of the needed tool.Automatic
DifficultyEasy, Medium or Hard (not shown with None).Medium

Door (door targets open a door until the place's cooldown ends)

SettingWhat it changesUnitDefault
Doorlock doorThe id of a door in ai-doorlock. Empty: the vault object below swings instead.empty
Vault modelA map object within 6 m of the spot, turned on every player's game.empty
Closed headingThe object's heading when closed. -720 to 720.°0
Open headingThe object's heading when open. -720 to 720.°0

Reward (money and items the robber gets when the time runs out)

SettingWhat it changesUnitDefault
Money from / Money up toA random amount between the two. 0-1,000,000.$0 / 0
ItemItem given with the money. Empty: none.empty
Items from / Items up toA random count between the two. 0-100.0 / 0

Default targets by kind:

TargetsToolDurationMoneyItems
Store registerslockpick20 s$80-200
Store safesnone60 s$400-1,2000-3 rolex
Bank vault doorselectronickit (Paleto and Pacific also c4), used up30 s
Bank lockersdrill25 s$500-1,5001-4 goldchain
Vangelico vitrinesweapon in hand5 s1-4 rolex, goldchain or diamond_ring
House doorslockpick15 s
House search spotsnone6 s$0-1200-1 rolex, goldchain or diamond_ring

Settings tab

Settings (used by every place)

SettingWhat it changesDefault
Police jobsOn-duty members of these jobs count for Police needed. Up to 10.police
Money accountStolen money goes to this account of the robber.cash
Place blipHow places with Show on the map on look on the map.sprite 617, colour 3, size 0.7

Armored truck: a robber pays at the giver, a guarded truck parks at a random spawn; guards down, charge on the rear doors, cash.

SettingWhat it changesUnitDefault
Job giverWhere robbers ask for the job. Leave at 0, 0, 0 to turn trucks off.960.78, -216.25, 76.25
Job priceTaken from the job price account. 0-1,000,000.$500
Job price accountThe account the job price is taken from.bank
Truck modelThe truck.stockade
Guard modelThe guards' ped model.s_m_m_security_01
Guard weaponWeapon name the guards carry.WEAPON_CARBINERIFLE
Truck lifetimeAn unrobbed truck goes away after this time. 1-240.min20
Planting timeProgress bar for planting the charge. 1-120.s5
FuseTime between planting the charge and the doors blowing. 1-120.s10
Looting timeProgress bar for looting. 1-120.s10
Police neededOn-duty officers needed to start the job. 0-32.2
Time between trucksCooldown before the next truck job. 1-1440.min45
Charge itemSpent to blow the rear doors.c4
Money from / Money up toCash in the truck. 0-1,000,000.$2,500 / 4,500
Truck spawnsUp to 30 points (position and facing) where the truck parks.5 spawns

Commands

None.

Keybinds

None. Targets and the job giver use ai-core's Interaction style (prompt with E, or a target option).

What it stands in for

No fxProvide. The defaults copy qb-storerobbery, qb-bankrobbery, qb-jewelery, qb-houserobbery and qb-truckrobbery, but it does not answer their exports or events.

Compatible scripts

Tools and loot go through AI Core's inventory layer, police alerts through the dispatch layer, the truck through AI Core's vehicle spawning. Any inventory and alert script AI Core supports works (see Compatibility).

Known limits

  • Robbed targets and opened doors reset when the resource restarts.
  • The minigame result comes from the player's game; the server still runs the progress bar and every check after it.
  • Log channel: robberies.

On this page