ThinkChat🤖让你学习和工作更高效,注册即送10W Token,即刻开启你的AI之旅 广告
# :-: 动态创建倒计时 >[danger] 除了副本的限时倒计时,还可以动态添加自定义倒计时,提升服务器副本玩法 > 例如: > 限时击杀(QAQ) > 限时跑酷败(QAQ) > 限时找道具(QAQ) > 限时...(QAQ) ## :-: 游戏内截图 :-: ![](https://img.kancloud.cn/29/3c/293cf04841eb915be78e00039a9fc4ab_838x236.png) ![](https://img.kancloud.cn/b6/18/b6186f3c4f54ced9544e0ff90d4aefbb_625x326.png) ***** <br> ## :-: 简单的配置(配置在最底下可复制): :-: ![](https://img.kancloud.cn/c2/d9/c2d9fa74cfcfb1b5a4071f52002d9f1d_494x650.png) ***** :-: 这里简单的用监听说话(chat)内容`开始挑战`来触发 ![](https://img.kancloud.cn/54/12/5412ca4f7570dfe9cbecf302f1223b95_430x122.png) 创建倒计时并命名为`挑战计时`,时长为10秒 ***** :-: 随后会每秒触发倒计时`trigger` ![](https://img.kancloud.cn/94/80/948082290a44092b034a679e93e6b6cc_425x117.png) 在这里提示玩家当前剩余多少秒 ***** :-: 当倒计时结束时会触发 ![](https://img.kancloud.cn/2a/9b/2a9b64a0808a75b2869280ca8aade098_499x201.png) 可以在condition做一些副本变量判断,如: ``` condition: #副本某个变量的数值 >= 5 - 'type=inst_num;note=挑战XX数量;min=5' ``` :-: 当条件成立时,会给进入的所有玩家发送`&a挑战成功` 并可以在其下方添加一些奖励到奖励池中 未成立时会提示`&c挑战失败` ***** :-: ![](https://img.kancloud.cn/51/9d/519d642f4e94eb9a6816951bea40bffa_497x149.png) 如果不需要这个消息发送出去时,可以在这添加一条 `- 'type=cancel'`即可 :-: ![](https://img.kancloud.cn/71/c6/71c610b8e5dc2e0a38261de5fbf6e5b0_512x200.png) ***** # :-: 配置 ``` #触发器 trigger: chat_开始挑战: trigger: 'type=chat;text=开始挑战' count: -1 true-event: - 'type=msg;msg=&a开始挑战,限时 &e10秒;to=trigger' - 'type=count_down_create;name=挑战计时;time=10' - 'type=cancel' chat_关闭挑战: trigger: 'type=chat;text=放弃挑战' count: -1 condition: - 'type=count_down_has;name=挑战计时' true-event: - 'type=msg;msg=&a退出了挑战;to=join' - 'type=count_down_delete;name=挑战计时' 挑战计时: trigger: 'type=count_down_custom;name=挑战计时' count: -1 true-event: - 'type=msg;msg=&a挑战剩余 {arg.time} 秒;to=join' 挑战计时_完毕: trigger: 'type=count_down_over_custom;name=挑战计时' count: -1 condition: # ... # 可以在这里做一些变量判断,是否挑战成功 true-event: - 'type=msg;msg=&a挑战成功;to=join' # ... 可以添加一些奖励 false-event: - 'type=msg;msg=&c挑战失败;to=join' ```