DayZ
  • 🌶️FoxApo DayZ Mods
  • ⚙️Modding | Repacking
  • MODS
    • 👻CRDTN Creatures
      • Phantom
      • config.cpp
    • 💯CRDTN Core
      • File Logger
        • Logger Player Connected
      • Rest Api
        • Getting started
      • Event Handler
      • Notifications UI
      • Admin Utils
      • NPCs
    • 📺CRDTN Gui
    • 📦CRDTN Krabice
    • 🫂CRDTN Factions
    • ⁉️CRDTN Quests
      • ⁉️Getting started
      • 💻Client Side
      • 🖥️Server Side
        • ⚙️Installation
          • 🛠️Quests.json
            • ⚔️Goal
            • 🎁Reward
          • 🌎Quest Events
            • Teleport quest with quest event (server)
        • ⚙️Quest & Goal Types
          • 📜Turn-In goal
          • 📜Kill goal
          • 📜Trade goal
          • 📜Craft goal
          • 📜Action goal
          • 📜Explore goal
        • ⚙️Rewards
        • ⚙️Quest NPCs
    • 🔥CRDTN Fire Regen
      • Config
    • 🔊CRDTN Sounds
    • 🚪CRDTN Locked Doors
      • Config
      • How To
      • config.cpp
Powered by GitBook
On this page
  1. MODS
  2. CRDTN Quests
  3. Server Side
  4. Installation
  5. Quest Events

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);
    };
};
```
PreviousQuest EventsNextQuest & Goal Types

Last updated 1 year ago

⁉️
🖥️
⚙️
🌎