> For the complete documentation index, see [llms.txt](https://temp-17.gitbook.io/trmenu/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://temp-17.gitbook.io/trmenu/chinese/actions/reactions.md).

# 反应

## 常规写法

```yaml
actions:
 - 'tell: Hello, %player_name%'
```

## 三元写法

```yaml
actions:
  condition: 'hasMoney.100'
  actions:
  - 'tell: You have enough money.'
  deny-actions:
  - 'tell: You don''t have enough money.'
```

## 多组三元写法

```yaml
    actions:
      all:
        - condition: 'utils.chance(0.1)'
          priority: 3
          actions:
            - 'tell: Prize 1'
            - 'return'
        - condition: 'utils.chance(0.5)'
          priority: 2
          actions:
            - 'tell: Prize 2'
            - 'return'
        - condition: 'true'
          priority: 1
          actions:
            - 'tell: Prize 3'
```

## 注意

* 使用多个反应组时，可以设置优先级，按降序执行
* 若执行到任意**中断动作**，整个动作组将停止
* 节点别称有许多，例如

```yaml
requirement: 'hasPoints.100'
execute: 'tell: You have 100 points'
deny: 'tell: You dont have 100 points'
```


---

# 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://temp-17.gitbook.io/trmenu/chinese/actions/reactions.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.
