Skip to main content

Config Preview

Dream Junkyard​

DreamCore.lua
DreamLocales = {} -- Do not touch this!!!
DreamFramework = {} -- Do not touch this!!!
DreamCore = {} -- Do not touch this!!!

-- Dream Junkyard Settings
DreamCore.Language = 'en'
DreamCore.GiveCredits = true -- Set to false if you don't want to give credits

DreamCore.XPLevelThreshold = 100 -- Needed default XP for 1 Level
DreamCore.XPIncreasement = 25 -- XP Increasement for each Level
DreamCore.LevelMoneyMultiplier = {
activate = true,
multiplier = 0.05 -- 5% more money for each level (e.g. Player is level 5 and gets 25% more money)
}

DreamCore.MinijobCooldown = { 30000, 120000 } -- min - max
DreamCore.MinijobLocation = {
{
blip = {
show = true,
name = 'Boss | Junkyard',
coords = vector3(2351.7190, 3151.8916, 48.2192),
sprite = 67,
scale = 0.8,
color = 10
},
ped = {
model = 'a_m_y_gencaspat_01',
coords = vector4(2351.7190, 3151.8916, 47.2192, 346.5522)
},
truck = {
spawn = vector4(2365.0454, 3165.5513, 47.0314, 113.7135),
plate = 'JUNKYARD'
},
park = {
coords = vector3(2365.0454, 3165.5513, 47.0314),
distance = 5.0,
},
deliveryPoint = {
coords = vector3(2354.8884, 3133.1423, 47.2087),
marker = {
coords = vector3(2353.4910, 3133.7732, 47.2087),
size = 1.5,
}
},
}
}
DreamCore.MinijobContracts = {

-- πŸ”§ Contract Types
-- SCRAP_VEHICLE_DISMANTLE – Dismantling of vehicles
-- SCRAP_VEHICLE_DELIVERY - Delivery of vehicles

-- contact: https://wiki.rage.mp/wiki/Notification_Pictures only "Works without requesting" = Yes

{
type = 'SCRAP_VEHICLE_DISMANTLE',
name = 'Hao',
contact = 'CHAR_HAO',
minimumLevel = 1,
reward = {
xp = { min = 25, max = 50 }, -- The Player will get a random amount between min and max
money = { min = 1000, max = 2000 } -- The Player will get a random amount between min and max
},
blip = {
exactPos = true,
name = 'Search Area',
sprite = 12,
scale = 1.0,
color = 60,
radius = 75.0
},
searchLabels = {
-- This is just for the messages

'Circuit',
'Copper Wire',
'Battery',
'ECU',
'Radiator',
'Fuel Pump',
'Brake Disc',
'Alternator',
'Steering Rack',
'Turbocharger',
},
vehicles = {
GetHashKey('elegy'),
GetHashKey('drafter'),
GetHashKey('issi7'),
GetHashKey('fusilade'),
GetHashKey('raiden'),
GetHashKey('rapidgt'),
},
locations = {
vector4(2408.4624, 3033.3376, 46.4787, 5.0094),
vector4(2402.9214, 3041.1101, 46.4789, 291.2755),
vector4(2403.0715, 3051.3574, 46.4792, 299.5623),
vector4(2395.4734, 3090.0027, 46.4791, 155.2937),
vector4(2386.8237, 3058.1799, 46.4791, 176.9024),
vector4(2379.9211, 3033.3198, 46.4790, 8.5126),
vector4(2367.9170, 3040.8835, 46.4791, 97.9820),
vector4(2356.0740, 3034.1470, 46.4771, 1.9923),
vector4(2345.7046, 3041.2839, 46.4778, 1.4167),
vector4(2339.7878, 3049.4136, 46.4777, 296.5427),
vector4(2346.1689, 3073.6619, 46.4795, 272.2790),
vector4(2365.4314, 3078.7522, 46.4862, 282.5143),
vector4(2383.9844, 3098.1499, 46.4895, 359.8690),
vector4(2422.4080, 3115.5891, 46.5343, 271.7648),
vector4(2390.8267, 3125.3848, 46.4802, 64.7968),
vector4(2403.7561, 3136.5784, 46.4797, 247.0283),
vector4(2407.7305, 3143.5784, 46.4864, 236.3463),
vector4(2429.3586, 3152.6426, 46.5181, 89.7146),
vector4(2360.0398, 3127.4089, 46.5371, 348.5954),
vector4(2344.1682, 3140.6150, 46.5349, 170.4822),
}
},

{
type = 'SCRAP_VEHICLE_DELIVERY',
name = 'Beverly',
contact = 'CHAR_BEVERLY',
minimumLevel = 1,
reward = {
xp = { min = 75, max = 125 }, -- The Player will get a random amount between min and max
money = { min = 2000, max = 3500 } -- The Player will get a random amount between min and max
},
blip = {
pickup = {
name = 'Vehicle Pickup Point',
sprite = 635,
scale = 1.0,
color = 60
},
delivery = {
name = 'Vehicle Delivery Point',
sprite = 635,
scale = 1.0,
color = 60
},
},
vehicles = {
GetHashKey('elegy'),
GetHashKey('drafter'),
GetHashKey('issi7'),
GetHashKey('fusilade'),
GetHashKey('raiden'),
GetHashKey('rapidgt'),
},
locations = {

-- Vinewood
{ coords = vector4(318.4586, 494.8661, 151.3342, 286.9929), broken = false },
{ coords = vector4(339.6811, 478.6647, 148.7798, 204.0157), broken = true },
{ coords = vector4(354.5346, 437.6290, 145.0471, 295.6454), broken = false },
{ coords = vector4(437.6675, 421.8112, 139.0909, 216.4558), broken = true },
{ coords = vector4(90.3523, 487.0548, 146.3076, 207.6424), broken = false },
{ coords = vector4(64.4940, 455.7636, 145.3927, 35.8400), broken = false },
{ coords = vector4(-79.1828, 497.5043, 142.9939, 344.9290), broken = false },

-- Sandy Shores
{ coords = vector4(2070.4604, 3282.4702, 45.1734, 232.3325), broken = true },
{ coords = vector4(2395.3760, 3297.5269, 46.2575, 138.1942), broken = false },
{ coords = vector4(1950.7224, 3799.5579, 30.6686, 208.6549), broken = false },

}
}

}

