QuestCreator - Index - Historical

Applied By PYRRH4: Feb 11, 2018 at 9:09 PM

QuestCreator - Index
[​IMG]

Welcome to the Quest Creator wiki ! Here, you can find a lot of informations and tutorials about the plugin.

Official plugin page : https://www.spigotmc.org/resources/38734/

Table of contents :

1. Commands and permissions
2. Storage
3. Create a quest (with more explanations over variables, preconditions, etc)


Enums that you can use :

Entity/mob types : https://hub.spigotmc.org/javadocs/spigot/org/bukkit/entity/EntityType.html
Block/item types : https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Material.html
Potion/effects types : https://hub.spigotmc.org/javadocs/spigot/org/bukkit/potion/PotionEffectType.html
Particles : http://pyrrh4.be/doc/particles/
Sounds : http://pyrrh4.be/doc/sounds/


1. Commands and permissions


The only root command is /quests ; you can also use the aliases /quest, /questcreator and /qc

/quests

Open the quests GUI if you have permission questcreator.see, otherwise show help.


/quests help

Display the commands list


/quests see <player>

See the quests for a player (its GUI) ; however the sender won't be allowed to start the quests from the GUI
Permission questcreator.see.others


/quests list

List the available quests in the chat, with interactive texts to start or have more informations
Permission questcreator.list


/quests stats

See a quick list of what you've done from now


/quests start|begin <quest id>

Start a quest
Permission questcreator.start.command


/quests start|begin <quest id> <player>

Start a quest for a player
Permission questcreator.start.command.others


/quests invite <player>

Invite a player if you started a coop quest.


/quests cancel|stop

Stop an active quest (opens a GUI to select which one you want to cancel)
Permission questcreator.cancel


/quests cancel|stop <player>

Stop an active quest for a player (opens a GUI to select which one you want to cancel)
Permission questcreator.cancel.others


/quests cancelall|stopall

Stop all your active quests
Permission questcreator.cancelall


/quests cancelall|stopall <player>

Stop all the active quests for a player
Permission questcreator.cancelall.others


/quests reset

Reset the progression and all the previous completions of a quest (opens a GUI to select which one you want to reset)
Permission questcreator.reset


/quests reset <player>

Reset the progression and all the previous completions of a quest for a player (opens a GUI to select which one you want to reset)
Permission questcreator.reset.others


/quests resetall

Reset the progression and all the previous completions of all your quests
Permission questcreator.resetall


/quests resetall <player>

Reset the progression and all the previous completions of all the quests for a player
Permission questcreator.resetall.others


/quests setsign <quest id>

Assign a quest to a sign while looking at the sign block. When a player will interact with the sign, the quest will start.
Permission questcreator.sign.manipulate
- this permission also provides the right to break the sign


questcreator.see.available

Allows to see the available quests in the quests GUI


questcreator.see.progress

Allows to see the quests 'in progress' in the quests GUI


questcreator.see.completed

Allows to see the completed quests in the quests GUI


questcreator.start.gui

Allows to start a quest by clicking its item in the quests GUI


questcreator.sign.use

Allows to use the signs assigned to a quest and starting the quests by interacting it


2. Storage


As all of my plugins require PyrCore in order to be able to run properly, all the configuration files are stored in the PyrCore directory in the plugins folder : /plugins/PyrCore/

In that folder you can find the general configurations for all the plugins, including QuestCreator : questcreator_config.yml

Default file :
Code (Text):
#----------------------------------------------------------------------------------------------------
# Configuration file for QuestCreator
#----------------------------------------------------------------------------------------------------

# Locale

locale: questcreator_en_US.yml

#----------------------------------------------------------------------------------------------------
# Settings
#----------------------------------------------------------------------------------------------------

settings:

  # Save the current quests on plugin disable ?
  quests_save_on_disable: true
 
  # Data save interval
  data_save_interval: 180

  # Cancel quests after X inactivity minutes (set it to -1 to disable this option)
  cancel_delay: -1

  # Max active quests per player (experimental)
  # This could be confusing if this is > to 1, but it's your choice !
  max_active_quests_player: 1

  # Action bar settings
  action_bar_enable: true
  action_bar: '&a$QUEST &7| &a$OBJECTIVE &7| &a$PROGRESSION&7/&a$GOAL'
  action_bar_no_objective: '&a$QUEST'

  # Play sound when the rewards of a quest are given
  # The sounds names can change between the versions ! (default version used is 1.11)
  sound_rewards_enable: true
  sound_rewards: ENTITY_EXPERIENCE_ORB_PICKUP
 
  # Ephemerial quests (when the player quits the server, the quest is cancelled)
  ephemerial_quests: false

