Teleport quest with quest event (server)

Quest

```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

```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);
    };
};
```

Last updated