1.x/List of Initial node types: Difference between revisions
< 1.x
Aufdemrand (talk | contribs) (Created page with "=Initials node= The initials node is used in Quests.yml to perform actions when the quest starts. Initials are laid out much like rewards. Here's an example: <pre>initial...") |
Aufdemrand (talk | contribs) No edit summary |
||
Line 1: | Line 1: | ||
= | =Initial node= | ||
The initials node is used in [[Quests.yml]] to perform actions when the quest starts. | The initials node is used in [[Quests.yml]] to perform actions when the quest starts. |
Revision as of 03:24, 31 January 2012
Initial node
The initials node is used in Quests.yml to perform actions when the quest starts.
Initials are laid out much like rewards. Here's an example:
initial: '0': type: item # Gives an item when conditions are met. id: 268 # wooden_sword amount: 1 take: false # Optional. By default, take: is false.
You may have multiple initials.
Initial Types
Command
Command node (command:) - executes a command. Specified by the command: node. Use <player> as a variable that will be replaced with the name of the player. 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: true
NPC
NPC node (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 started 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 node (rank) - grants a group ('rank') to a player. Specified by the rank: node.
'0': type: rank rank: 'admin'
Permission
Permission node (permission) - grants a permission to a player. Specified by the permission: node.
'0': type: permission permission: 'quests.admin'
Item
Item node (item) - gives an item to a player. Loaded from the item: nodes.
'0': type: item item: id: 10 amount: 50 data: 0
Health
Health node (health) - gives health to a player. Loaded from the amount: node.
'0': type: health amount: 10
Money
Money node (money) - gives money to a player. Loaded from the money: node.
'0': type: money money: 100
Teleport
Teleport node (teleport) - teleports a player to a location. Loaded from the location: node.
'0': type: teleport location: x: 10 y: 50 z: -10 world: 'rivers'