> For the complete documentation index, see [llms.txt](https://derass.gitbook.io/derass-script/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://derass.gitbook.io/derass-script/sell-drugs-to-npc/sell-drugs-to-npc-price-variation.md).

# Sell drugs to NPC (Price variation)

<figure><img src="/files/AOXgeLKkfNZUBvsMdGXv" alt=""><figcaption></figcaption></figure>

## Tebex

Open source : <https://derass.tebex.io/package/5658315>\
Escrowed :  <https://derass.tebex.io/package/5658314>

## Presentation

This script allow you to sell drugs to NPC, with price variation.<br>

Each time you sell X drugs, its price decreases and the price of other drugs increases\
You can configure which drug affects the price of which drug.

Ex :

* Weed increase the price of Meth
* Meth increase the price of Coke
* Coke increase the price of Opium
* Opium increase the price of Meth and Weed

\
You can only sell drugs to an NPC once. (The system uses statebags)

Peds can refuse your drugs and call the police, with the street name, coords and mugshot of you

## Features

* Price variation
* Configure :\
  \- Multiple drugs\
  \- Drug price (min / max / default)\
  \- Money receive\
  \- Cops required\
  \- Ped reject %\
  \- Ped call cops %\
  \- Cops jobs\
  \- Price variation \
  \- Max drug to sell at once
* Open function for remove item and give money
* Open function for your calling cops system
* Open function for your notification system

## Requirement

* ESX or QB
* OneSync
* ox\_lib : <https://github.com/overextended/ox_lib/releases>
* ( Optional ) ox\_target : <https://github.com/overextended/ox_target/releases>

## Video preview

{% embed url="<https://youtu.be/tlgtQ-zHBBg>" %}