#----------------------------------------------------------------------------------------------------
# Variables
#----------------------------------------------------------------------------------------------------
# This is the variables that can affect the player's quests. You can use them in all the quests
#  for example for making multiple choices and dialogs that affect the current quest or even
#  other quests.
# Every variable can be assigned with everything on one line (numbers, strings, booleans or
#  whatever). Lists aren't allowed.
# The variables names AND values are both case sensivite.
# Please note that those variables are NOT global, which means every value associated to a variable
#  can be different for each player ! (example, if there is a variable called 'test', this variable
#  can be associated to value 1 for Notch and associated to value 2 for PYRRH4)
# Please note too that this section is useful only if you want default values. If you don't register
#  a variable here, it won't have a default value but you still we able to use it.
# The formatting is 'var {variable name} default {default value}'
#----------------------------------------------------------------------------------------------------

variables:
  - 'var example default yes'
  - 'var number default 10'

#----------------------------------------------------------------------------------------------------
# NPCs
#----------------------------------------------------------------------------------------------------

# Start quests in this order when clicking a NPC (if no active quests)

npcs_quests:
  '1':
    - example

#----------------------------------------------------------------------------------------------------
# GUI
#----------------------------------------------------------------------------------------------------

gui:

  # GUI name
  name: Available quests

  # Previous page item
  previous_page_item:
    type: 262
    name: '&7Previous page'

  # Next page item
  next_page_item:
    type: 262
    name: '&7Next page'
 
You can create all your quests in /plugins/PyrCore/questcreator_quests/
You can customize the plugin's texts (locale) in /plugins/PyrCore/locale/

The data (user data, current paused quests, sign/npc data etc) is stored at the server root in a folder named /pyrrh4/ ; do not delete it otherwise you're gonna lose all your current data, and it's better not to modify it, at least when the server is running.


3. Create a quest


The quests configuration system has been made much simplier in update 1.4.0. Let's take a look at it !

As said upper, all your quest configuration files will be in /plugins/PyrCore/questcreator_quests/.
Every file that you create in this folder, ending with .yml, will be considered as a quest (you can organize your quests into subfolders if you want). The name of the file, without extension (.yml), will be the quest id, it's better not to put non-alphanumerical characters in it, and definitely no spaces.

Good : my_quest_1.yml, the id will be my_quest_1
Not good : quest n°1.yml

Now we're going to see what parameters we can set and how you can create objectives and stuff like that, in this file. I'll start this tutorial by assuming you know how YAML works and that you master its formatting and indentation :rolleyes:


Example quest

This is the default quest generated when the plugin launches for the first time. Everything is detailed below, but this is so you can have an overview.

Code (Text):
#----------------------------------------------------------------------------------------------------
# Quest 'example' (file name without the extension is the quest identifier)
# Refer to the plugin's wiki to have more details about how creating a quest
#----------------------------------------------------------------------------------------------------

# --------------------------------------------------
# Quest settings
# --------------------------------------------------

settings:
  # name
  name: '&aExample'
  # description : can be either a single line or a list
  description: 'Just a sample quest'
  # enabled : if the quest is enabled or not
  enabled: false
  # auto_start : will the quest auto_start when the player connects
  auto_start: false
  # max_simultaneous_players : maximum players that can do this quest at the same time
  max_simultaneous_players: 1
  # max_coop_players : maximum additionnal players (don't count the guy that starts the quest) that can do the quest with him
  max_coop_players: 0
  # max_completions : maximum times the player can complete the quest
  max_completions: 1
  # cooldown : time (in minutes) the player will have to wait between completions (will be effective if max_completions is greater than 1)
  cooldown: 5
  # apply_cooldown_if_fail : if the player fails the quest (task QUEST_CANCEL), do we still apply the cooldown ?
  apply_cooldown_if_fail: true
  # show_actionbar : display the current objective name (you can customize its look in the questcreator_config.yml, settings.action_bar)
  show_actionbar: true
  # send_success_message : display the success/fail message when the player ends the quest
  send_success_message: true

# --------------------------------------------------
# GUI
# --------------------------------------------------

