Agency-Minerjob V2 Конфигурация
Работа шахтера для FiveM на QBCore, Qbox, ESX или полностью standalone в трех локациях: карьер Davis Quartz, старая.

01Конфигурация
Быстрая установка · config.lua · Agency-Minerjob V2
--[[
╔══════════════════════════════════════════════════════════════════════╗
║ AGENCY MINERJOB - CONFIGURATION ║
║ (c) Agency Scripts ║
╚══════════════════════════════════════════════════════════════════════╝
A mining job in three places: the Davis Quartz quarry, the mine shaft in
the hills and the foundry in the city. Players break real rocks with
pickaxes and a drill, smelt ore into bars, cut rough gems, take contracts
from the foreman and sell on a market whose prices move. Finds QBCore,
Qbox or ESX by itself and runs fully standalone without any of them.
CONTENTS
1. Agency Companion The free app for your players, accent colour
2. Core Framework, language, storage, inventory
3. Integrations Agency-Notify, Agency-Progressbar
4. Look Menu size and colour
5. Keys and commands
6. Places Mining areas, foundry, blips, markers
7. Items
8. Tools
9. Mining
10. Levels
11. Smelting Foundry furnaces
12. Gem cutting Foundry benches
13. Contracts Foreman
14. Market and money
15. Admins
16. Standalone
17. Your own wording
Admins change the most used values in the menu (/mineradmin). Those are
saved for the whole server and win over this file until "Reset to
config.lua" is pressed.
Discord: https://discord.gg/RTax3aBMUs · Shop: https://shop.agencyg.de
]]
Config = {}
--==============================================================================
-- 1 · AGENCY COMPANION
--==============================================================================
-- Agency-Companion (free): https://shop.agencyg.de/en/product/agency-companion
-- One resource for every Agency script: your players link them with the free
-- Agency Companion app (iPhone, Android, web), and your admins pick one accent
-- colour for all Agency scripts in game (/app, admin page). Drop it into your
-- resources and Agency Minerjob follows it by itself. Nothing else to set up.
Config.Companion = {
Enabled = true, -- follow Agency-Companion (accent colour)
}
-- ── Accent colour ────────────────────────────────────────────────────────────
-- false = the colour from Agency-Companion, gold without it
-- { r,g,b } = a fixed colour for this script only, e.g. { 0, 190, 255 }
-- (The old Config.UI.accent below still works when you changed it.)
Config.AccentColor = false
--==============================================================================
-- 2 · CORE
--==============================================================================
-- ── Framework ────────────────────────────────────────────────────────────────
Config.Framework = 'auto' -- 'auto' | 'qbcore' (also Qbox) | 'esx' | 'standalone'
-- ── Language ─────────────────────────────────────────────────────────────────
-- en bg cs da de el es fi fr hr hu it ja ko nb nl pl pt ro ru sk sv tr uk zh
-- (also ar, hi; 'no' still works for Norwegian)
Config.Locale = 'en'
-- ── Debug ────────────────────────────────────────────────────────────────────
-- Debug mode: every request and every reward in the server console.
-- Admins can switch it in the menu as well.
Config.Debug = false
-- ── Storage ──────────────────────────────────────────────────────────────────
-- Where levels, tools, furnaces and contracts are saved. 'auto' uses oxmysql
-- when it runs (one table, created by itself) and otherwise the server's own
-- key value store, so a server without a database works too.
Config.Storage = 'auto' -- 'auto' | 'mysql' | 'kvp'
-- ── Inventory ────────────────────────────────────────────────────────────────
-- Who keeps the items:
-- 'auto' ox_inventory, qs-inventory, then the framework (qb-inventory,
-- ps, lj, jpr and other QB forks, ESX), then the miner's own
-- satchel in the menu (standalone without an inventory)
-- 'own' always the satchel in the menu, even with an inventory
Config.Inventory = 'auto' -- 'auto' | 'ox' | 'qs' | 'framework' | 'own'
-- ── Item pictures ────────────────────────────────────────────────────────────
-- Item pictures in the menu: 'auto' takes them from the inventory that runs
-- and falls back to the pictures in html/images. A link ('https://...' or
-- 'nui://my-inventory/images/') uses that folder instead.
Config.Images = 'auto'
--==============================================================================
-- 3 · INTEGRATIONS
--==============================================================================
-- ── Notifications ────────────────────────────────────────────────────────────
-- Agency-Notify (free): https://shop.agencyg.de/en/product/notify
-- true = Agency-Notify when it runs, otherwise the Agency style cards of this script
-- false = always the cards of this script
Config.UseAgencyNotify = true
-- ── Progress bar ─────────────────────────────────────────────────────────────
-- Agency-Progressbar (free): https://shop.agencyg.de/en/product/progressbar
-- Agency Minerjob has no plain waiting bars: mining and gem cutting are skill
-- games and the furnace keeps working while the player is away, so there is
-- nothing to hand to a progress bar. Nothing to set up here.
--==============================================================================
-- 4 · LOOK
--==============================================================================
-- The menu fits every screen resolution by itself (1080p to 4K, ultrawide).
-- The colour comes from section 1. Replace html/img/logo.png for your own logo.
Config.UI = {
accent = '#E2B649', -- old accent setting, kept for older configs (see Config.AccentColor)
scale = 1.0, -- not used any more (automatic)
}
--==============================================================================
-- 5 · KEYS AND COMMANDS
--==============================================================================
Config.Keys = {
interact = 38, -- E: mine, talk to the foreman, use the furnace or the bench
}
Config.Commands = {
menu = 'miner', -- the menu, from anywhere (selling, buying and the furnace need the place)
level = 'mininglevel', -- level and progress (V1 command)
admin = 'mineradmin', -- admin page of the menu
}
--==============================================================================
-- 6 · PLACES
--==============================================================================
-- Seven mining areas, each with its own blip, lowest level and ore. Six of
-- them are the terraces of Davis Quartz (the quarry east of Sandy Shores),
-- the seventh is the old mine shaft in the Tataviam Mountains.
--
-- A foreman buys ore, sells and repairs tools and hands out contracts; the
-- foreman of the pit serves every area of Davis Quartz. Rocks appear for
-- players within `radius` of `center`.
-- `ores`: weight at the area's first level, change per level and the bounds,
-- like V1. The weights of an area always add up to 100 %.
Config.Zones = {
quarry = {
label = 'Davis Quartz Pit',
center = vec3(2941.0, 2792.2, 41.5),
radius = 55.0,
level = 1, -- lowest level to mine here
blip = { sprite = 618, colour = 5, scale = 0.8 },
foreman = { model = 's_m_y_construct_01', coords = vec4(2956.95, 2744.58, 43.56, 286.29) },
ores = {
stone = { weight = 60.0, perLevel = -0.4, min = 20.0, max = 60.0 },
coal = { weight = 25.0, perLevel = -0.2, min = 10.0, max = 35.0 },
silver = { weight = 10.0, perLevel = -0.1, min = 8.0, max = 25.0 },
copper = { weight = 4.0, perLevel = 0.2, min = 4.0, max = 20.0 },
diamond = { weight = 0.8, perLevel = 0.3, min = 0.8, max = 15.0 },
emerald = { weight = 0.2, perLevel = 0.2, min = 0.2, max = 10.0 },
},
rocks = {
vec3(2951.82, 2769.76, 39.03), vec3(2969.16, 2777.00, 38.43), vec3(2973.73, 2775.26, 38.20),
vec3(2939.32, 2772.49, 39.27), vec3(2929.48, 2788.70, 39.91), vec3(2926.46, 2794.93, 40.77),
vec3(2930.37, 2811.02, 43.47), vec3(2925.04, 2807.35, 42.93), vec3(2927.23, 2799.80, 41.33),
vec3(2930.23, 2794.45, 40.64), vec3(2935.81, 2795.59, 40.69), vec3(2940.86, 2800.04, 40.95),
vec3(2935.34, 2802.25, 41.30), vec3(2932.22, 2806.70, 42.23), vec3(2941.54, 2805.18, 41.19),
vec3(2938.45, 2811.39, 42.57), vec3(2944.70, 2817.50, 42.73), vec3(2947.33, 2819.38, 42.68),
vec3(2954.88, 2819.88, 42.52), vec3(2953.42, 2756.13, 43.52), vec3(2943.83, 2742.77, 43.37),
vec3(2929.83, 2761.15, 44.70),
},
},
quarry_south = {
label = 'Davis Quartz South Bench',
center = vec3(2993.2, 2758.9, 43.3),
radius = 30.0,
level = 3,
blip = { sprite = 618, colour = 47, scale = 0.8 },
ores = {
stone = { weight = 35.0, perLevel = -0.3, min = 15.0, max = 35.0 },
coal = { weight = 25.0, perLevel = -0.15, min = 12.0, max = 25.0 },
silver = { weight = 20.0, perLevel = 0.05, min = 20.0, max = 28.0 },
copper = { weight = 18.0, perLevel = 0.1, min = 18.0, max = 28.0 },
diamond = { weight = 1.5, perLevel = 0.1, min = 1.5, max = 8.0 },
emerald = { weight = 0.5, perLevel = 0.06, min = 0.5, max = 5.0 },
},
rocks = {
vec3(2991.07, 2777.86, 43.28), vec3(2998.41, 2759.32, 42.95), vec3(2983.30, 2761.86, 42.79),
vec3(2977.84, 2741.26, 44.74), vec3(2980.57, 2748.40, 43.20), vec3(2985.72, 2750.95, 43.26),
vec3(2990.25, 2750.40, 43.60), vec3(3000.97, 2753.95, 43.70), vec3(3004.29, 2761.18, 43.84),
vec3(3006.38, 2768.63, 42.79), vec3(3005.94, 2773.78, 42.51),
},
},
north_face = {
label = 'Davis Quartz North Face',
center = vec3(2954.5, 2847.9, 47.2),
radius = 15.0,
level = 5,
blip = { sprite = 618, colour = 17, scale = 0.8 },
ores = {
stone = { weight = 25.0, perLevel = -0.2, min = 12.0, max = 25.0 },
coal = { weight = 15.0, perLevel = -0.1, min = 8.0, max = 15.0 },
copper = { weight = 45.0, perLevel = 0.1, min = 45.0, max = 55.0 },
silver = { weight = 12.0, perLevel = 0.05, min = 12.0, max = 18.0 },
diamond = { weight = 2.0, perLevel = 0.08, min = 2.0, max = 8.0 },
emerald = { weight = 1.0, perLevel = 0.05, min = 1.0, max = 5.0 },
},
rocks = {
vec3(2949.88, 2851.03, 48.35), vec3(2955.06, 2850.16, 47.60), vec3(2959.48, 2848.07, 46.81),
vec3(2952.21, 2847.91, 47.25), vec3(2956.31, 2845.92, 46.56), vec3(2947.42, 2848.02, 47.75),
vec3(2961.44, 2844.13, 46.06),
},
},
east_ridge = {
label = 'Davis Quartz East Ridge',
center = vec3(3027.2, 2760.2, 56.3),
radius = 20.0,
level = 8,
blip = { sprite = 618, colour = 55, scale = 0.8 },
ores = {
stone = { weight = 20.0, perLevel = -0.15, min = 10.0, max = 20.0 },
coal = { weight = 12.0, perLevel = -0.08, min = 6.0, max = 12.0 },
silver = { weight = 45.0, perLevel = 0.1, min = 45.0, max = 55.0 },
copper = { weight = 18.0, perLevel = 0.05, min = 18.0, max = 24.0 },
diamond = { weight = 3.0, perLevel = 0.1, min = 3.0, max = 10.0 },
emerald = { weight = 2.0, perLevel = 0.06, min = 2.0, max = 6.0 },
},
rocks = {
vec3(3027.83, 2772.18, 55.48), vec3(3030.89, 2767.52, 56.47), vec3(3028.25, 2764.44, 56.07),
vec3(3030.58, 2760.33, 57.46), vec3(3025.91, 2756.87, 56.01), vec3(3026.10, 2751.26, 57.28),
vec3(3020.68, 2748.78, 55.54),
},
},
south_terrace = {
label = 'Davis Quartz South Terrace',
center = vec3(2960.5, 2697.5, 54.8),
radius = 18.0,
level = 12,
blip = { sprite = 618, colour = 25, scale = 0.8 },
ores = {
stone = { weight = 25.0, perLevel = -0.2, min = 12.0, max = 25.0 },
coal = { weight = 10.0, perLevel = -0.05, min = 6.0, max = 10.0 },
silver = { weight = 15.0, perLevel = 0.0, min = 15.0, max = 15.0 },
copper = { weight = 15.0, perLevel = 0.0, min = 15.0, max = 15.0 },
diamond = { weight = 18.0, perLevel = 0.1, min = 18.0, max = 26.0 },
emerald = { weight = 12.0, perLevel = 0.1, min = 12.0, max = 20.0 },
ruby = { weight = 5.0, perLevel = 0.08, min = 5.0, max = 12.0 },
},
rocks = {
vec3(2969.42, 2697.80, 54.51), vec3(2966.65, 2694.42, 54.66), vec3(2962.93, 2697.26, 54.66),
vec3(2953.25, 2697.23, 55.14), vec3(2950.21, 2700.96, 54.86),
},
},
high_ridge = {
label = 'Davis Quartz High Ridge',
center = vec3(3053.3, 2731.7, 63.8),
radius = 28.0,
level = 20,
blip = { sprite = 618, colour = 46, scale = 0.8 },
ores = {
stone = { weight = 15.0, perLevel = -0.1, min = 8.0, max = 15.0 },
coal = { weight = 8.0, perLevel = -0.05, min = 4.0, max = 8.0 },
gold_ore = { weight = 40.0, perLevel = 0.15, min = 40.0, max = 55.0 },
silver = { weight = 12.0, perLevel = 0.0, min = 12.0, max = 12.0 },
copper = { weight = 10.0, perLevel = 0.0, min = 10.0, max = 10.0 },
ruby = { weight = 8.0, perLevel = 0.1, min = 8.0, max = 16.0 },
diamond = { weight = 5.0, perLevel = 0.08, min = 5.0, max = 12.0 },
emerald = { weight = 2.0, perLevel = 0.05, min = 2.0, max = 6.0 },
},
rocks = {
vec3(3041.40, 2719.44, 63.18), vec3(3047.69, 2717.88, 62.76), vec3(3045.97, 2722.41, 63.17),
vec3(3052.43, 2721.98, 63.14), vec3(3052.26, 2728.10, 63.63), vec3(3058.06, 2731.15, 64.68),
vec3(3056.00, 2737.53, 64.32), vec3(3060.63, 2741.50, 64.53), vec3(3058.53, 2746.53, 64.35),
vec3(3060.26, 2750.58, 64.33),
},
},
mineshaft = {
label = 'Mine Shaft',
center = vec3(-527.3, 1998.7, 126.7),
radius = 85.0,
level = 10,
blip = { sprite = 618, colour = 40, scale = 0.8 },
foreman = { model = 's_m_y_construct_02', coords = vec4(-594.96, 2091.30, 131.47, 67.65) },
ores = {
stone = { weight = 30.0, perLevel = -0.25, min = 10.0, max = 30.0 },
coal = { weight = 20.0, perLevel = -0.1, min = 8.0, max = 20.0 },
copper = { weight = 15.0, perLevel = 0.05, min = 15.0, max = 20.0 },
silver = { weight = 12.0, perLevel = 0.0, min = 12.0, max = 12.0 },
gold_ore = { weight = 12.0, perLevel = 0.15, min = 12.0, max = 24.0 },
diamond = { weight = 4.0, perLevel = 0.1, min = 4.0, max = 12.0 },
emerald = { weight = 3.0, perLevel = 0.08, min = 3.0, max = 10.0 },
ruby = { weight = 4.0, perLevel = 0.1, min = 4.0, max = 12.0 },
},
rocks = {
vec3(-589.25, 2050.53, 130.11), vec3(-580.30, 2037.82, 128.80), vec3(-572.68, 2022.37, 127.93),
vec3(-563.00, 2011.85, 127.45), vec3(-548.99, 1996.56, 127.28), vec3(-534.22, 1982.90, 127.18),
vec3(-531.53, 1978.88, 127.35), vec3(-523.71, 1981.21, 126.75), vec3(-516.25, 1977.32, 126.49),
vec3(-506.58, 1980.66, 126.14), vec3(-499.52, 1981.87, 125.88), vec3(-488.44, 1982.74, 124.64),
vec3(-469.78, 1993.57, 123.86), vec3(-458.53, 2003.33, 123.73),
},
},
}
-- ── Foundry ──────────────────────────────────────────────────────────────────
-- The foundry: a buyer who pays for everything, the furnaces and the cutting
-- benches. Ore can be sold to every foreman as well.
Config.Foundry = {
label = 'LS Foundry',
blip = { coords = vec3(1090.18, -1999.51, 30.93), sprite = 473, colour = 47, scale = 0.8 },
buyer = { model = 'g_m_m_chemwork_01', coords = vec4(1090.18, -1999.51, 30.93, 146.24) },
furnaces = { vec3(1112.29, -2009.90, 31.46) },
benches = {
{ coords = vec4(1077.11, -1984.22, 31.02, 235.8), prop = 'gr_prop_gr_speeddrill_01c' },
{ coords = vec4(1075.19, -1985.45, 30.92, 144.89), prop = 'gr_prop_gr_speeddrill_01c' },
},
}
-- ── Blips ────────────────────────────────────────────────────────────────────
Config.Blips = {
places = true, -- a blip for every mining area and the foundry
foremen = true, -- a blip for every foreman
foremanBlip = { sprite = 207, colour = 5, scale = 0.7 },
rocks = true, -- a small dot for every rock, only while you are near its area
rockDistance = 150.0, -- metres from an area where its rocks show on the map
}
-- ── Markers ──────────────────────────────────────────────────────────────────
-- Arrows above the rocks while you are close: accent colour where you can mine
-- now, grey where the rock is broken or needs a higher level.
Config.Markers = {
enabled = true,
distance = 30.0, -- metres
type = 2, -- GTA marker type, 2 is the arrow
size = 0.45,
ready = false, -- false = accent colour, or { r, g, b, a } e.g. { 226, 182, 73, 210 }
waiting = { 150, 155, 165, 120 },
}
--==============================================================================
-- 7 · ITEMS
--==============================================================================
-- The names of the items in your inventory. V1 names are kept (stone, coal,
-- copper, silver, diamond, emerald), the rest is new in V2: see install/ for
-- ox_inventory, qb-core and ESX. `ox` sets another name for ox_inventory only.
-- `price` is the range the market moves in, per piece.
Config.Items = {
stone = { kind = 'ore', price = { 250, 500 } },
coal = { kind = 'ore', price = { 500, 1000 } },
copper = { kind = 'ore', price = { 2000, 3000 } },
silver = { kind = 'ore', price = { 1000, 2000 } },
gold_ore = { kind = 'ore', price = { 3500, 5000 } },
diamond = { kind = 'gem', price = { 3000, 5000 } },
emerald = { kind = 'gem', price = { 8000, 10000 } },
ruby = { kind = 'gem', price = { 5000, 7000 } },
copper_bar = { kind = 'bar', price = { 11000, 15000 } },
silver_bar = { kind = 'bar', price = { 6500, 10000 } },
gold_bar = { kind = 'bar', price = { 20000, 26000 } },
cut_diamond = { kind = 'cut', price = { 6500, 9000 } },
cut_emerald = { kind = 'cut', price = { 15000, 19000 } },
cut_ruby = { kind = 'cut', price = { 9000, 12000 } },
pickaxe = { kind = 'tool' },
reinforced_pickaxe = { kind = 'tool' },
mining_drill = { kind = 'tool' },
}
-- QBCore with its own inventory: items qb-core does not know yet are added
-- while the server runs, so nothing has to be edited in qb-core. Pictures for
-- your inventory are in install/images.
Config.RegisterItems = true
--==============================================================================
-- 8 · TOOLS
--==============================================================================
-- Sold and repaired by every foreman. A better tool means fewer and easier
-- rounds of the mining game and more ore per rock. `uses` is how often it
-- works before it breaks; the foreman repairs it for `repair`.
Config.RequireTool = true -- false: without a tool players mine like with the basic pickaxe (V1 style)
Config.Tools = {
{ item = 'pickaxe', price = 750, level = 1, uses = 60, rounds = 3, zone = 1.0, yield = 0, repair = 150,
prop = 'prop_tool_pickaxe', style = 'pickaxe' },
{ item = 'reinforced_pickaxe', price = 3500, level = 10, uses = 150, rounds = 3, zone = 1.3, yield = 1, repair = 600,
prop = 'prop_tool_pickaxe', style = 'pickaxe' },
{ item = 'mining_drill', price = 12500, level = 25, uses = 300, rounds = 2, zone = 1.55, yield = 2, repair = 2000,
prop = 'hei_prop_heist_drill', style = 'drill' },
}
--==============================================================================
-- 9 · MINING
--==============================================================================
Config.Mining = {
distance = 2.4, -- metres to a rock
difficulty = 'normal', -- 'easy' | 'normal' | 'hard': size and speed of the gold zone
hitsPerRock = 3, -- times a rock can be mined before it breaks
respawn = 300, -- seconds until a broken rock is back
cooldown = 3, -- seconds between two minings of one player
amount = { min = 1, max = 2 }, -- pieces per mining; tools add their yield on top
failWear = true, -- a lost mining game costs one use of the tool too
rockModels = { 'cs_x_rubweec' }, -- base game props, one is picked per rock
brokenModel = 'prop_rock_5_a', -- what is left of a broken rock, '' = nothing
}
--==============================================================================
-- 10 · LEVELS
--==============================================================================
-- Same curve as V1. V1 levels are taken over on the first start.
Config.Levels = {
max = 100,
xpMining = 8, -- XP per mining
xpPerLevel = 1.5, -- plus this much per level
xpFormula = function(level) return math.floor(120 * (level ^ 1.8)) end,
}
--==============================================================================
-- 11 · SMELTING (FOUNDRY FURNACES)
--==============================================================================
-- Ore goes in, bars come out after a while, also while the player is away.
-- They are picked up at the furnace.
Config.Smelting = {
enabled = true,
level = 5, -- lowest level to use a furnace
seconds = 20, -- per bar
maxQueue = 20, -- bars in the furnace at once per player
fuel = { item = 'coal', amount = 1 }, -- per bar
xp = 12, -- per bar picked up
recipes = {
{ from = 'copper', amount = 4, to = 'copper_bar' },
{ from = 'silver', amount = 4, to = 'silver_bar' },
{ from = 'gold_ore', amount = 4, to = 'gold_bar' },
},
}
--==============================================================================
-- 12 · GEM CUTTING (FOUNDRY BENCHES)
--==============================================================================
-- A precise game: every round has to hit. A miss can break the stone.
Config.Cutting = {
enabled = true,
level = 15,
rounds = 3,
difficulty = 'hard',
breakChance = 25, -- % that a miss breaks the rough gem
xp = 20,
gems = {
{ from = 'diamond', to = 'cut_diamond' },
{ from = 'emerald', to = 'cut_emerald' },
{ from = 'ruby', to = 'cut_ruby' },
},
}
--==============================================================================
-- 13 · CONTRACTS (FOREMAN)
--==============================================================================
-- Each player gets a few offers that change every `refresh` minutes. One can
-- be taken at a time; delivered in time at any foreman, it pays the market
-- value times `bonus` and XP.
Config.Contracts = {
enabled = true,
offers = 3,
refresh = 20, -- minutes
minutes = { min = 20, max = 45 }, -- time to deliver
bonus = 1.35,
xp = 60,
pool = {
{ item = 'stone', min = 15, max = 30, level = 1 },
{ item = 'coal', min = 10, max = 20, level = 1 },
{ item = 'silver', min = 6, max = 14, level = 1 },
{ item = 'copper', min = 5, max = 12, level = 3 },
{ item = 'copper_bar', min = 2, max = 6, level = 5 },
{ item = 'silver_bar', min = 2, max = 6, level = 5 },
{ item = 'gold_ore', min = 4, max = 10, level = 10 },
{ item = 'gold_bar', min = 1, max = 4, level = 12 },
{ item = 'cut_diamond', min = 1, max = 3, level = 15 },
{ item = 'cut_ruby', min = 1, max = 3, level = 15 },
{ item = 'cut_emerald', min = 1, max = 2, level = 20 },
},
}
--==============================================================================
-- 14 · MARKET AND MONEY
--==============================================================================
-- Prices move within the range of each item every `update` minutes, by up to
-- `swing` percent (V1 dynamic pricing).
Config.Market = {
dynamic = true,
update = 10, -- minutes
swing = 20, -- percent
payTo = 'cash', -- what selling and contracts pay into: 'cash' | 'bank'
buyWith = 'cash', -- what tools and repairs are paid with: 'cash' | 'bank'
currency = '$',
}
--==============================================================================
-- 15 · ADMINS
--==============================================================================
-- Players with the ACE below, group.admin or group.superadmin, one of the
-- framework groups, or one of the identifiers.
Config.Admin = {
ace = 'agency.minerjob.admin',
groups = { 'admin', 'god', 'superadmin' },
identifiers = {
-- 'license:xxxxxxxx', 'discord:xxxxxxxx',
},
}
--==============================================================================
-- 16 · STANDALONE
--==============================================================================
-- Without QBCore, Qbox or ESX:
-- money: 'auto' uses Agency-Banking when it runs, otherwise the miner's own
-- wallet in the menu. 'hooks' uses the functions below.
-- items: without an inventory the satchel in the menu keeps them; the
-- hooks connect your own inventory instead.
Config.Standalone = {
money = 'auto', -- 'auto' | 'banking' | 'wallet' | 'hooks'
walletStart = 1000, -- a new miner's wallet, enough for the first pickaxe
-- getMoney = function(src, account) return 0 end, -- account: 'cash' | 'bank'
-- removeMoney = function(src, account, amount) return true end,
-- addMoney = function(src, account, amount) return true end,
-- itemCount = function(src, item) return 0 end,
-- addItem = function(src, item, amount) return true end,
-- removeItem = function(src, item, amount) return true end,
}
--==============================================================================
-- 17 · YOUR OWN WORDING
--==============================================================================
-- Any text of the language files can be replaced here and survives updates:
-- Config.Text = { ui_sell_all = 'Sell it all!', notify_title = 'Quarry' }
Config.Text = {}
02SQL файл
Необязательно: ресурс сам создаёт эти таблицы при запуске. Импортируйте файл, только если настраиваете базу данных вручную:
-- Agency-Minerjob V2
-- Optional: the script creates this table by itself on the first start when oxmysql runs.
-- Only needed when your database user may not create tables.
-- Without oxmysql everything is saved in the server's key value store instead.
-- Levels from V1 (player_mining_skills) are taken over on the first start; that table stays untouched.
CREATE TABLE IF NOT EXISTS `agency_minerjob` (
`scope` VARCHAR(16) NOT NULL,
`id` VARCHAR(96) NOT NULL,
`data` LONGTEXT NOT NULL,
`updated` INT UNSIGNED NOT NULL DEFAULT 0,
PRIMARY KEY (`scope`, `id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
+Полезно знать
Каждый параметр в config.lua что-то делает: всего 15 разделов, от фреймворка до собственных формулировок. Самые часто используемые значения также можно изменить в игре на странице администратора для всего сервера.
- Основное и внешний вид
- Config.Framework, Config.Locale, Config.Debug, Config.Storage, Config.Inventory, Config.Images и Config.UseAgencyNotify определяют, как работает скрипт. Config.UI задаёт цвет акцента и размер меню.
- Клавиши и команды
- Config.Keys задаёт клавишу взаимодействия, по умолчанию E. Config.Commands задаёт названия команд /miner, /mininglevel и /mineradmin.
- Места
- Config.Zones содержит семь зон добычи с центром, радиусом, минимальным уровнем, бригадиром и рудами с их весом для каждого уровня. Config.Foundry задаёт места для скупщика, печей и верстаков для огранки. Config.Blips и Config.Markers задают метки на карте и стрелки над камнями.
- Предметы и инструменты
- Config.Items задаёт название каждого предмета, его тип и диапазон рыночных цен. Config.RequireTool определяет, нужен ли инструмент, а Config.Tools задаёт цену, уровень, число использований, циклы, размер зоны, дополнительную руду и стоимость ремонта для каждого инструмента.
- Добыча и уровни
- Config.Mining задаёт расстояние, сложность, количество добыч с одного камня, время возрождения, время перезарядки и количество руды за одну добычу. Config.Levels содержит максимальный уровень, XP за добычу и кривую XP.
- Литейная
- Config.Smelting задаёт минимальный уровень, количество секунд на слиток, очередь, расход угля на слиток и рецепты. Config.Cutting задаёт уровень, количество раундов, сложность и вероятность того, что при промахе камень сломается.
- Контракты и рынок
- Config.Contracts задаёт количество предложений, частоту их обновления, срок доставки, бонус и список доступных предметов. Config.Market задаёт, меняются ли цены, как часто и насколько, куда поступают и откуда списываются деньги, а также символ валюты.
- Администраторы, автономный режим и тексты
- Config.Admin задаёт ACE, группы и идентификаторы администраторов. Config.Standalone подключает деньги и предметы на серверах без фреймворка. Config.Text переопределяет любые тексты из языковых файлов.
?Частые вопросы
На что влияют настройки на странице администратора?
Режим отладки, необходимость инструмента, контракты, плавка, резка, изменение цен, множители XP и цен, возрождение камней и количество добычи с каждого камня. Настройки сохраняются для всего сервера и имеют приоритет над config.lua, пока не будет нажата кнопка Reset to config.lua или в консоли не будет выполнена команда minerjob reset.
Как использовать собственные тексты?
Добавьте ключ из locales/en.lua с нужным текстом в Config.Text, например Config.Text = { ui_sell_all = 'Продать всё!' }. Этот текст имеет приоритет над любым языком и сохраняется после обновлений.