Skip to main content
Daily and weekly quests are defined in Config.Quests in shared/config.lua. Each quest can use a built-in tracker or be driven entirely by your own scripts via exports.

Defining a quest

Each entry in Config.Quests is a table. Here’s a built-in playtime quest:
Config.Quests = {
    {
        id = 'mission_1',                  -- must be unique
        QuestName = 'Be online for 30 mins',
        QuestDesc = 'You must be online for 30 mins to complete this quest',
        totalObjectives = 30,              -- 30 minutes
        Reward = 200,                      -- XP awarded on completion
        questType = 'daily',               -- 'daily' or 'weekly'
        BuiltinQuest = 'playtime'          -- built-in tracker (omit for custom quests)
    },
}
FieldWhat it does
idUnique identifier for the quest. Used by exports to push progress.
QuestNameDisplay name shown in the UI
QuestDescDescription shown in the UI
totalObjectivesTarget the player must reach to complete the quest
RewardXP awarded when the quest completes
questType'daily' or 'weekly'
BuiltinQuestOptional built-in tracker. Omit for a custom quest driven by your own scripts.

Built-in trackers

Set BuiltinQuest to one of these and progress is tracked automatically — no extra code needed.
TrackerCountsUnit
playtimeTime onlineminutes
killcountPlayer / NPC killskills
swimdistanceDistance swamkm
rundistanceDistance rankm
The four sample quests shipped in Config.Quests demonstrate one of each tracker.

Reset timing

  • Daily quests reset at Config.DailyResetHour (0-23, default 0 = midnight).
  • Weekly quests reset on Config.WeeklyResetDay (1 = Monday … 7 = Sunday, default Monday).
See Configuration for these options.

Custom quests from your own resources

Add a quest in Config.Quests without a BuiltinQuest field, then push progress from anywhere on the server side:
-- add 1 progress to "mission_5" for a player
exports.nex_battlepass:AddQuestProgress(source, 'mission_5', 1)
When the quest’s progress reaches its totalObjectives, it completes automatically and awards its Reward XP.

Driving a built-in tracker manually

You can also push progress to a built-in tracker type yourself — useful if you want to count an event the resource doesn’t track natively:
exports.nex_battlepass:AddBuiltinProgress(source, 'killcount', 1)
This advances every quest that uses that built-in tracker type.
Both export calls are server-side. The amount defaults to 1 if omitted. See Exports for full signatures.