DreamCore.QuestBlips = {
dropArea = {
show = true,
name = 'Drop Area',
sprite = 68,
scale = 1.0,
color = 60
}
}
DreamCore.ScrapVehicleLocation = {
{
blip = {
show = true,
name = 'Scrapworker | Junkyard',
coords = vector3(2403.5288, 3127.9453, 47.1529),
sprite = 596,
scale = 0.8,
color = 10
},
ped = {
model = 's_m_y_construct_01',
coords = vector4(2403.5288, 3127.9453, 47.1529, 251.1656)
},
dropArea = {
coords = vector3(2422.6641, 3130.9053, 48.1960),
size = 1.5,
},
vehicleBlacklist = {
GetHashKey('adder'),
GetHashKey('zentorno')
},
vehicles = {
-- πŸ” Explanation:
-- πŸ’° worth: Base worth of the vehicle (e.g. 25000).
-- πŸ”§ damage: πŸ“‰ Percentage of total worth lost when the vehicle reaches maximum engine damage.
-- For example, if engine health is 500 (out of 1000), and damage is set to 15,
-- then the vehicle has lost 7.5% of its worth.
-- πŸ›£οΈ mileage: πŸ“‰ Percentage of total worth lost when the vehicle reaches its maximum mileage.
-- ⏱️ mileageMax: The mileage value at which the full mileage-based worth reduction applies.
-- For example, if mileageMax is 100000 and the vehicle has driven 50000,
-- then 50% of the mileage-based worth reduction (defined in `mileage`) is applied.
-- 🎁 rewards (optional): Defines potential item rewards when scrapping the vehicle.
-- You can omit this entirely if you don’t want to assign any rewards.
-- Each entry is an object with the following properties:
-- πŸ”Ή item: The item name (string) that can be rewarded (e.g., 'gold').
-- 🎲 possibility: Integer value representing the chance of receiving this reward.
-- Higher values = higher chance. This does **not** represent a percentage.
-- They are the entries in the pot.
-- πŸ”’ quantity: A table with two values `{ min, max }`.
-- The actual quantity given will be a random number between these values.
-- Example: `{ 2, 6 }` means a random number from 2 to 6 units of the item will be rewarded.

-- Default value for vehicles which ones
['default'] = {
worth = 15000,
damage = 15,
mileage = 80,
mileageMax = 100000,
rewards = {
{ item = 'scrapmetal', possibility = 30, quantity = { 1, 3 } },
{ item = 'electronicwaste', possibility = 25, quantity = { 1, 2 } },
{ item = 'copperwire', possibility = 20, quantity = { 2, 4 } },
{ item = 'smallbattery', possibility = 20, quantity = { 1, 2 } },
{ item = 'goldchip', possibility = 10, quantity = { 1, 1 } },
{ item = 'carfuse', possibility = 18, quantity = { 1, 2 } },
{ item = 'steelgear', possibility = 15, quantity = { 1, 2 } },
{ item = 'circuitboard', possibility = 12, quantity = { 1, 1 } }

-- Add more...
}
},

[GetHashKey('t20')] = { worth = 25000, damage = 15, mileage = 80, mileageMax = 100000 },
}
}
}

