Quests

Game Quests gives players alternative tasks to do, allow them to earn rewards as well as drives them across the world

- run drustcraft.quest.load

- run drustcraft.quest.save

- run drustcraft.quest.remove def:<quest-id>

- run drustcraft.quest.owner def:<quest-id>|<player>

- run drustcraft.quest.update_markers def:[force]

Creating and Removing Quests

Create

Command
Scripting
Command

/quest create <title>

Creates a new quest with a given title. This command will then return the Quest ID which is used for any subsequent quest commands.

Scripting

- ~run drustcraft.quest.create def:<title>

Creates a new quest with a given title. This command will then return the Quest ID which is used for any subsequent quest tasks.

Determinations

  • <id> - The created quest ID (the determination should be an integer > 0)

  • err_title_missing - No title was passed to the task

Remove

Command
Scripting
Command

/quest remove <id>

Removes a quest

Scripting

- run drustcraft.quest.remove def:<id>

Removes a quest

Determinations

  • err_id_missing - No quest id was passed to the task

  • err_id_doesnt_exist - Quest id doesnt exist

Update

Command
Scripting
Command

/kit update <id> [player] /kit replace <id> [player] /kit clear <id> /kit give <id> <item> [-q amount] /kit take <id> <item> [-q amount]

Updates a kit's items

  • update will append your inventory (or the inventory or [player]) contents to the current kits contents

  • replace will replace the kits contents with what is in your inventory (or the inventory or [player]).

  • clear will clear the kits contents

  • give will add <item> to the kits contents

  • take will take <item> from the kits contents

  • -q amount sets the amount of an item to give or take from the kit

/kit update and /kit replace require a player to be specified when run from the server console.

Scripting

Update

- run drustcraft.kit.update def:<id>|<items>

Appends the list of <items> to the contents of kit <id>

Determinations

  • err_not_permitted - Player does not have permission for this command

  • err_id_missing - No kit id was passed to the task

  • err_id_doesnt_exist - Kit id doesnt exist

  • err_no_item_list - Command can only be run by a player

Replace

- run drustcraft.kit.replace def:<id>|[items]

Replaces the kit <id> items with the list of items in [items] . If [items] is empty, the kit's items are cleared.

Determinations

  • err_not_permitted - Player does not have permission for this command

  • err_id_missing - No kit id was passed to the task

  • err_id_doesnt_exist - Kit id doesnt exist

Give

- run drustcraft.kit.give def:<id>|<item>

Adds the <item> to the contents of kit <id>

Determinations

  • err_not_permitted - Player does not have permission for this command

  • err_id_missing - No kit id was passed to the task

  • err_id_doesnt_exist - Kit id doesnt exist

Take

- run drustcraft.kit.take def:<id>|<item>

Takes the <item> to the contents of kit <id>

Determinations

  • err_not_permitted - Player does not have permission for this command

  • err_id_missing - No kit id was passed to the task

  • err_id_doesnt_exist - Kit id doesnt exist

Applying

Command
Scripting
Command

/kit apply <id> [player]

Applies a kit to yourself or an optional player

The player parameter is required when this command is run from the server console

Scripting

- run drustcraft.kit.apply def:<id>|[player]

Applies a kit to the player within the context or an optional player

Determinations

  • err_not_permitted - Player does not have permission for this command

  • err_id_missing - No kit id was passed to the task

  • err_id_doesnt_exist - Kit id doesn't exist

  • err_no_player_defined - A player was required but was not passed

Getting Information

Information

Command
Scripting
Command

/kit info <id>

Displays information about a particular kit including its:

  • Items

  • Mode

  • Attached events

Scripting

Items

- <proc[drustcraftp.kit.items].context[<id>]>

Returns a list of ItemTags for a particular kit id.

If the kit id does not exist, or if the kit contains no items, an empty list will be returned.

Determinations

  • err_not_permitted - Player does not have permission for this command

  • err_id_missing - No kit id was passed to the task

  • err_id_doesnt_exist - Kit id doesnt exist

Mode

- <proc[drustcraftp.kit.mode].context[<id>]>

Returns the mode for a particular kit id.

If the kit id does not exist, <empty> will be returned.

Determinations

  • err_not_permitted - Player does not have permission for this command

  • err_id_missing - No kit id was passed to the task

  • err_id_doesnt_exists - Kit id doesnt exist

Events

- <proc[drustcraftp.kit.events].context[<id>]>

Returns a list of events names for a particular kit id.

If the kit id does not exist, or no events are defined for the kit, an empty list will be returned.

Determinations

  • err_not_permitted - Player does not have permission for this command

  • err_id_missing - No kit id was passed to the task

  • err_id_doesnt_exists - Kit id doesnt exist

List

Command
Scripting
Command

/kit list [page]

Lists all the current kits with an optional page number.

Scripting

- <proc[drustcraftp.kit.list]>

Returns the list of current kit id's

Setting Kit Options

Mode

Command
Scripting
Command

/kit mode <id> <mode>

Allows you to change how a kit is applied to a players inventory. The following modes are available:

  • merge - (default) Gives all the items to the player

  • match - Adds each item in the kit into the players inventory up to the quantity within the kit (ie if the kit contains 5 gravel blocks and the player already has 4 gravel blocks, they will only receive 1 additional gravel block). Players will not loose items within their inventory if they have more of an item than within the kit.

  • replace - Replaces the players inventory with the contents of the kit

Items in a kit may be skipped if the player does not have enough room in their inventory.

Scripting

- run drustcraft.kit.mode def:<id>|<mode>

Sets the specified kits mode. See the command tab for mode names.

Determinations

  • err_not_permitted - Player does not have permission for this command

  • err_id_missing - No kit id was passed to the task

  • err_mode_invalid - Mode passed is invalid

  • err_id_doesnt_exist - Kit id doesnt exist

Events

Command
Scripting
Command

/kit addevent <id> <event> /kit removeevent <id> <event>

Allows you to add or remove when a kit is applied to a player on a certain event.

Events available:

  • firstlogin - The kit will be applied when a player first logins to the server

  • nextlogin - The kit will be applied the next time a player logins to the server

Items in a kit may be skipped if the player does not have enough room in their inventory.

Scripting

- run drustcraft.kit.event.add def:<id>|<event> - run drustcraft.kit.event.remove def:<id>|<event>

Sets what events the kit will be applied to a player. See the command tab for event names.

Determinations

  • err_not_permitted - Player does not have permission for this command

  • err_id_missing - No kit id was passed to the task

  • err_event_invalid - Event passed is invalid

  • err_id_doesnt_exist - Kit id doesnt exist

Advanced

Apply Event

- run drustcraft.kit.event.apply def:<player>|<event>

Will apply any kits that have the <event> applied to <player>

The <event> parameter supports the types listed at Events.

Determinations

  • err_not_permitted - Player does not have permission for this command

  • err_event_invalid - Mode passed is invalid

Refresh

- run drustcraft.kit.refresh

Will reload kit data from disk and replace all kit data in memory

Save

- run drustcraft.kit.save

Will save kit data to disk

proc[qmp_quest.list]>
qm_quest.player.accept def:[player|quest_id]
qm_quest.player.abandon def:[player|quest_id]
qm_quest.player.close def:[player|quest_id]
<proc[qmp_quest.player.list.available].context[player|npc]>
<proc[qmp_quest.player.list.active].context[player]>
<proc[qmp_quest.player.list.completed].context[player|(npc)]>
<proc[qmp_quest.player.list.closed].context[player]>
<proc[qmp_quest.lore].context[player|quest_id|player_menu]>
<proc[qmp_quest.quest_complete].context[player|quest_id]>
qm