Exemplo n.º 1
0
        public async Task <bool> Run()
        {
            if (!DutyManager.InInstance || DeepDungeonManager.Director.TimeLeftInDungeon == TimeSpan.Zero)
            {
                return(false);
            }
            //dont try and do combat outside of the dungeon plz
            if (!Constants.InDeepDungeon)
            {
                return(false);
            }

            if (AvoidanceManager.IsRunningOutOfAvoid)
            {
                return(true);
            }

            if (!Core.Me.InRealCombat())
            {
                if (await Rest())
                {
                    await CommonTasks.StopMoving("Resting");

                    await Tasks.Common.UsePots();
                    await Heal();

                    return(true);
                }

                if (await PreCombatBuff())
                {
                    return(true);
                }


                // For floors with auto heal penalty or item penalty we will engage normally until we hit
                // the magic sub-40% threshold. Statistically it is smarter to just try and finish the floor
                // instead of waiting around while healing just to encounter additional mobs spawning in.
                if (Core.Me.CurrentHealthPercent <= 40 &&
                    (Core.Me.HasAura(Auras.ItemPenalty) || Core.Me.HasAura(Auras.NoAutoHeal)) &&
                    !DeepDungeonManager.BossFloor)
                {
                    await CommonTasks.StopMoving("Resting");
                    await Heal();

                    return(true);
                }

                if (Core.Me.CurrentHealthPercent <= 90 &&
                    !(Core.Me.HasAura(Auras.ItemPenalty) || Core.Me.HasAura(Auras.NoAutoHeal)) &&
                    !DeepDungeonManager.BossFloor)
                {
                    await CommonTasks.StopMoving("Resting");
                    await Heal();

                    return(true);
                }
            }

            if (Poi.Current == null || Poi.Current.Type != PoiType.Kill || Poi.Current.BattleCharacter == null)
            {
                return(false);
            }
            if (Poi.Current.BattleCharacter == null || !Poi.Current.BattleCharacter.IsValid || Poi.Current.BattleCharacter.IsDead)
            {
                Poi.Clear("Target is dead");
                return(true);
            }

            var target = Poi.Current;

            TreeRoot.StatusText = $"Combat: {target.BattleCharacter.Name}";

            //target if we are in range
            //Logger.Info("======= OUT OF RANGE");
            if (target.BattleCharacter.Pointer != Core.Me.PrimaryTargetPtr && target.BattleCharacter.IsTargetable && target.Location.Distance2D(Core.Me.Location) <= Constants.ModifiedCombatReach)
            {
                Logger.Warn("Combat target has changed");
                target.BattleCharacter.Target();
                return(true);
            }

            //Logger.Info("======= PRE COMBAT");
            if (await PreCombatBuff())
            {
                return(true);
            }

            //Logger.Info("======= OUT OF RANGE2");
            //we are outside of targeting range, walk to the mob
            if ((Core.Me.PrimaryTargetPtr == IntPtr.Zero || target.Location.Distance2D(Core.Me.Location) > Constants.ModifiedCombatReach) && !AvoidanceManager.IsRunningOutOfAvoid)
            {
                //Logger.Info("======= MoveAndStop======");
                var dist = Core.Player.CombatReach + RoutineManager.Current.PullRange + (target.Unit != null ? target.Unit.CombatReach : 0);
                if (dist > 30)
                {
                    dist = 29;
                }

                await CommonTasks.MoveAndStop(new MoveToParameters(target.Location, target.Name), Constants.ModifiedCombatReach, true);

                return(true);
            }

            if (await UseWitching())
            {
                return(true);
            }

            //used if we are transformed
            if (await UsePomanderSpell())
            {
                return(true);
            }

            if (await PreCombatLogic())
            {
                return(true);
            }

            //Logger.Info("======= PULL");
            //pull not in combat
            if (!Core.Me.HasAura(Auras.Lust) && !Core.Me.HasAura(Auras.Rage) && !Core.Me.InRealCombat())
            {
                //if(target.Location.Distance2D(Core.Me.Location) > RoutineManager.Current.PullRange)
                //{
                //    Logger.Info("======= Should be pulling....out");
                //    TreeRoot.StatusText = $"Moving to kill target";
                //    await CommonTasks.MoveAndStop(new MoveToParameters(target.Location, target.Name),  Constants.ModifiedCombatReach, true);
                //    return true;
                //}
                await Pull();

                return(true);
            }

            //6334 - Final Sting
            if (
                GameObjectManager.Attackers.Any(
                    i =>
                    i.IsCasting &&
                    i.CastingSpellId == 6334 &&
                    i.TargetCharacter == Core.Me) &&
                Core.Me.CurrentHealthPercent < 90)
            {
                if (await Tasks.Common.UsePots(true))
                {
                    return(true);
                }
            }


            if (GameObjectManager.Attackers.Any(
                    i =>
                    i.IsCasting &&
                    i.CastingSpellId == 12174 ||
                    i.CastingSpellId == 393))
            {
                Logger.Warn("Blinding Burst spell detected");
                var npc =
                    GameObjectManager.Attackers
                    .FirstOrDefault(i => i.IsCasting && i.CastingSpellId == 12174 || i.CastingSpellId == 393);
                //GameSettingsManager.FaceTargetOnAction = false;
                while (npc != null && npc.IsCasting)
                {
                    MovementManager.SetFacing(npc.Heading);
                    await Coroutine.Sleep(100);
                }
                // GameSettingsManager.FaceTargetOnAction = true;
            }

            if (GameObjectManager.Attackers.Any(
                    i =>
                    i.IsCasting &&
                    i.CastingSpellId == 6351 &&
                    i.NpcId == 7268))
            {
                BattleCharacter npc =
                    GameObjectManager.Attackers
                    .FirstOrDefault(i => i.IsCasting && i.NpcId == 7268 && i.CastingSpellId == 6351);
                while (npc != null && npc.IsCasting)
                {
                    MovementManager.SetFacing(npc.Heading);
                    await Coroutine.Sleep(100);
                }
            }

            if (GameObjectManager.Attackers.Any(
                    i =>
                    i.IsCasting &&
                    i.CastingSpellId == 11290 &&
                    i.NpcId == 7478))
            {
                BattleCharacter npc =
                    GameObjectManager.Attackers
                    .FirstOrDefault(i => i.IsCasting && i.NpcId == 7478 && i.CastingSpellId == 11290);


                while (npc != null && npc.IsCasting && npc.CastingSpellId == 11290)
                {
                    Clio.Utilities.Vector3 vector3 = new Clio.Utilities.Vector3(-299.9771f, -0.01531982f, -320.4548f);
                    float dist = Core.Player.Location.Distance(vector3);
                    Navigator.PlayerMover.MoveTowards(vector3);
                    while (vector3.Distance2D(Core.Me.Location) >= 4.4)
                    {
                        Navigator.PlayerMover.MoveTowards(vector3);
                        await Coroutine.Sleep(100);
                    }

                    Navigator.PlayerMover.MoveStop();
                    await Coroutine.Sleep(9000);
                }
            }

            if (Core.Me.InRealCombat())
            {
                if (await Tasks.Common.UseSustain())
                {
                    return(true);
                }

                if (Settings.Instance.UseAntidote)
                {
                    if (Core.Me.HasAnyAura(Auras.Poisons) && await Tasks.Common.UseItemById(Items.Antidote))
                    {
                        return(true);
                    }
                }

                if (await Heal())
                {
                    return(true);
                }

                if (await CombatBuff())
                {
                    return(true);
                }

                if (await Combat())
                {
                    return(true);
                }
            }

            //Logger.Warn($"don't let anything else execute if we are running the kill poi");
            //don't let anything else execute if we are running the kill poi
            return(true); //we expected to do combat
        }
