1.x/List of Rewards node types: Difference between revisions
< 1.x
Aufdemrand (talk | contribs) (Created page with "The rewards: node is used in Quests.yml for rewarding the player when certain conditions have been met. ''Format:''' Name (''type specifier'') - '''description''' These can...") |
m (moved List of Rewards node types to 1.x/List of Rewards node types) |
||
(5 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
The rewards | {{NoSupport}} | ||
=Rewards node= | |||
The rewards node is used in [[Quests.yml]] to tell the quester what to reward the player with when conditions are met. If all the objectives are completed, the rewards: node is triggered. | |||
For example: | |||
<pre>rewards: | |||
'0': | |||
type: item # Rewards an item | |||
id: 15 # iron_ore | |||
amount: 30 | |||
'1': | |||
type: quest # Rewards a quest. This quest will start immediately. | |||
quest: "Part II" | |||
</pre> | |||
Command reward (command) - executes a command. | You may have multiple rewards, or just one. Rewards can also be subset into objectives to reward the player as objectives are completed. The format is the same. | ||
=Rewards Types= | |||
==Command== | |||
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. Use <world> as a variable that will be replaced with the name of the world the player is currently in. Use server: true to execute the command from the console. | 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. Use <world> as a variable that will be replaced with the name of the world the player is currently in. Use server: true to execute the command from the console. | ||
NPC reward (npc) - grants an npc to a player. | <pre>'0': | ||
type: command | |||
command: give <player> 1 100 | |||
server: false | |||
</pre> | |||
==NPC== | |||
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. | 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. | ||
<pre>'0': | |||
type: npc | |||
npcid: 1 # optional - gives the ownership of npc specified by this id to the player | |||
name: 'Bill' | |||
types: 'guard,trader,quester' | |||
location: | |||
x: 10 | |||
y: 10 | |||
z: -50 | |||
world: 'world'</pre> | |||
==Rank== | |||
Rank reward (rank) - grants a group ('rank') to a player. | Rank reward (rank) - grants a group ('rank') to a player. | ||
Specified by the rank: node. | Specified by the rank: node. | ||
<pre>'0': | |||
type: rank | |||
rank: 'admin'</pre> | |||
==Permission== | |||
Permission reward (permission) - grants a permission to a player. | Permission reward (permission) - grants a permission to a player. | ||
Specified by the permission: node. | Specified by the permission: node. | ||
<pre>'0': | |||
type: permission | |||
permission: 'quests.admin' | |||
</pre> | |||
==Quest== | |||
Quest reward (quest) - grants a quest to a player. Note that it cannot be taken away from a player. | Quest reward (quest) - grants a quest to a player. Note that it cannot be taken away from a player. | ||
Specified by the quest: node. | Specified by the quest: node. | ||
<pre>'0': | |||
type: quest | |||
quest: 'builder'</pre> | |||
''Note by aufdemrand: Need to test behavior of using the quest reward in a sub-objective reward. Will report what I find soon.'' | |||
==Item== | |||
Item reward (item) - gives an item to a player. | Item reward (item) - gives an item to a player. | ||
Loaded from the item: nodes. | Loaded from the item: nodes. | ||
<pre>'0': | |||
type: item | |||
item: | |||
id: 10 | |||
amount: 50 | |||
data: 0</pre> | |||
==Health== | |||
Health reward (health) - gives health to a player. | Health reward (health) - gives health to a player. | ||
Loaded from the amount: node. | Loaded from the amount: node. | ||
<pre> | |||
'0': | |||
type: health | |||
amount: 10 | |||
</pre> | |||
==Money== | |||
Money reward (money) - gives money to a player. | Money reward (money) - gives money to a player. | ||
Loaded from the money: node. | Loaded from the money: node. | ||
<pre>'0': | |||
type: money | |||
money: 100</pre> | |||
==Teleport== | |||
Teleport reward (teleport) - teleports a player to a location. | Teleport reward (teleport) - teleports a player to a location. | ||
Loaded from the location: node. | Loaded from the location: node. | ||
<pre>'0': | |||
type: teleport | |||
location: | |||
x: 10 | |||
y: 50 | |||
z: -10 | |||
world: 'main'</pre> | |||
{{NavBox}} | |||
[[Category:Citizens1]] |
Latest revision as of 12:27, 19 February 2012
Not Supported! |
---|
This page is about Citizens 1.x, while the current version is Citizens 2.0.2. This page's content may be outdated, and shouldn't be trusted as being correct. See this page's talk page for more information. If you were looking for the 2.0.2 equivalent of this page, try List of Rewards node types. If you feel this message was displayed in error, please contact an administrator. |
Rewards node
The rewards node is used in Quests.yml to tell the quester what to reward the player with when conditions are met. If all the objectives are completed, the rewards: node is triggered.
For example:
rewards: '0': type: item # Rewards an item id: 15 # iron_ore amount: 30 '1': type: quest # Rewards a quest. This quest will start immediately. quest: "Part II"
You may have multiple rewards, or just one. Rewards can also be subset into objectives to reward the player as objectives are completed. The format is the same.
Rewards Types
Command
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. Use <world> as a variable that will be replaced with the name of the world the player is currently in. Use server: true to execute the command from the console.
'0': type: command command: give <player> 1 100 server: false
NPC
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.
'0': type: npc npcid: 1 # optional - gives the ownership of npc specified by this id to the player name: 'Bill' types: 'guard,trader,quester' location: x: 10 y: 10 z: -50 world: 'world'
Rank
Rank reward (rank) - grants a group ('rank') to a player. Specified by the rank: node.
'0': type: rank rank: 'admin'
Permission
Permission reward (permission) - grants a permission to a player. Specified by the permission: node.
'0': type: permission permission: 'quests.admin'
Quest
Quest reward (quest) - grants a quest to a player. Note that it cannot be taken away from a player. Specified by the quest: node.
'0': type: quest quest: 'builder'
Note by aufdemrand: Need to test behavior of using the quest reward in a sub-objective reward. Will report what I find soon.
Item
Item reward (item) - gives an item to a player. Loaded from the item: nodes.
'0': type: item item: id: 10 amount: 50 data: 0
Health
Health reward (health) - gives health to a player. Loaded from the amount: node.
'0': type: health amount: 10
Money
Money reward (money) - gives money to a player. Loaded from the money: node.
'0': type: money money: 100
Teleport
Teleport reward (teleport) - teleports a player to a location. Loaded from the location: node.
'0': type: teleport location: x: 10 y: 50 z: -10 world: 'main'
Quick Navigation | |
---|---|
Usage | Installation · Frequently Asked Questions · Commands · Editors · Characters · API · |
Configuration | Configuration · Text Syntax · Permissions · Waypoints · Data Storage |