DreamCore.CalculateVehicleWorth = function(VehicleLocationId, PlayerVehicle)
local VehicleLocation = DreamCore.ScrapVehicleLocation[VehicleLocationId]
local LocationVehicles = VehicleLocation.vehicles

-- Get Vehicle Infos
local VehicleModel = GetEntityModel(PlayerVehicle)

-- Calculate Vehicle Damage
local EngineHealth = GetVehicleEngineHealth(PlayerVehicle)
local BodyHealth = GetVehicleBodyHealth(PlayerVehicle)
local TankHealth = GetVehiclePetrolTankHealth(PlayerVehicle)

-- Count damaged tires
local BurstTires = 0
for i = 0, 5 do
if IsVehicleTyreBurst(PlayerVehicle, i, false) then
BurstTires = BurstTires + 1
end
end

-- Count damaged doors
local BrokenDoors = 0
for i = 0, 5 do
if IsVehicleDoorDamaged(PlayerVehicle, i) then
BrokenDoors = BrokenDoors + 1
end
end

-- Calculate total damage
EngineHealth = 750.0
local VehicleDamage = (
(100 - ((EngineHealth / 1000) * 100)) + -- Engine Damage
(100 - ((BodyHealth / 1000) * 100)) + -- Body Damage
(100 - ((TankHealth / 1000) * 100)) + -- Tank Damage
((BurstTires / 5) * 100) + -- Tire Damage
((BrokenDoors / 5) * 100) -- Door Damage
) / 5 -- Average of all components

-- Try to find vehicle
local LocationVehicleData = LocationVehicles[VehicleModel]
if not LocationVehicleData then LocationVehicleData = LocationVehicles['default'] end

local VehicleWorth = LocationVehicleData.worth

local VehicleMileageResult = lib.callback.await('dream_junkyard:server:GetVehicleMileage', nil, GetVehicleNumberPlateText(PlayerVehicle))
local VehicleMileage = (((VehicleMileageResult.mileage or 0) / LocationVehicleData.mileageMax) * 100)

-- Calculate Vehicle Lose
local VehicleWorthDamageLosePercent = (VehicleDamage / LocationVehicleData.damage) * 100
local VehicleWorthMileageLosePercent = (VehicleMileage / LocationVehicleData.mileage) * 100

