private void Combo() { if (actionQueue.ExecuteNextAction(comboQueue)) { return; } if (q.UseOnCombo && q.IsReady()) { if (CastQ(true)) { return; } } if (w.UseOnCombo && w.IsReady() && TargetSelector.GetTarget(player.AttackRange + 30F, TargetSelector.DamageType.Physical) != null) { AIHeroClient target = TargetSelector.GetTarget(player.AttackRange + 30F, TargetSelector.DamageType.Physical); if (target != null) { actionQueue.EnqueueAction(comboQueue, () => true, () => w.Cast(), () => !w.IsReady()); actionQueue.EnqueueAction(comboQueue, () => true, () => olafItems.UseItems(target), () => true); actionQueue.EnqueueAction( comboQueue, () => true, () => EloBuddy.Player.IssueOrder(GameObjectOrder.AttackUnit, target), () => autoAttackCheck.Status || player.Distance(target) > Orbwalking.GetRealAutoAttackRange(target)); return; } } if (e.UseOnCombo && e.IsReady()) { AIHeroClient target = TargetSelector.GetTarget(e.Range, e.DamageType); if (target != null) { actionQueue.EnqueueAction( comboQueue, () => true, () => EloBuddy.Player.IssueOrder(GameObjectOrder.AttackUnit, target), () => autoAttackCheck.Status); actionQueue.EnqueueAction(comboQueue, () => true, () => olafItems.UseItems(target), () => true); actionQueue.EnqueueAction(comboQueue, () => true, () => CastE(target), () => !e.IsReady()); actionQueue.EnqueueAction( comboQueue, () => true, () => EloBuddy.Player.IssueOrder(GameObjectOrder.AttackUnit, target), () => autoAttackCheck.Status || player.Distance(target) > Orbwalking.GetRealAutoAttackRange(target)); } } }
private bool CastQ(bool combo, IEnumerable <AIHeroClient> blackList = null) { if ((q.IsReady()) && ((combo && q.UseOnCombo) || (!combo && q.UseOnHarass))) { AIHeroClient target = TargetSelector.GetTarget(q.Range, q.DamageType, true, blackList); if (target != null) { PredictionOutput predictionOutput = q.GetPrediction(target); if (predictionOutput.Hitchance >= HitChance.Medium) { float distance1 = predictionOutput.CastPosition.Distance(player.Position); float distance2 = target.Distance(player.Position); float extension = -75F; if (distance2 < player.AttackRange) { extension = 50F; } if (distance1 > 250F) { extension = -100; } if (distance1 > 500F) { extension = -130F; } if (distance1 > 700) { extension = -150F; } else if (distance1 > 850F) { extension = -175F; } q.Cast(predictionOutput.CastPosition.Extend(player.Position, extension)); return(true); } } } return(false); }