Exemplo n.º 2
0
        public static async Task <bool> Run()
        {
            var plugin = PluginManager.Plugins.Where(p => p.Plugin.Name == "SideStep" || p.Plugin.Name == "回避").First();

            var check = GameObjectManager.GetObjectsOfType <BattleCharacter>().Where(r => r.CastingSpellId != 0 && !r.IsMe && r.Distance() < 50 && (r.CastingSpellId == 15826 || r.CastingSpellId == 15827));

            var check1 = GameObjectManager.GetObjectsOfType <BattleCharacter>().Where(r => r.CastingSpellId != 0 && !r.IsMe && r.Distance() < 50 && (r.CastingSpellId == 15842 || r.CastingSpellId == 15833 || r.CastingSpellId == 16777 || r.CastingSpellId == 16790));

            //驱魔(分摊)      BOSS 2
            if (check.Any() == true)
            {
                Logging.Write(Colors.Aquamarine, $"驱魔");

                //中点
                var Location = new Vector3("78.77, 0, -82.18");

                //读条中断
                if (Location.Distance2D(Core.Me.Location) > 1f && Core.Me.IsCasting)
                {
                    ActionManager.StopCasting();
                }

                while (Location.Distance2D(Core.Me.Location) > 1f)
                {
                    Logging.Write(Colors.Aquamarine, $"中点距离:{Location.Distance2D(Core.Me.Location)}");
                    Navigator.PlayerMover.MoveTowards(Location);
                    await Coroutine.Sleep(100);
                }

                Navigator.PlayerMover.MoveStop();
                await Coroutine.Sleep(6000);

                if (Helpers.IsHealer() == false)
                {
                    //远点
                    Location = new Vector3("84.92282, 0, -97.60876"); // 远点坐标

                    //读条中断
                    if (Location.Distance2D(Core.Me.Location) > 1f && Core.Me.IsCasting)
                    {
                        ActionManager.StopCasting();
                    }

                    while (Location.Distance2D(Core.Me.Location) > 1f)
                    {
                        Logging.Write(Colors.Aquamarine, $"远点距离:{Location.Distance2D(Core.Me.Location)}");
                        Navigator.PlayerMover.MoveTowards(Location);
                        await Coroutine.Sleep(100);
                    }

                    Navigator.PlayerMover.MoveStop();
                    await Coroutine.Sleep(20000);

                    return(true);
                }
            }


            if (check1.Any() == true)
            {
                Logging.Write(Colors.Aquamarine, $"TMFS");

                var Location = new Vector3("117.1188,23,-474.0881");

                //读条中断
                if (Location.Distance2D(Core.Me.Location) > 1f && Core.Me.IsCasting)
                {
                    ActionManager.StopCasting();
                }

                while (Location.Distance2D(Core.Me.Location) > 1f)
                {
                    Logging.Write(Colors.Aquamarine, $"分散:{Location.Distance2D(Core.Me.Location)}");
                    Navigator.PlayerMover.MoveTowards(Location);
                    await Coroutine.Sleep(100);
                }

                Navigator.PlayerMover.MoveStop();
                await Coroutine.Sleep(3000);
            }


            // 检测附近 对象是否有特定读条技能
            var num = GameObjectManager.GetObjectsOfType <BattleCharacter>()
                      .Where(r => r.CastingSpellId != 0 && !r.IsMe && r.Distance() < 50 &&
                             (
                                 r.CastingSpellId == 15815 || //木马  扇形AOE
                                 r.CastingSpellId == 15816 || //圆形AOE 不让sidestep处理(绞刑笼)
                                 r.CastingSpellId == 15814 || //螺旋突刺
                                 r.CastingSpellId == 15818 || //处刑之剑
                                 r.CastingSpellId == 15819 || //光线射击
                                 r.CastingSpellId == 15846 || //右鞭打测试
                                 r.CastingSpellId == 15847 || //左鞭打测试
                                 r.CastingSpellId == 15848 || //吸取以太测试
                                 r.CastingSpellId == 15849 || //吸取以太测试
                                 r.CastingSpellId == 17232 || //埋没之光测试
                                 r.CastingSpellId == 15845 || //埋没之光测试
                                 r.CastingSpellId == 15834 || //捶打测试
                                 r.CastingSpellId == 15835 || //捶打测试
                                 r.CastingSpellId == 15836 || //捶打测试
                                 r.CastingSpellId == 15837 || //捶打测试
                                 r.CastingSpellId == 15838 || //捶打测试
                                 r.CastingSpellId == 15839 || //捶打测试
                                 r.CastingSpellId == 15843 || //污浊豪炎测试
                                 r.CastingSpellId == 16765 || //污浊豪炎测试
                                 r.CastingSpellId == 15840 || //九尾猫测试
                                 r.CastingSpellId == 15841 || //九尾猫测试
                                 r.CastingSpellId == 16779 || //土符文测试
                                 r.CastingSpellId == 16780 || //土符文测试
                                 r.CastingSpellId == 16781 || //土符文测试
                                 r.CastingSpellId == 16782 || //土符文测试
                                 r.CastingSpellId == 15822    //异端十字叉
                             )
                             );

            if (num != null && num.Count() > 0)
            {
                var spell = num.First();
                Logging.Write(Colors.Aquamarine, $"跟随");

                if (spell.NpcId == 8299)
                {
                    if (plugin != null)
                    {
                        if (plugin.Enabled == true)
                        {
                            plugin.Enabled = false;
                        }
                    }
                }

                var Obj = GameObjectManager.GetObjectsOfType <BattleCharacter>(true).Where(r =>
                                                                                           (r.NpcId == 729 || r.NpcId == 8378 || // "雅·修特拉"
                                                                                            r.NpcId == 1492 ||                   // "于里昂热"
                                                                                            r.NpcId == 4130 ||                   // "阿尔菲诺"
                                                                                            r.NpcId == 5239 ||                   // "阿莉塞"
                                                                                            r.NpcId == 8889 ||                   // 琳
                                                                                            r.NpcId == 8650 ||                   // 水晶公
                                                                                            r.NpcId == 8919 ||                   // 莱楠
                                                                                            r.NpcId == 8917 ||                   // 敏菲利亚
                                                                                            r.Name == "桑克瑞德" ||
                                                                                            r.Name == "阿莉塞" ||
                                                                                            r.Name == "水晶公" ||
                                                                                            r.Name == "莱楠" ||
                                                                                            r.Name == "敏菲利亚" ||
                                                                                            r.Name == "雅·修特拉" ||
                                                                                            r.Name == "琳") &&
                                                                                           r.IsDead == false
                                                                                           ).OrderBy(r => r.Distance()).First();

                //当距离大于跟随距离 再处理跟随
                if (Obj.Location.Distance2D(Core.Me.Location) >= 0.3f)
                {
                    //读条中断
                    if (Core.Me.IsCasting)
                    {
                        ActionManager.StopCasting();
                    }

                    // 选中跟随最近的队友
                    Obj.Target();

                    Logging.Write(Colors.Aquamarine, $"队友{Obj.Name}距离:{Obj.Location.Distance2D(Core.Me.Location)}");

                    while (Obj.Location.Distance2D(Core.Me.Location) >= 0.3f)
                    {
                        Navigator.PlayerMover.MoveTowards(Obj.Location);
                        await Coroutine.Sleep(100);
                    }
                    Navigator.PlayerMover.MoveStop();
                    await Coroutine.Sleep(100);

                    return(true);
                }
            }


            if (Core.Target != null)
            {
                var sC = GameObjectManager.GetObjectsOfType <BattleCharacter>().Where(
                    r => !r.IsMe && r.Distance() < 50 && r.NpcId == 8301
                    );
                var sC1 = GameObjectManager.GetObjectsOfType <BattleCharacter>().Where(
                    r => !r.IsMe && r.Distance() < 50 && r.NpcId == 8299
                    );
                var sC2 = GameObjectManager.GetObjectsOfType <BattleCharacter>().Where(
                    r => !r.IsMe && r.Distance() < 50 && r.NpcId == 8300
                    );
                var sC3 = GameObjectManager.GetObjectsOfType <BattleCharacter>().Where(
                    r => !r.IsMe && r.Distance() < 50 && r.NpcId == 8570
                    );  //锁链

                // boss 1
                if (sC1.Any() == true)
                {
                    if (plugin != null)
                    {
                        if (plugin.Enabled == true)
                        {
                            plugin.Enabled = false;
                        }
                    }
                }

                /*// boss 3 移动
                 * if (sC.Any() == true)
                 * {
                 *  if (plugin != null)
                 *  {
                 *      if (plugin.Enabled == true) plugin.Enabled = false;
                 *  }
                 *
                 *  Logging.Write(Colors.Aquamarine, $"boss3");
                 *  var spellCaster = sC.First();
                 *
                 *
                 *  if (spellCaster != null && spellCaster.Name == Core.Target.Name)
                 *  {
                 *      //读条中断
                 *      if (Core.Me.IsCasting) ActionManager.StopCasting();
                 *
                 *      var Obj = GameObjectManager.GetObjectsOfType<BattleCharacter>(true).Where(r =>
                 *                  (r.NpcId == 729 || r.NpcId == 8378 ||        // "雅·修特拉"
                 *                  r.NpcId == 8889 ||                          // 琳
                 *                  r.NpcId == 5239 ||                          // "阿莉塞"
                 *                  r.Name == "阿莉塞" ||
                 *                  r.Name == "雅·修特拉" ||
                 *                  r.Name == "琳")
                 *                  && r.IsDead == false
                 *                   ).OrderBy(r => r.Distance()).First();
                 *
                 *      //当距离大于跟随距离 再处理跟随
                 *      if (Obj.Location.Distance2D(Core.Me.Location) >= 0.2)
                 *      {
                 *          // 选中跟随最近的队友
                 *          Obj.Target();
                 *
                 *          Logging.Write(Colors.Aquamarine, $"队友{Obj.Name}距离:{Obj.Location.Distance2D(Core.Me.Location)}");
                 *
                 *          while (Obj.Location.Distance2D(Core.Me.Location) >= 0.2)
                 *          {
                 *              Navigator.PlayerMover.MoveTowards(Obj.Location);
                 *              await Coroutine.Sleep(50);
                 *          }
                 *          Navigator.PlayerMover.MoveStop();
                 *          await Coroutine.Sleep(50);
                 *          return true;
                 *      }
                 *
                 *  }
                 * }*/
            }

            return(false);
        }
