NPC Variables: Difference between revisions

From PSwiki
Jump to navigation Jump to search
Magodra (talk | contribs)
Magodra (talk | contribs)
Line 16: Line 16:
|-
|-
|$NBUFFER[x]
|$NBUFFER[x]
|Replace with the value from the NPC buffers
|Replace with the value from the NPC buffers that is set by the [[Tribe Scripting]] [[Tribe_Scripting#SetBuffer|SetBuffer algorithm]]
|-
|-
|$TBUFFER[x]
|$TBUFFER[x]
|Replace with the value from the Tribe buffers
|Replace with the value from the Tribe buffers that is set by the [[Tribe Scripting]] [[Tribe_Scripting#SetBuffer|SetBuffer algorithm]]
|-
|-
|}
|}

Revision as of 11:04, 24 December 2011

For both Behavior Operations and Tribe Scripting some of the fields are parsed for keywords and values replaced before use.


Substituted Keyword

The following keywords are replaced in strings used in the NPC Client Scripting.

This allows for generic scripting like:

<talk text="My name is $name" />
<wait duration="$NBUFFER[Wait_Duration]" anim="stand" />

Before keywords is replaced the NPC and Tribe buffers will be replaced. This allows keywords in the buffers.

Keyword Description
$NBUFFER[x] Replace with the value from the NPC buffers that is set by the Tribe Scripting SetBuffer algorithm
$TBUFFER[x] Replace with the value from the Tribe buffers that is set by the Tribe Scripting SetBuffer algorithm

Keywords that will be replaced.

Keyword Description
$name Replaced with the name of the NPC.
$owner If npc is a pet, replaced with the name of the owner
$member_type Replace with the npc tribe member type.
$race Replaced with the race of the NPC.
$target Replaced with the name of the current target.
$tribe If npc is part of a tribe, replaced with the tribes name.