RX Drug Sales Installation
RX Drug Sales is a street selling loop for VORP, RSG, and QBR. Players approach customers inside configured areas, negotiate a price, and risk drawing law enforcement attention depending on how the exchange goes.
Prices, sellable items, and NPC dialogue are set per location, so each town can pay differently and accept different goods.
Requirements
| Requirement | Why it is needed |
|---|---|
vorp_core, rsg-core, or a QBR core | Supplies player data, inventory checks, and payments. |
Inventory items matching Config.SellableItems | The goods players sell. Item keys must already exist in your inventory. |
No database is required. RX Drug Sales stores nothing of its own.
1. Place the resource
Extract the complete resource into your server’s resources directory. The default extracted folder name is ripex-selldrugs.
2. Add it to server.cfg
Start your framework first, then RX Drug Sales.
ensure vorp_core
ensure ripex-selldrugsIf you renamed the resource folder, replace ripex-selldrugs with that exact folder name.
3. Set your framework
RX Drug Sales does not detect the framework automatically. Set it explicitly before the first start:
Config.Framework = 'vorp' -- 'qbr', 'vorp', 'rsg' A wrong value here means item checks and payments silently fail, which is the most common cause of a sale that appears to complete but pays nothing.
4. Match the items to your inventory
Config.SellableItems ships with moonshine, tobacco, gold_nugget, medicine, and water. Each key must match an item registered in your inventory:
Config.SellableItems = {
['moonshine'] = {
label = 'Moonshine',
basePrice = 15,
bargainChance = 70,
rejectChance = 20
}
} Remove the entries your server does not have and add your own with the same shape. water is a test entry with a base price of 1 and no bargaining; delete it once you have confirmed the flow works.
Then check Config.SellLocations, since each location lists which of those items it accepts. An item removed from SellableItems must also be removed from any location that lists it.
5. Set your police jobs
Config.Dispatch.policeJobs decides who receives alerts. The defaults are examples:
Config.Dispatch.policeJobs = { 'police', 'sheriff', 'BWPolice' } Replace them with the law job names your framework actually uses. Leave Config.Dispatch.sendToAll at false; it is a debugging option that sends every alert to every player.
6. Replace the testing values
Two defaults are marked as testing values in the config comments and should be changed before going live:
Config.NPCCooldown = {
duration = 8000, -- 8 seconds; far too short for production
repeatChance = 80
} An eight second cooldown lets a player sell to the same customer over and over. Raise it to a length that fits the pace of your economy. See Configuration for the full reference.
7. Verify the flow
Restart the server and test with a player carrying a sellable item:
- Enter one of the configured sell areas.
- Approach an NPC and confirm the sell prompt appears within
SellDistance. - Complete a sale and confirm the payment arrives.
- Confirm the price falls within the bargaining range and the location multiplier.
- Approach the same NPC again and confirm the repeated-attempt dialogue plays.
- Trigger a rejected sale and confirm law enforcement receives an alert with a blip.
- Try selling an item a location does not accept and confirm it is refused.
If nothing happens, set Config.Debug = true to see the checks in the console, then turn it off again.