Exemplo n.º 3
0
 public Aetheryte(uint id, string name, Clio.Utilities.Vector3 coord)
 {
     Id           = id;
     Coord        = coord;
     LocationName = name;
 }
Exemplo n.º 4
0
        public static async Task <bool> Run()
        {
            var plugin = PluginManager.Plugins.Where(p => p.Plugin.Name == "SideStep" || p.Plugin.Name == "回避").First();

            var check = GameObjectManager.GetObjectsOfType <BattleCharacter>().Where(r => r.CastingSpellId != 0 && !r.IsMe && r.Distance() < 50 && (r.CastingSpellId == 15723 || r.CastingSpellId == 13520 || r.CastingSpellId == 13844));

            var sC3 = GameObjectManager.GetObjectsOfType <BattleCharacter>().Where(r => !r.IsMe && r.Distance() < 50 && r.NpcId == 8146);  //73BOSS3

            //过独木桥     BOSS 3
            if (check.Any() == true && sC3.First().Location.Distance2D(Core.Me.Location) >= 10)
            {
                //读条中断
                if (Core.Me.IsCasting)
                {
                    ActionManager.StopCasting();
                }

                await Coroutine.Sleep(3000);

                Logging.Write(Colors.Aquamarine, $"过独木桥");
                //过桥
                var Location = new Vector3("-142.8355,-144.5264,-232.6624");
                while (Location.Distance2D(Core.Me.Location) > 0.2)
                {
                    Logging.Write(Colors.Aquamarine, $"远点距离:{Location.Distance2D(Core.Me.Location)}");
                    Navigator.PlayerMover.MoveTowards(Location);
                    await Coroutine.Sleep(30);
                }
                Location = new Vector3("-140.8284,-144.5366,-246.1443");
                while (Location.Distance2D(Core.Me.Location) > 0.2)
                {
                    Logging.Write(Colors.Aquamarine, $"远点距离:{Location.Distance2D(Core.Me.Location)}");
                    Navigator.PlayerMover.MoveTowards(Location);
                    await Coroutine.Sleep(30);
                }
                Location = new Vector3("-130.1889,-144.5366,-242.384");
                while (Location.Distance2D(Core.Me.Location) > 0.2)
                {
                    Logging.Write(Colors.Aquamarine, $"远点距离:{Location.Distance2D(Core.Me.Location)}");
                    Navigator.PlayerMover.MoveTowards(Location);
                    await Coroutine.Sleep(30);
                }
                Location = new Vector3("-114.455,-144.5366,-244.2632");
                while (Location.Distance2D(Core.Me.Location) > 0.2)
                {
                    Logging.Write(Colors.Aquamarine, $"远点距离:{Location.Distance2D(Core.Me.Location)}");
                    Navigator.PlayerMover.MoveTowards(Location);
                    await Coroutine.Sleep(30);
                }
                Location = new Vector3("-125.6857,-144.5238,-249.264");
                while (Location.Distance2D(Core.Me.Location) > 0.2)
                {
                    Logging.Write(Colors.Aquamarine, $"远点距离:{Location.Distance2D(Core.Me.Location)}");
                    Navigator.PlayerMover.MoveTowards(Location);
                    await Coroutine.Sleep(30);
                }
                Location = new Vector3("-122.5055,-144.5192,-258.3726");
                while (Location.Distance2D(Core.Me.Location) > 0.2)
                {
                    Logging.Write(Colors.Aquamarine, $"远点距离:{Location.Distance2D(Core.Me.Location)}");
                    Navigator.PlayerMover.MoveTowards(Location);
                    await Coroutine.Sleep(30);
                }
                Location = new Vector3("-128.1084,-144.5226,-258.0896");
                while (Location.Distance2D(Core.Me.Location) > 1)
                {
                    Logging.Write(Colors.Aquamarine, $"远点距离:{Location.Distance2D(Core.Me.Location)}");
                    Navigator.PlayerMover.MoveTowards(Location);
                    await Coroutine.Sleep(100);
                }
            }

            // 检测附近 对象是否有特定读条技能
            var num = GameObjectManager.GetObjectsOfType <BattleCharacter>()
                      .Where(r => r.CastingSpellId != 0 && !r.IsMe && r.Distance() < 50 &&
                             (
                                 r.CastingSpellId == 15788 || //小怪禁园篮筐 圆形
                                                              //r.CastingSpellId == 15793 ||    //小怪禁园花楸树  圆形
                                                              //r.CastingSpellId == 15792 ||    //小怪禁园花楸树  扇形
                                 r.CastingSpellId == 15794 || //小怪蜜蜂 针
                                 r.CastingSpellId == 15796 || //小怪熊 扇形
                                                              //r.CastingSpellId == 8906 ||    //重击 扇形  73 2王
                                                              //r.CastingSpellId == 15798 ||   //小怪凯尔派 圆圈
                                 r.CastingSpellId == 15799 || //小怪那伊阿得斯 扇形
                                 r.CastingSpellId == 15800 || //小怪那伊阿得斯 圆形
                                                              //r.CastingSpellId == 13552 ||    //河童歌唱队	Imp Choir     背对   73 3王
                                 r.CastingSpellId == 13551 || //青蛙歌唱队	Toad Choir   扇形变形
                                                              //r.CastingSpellId == 13498 ||    //独木桥幻想曲	 读条结束击退出现独木桥
                                                              //r.CastingSpellId == 15723 ||    // 终章	Finale  独木桥狂暴读条
                                                              //r.CastingSpellId == 13520 ||    // 终章	Finale  独木桥狂暴读条
                                                              //r.CastingSpellId == 13844 ||    // 终章	Finale  独木桥狂暴读条
                                 r.CastingSpellId == 13514 || //水毒浴	 ID有可能错误
                                 r.CastingSpellId == 13547 || //腐蚀咬     正面范围持续
                                 r.CastingSpellId == 13548 || //腐蚀咬     正面范围持续
                                 r.CastingSpellId == 13952 || //触手轰击    十字触手
                                 r.CastingSpellId == 13953    //触手轰击   十字触手
                             )
                             );

            /*             var sC2 = GameObjectManager.GetObjectsOfType<BattleCharacter>().Where(
             *              r => r.NpcId == 8145 && r.IsVisible == true
             *              );	//藤蔓
             *
             *          if (Core.Target != sC2.First())
             *          {
             *              if (sC2.Any() == true)
             *              {
             *                  sC2.First().Target();
             *                  return true;
             *              }
             *          }
             *
             *          else  */

            if (num != null && num.Count() > 0)
            {
                var spell = num.First();
                Logging.Write(Colors.Aquamarine, $"跟随");

                if (spell.NpcId == 8299)
                {
                    if (plugin != null)
                    {
                        if (plugin.Enabled == true)
                        {
                            plugin.Enabled = false;
                        }
                    }
                }
                //读条中断
                if (Core.Me.IsCasting)
                {
                    ActionManager.StopCasting();
                }

                var Obj = GameObjectManager.GetObjectsOfType <BattleCharacter>(true).Where(r =>
                                                                                                                                //r.NpcId == 8145||						 // 藤蔓
                                                                                           r.NpcId == 729 || r.NpcId == 8378 || // "雅·修特拉"
                                                                                           r.NpcId == 1492 ||                   // "于里昂热"
                                                                                           r.NpcId == 4130 ||                   // "阿尔菲诺"
                                                                                           r.NpcId == 5239 ||                   // "阿莉塞"
                                                                                           r.NpcId == 8889 ||                   // 琳
                                                                                           r.Name == "雅·修特拉" ||
                                                                                           r.Name == "阿莉塞" ||
                                                                                           r.Name == "琳"
                                                                                           ).OrderBy(r => r.Distance()).First();

                //当距离大于跟随距离 再处理跟随
                if (Obj.Location.Distance2D(Core.Me.Location) >= 0.3)
                {
                    // 选中跟随最近的队友
                    Obj.Target();

                    Logging.Write(Colors.Aquamarine, $"队友{Obj.Name}距离:{Obj.Location.Distance2D(Core.Me.Location)}");

                    while (Obj.Location.Distance2D(Core.Me.Location) >= 0.3)
                    {
                        Navigator.PlayerMover.MoveTowards(Obj.Location);
                        await Coroutine.Sleep(100);
                    }
                    Navigator.PlayerMover.MoveStop();
                    await Coroutine.Sleep(100);

                    return(true);
                }
            }

            if (Core.Target != null)
            {
                var sC = GameObjectManager.GetObjectsOfType <BattleCharacter>().Where(
                    r => !r.IsMe && r.Distance() < 50 && r.NpcId == 8141
                    );  //73BOSS1

                // 73boss 1 移动
                if (sC.Any() == true)
                {
                    if (plugin != null)
                    {
                        if (plugin.Enabled == true)
                        {
                            plugin.Enabled = false;
                        }
                    }

                    Logging.Write(Colors.Aquamarine, $"boss1");
                    var spellCaster = sC.First();


                    if (spellCaster != null && spellCaster.Name == Core.Target.Name)
                    {
                        //读条中断
                        if (Core.Me.IsCasting)
                        {
                            ActionManager.StopCasting();
                        }

                        var Obj = GameObjectManager.GetObjectsOfType <BattleCharacter>(true).Where(r =>
                                                                                                   r.NpcId == 729 || r.NpcId == 8378 || // "雅·修特拉"
                                                                                                   r.NpcId == 1492 ||                   // "于里昂热"
                                                                                                   r.NpcId == 4130 ||                   // "阿尔菲诺"
                                                                                                   r.NpcId == 5239 ||                   // "阿莉塞"
                                                                                                   r.NpcId == 8889 ||                   // 琳
                                                                                                   r.Name == "雅·修特拉" ||
                                                                                                   r.Name == "阿莉塞" ||
                                                                                                   r.Name == "琳"
                                                                                                   ).OrderBy(r => r.Distance()).First();

                        //当距离大于跟随距离 再处理跟随
                        if (Obj.Location.Distance2D(Core.Me.Location) >= 0.2)
                        {
                            // 选中跟随最近的队友
                            Obj.Target();

                            Logging.Write(Colors.Aquamarine, $"队友{Obj.Name}距离:{Obj.Location.Distance2D(Core.Me.Location)}");

                            while (Obj.Location.Distance2D(Core.Me.Location) >= 0.2)
                            {
                                Navigator.PlayerMover.MoveTowards(Obj.Location);
                                await Coroutine.Sleep(50);
                            }
                            Navigator.PlayerMover.MoveStop();
                            await Coroutine.Sleep(50);

                            return(true);
                        }
                    }
                }
            }

            return(false);
        }
