# Teleport quest with quest event (server)

#### Quest

````json5
```json
{
      "Id": "TestQuest",
      "TakerId": "player",
      "QType": 1,
      "Name": "Test quests",
      "Description": "Complete this quest to teleport to testing area of the quests. This quest uses regular Turn In goal and server events to teleport the player to a location after completion. You can follow up in the config file and respective classes to do something similar.",
      "Goals": [
        {
          "QType": 1,
          "ClassName": "",
          "State": true,
          "Count": 0,
          "Quantity": 0,
          "Value": "",
          "TriggerCoordinate": "",
          "TriggerRadius": 0.0,
          "TriggerId": "",
          "TriggerEventId": "",
          "TriggerSendToClient": false,
          "Description": "Teleport me",
          "KeepItem": false
        }
      ],
      "Rewards": [],
      "IsRepeatable": false,
      "PreQuests": [],
      "RepeatDurationHours": 0,
      "EventId": "test_quest_complete",
      "EventSendToClient": true
    }
```
````

#### QuestEventHandlerServer

Always make sure, that you put server based quest event handlers on the server side mod only. It's part of the&#x20;

````c
```c
modded class QuestEventHandlerServer
{
    override void OnQuestEvent(PlayerBase questCompleteActor, Quest questDefinition, string eventKey, ref Param params = NULL, ref PlayerIdentity identity = NULL, ref Object target = NULL, bool sendToClient = true)
    {
        if (questCompleteActor == NULL || eventKey == "")
        {
            return;
        }
        // Event triggered by the explore trigger in the quest
        if (eventKey == "test_quest_complete")
        {
            questCompleteActor.SetPosition("9817.386719 250.825714 11459.413086");
        }
        super.OnQuestEvent(questCompleteActor, questDefinition, eventKey, params, identity, target, sendToClient);
    };
};
```
````

<figure><img src="/files/HDWiI4SCvgxIA2NdDZaA" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://dayz.foxapo.com/mods/crdtn-quests/server-side/installation/quest-events/teleport-quest-with-quest-event-server.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
