Skip to content

K.Quests ​

Functions ​

K.Quests.Objective ​

lua
K.Quests.Objective(name: string, definition: { [string]: any })

Adds an objective type. Fields lists the extra fields it takes and their types; Track(player, objective, add, set) runs while it's active and can return a stop function.

K.Quests.Define ​

lua
K.Quests.Define(id: string, options: { [string]: any })

K.Quests.Start ​

lua
K.Quests.Start(...: any): (boolean, string?)

Server: Start(player, id) -> (started, reason). Client: Start(id) asks (needs ClientCanStart).

K.Quests.Claim ​

lua
K.Quests.Claim(...: any): (boolean, string?)

Gives the rewards of a finished quest (for quests with AutoClaim = false). Server: Claim(player, id) -> (claimed, reason). Client: Claim(id) asks (needs ClientCanClaim).

K.Quests.Abandon ​

lua
K.Quests.Abandon(player: Player, id: string): boolean

Drops an active quest and its progress.

K.Quests.Event ​

lua
K.Quests.Event(name: string, player: Player, amount: number?)

Moves every active "Event" objective named name forward by amount (1).

K.Quests.IsActive ​

lua
K.Quests.IsActive(player: Player, id: string): boolean

K.Quests.TimesCompleted ​

lua
K.Quests.TimesCompleted(player: Player, id: string): number

How many times the player has completed the quest.

K.Quests.Get ​

lua
K.Quests.Get(player: Player?): { any }

Server: Get(player). Client: Get(). Active quests with Name, Objectives ({ Text, Progress, Amount }) and Ready.

K.Quests.OnChanged ​

lua
K.Quests.OnChanged(callback: ({ any }) -> ())

Client: runs callback(quests) now and whenever your quests change.

K.Quests.Before ​

lua
K.Quests.Before(operation: string, callback: (Context) -> (), priority: number?): () -> ()

K.Quests.After ​

lua
K.Quests.After(operation: string, callback: (Context) -> ()): () -> ()

K.Quests.Middleware ​

lua
K.Quests.Middleware(operation: string, callback: (Context, () -> ()) -> (), priority: number?): () -> ()

Events ​

K.Quests.Started ​

Server signals: Started (player, id), Progressed (player, id, objectiveIndex, value), Completed (player, id).

K.Quests.Progressed ​

K.Quests.Completed ​

Generated from src/Corode/Quests.luau.

Corode 0.13.0 · MIT License