local VehicleWorthLosePercent = (VehicleWorthDamageLosePercent + VehicleWorthMileageLosePercent) / 2

return math.floor(
VehicleWorth - ((VehicleWorth * VehicleWorthLosePercent) / 100) -- Vehicle Worth reduction
)
end

DreamCore.Target = function()
if GetResourceState('ox_target') == 'started' then
return 'ox'
elseif GetResourceState('qb-target') == 'started' then
return 'qb'
else
return error('No target system found! Please adjust DreamCore.Target!!!')
end
end
DreamCore.Notify = function(text, type, duration)
-- Always clientside

-- Params:
-- text: message: string
-- type: info, success, warning, error
-- duration: time in ms

-- Default Values
local type = type or 'info'
local duration = duration or 5000

-- Ox Notification (ox_lib)
lib.notify({
type = type,
position = 'center-right',
title = DreamLocales[DreamCore.Language]['NotifyHeader'],
description = text,
duration = duration
})
end
DreamCoreExt.lua
DreamCore.Webhooks = {
Enabled = true,

-- Base Data
Color = '10169855', -- Change the Color of the Webhook
Author = 'Dream Junkyard', -- Change the Author of the Webhook
IconURL = 'https://i.imgur.com/vDc2B6l.png', -- Change the IconURL of the Webhook

-- Webhook URLs
ScrapVehicle = 'https://canary.discord.com/api/webhooks/XXX/XXX',
BusinessCompleteContract = 'https://canary.discord.com/api/webhooks/XXX/XXX',
}

Dream Junkyard Locales​

Reminder: You can create your own locale file in your language πŸ‘Œ

