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
Free and open source. You can also get it on GitHub: github.com/L9th/l3th-graverob
#Install
#Install dependencies
Install (or update)
ox_lib, and start it before this script in yourserver.cfg. You also need a target (ox_targetorqb-target) and an inventory (ox_inventory,qb-inventoryorps-inventory, found by itself). A dispatch resource is optional.#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_startandgoldbar. Change them inconfigs/sv_config.luato items you already have.#Start the script
- Put the
l3th-graverobfolder in your resources folder - Add
ensure l3th-graverobto yourserver.cfg, after its dependencies:
server.cfgensure ox_lib ensure ox_target ensure ox_inventory ensure l3th-graverob- Put the
#How it works
- The player talks to the NPC and starts the job.
- A random grave is marked on their GPS.
- They dig it up with a shovel (about 25 seconds). There's a chance the police get an alert.
- They get a random reward from the loot table, plus a chance of a bonus item.
- If they don't finish within the time limit, the job is cancelled.
#Configuration
#configs/cl_config.lua
| Setting | What 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 |
policeChance | Chance the police are alerted when digging starts, in % (default 30) |
npc | Where the NPC stands and which model it uses. Remove it if you don't want an NPC. |
debug | Shows debug messages and zones. Set to false on a live server. |
#configs/sv_config.lua
| Setting | What it does |
|---|---|
timeLimit | Minutes to finish the job before it's cancelled (default 10) |
robLocations | The graves. One is picked at random for each job. Add or remove freely. |
rewards | The loot table: { item = 'name', chance = N, amount = N }. item = nil means finding nothing. |
specialRewardChance | Chance of the bonus item on top, in % |
specialReward | The bonus item |
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.