L3THDocs

Scripts

Grave Robbery

Take a job from the cemetery NPC, dig up graves for loot, and hope nobody calls the cops.

Requires
ox_lib
Frameworks
ox, qb, qbx & esx
Target & inventory
ox or qb target; ox, qb or ps inventory; or your own
Dispatch
tk, ps, cd & fd
Latest version 1.0.1 View in store

Free and open source. You can also get it on GitHub: github.com/L9th/l3th-graverob

#Install

  1. #Install dependencies

    Install (or update) ox_lib, and start it before this script in your server.cfg. You also need a target (ox_target or qb-target) and an inventory (ox_inventory, qb-inventory or ps-inventory, found by itself). A dispatch resource is optional.

    github.com/CommunityOx/ox_lib/releases

  2. #Add the reward items

    Every item in the loot table has to exist in your inventory, or the player gets nothing for it. The default table uses lockpick, cash, silver_coin, gold_coin, branded_cigarette_box, ancient_egypt_artifact, danburite, sea_hunt_start and goldbar. Change them in configs/sv_config.lua to items you already have.

  3. #Start the script

    • Put the l3th-graverob folder in your resources folder
    • Add ensure l3th-graverob to your server.cfg, after its dependencies:
    server.cfg
    ensure ox_lib
    ensure ox_target
    ensure ox_inventory
    
    ensure l3th-graverob

#How it works

  1. The player talks to the NPC and starts the job.
  2. A random grave is marked on their GPS.
  3. They dig it up with a shovel (about 25 seconds). There's a chance the police get an alert.
  4. They get a random reward from the loot table, plus a chance of a bonus item.
  5. If they don't finish within the time limit, the job is cancelled.

#Configuration

#configs/cl_config.lua

SettingWhat it does
interaction'ox' or 'qb'. Covers target, progress bar and notifications.
dispatch'tk_dispatch', 'ps-dispatch', 'cd_dispatch', 'fd-dispatch', or 'custom' for your own or none
policeChanceChance the police are alerted when digging starts, in % (default 30)
npcWhere the NPC stands and which model it uses. Remove it if you don't want an NPC.
debugShows debug messages and zones. Set to false on a live server.

#configs/sv_config.lua

SettingWhat it does
timeLimitMinutes to finish the job before it's cancelled (default 10)
robLocationsThe graves. One is picked at random for each job. Add or remove freely.
rewardsThe loot table: { item = 'name', chance = N, amount = N }. item = nil means finding nothing.
specialRewardChanceChance of the bonus item on top, in %
specialRewardThe bonus item
Important

The chance values in rewards have to add up to exactly 100, or the last rewards can never drop.

#Languages

English and Danish are in locales/. Add your own <lang>.json there.

#Need help?

Most issues come from a missing dependency or the wrong start order in server.cfg, so run through the steps once more first. Still stuck? See Common problems or open a ticket on Discord.