gui:
  # enabled : if the quest can be seen in the GUI /quests
  enabled: true
  # item_available : will be showed when the quest status is 'available'
  item_available:
    type: DIAMOND_SWORD
    name: '&a$NAME &a- AVAILABLE'
    lore:
      - '&7$DESCRIPTION'
      - '&7Right click to follow this quest'
  # item_progress : will be showed when the quest status is 'in progress'
  item_progress:
    type: DIAMOND_SWORD
    name: '&6$NAME &6- IN PROGRESS'
    lore:
      - '&7$DESCRIPTION'
      - '&7Objective : $OBJECTIVE'
  # item_cooldown : will be showed when the quest status is 'completed' and the player hasn't reached max_completions and the cooldown is not over
  item_cooldown:
    type: DIAMOND_SWORD
    name: '&7$NAME &7- COOLDOWN'
    lore:
      - '&7$DESCRIPTION'
      - '&7You have completed this quest $COMPLETIONS time$PLURAL.'
      - '&7$COOLDOWN remaining before you can start this quest again.'
  # item_completed : will be showed when the quest status is 'completed' and the player has reached max_completions
  item_completed:
    type: DIAMOND_SWORD
    name: '&7$NAME &7- COMPLETED'
    lore:
      - '&7$DESCRIPTION'
      - '&7You have completed this quest $COMPLETIONS time$PLURAL.'

# --------------------------------------------------
# Requirements
# The things that the player needs to start the quest
# Types : ITEM, MONEY, PERMISSION, PRECONDITION
# --------------------------------------------------

requirements:
  1:
    type: MONEY
    money: 100.5

# --------------------------------------------------
# Quest flow
# What's going to happen in this quest
# --------------------------------------------------

flow:

  # first objective, walk on 30 blocs
  1:
    task:
      type: PLAYER_CLEAR
  2:
    task:
      type: SEND_MESSAGE
      message: '&2[AI] &aHello, $PLAYER&a. I''m here to ensure that your motor skills are functionnals.'
  3:
    wait: 2
    task:
      type: SEND_MESSAGE
      message: '&2[AI] &aFirst of all, let''s check your ability to walk. Please, &6walk on 30 blocs&a.'
  4:
    name: 'walk on 30 blocs'
    objective:
      type: WALK
      distance: 30.0
  5:
    task:
      type: SEND_MESSAGE
      message: '&2[AI] &aGood job !'

  # then ask him if he wants to do the jump objective
  6:
    wait: 1
    task:
      type: CHOICE
      message: '&2[AI] &aDo you want to execute the jump test or are you too lazy ?'
      choices:
        1:
          - '&bOf course !'
          - 'var quest_example_jump set yes'
        2:
          - '&bNo, I don''t.'
          - 'var quest_example_jump set no'

  # if he accepted, let's start the jump objective
  71:
    preconditions: 'var quest_example_jump equals yes'
    task:
      type: SEND_MESSAGE
      message: '&2[AI] &aOk, let''s jump. I''ll ask you to &6jump 5 times&a.'
  72:
    preconditions: 'var quest_example_jump equals yes'
    name: 'jump 5 times'
    objective:
      type: JUMP
      jumps: 5
  73:
    preconditions: 'var quest_example_jump equals yes'
    task:
      type: SEND_MESSAGE
      message: '&2[AI] &aWonderful ! Now everything is in order. Well played, $PLAYER ! Here are some rewards.'

  # if he denied, fail the quest
  81:
    preconditions: 'var quest_example_jump different yes'
    task:
      type: SEND_MESSAGE
      message: '&2[AI] &aIt''s ok, I''m not even frustrated.'
  82:
    preconditions: 'var quest_example_jump different yes'
    task:
      type: SEND_MESSAGE
      message: '&2[AI] &aYou''ll have to do it one day !'
  83:
    preconditions: 'var quest_example_jump different yes'
    task:
      type: QUEST_CANCEL

# --------------------------------------------------
# Rewards
# When the player ends the quest (and only if he succeeds), he'll receive this
# Types : COMMAND, ITEM, MONEY, VARIABLE, XP
# --------------------------------------------------

rewards:
  1:
    type: MONEY
    money: 15
  2:
    type: XP
    xp: 100
  3:
    type: COMMAND
    command: 'say $PLAYER completed the example quest !'
  4:
    type: ITEM
    item:
      type: STONE
      amount: 64
  5:
    type: ITEM
    item:
      type: DIAMOND
      name: '&6This is an awesome diamond, yes ?'
 

The basics : variables


The plugin has an advanced variable system.
The variables can affect the player's quests in many ways. For example, you can use them in all the quests for making multiple choices and dialogs that affect the current quest or even other quests, or preventing player to do something, etc.

Some things to know about the variables :
  • Every variable can be assigned to anything that is on one line (numbers, strings, booleans or whatever). Lists aren't allowed.
  • The variables are NOT global, which means every value associated to a variable is different for each player. For example, if there is a variable called "test", this variable can be associated to value 1 for player Notch and associated to value 2 for player PYRRH4.
  • The variables names and values are both case sensivite.
  • If you want a variable to have a default value, you can set it in the configuration, in the "variables" list. If you don't register it in the configuration, you will still be able to use it, but it won't have a default value and it could create minor problems, so it's preferable to do it.


