12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using pomelo.connector;
- using CommonLang.Property;
- using pomelo.area;
- namespace XmdsBotTest.Runner
- {
- public class TeamDungeonFunc : BotRunner.RunnerModule
- {
- public TeamDungeonFunc() {
- module_name = "组队副本";
- }
- public TeamDungeonFunc(BotRunner r) : base(r)
- {
-
- }
- protected internal override void OnGateBindPlayer(BindPlayerResponse e)
- {
- base.OnGateBindPlayer(e);
- }
- protected internal override void OnBattleActorReady(CommonAI.ZoneClient.ZoneLayer layer, CommonAI.ZoneClient.ZoneActor actor)
- {
- layer.AddTimePeriodicMS(Config.CheckIntervalMS, (t) =>
- {
- autoJoinTeam();
- });
- }
- private static int[] TEAM_DUNGEONS = new int[]
- {
- 2010,2020,2030,2040,2050,2060
- };
- public override void autoJoinTeamRequest()
- {
- client.GameSocket.teamHandler.autoJoinTeamRequest(TEAM_DUNGEONS[bot.Random.Next(TEAM_DUNGEONS.Length)], 1,
- (err, rsp) =>
- { });
- }
- protected override int rand()
- {
- return Config.RandNum;
- }
- [Desc("组队副本配置")]
- [Expandable]
- public class Config : ConfigBase
- {
- [Desc("组队副本检测间隔")]
- public static int CheckIntervalMS = 5000;
- [Desc("组队副本随机数")]
- public static int RandNum = 15;
- public override string ToString()
- {
- return "组队副本配置";
- }
- public override void popG2DPropertyDialog()
- {
- CommonFroms.G2D.G2DPropertyDialog<TeamDungeonFunc.Config>.Show("修改配置", this);
- }
- }
- }
- }
|