[FREE][RSG] boss-buyer (target to selling items to NPC, full-configuration)

BOSS-BUYER is a RedM script designed to create NPC-based item-selling functionality. Players can interact with NPCs to sell specific items at dynamic prices. Each NPC has a unique set of items they accept, adding variety and depth to the gameplay.

Features

  • NPC Item Selling: Each NPC accepts specific items for selling.
  • Dynamic Pricing: Randomized prices for items based on configurable price variance.
  • Target Integration: Interact with NPCs using a target system (e.g., rsg-target).
  • Configurable NPCs: Add multiple NPCs with unique models, locations, and item lists.
  • Smooth NPC Spawn/Despawn: NPCs spawn and despawn dynamically based on player proximity, with optional fade-in/out effects.
  • Blip Integration: Add customizable blips for each NPC with unique names and locations.
  • Inventory Integration: Uses rsg-core for item and money handling.

Requirements

Configurations

Summary

NPCs

Define NPCs in the Config.NPCs table:

Config.NPCs = {
    {
        model = "u_m_m_valbutcher_01", -- NPC model
        location = vec4(-803.63, -1281.76, 43.53, 230.58), -- NPC location
        blip = {
            name = "Butcher Shop", -- Blip name
            location = vec3(-803.63, -1281.76, 43.53), -- Blip location
            sprite = 52, -- Blip sprite ID
            color = 1  -- Blip color ID
        },
        items = { -- Items specific to this NPC
            { name = "wheat", label = "Wheat", basePrice = 8 },
            { name = "corn", label = "Corn", basePrice = 10 }
        }
    },
    {
        model = "u_m_m_valbutcher_01",
        location = vec4(1234.0, -567.0, 78.0, 45.0),
        blip = {
            name = "Farmers Market",
            location = vec3(1234.0, -567.0, 78.0),
            sprite = 85,
            color = 2
        },
        items = {
            { name = "carrot", label = "Carrot", basePrice = 7 },
            { name = "apple", label = "Apple", basePrice = 6 }
        }
    }
}

Price Variance

Control price fluctuation:

Config.PriceVariance = {
    min = 0.8, -- Minimum price multiplier (80% of base price)
    max = 1.2  -- Maximum price multiplier (120% of base price)
}

Screenshots

Summary





boss-buyer.zip (56.4 KB)

Any update? please check out my repository.
Source Code: Link

Hi, I’m Boss.dev, a newbie to this amazing community! I’m excited to share my scripts and performances with you all. I hope you’re enjoy them! :blush:

Code is accessible Yes
Subscription-based No
Lines (approximately) 300
Requirements RSG
Support Yes
(For releases without code the not applicable fields can be written as N/A)

Other:
boss-givemoney

1 Like

Updated v0.0.2

  • fix blip styles

If you need latest version, please check out my release section on github repository, ty :grinning: