public static void On_Unkillable_Minion(Obj_AI_Base unit, Orbwalker.UnkillableMinionArgs args) { if (Config.LasthitMenu.GetValue("lh") > Player.Instance.ManaPercent || unit == null || Modes.Combo.IsActive()) { return; } if (args.RemainingHealth <= Damages.QDamage(unit) && Spells.Q.IsReady() && Config.LasthitMenu.Checked("Q")) { Spells.Q.Cast(unit); } if (args.RemainingHealth <= Damages.WDamage(unit) && Spells.W.IsReady() && Config.LasthitMenu.Checked("W")) { Spells.W.CastStartToEnd(Player.Instance.Position.Extend(unit, Player.Instance.Distance(unit) + 100f).To3DWorld(), unit.Position); } if (args.RemainingHealth <= Damages.EDamage(unit) && Spells.E.IsReady() && Config.LasthitMenu.Checked("E")) { Spells.E.Cast(unit); } }
public static void Killsteal(EventArgs args) { if (Spells.Q.IsReady() && Config.MiscMenu.Checked("Qks")) { var target = TargetSelector.GetTarget(EntityManager.Heroes.Enemies.Where(t => t != null && t.IsValidTarget() && Spells.Q.IsInRange(t) && t.Health <= Damages.QDamage(t)), DamageType.Magical); if (target != null && !target.Unkillable()) { var pred = Spells.Q.GetPrediction(target); if (pred.CollisionObjects.Length == 0) { Spells.Q.Cast(pred.CastPosition); } } } if (Spells.W.IsReady() && Config.MiscMenu.Checked("Wks")) { var target = TargetSelector.GetTarget(EntityManager.Heroes.Enemies.Where(t => t != null && t.IsValidTarget() && Spells.W.IsInRange(t) && t.Health <= Damages.WDamage(t)), DamageType.Magical); if (target != null && !target.Unkillable()) { var pred = Spells.W.GetPrediction(target); var StartPos = pred.CastPosition.Extend(Player.Instance, pred.CastPosition.Distance(Player.Instance) + 100f).To3DWorld(); Spells.W.CastStartToEnd(StartPos, pred.CastPosition); } } if (Spells.E.IsReady() && Config.MiscMenu.Checked("Eks")) { var target = TargetSelector.GetTarget(EntityManager.Heroes.Enemies.Where(t => t != null && t.IsValidTarget() && Spells.W.IsInRange(t) && t.Health <= Damages.WDamage(t)), DamageType.Magical); if (target != null && !target.Unkillable()) { var pred = Spells.E.GetPrediction(target); Spells.E.Cast(pred.CastPosition); } } }