Quest Cancelers๐
You can easily let players cancel their quests using the cancel option in the quest backpack (or /cancelquest).
Cancelers also provide an easy way to clean up all the data that was created during the quest. They can also be triggered by actions.
Setup๐
Define a cancel section anywhere in your quest package. This section will contain all cancelers. Each canceler has an identifier.
Example
cancel:
woodQuest:
name: "&2Wood for the Innkeeper" #(1)!
conditions: "wood_started,!wood_paid" #(2)!
objectives: "farmWood" #(3)!
tags: "wood_started,wood_done,wood_paid" #(4)!
points: "wood" #(5)!
journal: "wood_started,wood_done,wood_paid" #(6)!
actions: "punishPlayer,sendMessage" #(7)!
location: "100;200;300;world" #(8)!
dragonQuest:
name: "&4Dragon Slayer"
conditions: "dragon_started,!dragon_done"
objectives: "killDragon"
- Display name that will be shown in the GUI.The name can be translated with this syntax:
name: en-US: '&2Wood for Innkeeper' # English translation de-DE: '&2Holz fรผr den Gastwirt' # German translation - A list of conditions separated by commas. The player needs to meet all those conditions to be able to cancel this quest. Place there the ones which detect that the player has started the quest, but he has not finished it yet.
- A list of all objectives used in this quest. They will be canceled without firing their completion actions.
- A list of tags that will be deleted. Place here all tags that you use during the quest.
- A list of all points that will be entirely deleted from the player.
- These journal entries will be removed from the player's journal.
- You can run any action when the player cancels a quest. For example, if you want to punish the player for canceling a quest list the related actions here.
- This is a location to which the player will be teleported when canceling the quest. Use the ULF format.
Related Actions๐
Call a quest canceler๐
Context:
Syntax: cancel <canceler> [bypass]
Description: Call the specified quest canceler.
This action works in the same way as a quest canceler in the backpack. Running this action is equal to the player canceling a quest using the backpack.
| Parameter | Syntax | Default Value | Explanation |
|---|---|---|---|
| canceler | CancelerID | The Quest Canceler to execute. | |
| bypass | Keyword (bypass) |
Disabled | If the canceler conditions should be ignored. If enabled the canceler will be executed, even when its conditions are not met. |
Example
actions:
cancelQuest: "cancel woodQuest bypass"