The basics : preconditions


A precondition is a condition needed to start a quest element (task or objective, see about that below), or needed to start the quest itself.

Variable precondition
It uses variables, either one from the plugin that you can assign differently for every player, either a value from PlaceholderAPI.

Code (Text):
requirements:
  4:
    type: PRECONDITION
    precondition: 'var [variable] [operation] [value]'
    error_message: '&cWhatever'
[variable] is the variable name, including the {} or %% if you use PlaceholderAPI
[value] is the value needed
[operation] is the operation that'll be checked

Available operations : EQUALS, DIFFERENT, ATLEAST, INFERIOR, PAPI_EQUALS, PAPI_DIFFERENT, PAPI_ATLEAST, PAPI_INFERIOR

ATLEAST and INFERIOR will only work if the value is a number
If the operation contains PAPI_ it'll use PlaceholderAPI values.

Completed quest precondition
quest_completed [quest id] [amount of completions needed]

MCMMO preconditions
mcmmo_xp [skill_name] [operation] [value]
(operations EQUALS, DIFFERENT, ATLEAST or INFERIOR)

mcmmo_level [skill_name] [operation] [value]
(operations EQUALS, DIFFERENT, ATLEAST or INFERIOR)

SkillAPI preconditions
skillapi_class [class_name]

skillapi_group [group_name]

skillapi_level [class_name] [operation] [value]
(operations EQUALS, DIFFERENT, ATLEAST or INFERIOR)

skillapi_points [class_name] [operation] [value]
(operations EQUALS, DIFFERENT, ATLEAST or INFERIOR)

skillapi_totalxp [class_name] [operation] [value]
(operations EQUALS, DIFFERENT, ATLEAST or INFERIOR)

Heroes preconditions
heroes_class [class_name] [type]
(types PRIMARY or SECONDARY)

heroes_skill [class_name] [type]
(types PRIMARY or SECONDARY)

Item precondition
item [operation] [type] [data] [amount]
(operations HAS or HASNOT)




The basics : quest settings


All the quest parameters and settings are located under the settings section.

name and description
Code (Text):
settings:
  name: '&aMy Quest'
  description: 'It's just a sample quest.'
IMO it's pretty self-explanatory. You can use color codes in both.
Note : description can also be a list with multiple lines.

enabled
Code (Text):
settings:
  enabled: true
The quest will be loaded in any case, but if this setting is set to false, it won't be possible to start it and it won't be displayed in any GUI.

auto_start
Code (Text):
settings:
  auto_start: true
The quest will/won't start automatically for any player.

max_simultaneous_players
Code (Text):
settings:
  max_simultaneous_players: 1
The amount of player that can do this same quest at the same time.

max_coop_players
Code (Text):
settings:
  max_coop_players: 0
The amount of additionnal players that can do the quest with the guy that started it. If you set it to 0, it'll be a normal solo quest. If you set it to 1, the player will need to invite at least one player to be able to start the quest. Etc.

max_completions
Code (Text):
settings:
  max_completions: 1
Maximum times the player can complete the quest.

cooldown
Code (Text):
settings:
  cooldown: 5
Time (in minutes) the player will have to wait after ending the quest to start it again.
Note : it'll only work if max_completions is greater than 1.

apply_cooldown_if_fail
Code (Text):
settings:
  apply_cooldown_if_fail: true
Apply or not the cooldown even if the player fails the quest.

show_actionbar
Code (Text):
settings:
  show_actionbar: true
Show the actionbar for this quest or not.

send_success_message
Code (Text):
settings:
  send_success_message: true
Send the success/fail message when the player ends the quest or not.


About the coop system


If you create coop quests (so if max_coop_players is greater than 0), please take a look at those details :
  • Every variable change/node in the quest will refer to the variable values of the player that started the quest.
  • The choices will be sent to the player that started the quest.
  • Some tasks will be executed for all players (sending a message, playing a sound, teleporting player, etc) and others will only be executing one time (teleporting an entity, placing a block, etc).

GUI settings


All the GUI-related settings for the quest are located under the gui section.

enable
Code (Text):
gui:
  enabled: true
Display or not the quest in the player's GUI.
Note : if this is set to false, you don't need to add the item_[...] settings.

item_available
Code (Text):
gui:
  item_available:
    type: DIAMOND_SWORD
    name: '&a$NAME &a- AVAILABLE'
    lore:
      - '&7$DESCRIPTION'
      - '&7Right click to follow this quest'
