> For the complete documentation index, see [llms.txt](https://changelog.matrixemulator.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://changelog.matrixemulator.com/welcome/server/muserver/data/custom/customnpccommand.md).

# CustomNpcCommand

<mark style="color:green;">Links clicking on an NPC (at an exact position on the map) to the automatic execution of a command, as if the player themselves had typed it.</mark>

```
//IND	NPC	MAP	NPX	NPY	NPT	COM		Comment
  0	543	0	144	127	0	"/pkclear"	//LIMPAR PK
end
```

<table data-header-hidden data-search="false"><thead><tr><th></th><th></th><th></th></tr></thead><tbody><tr><td><strong>Column</strong></td><td><strong>Accepted values</strong></td><td><strong>What it is</strong></td></tr><tr><td>IND</td><td>Number</td><td>Identifies the line.</td></tr><tr><td>NPC</td><td>Number of the NPC class</td><td>Which NPC triggers the command.</td></tr><tr><td>MAP</td><td>Number</td><td>Map where this NPC must be located.</td></tr><tr><td>NPX / NPY</td><td>Number</td><td>Exact position of the NPC on the map.</td></tr><tr><td>NPT</td><td><code>0</code> or <code>1</code></td><td><code>1</code> = executes the command while "talking" to the NPC (allows the command to reply in the chat directed to the NPC). <code>0</code> = executes the command directly, without a conversation context.</td></tr><tr><td>COM</td><td>Text in quotation marks</td><td>The executed command (with the <code>/</code>).</td></tr></tbody></table>

### <mark style="color:yellow;">Notes</mark>

* The combination of `NPC` + `MAP` + `NPX` + `NPY` must exactly match the actual position of the NPC on the map, in the same way as in `CustomNpcMove.txt`.
* The executed command must already exist in the system (whether it is a standard command from `Command.txt` or a custom one) — this file only triggers the command, it does not create a new one.