Exemplo n.º 5
0
        private void Drawing(DrawingContext ctx)
        {
            OverlaySettings settings = OverlaySettings.Instance;

            if (settings.OnlyDrawInForeground &&
                Imports.GetForegroundWindow() != Core.Memory.Process.MainWindowHandle)
            {
                return;
            }

            if (QuestLogManager.InCutscene)
            {
                return;
            }

            //Gameobject list is threadstatic, always need to pulse otherwise new objects wont show up
            GameObjectManager.Update();

            NVector3 mypos    = Core.Me.Location;
            Vector3  vecStart = new Vector3(mypos.X, mypos.Y, mypos.Z);
            int      myLevel  = Core.Me.ClassLevel;


            if (settings.DrawGameStats)
            {
                StringBuilder sb = new StringBuilder();

                GameObject currentTarget = Core.Me.CurrentTarget;


                sb.AppendLine("My Position: " + Core.Me.Location);
                if (currentTarget != null)
                {
                    sb.AppendLine("Current Target: " + currentTarget.Name + ", Distance: " +
                                  Math.Round(currentTarget.Distance(), 3));

                    NVector3 end    = currentTarget.Location;
                    Vector3  vecEnd = new Vector3(end.X, end.Y, end.Z);

                    ctx.DrawLine(vecStart, vecEnd, Color.DeepSkyBlue);
                }
                else
                {
                    sb.AppendLine("");
                }
                sb.AppendLine("");
                sb.AppendLine(string.Format("XP Per Hour: {0:F0}", GameStatsManager.XPPerHour));
                sb.AppendLine(string.Format("Deaths Per Hour: {0:F0}", GameStatsManager.DeathsPerHour));

                if (myLevel < 90)
                {
                    sb.AppendLine(string.Format("Time to Level: {0}", GameStatsManager.TimeToLevel));
                }

                sb.AppendLine(string.Format("TPS: {0:F2}", GameStatsManager.TicksPerSecond));

                sb.AppendLine();

                if (settings.UseShadowedText)
                {
                    ctx.DrawOutlinedText(sb.ToString(),
                                         settings.GameStatsPositionX,
                                         settings.GameStatsPositionY,
                                         settings.GameStatsForegroundColor,
                                         settings.GameStatsShadowColor,
                                         settings.GameStatsFontSize
                                         );
                }
                else
                {
                    ctx.DrawText(sb.ToString(),
                                 settings.GameStatsPositionX,
                                 settings.GameStatsPositionY,
                                 settings.GameStatsForegroundColor,
                                 settings.GameStatsFontSize
                                 );
                }

                ctx.DrawOutlinedBox(Core.Me.Location.Convert() + new Vector3(0, 1, 0), new Vector3(1),
                                    Color.FromArgb(255, Color.Blue));
            }

            if (settings.DrawHostilityBoxes || settings.DrawUnitLines || settings.DrawGameObjectBoxes || settings.DrawGameObjectLines)
            {
                foreach (GameObject obj in GameObjectManager.GameObjects)
                {
                    if (!obj.IsVisible)
                    {
                        continue;
                    }

                    if (settings.OnlyRenderTargetable)
                    {
                        if (obj.Type != GameObjectType.EventObject)
                        {
                            if (!obj.IsTargetable)
                            {
                                continue;
                            }
                        }
                    }



                    if (obj.Type == GameObjectType.Mount)
                    {
                        continue;
                    }

                    var name      = obj.Name;
                    var vecCenter = obj.Location.Convert() + new Vector3(0, 1, 0);


                    //.Where(i => i.Type == GameObjectType.GatheringPoint || i.Type == GameObjectType.BattleNpc || i.Type == GameObjectType.EventObject || i.Type == GameObjectType.Treasure || i.Type == GameObjectType.Pc)



                    var color = Color.FromArgb(150, Color.Blue);

                    //some generic objects. If you want to add a specific object it should probably go here or in it's own block below this.
                    if (obj.Type == GameObjectType.GatheringPoint || obj.Type == GameObjectType.EventObject || obj.Type == GameObjectType.Treasure)
                    {
                        if (obj.Type == GameObjectType.GatheringPoint)
                        {
                            color = Color.FromArgb(150, Color.BlueViolet);
                        }
                        if (obj.Type == GameObjectType.EventObject)
                        {
                            color = Color.FromArgb(150, Color.Fuchsia);
                        }
                        if (obj.Type == GameObjectType.Treasure)
                        {
                            color = Color.SandyBrown;
                        }

                        if (settings.DrawGameObjectNames && !string.IsNullOrEmpty(name))
                        {
                            ctx.Draw3DText(name, vecCenter);
                        }

                        if (settings.DrawGameObjectBoxes)
                        {
                            ctx.DrawOutlinedBox(vecCenter, new Vector3(1), Color.FromArgb(150, color));
                        }



                        //if (settings.DrawGameObjectLines)
                        //{
                        //    if (!settings.DrawGameObjectLinesLos || obj.InLineOfSight())
                        //        ctx.DrawLine(vecStart, vecCenter, Color.FromArgb(150, color));
                        //}
                    }

                    var u = obj as Character;
                    if (u != null)
                    {
                        var playerOrPlayerOwned = (!u.IsNpc || u.SummonerObjectId != GameObjectManager.EmptyGameObject);
                        if (!settings.DrawPlayers && playerOrPlayerOwned)
                        {
                            continue;
                        }

                        var hostilityColor = Color.FromArgb(150, Color.Green);

                        var uStatusFlags = u.StatusFlags;
                        if (uStatusFlags.HasFlag(StatusFlags.Hostile))
                        {
                            hostilityColor = Color.FromArgb(150, Color.Red);

                            //if (settings.DrawAggroRangeCircles)
                            //    ctx.DrawCircle(vecCenter, u.MyAggroRange, 64,
                            //                   Color.FromArgb(75, Color.DeepSkyBlue));
                        }

                        if (uStatusFlags == StatusFlags.None)
                        {
                            hostilityColor = Color.FromArgb(150, Color.Yellow);
                        }

                        if (uStatusFlags.HasFlag(StatusFlags.Friend) || uStatusFlags.HasFlag(StatusFlags.PartyMember) || uStatusFlags.HasFlag(StatusFlags.AllianceMember))
                        {
                            hostilityColor = Color.FromArgb(150, Color.Green);
                        }



                        if (playerOrPlayerOwned)
                        {
                            if (settings.DrawPlayerNames)
                            {
                                ctx.Draw3DText(name, vecCenter);
                            }
                        }
                        else
                        {
                            if (settings.DrawUnitNames)
                            {
                                if (!string.IsNullOrEmpty(name) && obj.IsTargetable)
                                {
                                    ctx.Draw3DText(name, vecCenter);
                                }
                            }
                        }



                        ctx.DrawOutlinedBox(vecCenter, new Vector3(1), Color.FromArgb(255, hostilityColor));
                    }
                }
            }


            //Profile curProfile = ProfileManager.CurrentProfile;
            //if (curProfile != null)
            //{
            //    if (settings.DrawHotspots)
            //    {
            //        GrindArea ga = QuestState.Instance.CurrentGrindArea;
            //        if (ga != null)
            //        {
            //            if (ga.Hotspots != null)
            //            {
            //                foreach (Hotspot hs in ga.Hotspots)
            //                {
            //                    var p = hs.Position;
            //                    Vector3 vec = new Vector3(p.X, p.Y, p.Z);
            //                    ctx.DrawCircle(vec, 10.0f, 32, Color.FromArgb(200, Color.Red));

            //                    if (!string.IsNullOrWhiteSpace(hs.Name))
            //                        ctx.Draw3DText("Hotspot: " + hs.Name, vec);
            //                    else
            //                    {
            //                        ctx.Draw3DText("Hotspot", vec);
            //                    }
            //                }
            //            }
            //        }

            //        // This is only used by grind profiles.
            //        if (curProfile.HotspotManager != null)
            //        {
            //            foreach (NVector3 p in curProfile.HotspotManager.Hotspots)
            //            {
            //                Vector3 vec = new Vector3(p.X, p.Y, p.Z);
            //                ctx.DrawCircle(vec, 10.0f, 32, Color.FromArgb(200, Color.Red));
            //                ctx.Draw3DText("Hotspot", vec);
            //            }
            //        }
            //    }

            //    if (settings.DrawBlackspots)
            //    {
            //        foreach (Blackspot bs in BlackspotManager.GetAllCurrentBlackspots())
            //        {
            //            var p = bs.Location;
            //            Vector3 vec = new Vector3(p.X, p.Y, p.Z);
            //            ctx.DrawCircle(vec, bs.Radius, 32, Color.FromArgb(200, Color.Black));

            //            if (!string.IsNullOrWhiteSpace(bs.Name))
            //                ctx.Draw3DText("Blackspot: " + bs.Name, vec);
            //            else
            //            {
            //                ctx.Draw3DText("Blackspot: " + vec, vec);
            //            }
            //        }
            //    }
            //}
        }
