protected override void Killsteal() { if (Menu.Item(Menu.Name + ".killsteal.q-aa").GetValue <bool>() && Q.IsReady()) { var target = GameObjects.EnemyHeroes.FirstOrDefault(t => t.IsValidTarget() && Orbwalking.InAutoAttackRange(t)); if (target != null) { var damage = CalcPassiveDamage(target) + Q.GetDamage(target); if (damage - 10 > target.Health) { Casting.TargetSkill(target, Q); Orbwalker.ForceTarget(target); } } } if (Menu.Item(Menu.Name + ".killsteal.e").GetValue <bool>() && E.IsReady()) { foreach (var target in GameObjects.EnemyHeroes.Where(t => t.IsValidTarget() && t.Distance(Player) < MaxERange)) { var damage = E.GetDamage(target); if (damage - 10 > target.Health) { if (ELogic(target, GameObjects.EnemyHeroes.ToList(), E.GetHitChance("combo"))) { break; } } } } }
private float CalcComboDamage(Obj_AI_Hero target, bool q, bool e, bool r) { try { if (target == null) { return(0); } var damage = 0f; if (HasQBuff() && Orbwalking.InAutoAttackRange(target)) { damage += CalcPassiveDamage(target); } if (q && Q.IsReady() && target.IsValidTarget(Q.Range)) { damage += Q.GetDamage(target); if (Orbwalking.InAutoAttackRange(target)) { damage += CalcPassiveDamage(target); } } if (e && E.IsReady() && target.IsValidTarget(MaxERange)) { damage += E.GetDamage(target); } if (r && R.IsReady() && target.IsValidTarget(R.Range + R.Width)) { damage += R.GetDamage(target); int stacks; if (!IsSpellUpgraded(R)) { stacks = target.IsNearTurret(500f) ? 3 : 10; var endTimes = target.Buffs.Where( t => t.Type == BuffType.Charm || t.Type == BuffType.Snare || t.Type == BuffType.Knockup || t.Type == BuffType.Polymorph || t.Type == BuffType.Fear || t.Type == BuffType.Taunt || t.Type == BuffType.Stun).Select(t => t.EndTime).ToList(); if (endTimes.Any()) { var max = endTimes.Max(); if (max - Game.Time > 0.5f) { stacks = 14; } } } else { stacks = 13; } damage += (R.GetDamage(target, 1) * stacks); } damage += ItemManager.CalculateComboDamage(target); damage += SummonerManager.CalculateComboDamage(target); return(damage); } catch (Exception ex) { Global.Logger.AddItem(new LogItem(ex)); } return(0); }
private void OnCorePostUpdate(EventArgs args) { try { if (Menu.Item(Menu.Name + ".ultimate.follow").GetValue <bool>()) { RFollowLogic(); } if (UltimateManager.Assisted() && R.IsReady()) { if (Menu.Item(Menu.Name + ".ultimate.assisted.move-cursor").GetValue <bool>()) { Orbwalking.MoveTo(Game.CursorPos, Orbwalker.HoldAreaRadius); } var target = TargetSelector.GetTarget(R); if (target != null && !RLogic( target, Menu.Item(Menu.Name + ".ultimate.assisted.min").GetValue <Slider>().Value, Menu.Item(Menu.Name + ".combo.q").GetValue <bool>() && Q.IsReady(), Menu.Item(Menu.Name + ".combo.e").GetValue <bool>() && E.IsReady())) { if (Menu.Item(Menu.Name + ".ultimate.assisted.duel").GetValue <bool>()) { RLogicDuel( Menu.Item(Menu.Name + ".combo.q").GetValue <bool>() && Q.IsReady(), Menu.Item(Menu.Name + ".combo.e").GetValue <bool>() && E.IsReady()); } } } if (UltimateManager.Auto() && R.IsReady()) { var target = TargetSelector.GetTarget(R); if (target != null && !RLogic( target, Menu.Item(Menu.Name + ".ultimate.auto.min").GetValue <Slider>().Value, Menu.Item(Menu.Name + ".combo.q").GetValue <bool>() && Q.IsReady(), Menu.Item(Menu.Name + ".combo.e").GetValue <bool>() && E.IsReady(), false, "auto")) { if (Menu.Item(Menu.Name + ".ultimate.auto.duel").GetValue <bool>()) { RLogicDuel( Menu.Item(Menu.Name + ".combo.q").GetValue <bool>() && Q.IsReady(), Menu.Item(Menu.Name + ".combo.e").GetValue <bool>() && E.IsReady()); } } } if (HeroListManager.Enabled("w-stunned") && W.IsReady()) { var target = GameObjects.EnemyHeroes.FirstOrDefault( t => t.IsValidTarget(W.Range) && HeroListManager.Check("w-stunned", t) && Utils.IsStunned(t)); if (target != null) { Casting.SkillShot(target, W, W.GetHitChance("combo")); } } if (HeroListManager.Enabled("w-slowed") && W.IsReady()) { var target = GameObjects.EnemyHeroes.FirstOrDefault( t => t.IsValidTarget(W.Range) && HeroListManager.Check("w-slowed", t) && t.Buffs.Any(b => b.Type == BuffType.Slow && b.EndTime - Game.Time > 0.5f)); if (target != null) { Casting.SkillShot(target, W, W.GetHitChance("combo")); } } if (Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.LastHit || Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.LaneClear) { if (Menu.Item(Menu.Name + ".lasthit.q-unkillable").GetValue <bool>() && Q.IsReady() && ManaManager.Check("lasthit")) { var canAttack = Game.Time >= _lastAutoAttack + Player.AttackDelay; var minions = MinionManager.GetMinions(Q.Range) .Where( m => (!canAttack || !Orbwalking.InAutoAttackRange(m)) && m.HealthPercent <= 50 && (_lastAfterFarmTarget == null || _lastAfterFarmTarget.NetworkId != m.NetworkId) && (_lastBeforeFarmTarget == null || _lastBeforeFarmTarget.NetworkId != m.NetworkId)) .ToList(); if (minions.Any()) { foreach (var minion in minions) { var health = HealthPrediction.GetHealthPrediction( minion, (int)(Q.ArrivalTime(minion) * 1000)); if (health > 0 && Math.Abs(health - minion.Health) > 10 && Q.GetDamage(minion) * 0.85f > health) { if (Q.CastOnUnit(minion)) { _lastQKillableTarget = minion; } break; } } } } } Orbwalking.PreventStuttering(HasQBuff()); } catch (Exception ex) { Global.Logger.AddItem(new LogItem(ex)); } }