en.lua
DreamLocales['en'] = {
['NotifyHeader'] = 'Junkyard',

['ScrapVehicle'] = {
['NPCTarget'] = 'Talk to NPC',
['NPCTalkDialog'] = {
['Header'] = 'πŸ”§ Junkyard',
['Description'] = "πŸ’¬ The junkyard guy wipes his hands on a rag. \nπŸš— 'So... you really wanna scrap a ride for good?'"
},
['NPCBringVehicleInZone'] = 'Alright buddy, bring your vehicle in the zone!',
['ScrapConfirmationAlert'] = {
['Header'] = 'πŸ”§ Junkyard',
['Description'] = 'πŸš— Vehicle: %s \nπŸ”§ Mileage: %s km \n πŸ’Έ Worth: %s$ \n \n\nAre you sure you want to scrap this vehicle?'
},
['ProgressTalkToScrap'] = 'Talking to scrapworker...',
['HelpToScrap'] = 'Time to get your hands dirty.\nStart dismantling the vehicle!',
['StartDismantlingVehicleTarget'] = 'Start dismantling',
['FailedDismantlingVehicle'] = 'Failed to dismantling the vehicle! Try again...',
['Errors'] = {
['NotOwnedVehicle'] = 'You do not own this vehicle!',
['WrongVehicleLocation'] = 'Wrong vehicle location',
['VehicleBlacklisted'] = 'We can\'t scrap this vehicle! Try with another one...',
['TalkToNPCInVehicle'] = 'You can\'t talk to the npc when you are in a vehicle.',
},
['Success'] = 'You scraped your vehicle with plate %s for %s$',
['DistanceNotify'] = 'Your position is too near to an existing trade shop',
['NameInput'] = {
['Title'] = 'πŸš— Trade Shop',
['Label'] = 'Name',
['Description'] = 'Enter the name of the trade shop'
},
['PriceInput'] = {
['Title'] = 'πŸš— Trade Shop',
['Label'] = 'Price',
['Description'] = 'Enter the price of the trade shop',
},
['LocationNotify'] = {
['blip'] = 'Press G to set the blip location',
['purchase'] = 'Press G to set the purchase location',
['management'] = 'Press G to set the management location',
['spawn'] = 'Press G to set the spawn location',
['deposit'] = 'Press G to set the deposit location',
},
['ConfirmDialog'] = {
['Title'] = 'πŸš— Trade Shop',
['Description'] = 'πŸ“˜ Name: %s \n πŸ’Έ Price: %s$ \n πŸ“Œ Blip Location: %s \n πŸ“Œ Purchase Location: %s \n πŸ“Œ Management Location: %s \n πŸ“Œ Spawn Location: %s \n πŸ“Œ Deposit Location: %s\n\nAre you sure you want to create this trade shop?'
}
},

['Minijob'] = {
['NPCTarget'] = 'Talk to NPC',
['NPCContext'] = {
['Title'] = 'πŸ‘” Junkyard Boss',
['Options'] = {
['CurrentLevelTitle'] = 'Current Level',
['CurrentLevelDesc'] = 'Level %s (%sXP / %sXP)',
['SpawnFlatbedTitle'] = 'Flatbed',
['SpawnFlatbedDesc'] = 'Spawn a flatbed to towing vehicles',
['CheckInTitle'] = 'Check In',
['CheckInDesc'] = 'Check in and be ready to receive contracts',
['CheckOutTitle'] = 'Check Out',
['CheckOutDesc'] = 'Check out and don\'t receive any contracts',
}
},
['Contract'] = {
['SCRAP_VEHICLE_DISMANTLE'] = {
['Title'] = 'New Contract',
['Description'] = 'Hey buddy, I need a %s from a %s. We\'ve got the car here β€” can you find it, dismantle it, and bring me that part?',
['TargetDismantle'] = 'Dismantle Vehicle',
['CompletedTitle'] = 'Completed Contract',
['CompletedDescription'] = 'Thank you very much for the %s from a %s. See you later!',
['CompletedNotify'] = 'You got %s$ and %s XP for this contract!'
},
['SCRAP_VEHICLE_DELIVERY'] = {
['Title'] = 'New Contract',
['Description'] = 'Hey there! Just got a callβ€”someone needs a scrap vehicle picked up. Head over, grab the car, and bring it back to our junkyard, alright?',
['ArrivedTarget'] = 'You arrived the target vehicle, now you can load it onto the flatbed.',
['BringToJunkyardTitle'] = 'Contract Progress',
['BringToJunkyardDescription'] = 'I see you find the vehicle, now bring it to the junkyard.',
['ArrivedDeliveryPoint'] = 'You arrived the delivery point, now you can unload the vehicle in the delivery area.',
['CompletedTitle'] = 'Completed Contract',
['CompletedDescription'] = 'Great job! You brought the scrap vehicle to the junkyard. Thanks for your help!',
['CompletedNotify'] = 'You got %s$ and %s XP for this contract!'
}
},
['Flatbed'] = {
['AlreadySpawned'] = 'Flatbed already spawned we only have one per citizen!',
['Spawned'] = 'The flatbed was unparked! Be careful!',
['ParkVehicle'] = {
['HelpNotify'] = '[E] - Park Flatbed',
['AlreadyLoaded'] = 'There is a vehicle loaded onto the flatbed!',
['Success'] = 'You parked the flatbed successfully!',
},
['LoadVehicle'] = {
['Target'] = 'Load Vehicle',
['NoVehicle'] = 'There is no vehicle nearby to load onto the flatbed!',
['AlreadyLoaded'] = 'There is already a vehicle loaded onto the flatbed!',
['InVehicle'] = 'You can\'t load a vehicle onto the flatbed while you are in a vehicle!',
['PedInTargetVehicle'] = 'You can\'t load a vehicle onto the flatbed while a ped is inside!',
['ProgressLabel'] = 'Loading vehicle onto the flatbed...',
},
['UnloadVehicle'] = {
['Target'] = 'Unload Vehicle',
['NothingLoaded'] = 'There is no vehicle loaded onto the flatbed!',
['InVehicle'] = 'You can\'t unload a vehicle from the flatbed while you are in a vehicle!',
['ProgressLabel'] = 'Unloading vehicle from the flatbed...',
}
}
}
}