Will be showed when the player hasn't started the quest.
You can even add amount (number) or enchants (list of enchants/levels, example DAMAGE_ALL,1).

item_progress
Code (Text):
gui:
  item_progress:
    type: DIAMOND_SWORD
    name: '&6$NAME &6- IN PROGRESS'
    lore:
      - '&7$DESCRIPTION'
      - '&7Objective : $OBJECTIVE'
Will be showed when the player has started and not finished the quest yet.
You can even add amount (number) or enchants (list of enchants/levels, example DAMAGE_ALL,1).

item_completed
Code (Text):
gui:
  item_progress:
    type: DIAMOND_SWORD
    name: '&6$NAME &6- IN PROGRESS'
    lore:
      - '&7$DESCRIPTION'
      - '&7Objective : $OBJECTIVE'
Will be showed when the player has finished the quest, and either has reached max_completions or not finished the cooldown yet.
You can even add amount (number) or enchants (list of enchants/levels, example DAMAGE_ALL,1).


Requirements


A requirement is something that the player needs to be able to start the quest.
All requirements for the quest are located under the requirements section.
A requirement is considered as a configuration section with its own settings.

Code (Text):
requirements:
  1:
    # settings
  2:
    # settings
  # etc

Item requirement
Code (Text):
requirements:
  1:
    type: ITEM
    item:
      type: STONE
      amount: 32
    error_message: '&cYou need 32 stones to start this quest.'
You can even add to the item name (text) or data (number).

Money requirement
Code (Text):
requirements:
  2:
    type: MONEY
    money: 500.5

Permission requirement
Code (Text):
requirements:
  3:
    type: PERMISSION
    permission: permission.node


Precondition requirement

Code (Text):
requirements:
  4:
    type: PRECONDITION
    precondition: 'var [variable] [operation] [value]'
    error_message: '&cWhatever'

Rewards


