> For the complete documentation index, see [llms.txt](https://chaoss-organization.gitbook.io/chaosdungeon/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://chaoss-organization.gitbook.io/chaosdungeon/zhu-yao-mo-kuai-jie-shao/fu-ben-jiao-ben-zu-jian/chu-fa-qi-trigger.md).

# 触发器 trigger

副本本体相关:

| 触发器名与构造写法                                       | 说明                                        |                                                       |                                          |
| ----------------------------------------------- | ----------------------------------------- | ----------------------------------------------------- | ---------------------------------------- |
| onDunStart                                      | 副本开始时触发                                   |                                                       |                                          |
| onDunEnd                                        | 副本结束时触发                                   |                                                       |                                          |
| <p>onMobDead<br>写法示例:<br>onMobDead:mmid1;20     | mmid2;5</p>                               | <p>mm怪物死亡时触发(可多个mmid,可指定个数)</p><p>格式写法: mmid;数量    可用 | 分隔表示多个</p><p>如果只判断一个怪物死亡一次. 非必须写数量参数</p> |
| <p>onAnymobDead<br>写法示例:<br>onAnymobDead:20</p> | 任意mm怪物死亡达到指定个数触发                          |                                                       |                                          |
| onDunTick                                       | 副本进行时,每duntick触发一次 (duntick可在配置文件中设置游戏刻数) |                                                       |                                          |

玩家相关触发器:&#x20;

有部分事件必须由玩家触发器触发才可生效

| 触发器名                              | 说明                                     |
| --------------------------------- | -------------------------------------- |
| onPlayerLoc:x;y;z                 | 玩家到达某坐标触发(精确的单个坐标)                     |
| onPlayerdunArea:x1;y1;z1;x2;y2;z2 | 玩家进入某副本区域触发(范围) 参数分别为两个坐标点的xyz坐标       |
| onIntercat:x;y;z                  | <p>玩家和某坐标方块交互(左右键)</p><p>(精确的单个坐标)</p> |
| onIntercatArea:x1;y1;z1;x2;y2;z2  | 玩家和某区域方块交互(左右键)(范围)                    |
| onPlayerDead                      | 玩家死亡触发                                 |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://chaoss-organization.gitbook.io/chaosdungeon/zhu-yao-mo-kuai-jie-shao/fu-ben-jiao-ben-zu-jian/chu-fa-qi-trigger.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