Exemplo n.º 6
0
        private void Drawing(DrawingContext ctx)
        {
            if ((Variables.settings.OnlyForeground && Imports.GetForegroundWindow() != Core.Memory.Process.MainWindowHandle) || QuestLogManager.InCutscene)
            {
                return;
            }

            GameObjectManager.Update();

            NVector3 mypos    = Core.Me.Location;
            Vector3  vecStart = new Vector3(mypos.X, mypos.Y, mypos.Z);
            int      myLevel  = Core.Me.ClassLevel;
            String   mainName = locman.GetLocationString(WorldManager.ZoneId);

            if (Variables.settings.EnableStats) // Statistics.
            {
                StringBuilder sb    = new StringBuilder();
                StringBuilder alert = new StringBuilder();

                GameObject currentTarget = Core.Me.CurrentTarget;

                if (!Variables.settings.AlertObject.Equals(""))
                {
                    foreach (GameObject obj in GameObjectManager.GameObjects)
                    {
                        if (obj.Name.ToLower().Equals(Variables.settings.AlertObject.ToLower()) || (Variables.settings.AlertObject.Equals("*") && obj.Name.Length > 1))
                        {
                            String details = "";
                            if (Core.Me.IsFacing(obj))
                            {
                                details += "Facing!";
                            }
                            alert.AppendLine(obj.Name + ": " + Math.Floor(obj.Location.X) + " EW, " + Math.Floor(obj.Location.Y) + " ALTI, " + Math.Floor(obj.Location.Z) + " NS\n\tDistance: " + Math.Floor(Core.Me.Distance(obj.Location)) + " yalms " + details);
                        }
                    }
                }

                sb.AppendLine(mainName);
                sb.AppendLine(Math.Floor(Core.Me.Location.X) + " EW," + Math.Floor(Core.Me.Location.Y) + " ALTI," + Math.Floor(Core.Me.Location.Z) + " NS");

                if (currentTarget != null)
                {
                    sb.AppendLine("Current Target: " + currentTarget.Name + ", Distance: " +
                                  Math.Round(currentTarget.Distance(), 3));

                    sb.AppendLine("Can Attack: " + currentTarget.CanAttack.ToString());

                    NVector3 end    = currentTarget.Location;
                    Vector3  vecEnd = new Vector3(end.X, end.Y, end.Z);

                    ctx.DrawLine(vecStart, vecEnd, Color.DeepSkyBlue);
                }
                else
                {
                    sb.AppendLine("");
                }

                sb.AppendLine();

                if (true)
                {
                    ctx.DrawOutlinedText(sb.ToString(), Variables.settings.OverlayXPos, Variables.settings.OverlayYPos, Color.FromArgb(0, 255, 0), Color.FromArgb(0, 0, 0));
                    ctx.DrawOutlinedText(alert.ToString(), Variables.settings.AlertXPos, Variables.settings.AlertYPos, Color.FromArgb(255, 0, 0), Color.FromArgb(0, 0, 0));
                }
            }

            if (Variables.settings.EnableOverlay && false) // Target self.
            {
                ctx.DrawOutlinedBox(Core.Me.Location.Convert() + new Vector3(0, 1, 0), new Vector3(0.1f),
                                    Color.FromArgb(255, Color.Blue));
            }

            if (Variables.settings.EnableOverlay)
            {
                foreach (GameObject obj in GameObjectManager.GameObjects)
                {
                    //if (!obj.IsVisible)
                    //    continue;

                    //if (Variables.settings.EnableOverlay) // Only targetable?
                    //{
                    //    if (obj.Type != GameObjectType.EventObject)
                    //    {
                    //        if (!obj.IsTargetable)
                    //            continue;
                    //    }
                    //}



                    if (obj.Type == GameObjectType.Mount)
                    {
                        continue;
                    }

                    var name      = obj.Name;
                    var vecCenter = obj.Location.Convert() + new Vector3(0, 1, 0);


                    //.Where(i => i.Type == GameObjectType.GatheringPoint || i.Type == GameObjectType.BattleNpc || i.Type == GameObjectType.EventObject || i.Type == GameObjectType.Treasure || i.Type == GameObjectType.Pc)



                    var color = Color.FromArgb(150, Color.Blue);

                    //some generic objects. If you want to add a specific object it should probably go here or in it's own block below this.
                    if ((obj.Type == GameObjectType.GatheringPoint || obj.Type == GameObjectType.EventObject || obj.Type == GameObjectType.Treasure) && false) // Etc Objects.
                    {
                        if (obj.Type == GameObjectType.GatheringPoint)
                        {
                            color = Color.FromArgb(150, Color.BlueViolet);
                        }
                        if (obj.Type == GameObjectType.EventObject)
                        {
                            color = Color.FromArgb(150, Color.Fuchsia);
                        }
                        if (obj.Type == GameObjectType.Treasure)
                        {
                            color = Color.SandyBrown;
                        }

                        if (Variables.settings.EnableOverlay && !string.IsNullOrEmpty(name))
                        {
                            ctx.Draw3DText(name, vecCenter);
                        }

                        if (Variables.settings.EnableOverlay)
                        {
                            ctx.DrawOutlinedBox(vecCenter, new Vector3(0.1f), Color.FromArgb(150, color));
                        }



                        //if (Variables.settings.DrawGameObjectLines)
                        //{
                        //    if (!Variables.settings.DrawGameObjectLinesLos || obj.InLineOfSight())
                        //        ctx.DrawLine(vecStart, vecCenter, Color.FromArgb(150, color));
                        //}
                    }

                    var u = obj as Character;
                    if (u != null && false) // Draw all players? Draw NPC's.
                    {
                        var playerOrPlayerOwned = (!u.IsNpc || u.SummonerObjectId != GameObjectManager.EmptyGameObject);

                        /*if (!Variables.settings.DrawPlayers && playerOrPlayerOwned)
                         * {
                         *  continue;
                         * }*/

                        var hostilityColor = Color.FromArgb(150, Color.Green);

                        var uStatusFlags = u.StatusFlags;
                        if (uStatusFlags.HasFlag(StatusFlags.Hostile))
                        {
                            hostilityColor = Color.FromArgb(150, Color.Red);

                            //if (Variables.settings.DrawAggroRangeCircles)
                            //    ctx.DrawCircle(vecCenter, u.MyAggroRange, 64,
                            //                   Color.FromArgb(75, Color.DeepSkyBlue));
                        }

                        if (uStatusFlags == StatusFlags.None)
                        {
                            hostilityColor = Color.FromArgb(150, Color.Yellow);
                        }

                        if (uStatusFlags.HasFlag(StatusFlags.Friend) || uStatusFlags.HasFlag(StatusFlags.PartyMember) || uStatusFlags.HasFlag(StatusFlags.AllianceMember))
                        {
                            hostilityColor = Color.FromArgb(150, Color.Green);
                        }



                        if (playerOrPlayerOwned)
                        {
                            /*if (Variables.settings.DrawPlayerNames)
                             * {
                             *  ctx.Draw3DText(name, vecCenter);
                             * }*/
                        }
                        else
                        {
                            /*if (Variables.settings.DrawUnitNames)
                             * {
                             *  if (!string.IsNullOrEmpty(name) && obj.IsTargetable)
                             *      ctx.Draw3DText(name, vecCenter);
                             * }*/
                        }
                        ctx.DrawOutlinedBox(vecCenter, new Vector3(0.1f), Color.FromArgb(255, hostilityColor));
                    }
                    else if (u != null && Variables.settings.ShowTargetablePlayers)
                    {
                        var     playerOrPlayerOwned = (!u.IsNpc || u.SummonerObjectId != GameObjectManager.EmptyGameObject);
                        Boolean attackable          = u.CanAttack;

                        if (playerOrPlayerOwned && attackable)
                        {
                            ctx.DrawOutlinedBox(vecCenter, new Vector3(0.1f), Color.FromArgb(255, Color.Red));
                        }
                    }
                }
            }
        }
