private static void Update(EventArgs args) { if (!MenuHandler.Enabled || !_shouldUse || !_isCasting || Game.CurrentMatchState != MatchState.InRound) { return; } var skill = ActiveSkills.Get(_castingId); if (skill == null) { return; } if (MenuHandler.Get(skill.Slot)) { if (OrbLogic(skill, true)) { return; } var pred = TargetSelection.GetTargetPrediction(skill, AbilityDatabase.Get(_castingId)); if (!pred.CanHit && !OrbLogic(skill)) { if (MenuHandler.Interrupt) { LocalPlayer.PressAbility(AbilitySlot.Interrupt, true); } LocalPlayer.EditAimPosition = false; return; } LocalPlayer.EditAimPosition = true; LocalPlayer.Aim(pred.CastPosition); } }
public static void GetTargetAndAim() { var castingId = LocalPlayer.Instance.AbilitySystem.CastingAbilityId; var skill = ActiveSkills.Get(castingId); if (skill == null) { return; } if (OrbLogic(skill, true)) { return; } var prediction = TargetSelection.GetTargetPrediction(skill, ActiveSkills.GetData(skill.Slot)); if (!prediction.CanHit) { if (OrbLogic(skill)) { Main.DebugOutput = "Attacking orb (no valid targets)"; } else if (MenuHandler.InterruptSpells) { LocalPlayer.PressAbility(AbilitySlot.Interrupt, true); } return; } Main.DebugOutput = "Aiming at " + prediction.Target.CharName; LocalPlayer.EditAimPosition = true; LocalPlayer.Aim(prediction.CastPosition); }
public static void GetTargetAndAim() { var castingId = LocalPlayer.Instance.AbilitySystem.CastingAbilityId; if (castingId == 238454699 && MenuHandler.SkillBool("close_a3") && EnemiesInRange(2.5f).Count > 0) { Main.DebugOutput = "Shielding self"; LocalPlayer.EditAimPosition = true; LocalPlayer.Aim(LocalPlayer.Instance.Pos()); return; } var skill = ActiveSkills.Get(castingId); if (skill == null) { return; } if (OrbLogic(skill, true)) { return; } var prediction = skill.Slot == AbilitySlot.Ability5 ? GetEPrediction(skill, ActiveSkills.GetData(skill.Slot)) : TargetSelection.GetTargetPrediction(skill, ActiveSkills.GetData(skill.Slot), skill.Slot == AbilitySlot.Ability2); if (!prediction.CanHit) { if (OrbLogic(skill)) { Main.DebugOutput = "Attacking orb (no valid targets)"; } else { if (MenuHandler.InterruptSpells && (!MenuHandler.NeverInterruptE || skill.Slot != AbilitySlot.Ability5)) { LocalPlayer.PressAbility(AbilitySlot.Interrupt, true); } } return; } Main.DebugOutput = "Aiming at " + prediction.Target.CharName; LocalPlayer.EditAimPosition = true; LocalPlayer.Aim(prediction.CastPosition); }
public static void GetTargetAndAim() { var castingId = LocalPlayer.Instance.AbilitySystem.CastingAbilityId; var skill = ActiveSkills.Get(castingId); if (skill == null) { return; } if (OrbLogic(skill, true)) { return; } var useOnIncaps = skill.Slot == AbilitySlot.Ability2 || skill.Slot == AbilitySlot.Ability5 || skill.Slot == AbilitySlot.Ability7; var prediction = skill.Slot == AbilitySlot.Ability1 && LocalPlayer.Instance.HasBuff("AscensionBuff") ? TargetSelection.GetTargetPrediction(Main.AscendedM1, Main.AM1Info, true) : TargetSelection.GetTargetPrediction(skill, ActiveSkills.GetData(skill.Slot), useOnIncaps); if (!prediction.CanHit) { if (OrbLogic(skill)) { Main.DebugOutput = "Attacking orb (no valid targets)"; } else { if (skill.SkillType == SkillType.Line && skill.Slot != AbilitySlot.Ability7 && MenuHandler.InterruptSpells) { LocalPlayer.PressAbility(AbilitySlot.Interrupt, true); } } return; } Main.DebugOutput = "Aiming at " + prediction.Target.CharName; LocalPlayer.EditAimPosition = true; LocalPlayer.Aim(prediction.CastPosition); }