Skip to content

Quest Files

Eufranio edited this page May 31, 2020 · 3 revisions

Quest Files are the files that store what each Quest should do, describing it's behavior. To add new quests, follow the syntax of the default file, and copy it to a new file in the quests folder. The name of the file must be the numerical ID (like 0.conf). After creating the file and pasting the syntax, add it to the game by reloading the plugin or restarting the server.

Contents

  • executorType=pbq:default: the quest executor to use. Keep this if you're not using plugins that add new Quest Executors.
  • denyMovement=true: if this Quest should stop players from moving while the messages are displayed.
  • displayName="": the display name of the quest that is shown to the players.
  • id=0: the ID of this quest. This should be the same ID in the name of the file.
  • messages=[]: a list of messages that are sent to the player while this Quest is running. This field sends messages in a configurable interval, so it's useful for dialogs, for example. You can leave it empty for instant quests.
  • timeBetweenMessages=1: the interval, in seconds, between every message sent from the messages field of this config.
  • rewards=[]: an list of rewards that this quest will give to the player after completion. The type of the reward is it's ID (the name of the file, with an pbq: at the start). Rewards are added using the syntax of the file of the reward. For example, command and message rewards would be added like this:
    rewards=[
        {
            type="pbq:command"
            value {
                commands=[
                    "give %player% minecraft:stone"
                ]
            }
        },
        {
            type="pbq:message"
            value {
                messages=[
                    "&aSuccessfully completed quest!"
                ]
            }
        }
    ]

See that it's using the ID of the reward (command and message are the name of the files in the rewards folder. They must be prefixed with pbq:), and next to it, a config block with the contents of the reward file to be overwritten.

You can add as many rewards as you want from any available reward type. They're rewarded in the order of the config.

  • tasks={}: just like the rewards, it's an list of tasks that are required to complete this quest. This follows the same logic from rewards, you can add available tasks here and use their config syntax to use custom values, for example:
    tasks=[
        {
            type="pbq:cost"
            value {
                cost=0
            }
        },
        {
            type="pbq:item"
            value {
                amount=1
                item="minecraft:stone"
            }
        }
    ]

Check Tasks and Rewards for a list of all available tasks and rewards, and their configs.

Clone this wiki locally