1.x/Quester
< 1.x
Questers allow players to go on many different types of quests. They can collect or place blocks, attack mobs, travel a certain distance, and more! Quests are fully customizable in the quests.yml file. You can assign these quests to a quester and send your players on fun quests. See below for information on setting up a quester and customizing your quests.
Commands
[] - Mandatory
() - Optional
Command - command's syntax
Args Description - description of the command's arguments
Require Selected - whether the command requires an NPC to be selected
Require Ownership - whether the commands requires you to be the owner of the NPC
Permission - command's permission node
Description - short description of the command
Command | Args Description | Require Selected | Require Ownership | Permission | Description |
---|---|---|---|---|---|
/quester help | None | false | false | citizens.quester.use.help | View the help page for questers |
/quester assign [quest] | quest - name of quest to assign to a quester | true | true | citizens.quester.modify.quests.assign | Assign a quest to a quester |
/quester remove [quest] | quest - quest to remove from a quester | true | true | citizens.quester.modify.quests.remove | Remove a quest from a quester |
/quester quests (page) | page - page number | true | true | citizens.quester.use.quests.view | View a quester's quests |
/quest help | None | false | false | citizens.quester.use.quests.help | View the help page for quests |
/quest abort | None | true | true | citizens.quester.use.quests.abort | Abort the current quest |
/quest completed (page) | page - page number | false | false | citizens.quester.use.quests.status | View completed quests |
/quest status | None | false | false | citizens.quester.use.quests.status | View the status of the current quest |
Usage
To accept a quest, go to a quester NPC. Via left clicking, you can scroll through the descriptions of each possible quest that the quester has assigned to it and that you can accept. Right click to accept the quest.
Only one quest can be accepted at any time - use /quest abort to abandon the current quest.
The status of the current quest can be viewed at any time via /quest status. On completion of the quest, return to the original quester NPC and right click them to finish the quest.
Quest Configuration
Basics
Quests are defined in the quests.yml file located in plugins/Citizens. Each root node in that file is a quest name - below, the two example quest names in quest.yml are 'example' and 'example2'. This is what you will use ingame to identify each quest.
Inside this, there are text nodes - pretty self-explanatory. Note that you can use
to denote a line break.
The repeats option allows you to set a limit for the number of times you can repeat the quest. -1 denotes an unlimited repeat count. Set it to 1 for once-off quests.
Objectives
Thus far, objectives have a set structure - a number of different 'steps' and a number of objectives within each step. This allows for more free-form quest design. Note that each step should be marked by an ascending number with single quotes around it. Each objective within a step is incremented concurrently.
The message variable is sent to the player on completion of each objective. Using the variable optional: true from Citizens 1.1.1 onwards will make an objective optional to completing each quest step. Be warned: if there's only one objective in the step, the step will be instantly completed. Using the variable finishhere: true from Citizens 1.1.1 onwards will make the quest be completed instantly as soon as the objective is completed (no need to return to the npc). Can be used in conjunction with optional objectives for interesting possibilities.
Objective Types
To aid with generic objective design, each objective can use one of a common set of variables:
- amount
- string
- materialid
- location
- item
- npcdestination (destination NPC ID)
Each objective type may use one or more of these variables - a reference is provided below.
- Specifying item and locations - Item nodes have three sub-nodes, two that must be included and one optional. The id sub-node designates the item/block ID. The amount sub-node specifies the item amount. The optional data sub-node specifies the item data value to be used.
Location nodes have 4 required sub-nodes, two optional. The world node specifies the world name of the location. The x, y, and z nodes specifies the x, y, and z values. The optional pitch/yaw nodes specify the rotation (think aeroplanes) of the location.
Quest Types
Build quest (build) - place a certain number of blocks Uses: materialid - the block ID to place. amount - the amount that must be placed.
Location quest (move location)- be within a certain range of a location. Uses: location - the base location to move to. amount - the amount in blocks that the player can be away from the location before finishing.
Hunt quest (hunt) - kill a certain number of monsters. Uses:
- amount - the number of monsters to kill.
- string - which monsters should be killed. Using '-' as the first character makes a whitelist. '*' represents all.
Distance quest (move distance)- walk a certain number of blocks. Uses:
- amount - the amount of blocks to walk.
Block destroy quest (destroy block) - break a certain amount of blocks. Uses:
- amount - the amount of blocks to break.
- materialid - the block ID to break.
Delivery quest (delivery)- deliver an item to an npc. Uses:
- npcdestination - the NPC ID to deliver to.
- materialid - the material that must be in hand.
- amount - the amount of the material that must be in hand.
Combat quest (player combat) - kill a certain number of players. Uses:
- amount - the amount of players to kill.
- string - which players should be killed. Using '-' as the first character makes a whitelist. '*' represents all. g:group represents groups.
Collect quest (collect) - pick up a certain number of items. Uses:
- amount - the number of items to pick up.
- materialid - the ID to pick up.
Rewards
Format: Name (type specifier) - description
These can be used as both rewards and requirements to start a quest. As rewards, they can be either give rewards, or take rewards. As requirements, they can only be used to take from a player. Rewards can also be specified under each objective, and also for each step, using the same syntax.
Command reward (command) - executes a command. Specified by the command: node. Use <player> as a variable that will be replaced with the name of the player who is receiving the reward.
NPC reward (npc) - grants an npc to a player. Uses a name: node to specify the name of the npc, and a comma-separated list of toggles in the types: node (eg. trader,quester,guard). Will create an NPC owned by the player who completed the quest, with a generated UID.
Rank reward (rank) - grants a group ('rank') to a player. Specified by the rank: node.
Permission reward (permission) - grants a permission to a player. Specified by the permission: node.
Quest reward (quest) - grants a quest to a player. Note that it cannot be taken away from a player. Specified by the quest: node.
Item reward (item) - gives an item to a player. Loaded from the item: nodes.
Health reward (health) - gives health to a player. Loaded from the amount: node.
Money reward (money) - gives money to a player. Loaded from the money: node.