private void LogicE() { if (Config.Item("autoE", true).GetValue <bool>()) { var t = TargetSelector.GetTarget(E.Range, TargetSelector.DamageType.Physical); if (t.IsValidTarget()) { var positionT = Player.ServerPosition - (t.Position - Player.ServerPosition); if (Q.IsReady() && OktwCommon.IsFaced(t) && Player.Distance(t.Position) < 700 && Player.Position.Extend(positionT, 400).CountEnemiesInRange(700) < 3) { var eDmg = E.GetDamage(t); var qDmg = Q.GetDamage(t); if (qDmg + eDmg > t.Health && Player.Mana > EMANA + QMANA) { Program.CastSpell(E, t); Program.debug("E + Q FINISH"); } else if (Program.Farm && Config.Item("harrasEQ", true).GetValue <bool>() && Player.Mana > EMANA + QMANA + RMANA && Player.Distance(t.Position) > 500) { Program.CastSpell(E, t); Program.debug("E + Q Harras"); } } if (Player.Mana > RMANA + EMANA) { if (GetRealDistance(t) < 500 && Player.Health < Player.MaxHealth * 0.3) { E.Cast(t, true); } if (Player.CountEnemiesInRange(250) > 0) { E.Cast(t, true); } } } } if (Config.Item("useE", true).GetValue <KeyBind>().Active) { var position = Player.ServerPosition - (Game.CursorPos - Player.ServerPosition); E.Cast(position, true); } }
private void Game_OnGameUpdate(EventArgs args) { var dashPosition = Player.Position.Extend(Game.CursorPos, Q.Range); if (E.IsReady()) { var ksTarget = Player; foreach (var target in Program.Enemies.Where(target => target.IsValidTarget(E.Range) && target.Path.Count() < 2)) { if (CondemnCheck(Player.ServerPosition, target) && Config.Item("stun" + target.ChampionName).GetValue <bool>()) { E.Cast(target); } else if (Q.IsReady() && DashCheck(dashPosition) && Config.Item("QE", true).GetValue <bool>() && CondemnCheck(dashPosition, target)) { Q.Cast(dashPosition); Program.debug("Q + E"); } if (Config.Item("Eks", true).GetValue <bool>()) { var dmgE = E.GetDamage(target); if (dmgE > target.Health || (GetWStacks(target) == 2 && dmgE + Wdmg(target) > target.Health)) { ksTarget = target; } } } if (ksTarget != Player) { E.Cast(ksTarget); } } if (Program.LagFree(1) && Q.IsReady() && DashCheck(dashPosition)) { if (Config.Item("autoQR", true).GetValue <bool>() && Player.HasBuff("vayneinquisition") && Player.CountEnemiesInRange(1500) > 0 && Player.CountEnemiesInRange(670) != 1) { Q.Cast(dashPosition, true); } if (Program.Combo && Config.Item("autoQ", true).GetValue <bool>() && !Config.Item("Qonly", true).GetValue <bool>()) { var t = TargetSelector.GetTarget(900, TargetSelector.DamageType.Physical); if (t.IsValidTarget() && !Orbwalking.InAutoAttackRange(t) && t.Position.Distance(Game.CursorPos) < t.Position.Distance(Player.Position) && dashPosition.CountEnemiesInRange(800) < 3 && !OktwCommon.IsFaced(t)) { Q.Cast(dashPosition); } } } if (Program.LagFree(2)) { Obj_AI_Hero bestEnemy = null; foreach (var target in Program.Enemies.Where(target => target.IsValidTarget(E.Range))) { if (target.IsValidTarget(270) && target.IsMelee) { if (Q.IsReady() && Config.Item("autoQ", true).GetValue <bool>() && DashCheck(dashPosition)) { Q.Cast(dashPosition, true); } else if (E.IsReady() && Player.Health < Player.MaxHealth * 0.5) { E.Cast(target); Program.debug("push"); } } if (bestEnemy == null) { bestEnemy = target; } else if (Player.Distance(target.Position) < Player.Distance(bestEnemy.Position)) { bestEnemy = target; } } if (Config.Item("useE", true).GetValue <KeyBind>().Active&& bestEnemy != null) { E.Cast(bestEnemy); } } if (Program.LagFree(3) && R.IsReady()) { if (Config.Item("autoR", true).GetValue <bool>()) { if (Player.CountEnemiesInRange(700) > 2) { R.Cast(); } else if (Program.Combo && Player.CountEnemiesInRange(600) > 1) { R.Cast(); } else if (Player.Health < Player.MaxHealth * 0.5 && Player.CountEnemiesInRange(500) > 0) { R.Cast(); } } } }