/// <summary> /// On Combo /// </summary> private void Combo() { var basename = BaseName + "Combo."; if (StaticObjects.ProjectMenu.Item($"{basename}.UseQ").GetValue <bool>()) { if (_manaManager.CheckComboQ()) { if (Functions.Objects.Heroes.GetEnemies(StaticObjects.Player.AttackRange - 30).Count > 0) { Q.Cast(); } } } if (StaticObjects.ProjectMenu.Item($"{basename}.UseW").GetValue <bool>()) { if (_manaManager.CheckComboW()) { var minHitChance = Prediction.GetHitChance(StaticObjects.ProjectMenu.Item($"{basename}.UseW.Prediction").GetValue <StringList>().SelectedValue); var focusTargetValid = false; //Check if the target in target selector is valid (best target) var focusTarget = TargetSelector.GetTarget(W.Range, W.DamageType); if (focusTarget != null) { if (StaticObjects.ProjectMenu.Item($"{basename}.UseW.On.{focusTarget.ChampionName}").GetValue <bool>()) { focusTargetValid = Prediction.DoCast(W, focusTarget, minHitChance); } } if (!focusTargetValid) { var orderedTargets = Prediction.OrderTargets(W); foreach (var target in orderedTargets) { if (StaticObjects.ProjectMenu.Item($"{basename}.UseW.On.{target.ChampionName}").GetValue <bool>()) { continue; } if (Prediction.DoCast(W, target, minHitChance)) { break; } } } } } if (StaticObjects.ProjectMenu.Item($"{basename}.UseR").GetValue <bool>()) { if (_manaManager.CheckComboR()) { var minHitChance = Prediction.GetHitChance(StaticObjects.ProjectMenu.Item($"{basename}.UseR.Prediction").GetValue <StringList>().SelectedValue); var focusTargetValid = false; //Check if the target in target selector is valid (best target) var focusTarget = TargetSelector.GetTarget(R.Range, R.DamageType); if (focusTarget != null) { if (StaticObjects.ProjectMenu.Item($"{basename}.UseR.On.{focusTarget.ChampionName}").GetValue <bool>()) { if (StaticObjects.ProjectMenu.Item($"{basename}.UseR.On.{focusTarget.ChampionName}.HpMin").GetValue <Slider>().Value > focusTarget.HealthPercent) { if (StaticObjects.ProjectMenu.Item($"{basename}.UseR.On.{focusTarget.ChampionName}.HpMax").GetValue <Slider>().Value < focusTarget.HealthPercent) { focusTargetValid = Prediction.DoCast(R, focusTarget, minHitChance); } } } } if (!focusTargetValid) { var orderedTargets = Prediction.OrderTargets(R); foreach (var target in orderedTargets) { if (!StaticObjects.ProjectMenu.Item($"{basename}.UseR.On.{target.ChampionName}").GetValue <bool>()) { continue; } if (StaticObjects.ProjectMenu.Item($"{basename}.UseR.On.{target.ChampionName}.HpMin").GetValue <Slider>().Value > target.HealthPercent) { continue; } if (StaticObjects.ProjectMenu.Item($"{basename}.UseR.On.{target.ChampionName}.HpMax").GetValue <Slider>().Value < target.HealthPercent) { continue; } if (Prediction.DoCast(R, target, minHitChance)) { break; } } } } } }
/// <summary> /// On Combo /// </summary> private void Combo() { var basename = BaseName + "Combo."; if (StaticObjects.ProjectMenu.Item($"{basename}.UseQ").GetValue <bool>()) { if (_manaManager.CheckComboQ()) { var minHitChance = Prediction.GetHitChance(StaticObjects.ProjectMenu.Item($"{basename}.UseQ.Prediction").GetValue <StringList>().SelectedValue); var focusTargetValid = false; //Check if the target in target selector is valid (best target) var focusTarget = TargetSelector.GetTarget(Q.Range, Q.DamageType); if (focusTarget != null) { if (StaticObjects.ProjectMenu.Item($"{basename}.UseQ.On.{focusTarget.ChampionName}").GetValue <bool>()) { focusTargetValid = Prediction.DoCast(Q, focusTarget, minHitChance, true); } } if (!focusTargetValid) { var orderedTargets = Prediction.OrderTargets(Q); foreach (var target in orderedTargets) { if (!StaticObjects.ProjectMenu.Item($"{basename}.UseQ.On.{target.ChampionName}").GetValue <bool>()) { continue; } if (Prediction.DoCast(Q, focusTarget, minHitChance, true)) { break; } } } } } if (StaticObjects.ProjectMenu.Item($"{basename}.UseW").GetValue <bool>()) { if (_manaManager.CheckComboW()) { var minHitChance = Prediction.GetHitChance(StaticObjects.ProjectMenu.Item($"{basename}.UseW.Prediction").GetValue <StringList>().SelectedValue); var focusTargetValid = false; //Check if the target in target selector is valid (best target) var focusTarget = TargetSelector.GetTarget(W.Range, W.DamageType); if (focusTarget != null) { if (StaticObjects.ProjectMenu.Item($"{basename}.UseW.On.{focusTarget.ChampionName}").GetValue <bool>()) { focusTargetValid = Prediction.DoCast(W, focusTarget, minHitChance); } } if (!focusTargetValid) { var orderedTargets = Prediction.OrderTargets(W); foreach (var target in orderedTargets) { if (!StaticObjects.ProjectMenu.Item($"{basename}.UseW.On.{target.ChampionName}").GetValue <bool>()) { continue; } if (Prediction.DoCast(W, focusTarget, minHitChance)) { break; } } } } } if (StaticObjects.ProjectMenu.Item($"{basename}.UseR").GetValue <bool>()) { if (_manaManager.CheckComboR()) { var minHitChance = Prediction.GetHitChance(StaticObjects.ProjectMenu.Item($"{basename}.UseR.Prediction").GetValue <StringList>().SelectedValue); var focusTargetValid = false; //Check if the target in target selector is valid (best target) var focusTarget = TargetSelector.GetTarget(StaticObjects.ProjectMenu.Item($"{basename}.UseR.Range").GetValue <Slider>().Value, R.DamageType); if (focusTarget != null) { if (StaticObjects.ProjectMenu.Item($"{basename}.UseR.On.{focusTarget.ChampionName}").GetValue <bool>()) { if (focusTarget.Distance(StaticObjects.Player) > Q.Range) { if (GetRealRDamage(focusTarget) > focusTarget.Health) { focusTargetValid = Prediction.DoCast(R, focusTarget, minHitChance); } } } } if (!focusTargetValid) { var orderedTargets = Prediction.OrderTargets(R); foreach (var target in orderedTargets) { if (!StaticObjects.ProjectMenu.Item($"{basename}.UseR.On.{target.ChampionName}").GetValue <bool>()) { continue; } if (target.Health > GetRealRDamage(target)) { continue; } if (Q.Range > target.Distance(StaticObjects.Player)) { continue; } if (Prediction.DoCast(R, target, minHitChance)) { break; } } } } } }