A reward is something that will be given to the player when he finished the quest (won't be given if he fails it).
All rewards for the quest are located under the rewards section.
A reward is considered as a configuration section with its own settings.

Code (Text):
rewards:
  1:
    # settings
  2:
    # settings
  # etc

Reward command
Code (Text):
rewards:
  1:
    type: COMMAND
    command: 'say $PLAYER succeed !'

Reward item
Code (Text):
rewards:
  2:
    type: ITEM
    item:
      type: STONE
      amount: 64
You can even add to the item name (text), data (number), lore (list) or enchants (list of enchants/levels, example DAMAGE_ALL,1).

Reward money
Code (Text):
rewards:
  3:
    type: MONEY
    money: 100.5

Reward variable
This is similar to the preconditions but only uses QuestCreator's variables (for the player).

Code (Text):
rewards:
  4:
    type: VARIABLE
    action: 'var [variable] [operation] [value]'
[variable] is the variable name
[value] is the value
[operation] is the operation that'll be applied to the variable

Available operations : SET, INCREMENT
INCREMENT will only work if the value is a number and if the current variable value is also a number

Reward XP
Code (Text):
rewards:
  5:
    type: XP
    xp: 100
It'll give minecraft experience.

Task
Code (Text):
rewards:
  6:
    type: TASK
    task:
      type: SEND_MESSAGE
      message: '&aThis is a task, ran as a reward !'

Quest flow


It's the most important part of the configuration : what will happen in this quest ?
Every element that happen in the quest is located under the flow section.
An element is considered as a configuration section with its own settings.

Code (Text):
flow:
  1:
    # settings
  2:
    # settings
  # etc

There are two element types :
  • task, elements that will execute actions (send a message, place a block, teleport an NPC, drop an item, etc). The player has no influence on those.
  • objective, elements that the player will have to do (walk on X blocs, kill a mob, break a block, enchant an item, throw a potion, sneak, enter a vehicle, etc)


Quest flow : settings


Every element can have "universal" settings regardless of his type.

wait

Code (Text):
flow:
  1:
    wait: 1
The time in seconds that the plugin will wait until it executes the task / allows the player to complete the objective. This setting is optional.

preconditions
Code (Text):
flow:
  1:
    preconditions: 'var [variable] [operation] [value]'
If the preconditions are not completed, the element task/objective will be skipped.
For details about [variable], [operation] and [value], see Requirement precondition upper.
This is optional.

name
Code (Text):
flow:
  1:
    name: '&aDisplay name of this thing'
Required if it's an objective and optional if it's a task.

forbidden
Code (Text):
flow:
  1:
    forbidden:
      - PICKUP_ITEM
      - DROP_ITEM
While the task is executing / while the player completes the objective, he will be disallowed to do those actions.
Complete list of forbidden actions types :
Code (Text):

MOVE
ITEM_PICKUP
ITEM_DROP
ITEM_ENCHANT
ITEM_CONSUME
BLOCK_PLACE
BLOCK_BREAK
ENTITY_TAME
ENTITY_MOUNT
ENTITY_SHEAR
COMMAND
CHAT
INTERACT
BED_ENTER
FISH
VEHICLE_ENTER
VEHICLE_EXIT
 
This is optional.

drop_item
Code (Text):
flow:
  1:
    drop_item:
      item:
        type: STONE
        amount: 16
      location: world,0,0,0
It's an item that will be dropped when the task is over / when the player has completed the objective.
You can even add to the item name (text), data (number), lore (list) or enchants (list of enchants/levels, example DAMAGE_ALL,1).
This is optional.

custom_actionbar
Code (Text):
flow:
  1:
    custom_actionbar: '&a$QUEST | &a$OBJECTIVE'
This actionbar will be used instead of the general one.
This is optional.


Quest flow : tasks


The task settings are located in the element configuration section, after all the upper settings.

Code (Text):
flow:
  1:
    task:
      # settings

Task types and settings are listed below.

Code (Text):
# change a block somewhere
task:
  type: BLOCK_PLACE
  block_type: STONE
  block_data: 0
  location: world,0,0,0

# change the player's tab
task:
  type:
  tab:
    header: '&aTab header'
    footer: '&aTab footer'

# send a choice to the player
task:
  type: CHOICE
  message: '&aChoose something'
  choices:
    # for every choice you can specify first the appearance of the choice then the consequences it has (variables operationns)
    1:
      - '&bChoice 1'
      - 'var [variable] [operation] [value]'
    2:
      - '&bChoice 2'
      - 'var [variable] [operation] [value]'

# execute the command as the player
task:
  type: COMMAND_AS
  command: 'me Hello'

# execute a command for the player
task:
  type: COMMAND_FOR
  command: 'give $PLAYER stone 64'

# delete entities around somewhere
task:
  type: ENTITY_DELETE
  location: world,0,0,0
  radius: 5.5
  # optional : entity type
  entity_type: PIG

# spawn an entity somewhere
task:
  type: ENTITY_SPAWN
  location: world,0,0,0
  entity_type: PIG
  # optional : entity name
  entity_name: '&aCustom piggy'

# teleport a named entity somewhere
task:
  type: ENTITY_TELEPORT
  entity_name: '&aCustom piggy'
  location: world,0,0,0

# create an explosion somewhere
task:
  type: EXPLOSION_CREATE
  location: world,0,0,0
  power: 0.3

# change XP in a Heroes class
task:
  type: HEROES_XP
  class: class_name
  amount: 10.0
  operation: ADD, SET or TAKE

# drop an item somewhere
task:
  type: ITEM_DROP
  location: world,0,0,0
  item:
    type: STONE
    name: '&6Awesome stone, yes ?'

# give an item to the player
task:
  type: ITEM_GIVE
  item:
    type: STONE
    name: '&dAnother awesome stone o/'

# remove an item from the player
task:
  type: ITEM_REMOVE
  item:
    type: STONE
    amount: 32

# change XP in a MCMMO skill
type: MCMMO_XP
task:
  skill: skill_name
  operation: ADD_RAW, ADD_MULTIPLIED, ADD_MODIFIED, SET or TAKE
  amount: 1.0

# change levels in a MCMMO skill
task:
  type: MCMMO_LEVEL
  skill: skill_name
  operation: ADD, SET or TAKE
  amount: 1

# spawn a MythicMobs spawn
task:
  type: MYTHICMOBS_SPAWN
  mob_name: your_mythicmob_name
  amount: 5
  location: world,0,0,0

# make a NPC disappear
task:
  type: NPC_HIDE
  id: 0

# reveal a NPC
task:
  type: NPC_SHOW
  id: 0

# move a NPC
task:
  type: NPC_MOVE
  id: 0
  location: world,0,0,0

# move a NPC and wait for him to be at the location to start the next element
task:
  type: NPC_MOVE_WAIT
  id: 0
  location: world,0,0,0

# teleport a NPC
task:
  type: NPC_TELEPORT
  id: 0
  location: world,0,0,0

# spawn a particle somewhere
task:
  type: PARTICLE_SPAWN
  particle_type: REDSTONE
  amount: 10
  speed: 1.5
  location: world,0,0,0

# clear the player
task:
  type: PLAYER_CLEAR

# damage the player
task:
  type: PLAYER_DAMAGE
  damage: 1.5

# teleport the player
task:
  type: PLAYER_TELEPORT
  location: world,0,0,0

# cancel the quest (fails it)
task:
  type: QUEST_CANCEL

# send an actionbar to the player
task:
  type: SEND_ACTIONBAR
  bar: '&dThis is an actionbar, yes ?'

# send a message to the player
task:
  type: SEND_MESSAGE
  # message (can also be a list)
  message: '&aMessage'

# send a message and a sound to the player in the same task
task:
  type: SEND_MESSAGE:CHEST_OPEN
  # message (can also be a list)
  message: '&aMessage'

# send a title to the player
task:
  type: SEND_TITLE
  title:
    title: '&aTitle o/'
    subtitle: '&dSubtitle \o'

# play a sound to the player
task:
  type: SOUND_PLAY
  sound: AMBIENCE_CAVE

# change level in a SkillAPI class
task:
  type: SKILLAPI_LEVEL
  class: class_name
  amount: 1
  operation: ADD, SET or TAKE

# change points in a SkillAPI class
task:
  type: SKILLAPI_POINTS
  class: class_name
  amount: 1
  operation: ADD, SET or TAKE

# change XP in a SkillAPI class
task:
  type: SKILLAPI_XP
  class: class_name
  amount: 1
  operation: ADD, SET or TAKE

# profess a SkillAPI class
task:
  type: SKILLAPI_PROFESS
  class: class_name

# assign a variable to a value
task:
  type: VARIABLE_CHANGE
  # action : same things as the preconditions but the operations are SET or INCREMENT
  action: 'var [variable] [operation] [value]'
 


Quest flow : objectives


The objective settings are located in the element configuration section, after all the upper settings.

Code (Text):
flow:
  1:
    objective:
      # settings

Objective types and settings are listed below.

Code (Text):
# the player must enter a bed
objective:
  type: BED_ENTER
  # location (optional)
  location: world,0,0,0

# the player must leave a bed
objective:
  type: BED_LEAVE
  # location (optional)
  location: world,0,0,0

# the player must break blocks
objective:
  type: BLOCK_BREAK
  amount: 10
  # optional : block type and data
  block_type: STONE
  block_data: 0

# the player must break a block at a location
objective:
  type: BLOCK_BREAK_AT
  location: world,0,0,0

# the player must break blocks in an area
objective:
  type: BLOCK_BREAK_ZONE
  point_1: world,0,0,0
  point_2: world,10,10,10
  amount: 100
  # optional : block type and data
  block_type: STONE
  block_data: 0

# the player must click a block at a location
objective:
  type: BLOCK_CLICK
  location: world,0,0,0

# the player must set blocks on fire
objective:
  type: BLOCK_FIRE
  amount: 10
  # optional : block type and data
  block_type: WOOD
  block_data: 0

# the player must set a block on fire at a location
objective:
  type: BLOCK_FIRE_AT
  location: world,0,0,0

# the player must place blocks
objective:
  type: BLOCK_PLACE
  amount: 10
  # optional : block type and data
  block_type: COBBLESTONE
  block_data: 0

# the player must place a block at a location
objective:
  type: BLOCK_PLACE_AT
  location: world,0,0,0
  # optional : block type and data
  block_type: COBBLESTONE
  block_data: 0

# the player must place blocks in a zone
objective:
  type: BLOCK_PLACE_ZONE
  point_1: world,0,0,0
  point_2: world,10,10,10
  amount: 100
  # optional : block type and data
  block_type: STONE
  block_data: 0

# the player must say something in the chat
objective:
  type: CHAT
  message: 'This server is amazing.'

# the player must execute a command
objective:
  type: COMMAND
  command: 'spawn'

# the player must land with an elytra
objective:
  type: ELYTRA_LAND
  # optional : location
  location: world,0,0,0

# the player must click a button
objective:
  type: ENABLE_BUTTON
  # optional : location
  location: world,0,0,0

# the player must walk on a pressure plate
objective:
  type: ENABLE_PRESSURE_PLATE
  # optional : location
  location: world,0,0,0

# the player must fill a bucket
objective:
  type: FILL_BUCKET
  # optional : bucket type (WATER, LAVA, MILK)
  bucket_type: WATER

# the player must fish some fishes \o/
objective:
  type: FISH
  amount: 3

# the player must frost some water blocks with frost walker boots
objective:
  type: FROST_WALKER
  amount: 16

# the player must jump with a horse
objective:
  type: HORSE_JUMP
  amount: 10

# the player must consume items
objective:
  type: ITEM_CONSUME
  item:
    type: CAKE
    amount: 10

# the player must craft items
objective:
  type: ITEM_CRAFT
  item:
    type: DIAMOND_SWORD
    amount: 1

# the player must drop an item
objective:
  type: ITEM_DROP
  item:
    type: DIRT
    amount: 64

# the player must enchant items
objective:
  type: ITEM_ENCHANT
  item:
    type: DIAMOND_PICKAXE
    data: 0
  enchant_type: DIG_SPEED
  echant_min_level: 1

# the player must pickup items
objective:
  type: ITEM_PICKUP
  item:
    type: STONE
    data: 0

# the player must jump
objective:
  type: JUMP
  amount: 10

# the player must toggle a lever
objective:
  type: LEVER_TOGGLE
  # optional : location
  location: world,0,0,0

# the player must gain some XP in a MCMMO skill
objective:
  type: MCMMO_XP
  skill: skill_name
  amount: 100

# the player must dismount a mob
objective:
  type: MOB_DISMOUNT
  # optional : mob type
  mob_type: PIG

# the player must dismount a named mob
objective:
  type: MOB_DISMOUNT_NAMED
  mob_name: '&dCustom mob'

# the player must kill mobs
objective:
  type: MOB_KILL
  amount: 5
  # optional : mob_type
  mob_type: ZOMBIE

# the player must kill a named mob
objective:
  type: MOB_KILL_NAMED
  mob_name: '&dCustom mob'

# the player must mount a mob
objective:
  type: MOB_MOUNT
  # optional : mob type
  mob_type: PIG

# the player must mount a named mob
objective:
  type: MOB_MOUNT_NAMED
  mob_name: '&dCustom mob'

# the player must shear mobs
objective:
  type: MOB_SHEAR
  amount: 10

# the player must shear named mobs
objective:
  type: MOB_SHEAR_NAMED
  amount: 10
  mob_name: '&dCustom mob'

# the player must tame mobs
objective:
  type: MOB_TAME
  amount: 3
  # optional : mob type
  mob_type: WOLF

# the player must tame named mobs
objective:
  type: MOB_TAME_NAMED
  amount: 3
  mob_name: '&dCustom mob'

# the player must kill a MythicMobs mob
objective:
  type: MYTHICMOBS_KILL
  mob_name: your_mythicmob_name
  amount: 5

# the player must interact with a npc
objective:
  type: NPC_INTERACT
  id: 0

# the player must interact with a npc with some items
objective:
  type: NPC_INTERACT_ITEM
  id: 0
  items:
    1:
      type: STONE
      amount: 128

# the player must interact with a npc with an item in his hand
objective:
  type: NPC_INTERACT_ITEM_HAND
  id: 0
  item:
    type: STONE
    data: 0

# the player must kill a NPC
objective:
  type: NPC_KILL
  id: 0

# the player must enter a portal
objective:
  type: PORTAL_ENTER

# the player must exit a portal
objective:
  type: PORTAL_EXIT

# the player must throw potions
objective:
  type: POTION_THROW
  amount: 5
  # optional : location and potion type
  location: world,0,0,0
  potion_type: BLINDNESS

# the player must shoot a projectile
objective:
  type: PROJECTILE_SHOOT
  # optional : location and projectile type (ARROW, EGG, SNOWBALL)
  location: world,0,0,0
  projectile_type: SNOWBALL

# the player must have a precondition
objective:
  type: PRECONDITION
  precondition: 'var [variable] [operation] [value]'

# the player must open a recipient
objective:
  type: RECIPIENT_OPEN
  # optional : location
  location: world,0,0,0

# the player must regain health
objective:
  type: REGAIN_HEALTH
  # end : the health that the player must have
  end: 20.0

# the player must gain xp in a SkillAPI class
objective:
  type: SKILLAPI_XP
  class: class_name
  amount: 100

# the player must sneak for a specific time
objective:
  type: SNEAK
  seconds: 5

# the player must toggle sneak
objective:
  type: SNEAK_TOGGLE
  amount: 10

# the player must enter a vehicle
objective:
  type: VEHICLE_ENTER
  # optional : vehicle type (BOAT, MINECART)
  vehicle_type: BOAT

# the player must exit a vehicle
objective:
  type: VEHICLE_EXIT
  # optional : vehicle type (BOAT, MINECART)
  vehicle_type: BOAT

# the player must walk for a specific distance
objective:
  type: WALK
  distance: 30.5

# the player must walk away from a location
objective:
  type: WALK_AWAY_FROM
  location: world,0,0,0
  distance: 10.0

# the player must walk to a location
objective:
  type: WALK_TO
  location: world,0,0,0
  # tolerance : the tolerance
  tolerance: 3.0

# the player must gain XP
objective:
  type: XP
  amount: 10

# the player must throw XP bottles
objective:
  type: XP_BOTTLE
  amount: 10
  # optional : location
  location: world,0,0,0