1.x/List of Initial node types

From Citizens Wiki
< 1.x
Jump to: navigation, search
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 Initial node types. If you feel this message was displayed in error, please contact an administrator.

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'