# Interface: QuestInterface (/jsdoc/nqtr/index/interfaces/QuestInterface)



Defined in: [src/interface/quest/QuestInterface.ts:5](https://github.com/DRincs-Productions/nqtr/blob/db22fe9e7612d547ff25befcc444cf095348917d/src/interface/quest/QuestInterface.ts#L5)

## Extends [#extends]

* `QuestBaseInternalInterface`

## Properties [#properties]

### completed [#completed]

\> `readonly` **completed**: `boolean`

Defined in: [src/interface/quest/QuestInterface.ts:40](https://github.com/DRincs-Productions/nqtr/blob/db22fe9e7612d547ff25befcc444cf095348917d/src/interface/quest/QuestInterface.ts#L40)

If the quest is completed.

#### Inherited from [#inherited-from]

`QuestBaseInternalInterface.completed`

***

### currentStage? [#currentstage]

\> `readonly` `optional` &#x2A;*currentStage?**: [`StageInterface`](/jsdoc/nqtr/index/interfaces/StageInterface)

Defined in: [src/interface/quest/QuestInterface.ts:25](https://github.com/DRincs-Productions/nqtr/blob/db22fe9e7612d547ff25befcc444cf095348917d/src/interface/quest/QuestInterface.ts#L25)

The current stage.

#### Inherited from [#inherited-from-1]

`QuestBaseInternalInterface.currentStage`

***

### currentStageIndex? [#currentstageindex]

\> `optional` &#x2A;*currentStageIndex?**: `number`

Defined in: [src/interface/quest/QuestInterface.ts:20](https://github.com/DRincs-Productions/nqtr/blob/db22fe9e7612d547ff25befcc444cf095348917d/src/interface/quest/QuestInterface.ts#L20)

The index of the current stage.

#### Inherited from [#inherited-from-2]

`QuestBaseInternalInterface.currentStageIndex`

***

### currentStageMustStart [#currentstagemuststart]

\> `readonly` **currentStageMustStart**: `boolean`

Defined in: [src/interface/quest/QuestInterface.ts:95](https://github.com/DRincs-Productions/nqtr/blob/db22fe9e7612d547ff25befcc444cf095348917d/src/interface/quest/QuestInterface.ts#L95)

If the current stage must start. It is true if the current stage is not started, can start and not completed.

#### Inherited from [#inherited-from-3]

`QuestBaseInternalInterface.currentStageMustStart`

***

### failed [#failed]

\> `readonly` **failed**: `boolean`

Defined in: [src/interface/quest/QuestInterface.ts:45](https://github.com/DRincs-Productions/nqtr/blob/db22fe9e7612d547ff25befcc444cf095348917d/src/interface/quest/QuestInterface.ts#L45)

If the quest is failed.

#### Inherited from [#inherited-from-4]

`QuestBaseInternalInterface.failed`

***

### id [#id]

\> `readonly` **id**: `string`

Defined in: [src/interface/quest/QuestInterface.ts:11](https://github.com/DRincs-Productions/nqtr/blob/db22fe9e7612d547ff25befcc444cf095348917d/src/interface/quest/QuestInterface.ts#L11)

The id of the quest.

#### Inherited from [#inherited-from-5]

`QuestBaseInternalInterface.id`

***

### inProgress [#inprogress]

\> `readonly` **inProgress**: `boolean`

Defined in: [src/interface/quest/QuestInterface.ts:35](https://github.com/DRincs-Productions/nqtr/blob/db22fe9e7612d547ff25befcc444cf095348917d/src/interface/quest/QuestInterface.ts#L35)

If the quest is started and not completed and not failed.

#### Inherited from [#inherited-from-6]

`QuestBaseInternalInterface.inProgress`

***

### onContinue? [#oncontinue]

\> `readonly` `optional` &#x2A;*onContinue?**: [`OnRunEvent`](/jsdoc/nqtr/index/type-aliases/OnRunEvent)\<`QuestInterface`>

Defined in: [src/interface/quest/QuestInterface.ts:59](https://github.com/DRincs-Productions/nqtr/blob/db22fe9e7612d547ff25befcc444cf095348917d/src/interface/quest/QuestInterface.ts#L59)

The function that will be called when the quest goes to the next stage.

#### Inherited from [#inherited-from-7]

`QuestBaseInternalInterface.onContinue`

***

### ~~onNextStage?~~ [#onnextstage]

\> `readonly` `optional` &#x2A;*onNextStage?**: [`OnRunEvent`](/jsdoc/nqtr/index/type-aliases/OnRunEvent)\<`QuestInterface`>

Defined in: [src/interface/quest/QuestInterface.ts:55](https://github.com/DRincs-Productions/nqtr/blob/db22fe9e7612d547ff25befcc444cf095348917d/src/interface/quest/QuestInterface.ts#L55)

#### Deprecated [#deprecated]

Use [onContinue](#oncontinue) instead. The function that will be called when the quest goes to the next stage.

#### Inherited from [#inherited-from-8]

`QuestBaseInternalInterface.onNextStage`

***

### onStart? [#onstart]

\> `readonly` `optional` &#x2A;*onStart?**: [`OnRunEvent`](/jsdoc/nqtr/index/type-aliases/OnRunEvent)\<`QuestInterface`>

Defined in: [src/interface/quest/QuestInterface.ts:50](https://github.com/DRincs-Productions/nqtr/blob/db22fe9e7612d547ff25befcc444cf095348917d/src/interface/quest/QuestInterface.ts#L50)

The function that will be called when the quest starts.

#### Inherited from [#inherited-from-9]

`QuestBaseInternalInterface.onStart`

***

### stages [#stages]

\> `readonly` **stages**: [`StageInterface`](/jsdoc/nqtr/index/interfaces/StageInterface)\[]

Defined in: [src/interface/quest/QuestInterface.ts:15](https://github.com/DRincs-Productions/nqtr/blob/db22fe9e7612d547ff25befcc444cf095348917d/src/interface/quest/QuestInterface.ts#L15)

The stages of the quest.

#### Inherited from [#inherited-from-10]

`QuestBaseInternalInterface.stages`

***

### started [#started]

\> `readonly` **started**: `boolean`

Defined in: [src/interface/quest/QuestInterface.ts:30](https://github.com/DRincs-Productions/nqtr/blob/db22fe9e7612d547ff25befcc444cf095348917d/src/interface/quest/QuestInterface.ts#L30)

If the quest is started.

#### Inherited from [#inherited-from-11]

`QuestBaseInternalInterface.started`

## Methods [#methods]

### advanceIfCompleted() [#advanceifcompleted]

\> **advanceIfCompleted**(`props`): `Promise`\<`boolean`>

Defined in: [src/interface/quest/QuestInterface.ts:74](https://github.com/DRincs-Productions/nqtr/blob/db22fe9e7612d547ff25befcc444cf095348917d/src/interface/quest/QuestInterface.ts#L74)

Go to the next stage if the current stage is completed.
If you want to force the change of stage, use [advanceUnconditionally](#advanceunconditionally).

#### Parameters [#parameters]

##### props [#props]

[`OnRunProps`](/jsdoc/nqtr/index/interfaces/OnRunProps)

The properties. If you not want to pass any property, you can pass an \{}.

#### Returns [#returns]

`Promise`\<`boolean`>

true if the stage was changed, false otherwise.

#### Inherited from [#inherited-from-12]

`QuestBaseInternalInterface.advanceIfCompleted`

***

### advanceUnconditionally() [#advanceunconditionally]

\> **advanceUnconditionally**(`props`): `Promise`\<`boolean`>

Defined in: [src/interface/quest/QuestInterface.ts:90](https://github.com/DRincs-Productions/nqtr/blob/db22fe9e7612d547ff25befcc444cf095348917d/src/interface/quest/QuestInterface.ts#L90)

Ignore the completed state of the current stage and go to the next stage without checking if the current stage is completed.
If you want to go to the next stage only if the current stage is completed, use [advanceIfCompleted](#advanceifcompleted).

#### Parameters [#parameters-1]

##### props [#props-1]

[`OnRunProps`](/jsdoc/nqtr/index/interfaces/OnRunProps)

The properties. If you not want to pass any property, you can pass an \{}.

#### Returns [#returns-1]

`Promise`\<`boolean`>

returns true if the stage was changed, false otherwise.

#### Inherited from [#inherited-from-13]

`QuestBaseInternalInterface.advanceUnconditionally`

***

### continue() [#continue]

\> **continue**(`props`): `Promise`\<`boolean`>

Defined in: [src/interface/quest/QuestInterface.ts:82](https://github.com/DRincs-Productions/nqtr/blob/db22fe9e7612d547ff25befcc444cf095348917d/src/interface/quest/QuestInterface.ts#L82)

Complete the current stage and go to the next stage with [advanceUnconditionally](#advanceunconditionally).
If you want to go to the next stage only if the current stage is completed, use [advanceIfCompleted](#advanceifcompleted).

#### Parameters [#parameters-2]

##### props [#props-2]

[`OnRunProps`](/jsdoc/nqtr/index/interfaces/OnRunProps)

The properties. If you not want to pass any property, you can pass an \{}.

#### Returns [#returns-2]

`Promise`\<`boolean`>

true if the stage was changed, false otherwise.

#### Inherited from [#inherited-from-14]

`QuestBaseInternalInterface.continue`

***

### start() [#start]

\> **start**(`props`): `Promise`\<`void`>

Defined in: [src/interface/quest/QuestInterface.ts:66](https://github.com/DRincs-Productions/nqtr/blob/db22fe9e7612d547ff25befcc444cf095348917d/src/interface/quest/QuestInterface.ts#L66)

Start the quest.

#### Parameters [#parameters-3]

##### props [#props-3]

[`OnRunProps`](/jsdoc/nqtr/index/interfaces/OnRunProps)

The properties for the start stage. If you not want to pass any property, you can pass an \{}.

#### Returns [#returns-3]

`Promise`\<`void`>

#### Inherited from [#inherited-from-15]

`QuestBaseInternalInterface.start`

***

### startCurrentStage() [#startcurrentstage]

\> **startCurrentStage**(`props`): `Promise`\<`void`>

Defined in: [src/interface/quest/QuestInterface.ts:101](https://github.com/DRincs-Productions/nqtr/blob/db22fe9e7612d547ff25befcc444cf095348917d/src/interface/quest/QuestInterface.ts#L101)

Start the current stage. This is a system function, do not use it directly.

#### Parameters [#parameters-4]

##### props [#props-4]

[`OnRunProps`](/jsdoc/nqtr/index/interfaces/OnRunProps)

The properties for the start stage. If you not want to pass any property, you can pass an \{}.

#### Returns [#returns-4]

`Promise`\<`void`>

#### Inherited from [#inherited-from-16]

`QuestBaseInternalInterface.startCurrentStage`
