# Quest

### Quest Class

The Quest is the interface for a user's progress in a Quest.

### Syntax

### Member Details

#### Agent Property

> The session Id for the user on this quest.
>
> #### Syntax
>
> **Value**
>
> > Documentation for this section has not yet been entered.
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### Definition Property

> #### Syntax
>
> \[get: Sansar.Script.Interface]\
> public [QuestDefinition](https://help.sansar.com/hc/en-us/articles/360031122071) **Definition** { get; }
>
> **Value**
>
> > Documentation for this section has not yet been entered.
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### GetState Method

> #### Syntax
>
> \[Sansar.Script.Interface]\
> public [QuestState](https://help.sansar.com/hc/en-us/articles/360030782212) **GetState** ()
>
> **Returns**
>
> > Documentation for this section has not yet been entered.
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### Objectives Property

> Returns a list of the objectives for this quest.
>
> #### Syntax
>
> \[get: Sansar.Script.Interface]\
> public [Objective](https://help.sansar.com/hc/en-us/Sansar.Simulation/Objective.html)\[] **Objectives** { get; }
>
> **Value**
>
> > Documentation for this section has not yet been entered.
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### Offer Method

> Offer the quest to a user.
>
> #### Syntax
>
> \[Sansar.Script.Interface]\
> public [void](http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Void) **Offer** ()
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### Offer Method

> Offer the quest to a user.
>
> #### Syntax
>
> **Parameters**
>
> > *handler*
> >
> > Handler to be called when the event completes.
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### Ready Property

> If the Quest data is ready.
>
> #### Syntax
>
> \[get: Sansar.Script.Interface]\
> public [bool](http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Boolean) **Ready** { get; }
>
> **Value**
>
> > Documentation for this section has not yet been entered.
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### SetState Method

> Set the state of the quest
>
> #### Syntax
>
> \[Sansar.Script.Interface]\
> public [void](http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Void) **SetState** ([QuestState](https://help.sansar.com/hc/en-us/articles/360030782212) state)
>
> **Parameters**
>
> > *state*
> >
> > The state to transition to.
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### SetState Method

> Set the state of the quest
>
> #### Syntax
>
> **Parameters**
>
> > *state*
> >
> > The state to transition to.
> >
> > *handler*
> >
> > Handler to be called when the event completes.
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### Subscribe Method

> Subscribes to Quest Events.
>
> #### Syntax
>
> **See Also**
>
> **Parameters**
>
> > *State*
> >
> > The state of the quest
> >
> > *callback*
> >
> > Callback which is executed when the event completes.
> >
> > *persistent*
> >
> > Optional, set to false to unsubscribe after one event.
>
> **Returns**
>
> > An [Sansar.Script.IEventSubscription](https://docs.sansar.com/latest/script-api-docs/sansar-script-namespace/ievent-subscription) that can be used to cancel the subscription.
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### ToString Method

> A string representation of this object.
>
> #### Syntax
>
> \[Sansar.Script.Interface]\
> public override [string](http://www.go-mono.com/docs/monodoc.ashx?link=T:System.String) **ToString** ()
>
> **Returns**
>
> > A string representation of this object.
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### Update Method

> Update the ObjectiveDefinition data.
>
> #### Syntax
>
> \[Sansar.Script.Interface]\
> public [void](http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Void) **Update** ()
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### Update Method

> Update the ObjectiveDefinition data.
>
> #### Syntax
>
> **Parameters**
>
> > *handler*
> >
> > Handler to be called when the event completes.
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

***

### QuestData Class

Handler for Quest state change events.

### Syntax

### Member Details

#### AgentId Property

> The SessionId of the agent on the quest.
>
> #### Syntax
>
> **Value**
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### State Property

> The state of the quest
>
> #### Syntax
>
> \[get: Sansar.Script.Interface]\
> public [QuestState](https://help.sansar.com/hc/en-us/articles/360030782212) **State** { get; }
>
> **Value**
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### ToString Method

> A string representation of this object.
>
> #### Syntax
>
> \[Sansar.Script.Interface]\
> public override [string](http://www.go-mono.com/docs/monodoc.ashx?link=T:System.String) **ToString** ()
>
> **Returns**
>
> > A string representation of this object.
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

***

### QuestDefinition Class

The QuestDefinition stores the data that is used to create quest instances for users.

### Syntax

### Member Details

#### Description Property

> The description of this quest.
>
> #### Syntax
>
> \[get: Sansar.Script.Interface]\
> public [string](http://www.go-mono.com/docs/monodoc.ashx?link=T:System.String) **Description** { get; }
>
> **Value**
>
> > Documentation for this section has not yet been entered.
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### GetQuest Method

> Get the state of this quest for a particular user.
>
> #### Syntax
>
> **Parameters**
>
> > *agent*
> >
> > The [Sansar.Script.SessionId](https://help.sansar.com/hc/en-us/articles/115003551808) of the user.
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### GetQuest Method

> Get the state of this quest for a particular user.
>
> #### Syntax
>
> \[Sansar.Script.Interface]\
> public [void](http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Void) **GetQuest** ([AgentPrivate](https://help.sansar.com/hc/en-us/articles/115003361386) agent)
>
> **Parameters**
>
> > *agent*
> >
> > Obtain the quest state for this user.
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### GetQuest Method

> Get the state of this quest for a particular user.
>
> #### Syntax
>
> **Parameters**
>
> > *agent*
> >
> > The [Sansar.Script.SessionId](https://help.sansar.com/hc/en-us/articles/115003551808) of the user.
> >
> > *handler*
> >
> > Handler to be called when the event completes.
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### GetQuest Method

> Get the state of this quest for a particular user.
>
> #### Syntax
>
> **Parameters**
>
> > *agent*
> >
> > Obtain the quest state for this user.
> >
> > *handler*
> >
> > Handler to be called when the event completes.
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### ObjectiveDefinitions Property

> All the ObjectiveDefinitions for this QuestDefinition.
>
> #### Syntax
>
> \[get: Sansar.Script.Interface]\
> public [ObjectiveDefinition](https://help.sansar.com/hc/en-us/articles/360031121931)\[] **ObjectiveDefinitions** { get; }
>
> **Value**
>
> > Documentation for this section has not yet been entered.
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### Ready Property

> If the QuestDefinition data is ready.
>
> #### Syntax
>
> \[get: Sansar.Script.Interface]\
> public [bool](http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Boolean) **Ready** { get; }
>
> **See Also**
>
> **Value**
>
> > Documentation for this section has not yet been entered.
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### Title Property

> The title of this quest.
>
> #### Syntax
>
> \[get: Sansar.Script.Interface]\
> public [string](http://www.go-mono.com/docs/monodoc.ashx?link=T:System.String) **Title** { get; }
>
> **Value**
>
> > Documentation for this section has not yet been entered.
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### ToString Method

> A string representation of this object.
>
> #### Syntax
>
> \[Sansar.Script.Interface]\
> public override [string](http://www.go-mono.com/docs/monodoc.ashx?link=T:System.String) **ToString** ()
>
> **Returns**
>
> > A string representation of this object.
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### Update Method

> Update the QuestDefinition data.
>
> #### Syntax
>
> \[Sansar.Script.Interface]\
> public [void](http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Void) **Update** ()
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### Update Method

> Update the QuestDefinition data.
>
> #### Syntax
>
> **Parameters**
>
> > *handler*
> >
> > Handler to be called when the event completes.
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

***

### QuestDefinition.GetQuestData Class

### Syntax

### Member Details

#### Quest Property

> #### Syntax
>
> \[get: Sansar.Script.Interface]\
> public [Quest](https://help.sansar.com/hc/en-us/articles/360031121971) **Quest** { get; }
>
> **Value**
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### ToString Method

> A string representation of this object.
>
> #### Syntax
>
> \[Sansar.Script.Interface]\
> public override [string](http://www.go-mono.com/docs/monodoc.ashx?link=T:System.String) **ToString** ()
>
> **Returns**
>
> > A string representation of this object.
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

***

### QuestState Enum

State of a quest for a user.

### Syntax

\[Sansar.Script.Interface]\
public enum **QuestState**

### Remarks

### Members

| Member Name             | Description                                                                                                 |
| ----------------------- | ----------------------------------------------------------------------------------------------------------- |
| **Active**              | The user is on the quest.                                                                                   |
| **Completed**           | The user has completed the quest.                                                                           |
| **None**                | The quest has not yet been offered to the user.                                                             |
| **ObjectivesCompleted** | The user has completed all the objectives for this quest.                                                   |
| **Offered**             | The user has been offered the quest.                                                                        |
| **SelectReward**        | The user has completed all the objectives for this quest, and turned it in, but still has to select rewards |

### Requirements

**Namespace:** Sansar.Simulation\
**Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
**Assembly Versions:** 1.1.0.0

***

### QuestCharacter Class

The QuestCharacter is the interface for a Quest Character

### Syntax

### Member Details

#### GetCharacterTracker Method

> Track a user's progress through the quests associated with this character.
>
> #### Syntax
>
> **Parameters**
>
> > *sessionId*
> >
> > The sessionId of the user.
>
> **Returns**
>
> > Documentation for this section has not yet been entered.
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### ShowQuests Method

> Show a UI panel displaying this characters' quests.
>
> #### Syntax
>
> **Parameters**
>
> > *sessionId*
> >
> > The sessionId of the user to open the ui panel for.
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### TurnInQuests Method

> Turn in any quests that a user has completed for this character, and show the quest character ui.
>
> #### Syntax
>
> **Parameters**
>
> > *sessionId*
> >
> > The sessionId of the user to complete quests for.
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### TurnInQuests Method

> Turn in any quests that a user has completed for this character, and show the quest character ui.
>
> #### Syntax
>
> **Parameters**
>
> > *sessionId*
> >
> > The sessionId of the user to complete quests for.
> >
> > *handler*
> >
> > Handler to be called when the event completes.
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

***
