2026-03-24 02:59:06 +08:00
|
|
|
|
package robot
|
|
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
|
"blazing/common/data/xmlres"
|
2026-03-25 01:22:44 +08:00
|
|
|
|
"blazing/cool"
|
2026-03-24 02:59:06 +08:00
|
|
|
|
"blazing/modules/config/service"
|
|
|
|
|
|
"strings"
|
2026-03-25 01:22:44 +08:00
|
|
|
|
"time"
|
2026-03-24 02:59:06 +08:00
|
|
|
|
|
|
|
|
|
|
"github.com/gogf/gf/v2/util/gconv"
|
|
|
|
|
|
zero "github.com/wdvxdr1123/ZeroBot"
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
func init() {
|
|
|
|
|
|
zero.OnCommand("勇者").
|
|
|
|
|
|
Handle(func(ctx *zero.Ctx) {
|
|
|
|
|
|
msgs := strings.Fields(ctx.Event.Message.String())
|
|
|
|
|
|
//eids := dict.NewDictInfoService().GetData("eid")
|
|
|
|
|
|
|
|
|
|
|
|
if len(msgs) > 1 {
|
|
|
|
|
|
count := gconv.Uint32(msgs[1])
|
|
|
|
|
|
if count != 0 {
|
2026-03-24 12:49:49 +08:00
|
|
|
|
var buf strings.Builder
|
2026-03-24 02:59:06 +08:00
|
|
|
|
r := service.NewTower500Service().Boss(count) //获取第一个配置,因为塔只绑定一组boss,bossid也是0
|
|
|
|
|
|
if len(r) > 0 {
|
2026-03-25 01:22:44 +08:00
|
|
|
|
|
2026-03-24 02:59:06 +08:00
|
|
|
|
for _, v := range service.NewBossService().Get(r[0].BossIds[0]) {
|
2026-03-24 03:07:27 +08:00
|
|
|
|
buf.WriteString("【" + xmlres.PetMAP[int(v.MonID)].DefName + "】" + "\n")
|
2026-03-24 02:59:06 +08:00
|
|
|
|
|
|
|
|
|
|
for _, effs := range service.NewEffectService().Args(v.Effect) {
|
|
|
|
|
|
|
|
|
|
|
|
buf.WriteString(effs.Desc + "\n")
|
|
|
|
|
|
}
|
2026-03-24 12:43:26 +08:00
|
|
|
|
//cdks = append(cdks, buf.String())
|
2026-03-24 02:59:06 +08:00
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-03-25 01:22:44 +08:00
|
|
|
|
msg := ctx.Send(buf.String())
|
|
|
|
|
|
cool.Cron.AfterFunc(10*time.Second, func() {
|
|
|
|
|
|
ctx.DeleteMessage(msg)
|
|
|
|
|
|
})
|
2026-03-24 02:59:06 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
}
|