Exemplo n.º 7
0
        public static async Task <bool> Run()
        {
            var plugin = PluginManager.Plugins.Where(p => p.Plugin.Name == "SideStep" || p.Plugin.Name == "回避").First();

            var check = GameObjectManager.GetObjectsOfType <BattleCharacter>().Where(r => r.CastingSpellId != 0 && !r.IsMe && r.Distance() < 50 && (r.CastingSpellId == 15826 || r.CastingSpellId == 15827));

            //驱魔(分摊)      BOSS 2
            if (check.Any() == true)
            {
                Logging.Write(Colors.Aquamarine, $"驱魔");

                //读条中断
                if (Core.Me.IsCasting)
                {
                    ActionManager.StopCasting();
                }

                //中点
                var Location = new Vector3("78.77, 0, -82.18");
                while (Location.Distance2D(Core.Me.Location) > 1)
                {
                    Logging.Write(Colors.Aquamarine, $"中点距离:{Location.Distance2D(Core.Me.Location)}");
                    Navigator.PlayerMover.MoveTowards(Location);
                    await Coroutine.Sleep(100);
                }

                Navigator.PlayerMover.MoveStop();
                await Coroutine.Sleep(6000);

                if (Helpers.IsHealer() == false)
                {
                    //读条中断
                    if (Core.Me.IsCasting)
                    {
                        ActionManager.StopCasting();
                    }

                    //远点
                    Location = new Vector3("84.92282, 0, -97.60876"); // 远点坐标
                    while (Location.Distance2D(Core.Me.Location) > 1)
                    {
                        Logging.Write(Colors.Aquamarine, $"远点距离:{Location.Distance2D(Core.Me.Location)}");
                        Navigator.PlayerMover.MoveTowards(Location);
                        await Coroutine.Sleep(100);
                    }

                    Navigator.PlayerMover.MoveStop();
                    await Coroutine.Sleep(20000);

                    return(true);
                }
            }


            // 检测附近 对象是否有特定读条技能
            var num = GameObjectManager.GetObjectsOfType <BattleCharacter>()
                      .Where(r => r.CastingSpellId != 0 && !r.IsMe && r.Distance() < 50 &&
                             (
                                 r.CastingSpellId == 15815 || //木马  扇形AOE
                                 r.CastingSpellId == 15816 || //圆形AOE 不让sidestep处理(绞刑笼)
                                 r.CastingSpellId == 15814 || //螺旋突刺
                                 r.CastingSpellId == 15818 || //处刑之剑
                                 r.CastingSpellId == 15819 || //光线射击
                                 r.CastingSpellId == 15822    //异端十字叉
                             )
                             );

            if (num != null && num.Count() > 0)
            {
                var spell = num.First();
                Logging.Write(Colors.Aquamarine, $"跟随");

                if (spell.NpcId == 8299)
                {
                    if (plugin != null)
                    {
                        if (plugin.Enabled == true)
                        {
                            plugin.Enabled = false;
                        }
                    }
                }

                var Obj = GameObjectManager.GetObjectsOfType <BattleCharacter>(true).Where(r =>
                                                                                           r.NpcId == 729 || r.NpcId == 8378 || // "雅·修特拉"
                                                                                           r.NpcId == 1492 ||                   // "于里昂热"
                                                                                           r.NpcId == 4130 ||                   // "阿尔菲诺"
                                                                                           r.NpcId == 5239 ||                   // "阿莉塞"
                                                                                           r.NpcId == 8889 ||                   // 琳
                                                                                           r.Name == "雅·修特拉" ||
                                                                                           r.Name == "于里昂热" ||
                                                                                           r.Name == "阿尔菲诺" ||
                                                                                           r.Name == "阿莉塞" ||
                                                                                           r.Name == "琳"
                                                                                           ).OrderBy(r => r.Distance()).First();

                //当距离大于跟随距离 再处理跟随
                if (Obj.Location.Distance2D(Core.Me.Location) >= 0.3)
                {
                    //读条中断
                    if (Core.Me.IsCasting)
                    {
                        ActionManager.StopCasting();
                    }

                    // 选中跟随最近的队友
                    Obj.Target();

                    Logging.Write(Colors.Aquamarine, $"队友{Obj.Name}距离:{Obj.Location.Distance2D(Core.Me.Location)}");

                    while (Obj.Location.Distance2D(Core.Me.Location) >= 0.3)
                    {
                        Navigator.PlayerMover.MoveTowards(Obj.Location);
                        await Coroutine.Sleep(100);
                    }
                    Navigator.PlayerMover.MoveStop();
                    await Coroutine.Sleep(100);

                    return(true);
                }
            }


            if (Core.Target != null)
            {
                var sC = GameObjectManager.GetObjectsOfType <BattleCharacter>().Where(
                    r => !r.IsMe && r.Distance() < 50 && r.NpcId == 8301
                    );
                var sC1 = GameObjectManager.GetObjectsOfType <BattleCharacter>().Where(
                    r => !r.IsMe && r.Distance() < 50 && r.NpcId == 8299
                    );
                var sC2 = GameObjectManager.GetObjectsOfType <BattleCharacter>().Where(
                    r => !r.IsMe && r.Distance() < 50 && r.NpcId == 8300
                    );
                var sC3 = GameObjectManager.GetObjectsOfType <BattleCharacter>().Where(
                    r => !r.IsMe && r.Distance() < 50 && r.NpcId == 8570
                    );  //锁链

                // boss 1
                if (sC1.Any() == true)
                {
                    if (plugin != null)
                    {
                        if (plugin.Enabled == true)
                        {
                            plugin.Enabled = false;
                        }
                    }
                }
                // boss 3 移动
                if (sC.Any() == true)
                {
                    if (plugin != null)
                    {
                        if (plugin.Enabled == true)
                        {
                            plugin.Enabled = false;
                        }
                    }

                    Logging.Write(Colors.Aquamarine, $"boss3");
                    var spellCaster = sC.First();


                    if (spellCaster != null && spellCaster.Name == Core.Target.Name)
                    {
                        //读条中断
                        if (Core.Me.IsCasting)
                        {
                            ActionManager.StopCasting();
                        }

                        var Obj = GameObjectManager.GetObjectsOfType <BattleCharacter>(true).Where(r =>
                                                                                                   r.NpcId == 729 || r.NpcId == 8378 || // "雅·修特拉"
                                                                                                   r.NpcId == 8889 ||                   // 琳
                                                                                                   r.NpcId == 5239 ||                   // "阿莉塞"
                                                                                                   r.Name == "阿莉塞" ||
                                                                                                   r.Name == "雅·修特拉" ||
                                                                                                   r.Name == "琳"
                                                                                                   ).OrderBy(r => r.Distance()).First();

                        //当距离大于跟随距离 再处理跟随
                        if (Obj.Location.Distance2D(Core.Me.Location) >= 0.2)
                        {
                            // 选中跟随最近的队友
                            Obj.Target();

                            Logging.Write(Colors.Aquamarine, $"队友{Obj.Name}距离:{Obj.Location.Distance2D(Core.Me.Location)}");

                            while (Obj.Location.Distance2D(Core.Me.Location) >= 0.2)
                            {
                                Navigator.PlayerMover.MoveTowards(Obj.Location);
                                await Coroutine.Sleep(50);
                            }
                            Navigator.PlayerMover.MoveStop();
                            await Coroutine.Sleep(50);

                            return(true);
                        }
                    }
                }
            }

            return(false);
        }