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); }
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); }
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 }
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); }