Response Operation: Difference between revisions
| Line 366: | Line 366: | ||
== NPC Cmd == | == NPC Cmd == | ||
This response operations send a command to the NPC Client. The command will trigger NPC responses. | This response operations send a command to the NPC Client. The command will trigger NPC responses. See [[Behaviors_and_Reactions#NPC_Cmd_Perception|NPC Cmd Perception]]. | ||
{| | {| | ||
Revision as of 00:52, 26 December 2013
Response Operations
Response operations are used to script response scripts as part of NPC Dialogues.
Action
This response operations cause an action by the NPC.
| Attribute | Required | Values/Type | Default | Description |
|---|---|---|---|---|
| anim | Mandatory | string | Name of animation | |
| text | Optional | string | Action command. |
Ex: <action anim="The anim" text="The action" />
Action My
This response operations .
| Attribute | Required | Values/Type | Default | Description |
|---|---|---|---|---|
Ex: <actionmy ... />
Action My Public
This response operations .
| Attribute | Required | Values/Type | Default | Description |
|---|---|---|---|---|
Ex: <actionmypublic ... />
Action Public
This response operations .
| Attribute | Required | Values/Type | Default | Description |
|---|---|---|---|---|
Ex: <actionpublic ... />
Assign Quest
This response operations assign a new quest to the player.
| Attribute | Required | Values/Type | Default | Description |
|---|---|---|---|---|
| q1 | Mandatory | string | Name of the quest | |
| q2 | Optional | string | Name of the quest | |
| q2 | Optional | string | Name of the quest | |
| q3 | Optional | string | Name of the quest | |
| q4 | Optional | string | Name of the quest | |
| q5 | Optional | string | Name of the quest | |
| timeout_msg | Optional | string | The timeout message. |
Ex: <assign q1="The Quest" q2="The Other Quest" timeout_msg="The Quest timeout message" />
Complete Quest
This response operations complete a quest.
| Attribute | Required | Values/Type | Default | Description |
|---|---|---|---|---|
| quest_id | Mandatory | string | The name of the quest. | |
| error_msg | Optional | string | Error message. |
Ex: <complete quest_id="The Quest" error_msg="The Quest Complete error message" />
Do Admin Command
This response operations run an admin command. In the command string the key words "targetchar" and "sourcenpc" is replaced with target and the NPC talking.
| Attribute | Required | Values/Type | Default | Description |
|---|---|---|---|---|
| command | Mandatory | string | The admin command to run. |
Ex: <doadmincmd command="/debugnpc sourcenpc 5" />
Faction
This response operations adjust the faction.
| Attribute | Required | Values/Type | Default | Description |
|---|---|---|---|---|
| name | Mandatory | string | Name of the faction. | |
| value | Mandatory | integer | The faction value. |
Ex: <faction name="My Faction" value="5" />
Give Item
This response operations give items to the player.
| Attribute | Required | Values/Type | Default | Description |
|---|---|---|---|---|
| item | Mandatory | string or integer | The name of the item stat or the id of the item stat. | |
| count | Optional | integer | 1 | The number of items to give. |
| quality | Optional | integer | 0 | The quality of the new item. |
Ex: <give item="The Item" count="2" quality="50" />
Guild Award
This response operations award a guild Karma Points.
| Attribute | Required | Values/Type | Default | Description |
|---|---|---|---|---|
| karma | Mandatory | integer | Number of Karma Points to award guild. |
Ex: <guild_award karma="10" />
Introduce
This response operations introduce the player with the NPC.
| Attribute | Required | Values/Type | Default | Description |
|---|---|---|---|---|
| name | Optional | string | Me | The character to introduce to the NPC. |
Ex: <introduce name="The Player" />
Money
This response operations give money to the player.
| Attribute | Required | Values/Type | Default | Description |
|---|---|---|---|---|
| value | Mandatory | int,int,int,int or int | The money to give. Either "Circles, octas, hexas, trias" or just "trias". |
Ex: <money value="1,2,3,4" />
<money value="42" />
Narrate
This response operations .
| Attribute | Required | Values/Type | Default | Description |
|---|---|---|---|---|
Ex: <narrate ... />
Narrate Public
This response operations .
| Attribute | Required | Values/Type | Default | Description |
|---|---|---|---|---|
Ex: <narratepublic ... />
NPC Cmd
This response operations send a command to the NPC Client. The command will trigger NPC responses. See NPC Cmd Perception.
| Attribute | Required | Values/Type | Default | Description |
|---|---|---|---|---|
| cmd | Mandatory | string | Use format npccmd:global:<your cmd text> or npccmd:self:<your cmd text> |
Ex: <npccmd cmd="npccmd:global:start_riot" />
<npccmd cmd="npccmd:self:open_cage" />
Offer Reward
This response operations offer items to the player. Either defined by ID or name. If ID is defined that will take precedence over name.
| Attribute | Required | Values/Type | Default | Description |
|---|---|---|---|---|
| id | Optional | integer | The ID of the item stat of the item to offer. If id not defined name must be defined. | |
| name | Optional | string | The name of the item stat of the item to offer. If name not defined id must be defined. |
Ex: <offer>
<item id="10" />
<item name="My Item State" />
</offer>
Respond
This response operations respond with a text to the player. This is the same as the Say operation.
| Attribute | Required | Values/Type | Default | Description |
|---|---|---|---|---|
| text | Mandatory | string | The chat message to respond with. |
Ex: <respond text="Hello" />
Run Script
This response operations run a script.
| Attribute | Required | Values/Type | Default | Description |
|---|---|---|---|---|
| script | Mandatory | string | The script | |
| with | Optional | string | Binding text. |
Ex: <run script="My Script" with="My Binding?" />
Respond Public
This response operations respond with a text to the player. This is the same as the Respond operation but the respond is public.
| Attribute | Required | Values/Type | Default | Description |
|---|---|---|---|---|
| text | Mandatory | string | The chat message to respond with. |
Ex: <respondpublic text="Chat message going public" />
Say
This response operations respond with a text to the player. This is the same as the Respond operation.
| Attribute | Required | Values/Type | Default | Description |
|---|---|---|---|---|
| text | Mandatory | string | The chat message to respond with. |
Ex: <say text="Hello" />
Set Variable
This response operations set a character variable. Character variables are typically used from scripts.
| Attribute | Required | Values/Type | Default | Description |
|---|---|---|---|---|
| name | Mandatory | string | The name of the variable | |
| value | Mandatory | string | The value of the variable. |
Ex: <setvariable name="My Variable" value="My Value" />
Train
This response operations start training for the player. A confirmation dialog is displayed at the client.
| Attribute | Required | Values/Type | Default | Description |
|---|---|---|---|---|
| skill | Mandatory | string | Skill name |
Ex: <train skill="My Skill" />
Uncomplete Quest
This response operations Un-complete a quest.
| Attribute | Required | Values/Type | Default | Description |
|---|---|---|---|---|
| quest_id | Mandatory | string | The name of the quest. | |
| error_msg | Optional | string | Error message. |
Ex: <uncomplete quest_id="The Quest" error_msg="The Quest Uncomplete error message" />
Unset Variable
This response operations Un-set a variable.
| Attribute | Required | Values/Type | Default | Description |
|---|---|---|---|---|
| name | Mandatory | string | The name of the variable. |
Ex: <unsetvariable name="My Variable" />
Verify Quest Assigned
This response operations verify if a quest is assigned.
| Attribute | Required | Values/Type | Default | Description |
|---|---|---|---|---|
| quest | Mandatory | string | Name of quest. | |
| error_msg | Optional | string | Error message. |
Ex: <verifyquestassigned quest="The Quest" error_msg="The Quest is not assigned" />
Verify Quest Completed
This response operations verify if a quest is complete.
| Attribute | Required | Values/Type | Default | Description |
|---|---|---|---|---|
| quest | Mandatory | string | Name of quest. | |
| error_msg | Optional | string | Error message. |
Ex: <verifyquestcompleted quest="The Quest" error_msg="The Quest is not completed" />
Verify Quest Not Assigned
This response operations verify that a quest is not assigned.
| Attribute | Required | Values/Type | Default | Description |
|---|---|---|---|---|
| quest | Mandatory | string | Name of quest. | |
| error_msg | Optional | string | Error message. |
Ex: <verifyquestnotassigned quest="The Quest" error_msg="The Quest is assigned" />