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 MountSkinFunc : BotRunner.RunnerModule { public MountSkinFunc() { module_name = "坐骑更换皮肤"; } public MountSkinFunc(BotRunner r) : base(r) { } protected internal override void OnGateBindPlayer(BindPlayerResponse e) { base.OnGateBindPlayer(e); runner.do_gm_add_exp(999999); // gm发放皮肤 runner.do_gm_add_skin(); } protected internal override void OnBattleActorReady(CommonAI.ZoneClient.ZoneLayer layer, CommonAI.ZoneClient.ZoneActor actor) { layer.AddTimePeriodicMS(Config.CheckIntervalMS, (t) => { if (Enable) { activeMountSkinRequest(); } }); } private void activeMountSkinRequest() { int skinId = bot.Random.Next(1, 8); client.GameSocket.mountHandler.activeMountSkinRequest(skinId, (err, rsp) => { }); } [Desc("坐骑更换皮肤配置")] [Expandable] public class Config : ConfigBase { [Desc("坐骑更换皮肤检测间隔")] public static int CheckIntervalMS = 5000; public override string ToString() { return "坐骑更换皮肤配置"; } public override void popG2DPropertyDialog() { CommonFroms.G2D.G2DPropertyDialog.Show("修改配置", this); } } } }