private static void AutoKick() { if (getSliderItem(miscMenu, "LeeSin_AutoKick") == 0 || getKeyBindItem(miscMenu, "LeeSin_InsecKick")) { return; } var target = HeroManager.Enemies.Where(x => x.LSDistance(Player) < 375 && !x.IsDead && x.LSIsValidTarget(375)) .OrderBy(x => x.LSDistance(Player)).FirstOrDefault(); if (target == null) { return; } var ultPoly = new LeagueSharp.Common.Geometry.Polygon.Rectangle(Player.ServerPosition, Player.ServerPosition.LSExtend(target.Position, 1100), target.BoundingRadius + 10); var count = HeroManager.Enemies.Where(x => x.LSDistance(Player) < 1100 && x.LSIsValidTarget(1100)) .Count(h => h.NetworkId != target.NetworkId && ultPoly.IsInside(h.ServerPosition)); if (count >= getSliderItem(miscMenu, "LeeSin_AutoKick") && _R.IsReady()) { _R.Cast(target); } }
private void Cast_Q(Obj_AI_Hero forceTarget = null) { if (!Q.IsReady() || !PassiveCheck()) { return; } var target = TargetSelector.GetTarget(Q.Range, TargetSelector.DamageType.Physical); if (forceTarget != null) { target = forceTarget; } if (target != null && target.IsValidTarget(Q.Range)) { if (Q.Cast(target) == Spell.CastStates.SuccessfullyCasted) { Q.LastCastAttemptT = Utils.TickCount; return; } } target = TargetSelector.GetTarget(QExtend.Range, TargetSelector.DamageType.Physical); if (forceTarget != null) { target = forceTarget; } if (target == null || !menu.Item("UseQExtendCombo", true).GetValue <bool>()) { return; } var pred = QExtend.GetPrediction(target, true); var collisions = MinionManager.GetMinions(Player.ServerPosition, Q.Range, MinionTypes.All, MinionTeam.NotAlly); if (!collisions.Any() || (!target.IsMoving && menu.Item("MovementCheck", true).GetValue <bool>())) { return; } foreach (var minion in collisions) { var poly = new Geometry.Polygon.Rectangle(Player.ServerPosition, Player.ServerPosition.Extend(minion.ServerPosition, QExtend.Range), QExtend.Width); if (poly.IsInside(pred.UnitPosition)) { if (Q.Cast(minion) == Spell.CastStates.SuccessfullyCasted) { Q.LastCastAttemptT = Utils.TickCount; return; } } } }
private void Combo() { var itemTarget = TargetSelector.GetTarget(750, TargetSelector.DamageType.Physical); if (itemTarget != null) { var dmg = GetComboDamage(itemTarget); ItemManager.Target = itemTarget; if (dmg > itemTarget.Health - 50) { ItemManager.KillableTarget = true; } ItemManager.UseTargetted = true; } if (Menu.Item("UseQExtendCombo", true).GetValue <bool>() && Q.IsReady()) { var target = TargetSelector.GetTarget(QExtend.Range, TargetSelector.DamageType.Physical); if (!target.IsValidTarget(Q.Range) && target.IsValidTarget(QExtend.Range)) { var pred = QExtend.GetPrediction(target, true); var collisions = MinionManager.GetMinions(Player.ServerPosition, Q.Range, MinionTypes.All, MinionTeam.NotAlly); if (!collisions.Any() || (!target.IsMoving && Menu.Item("MovementCheck", true).GetValue <bool>())) { return; } foreach (var minion in collisions) { var poly = new Geometry.Polygon.Rectangle(Player.ServerPosition, Player.ServerPosition.Extend(minion.ServerPosition, QExtend.Range), QExtend.Width); if (poly.IsInside(pred.UnitPosition)) { Q.Cast(minion); } } } } if (Menu.Item("UseRCombo", true).GetValue <bool>() && R.IsReady()) { var target = TargetSelector.GetTarget(R.Range, TargetSelector.DamageType.Physical); if (target.IsValidTarget(R.Range) && !target.IsZombie && !target.IsDead && R.GetDamage(target) * GetShots() > target.Health && target.Distance(Player) > Orbwalking.GetAttackRange(Player) + 150) { R.Cast(target); } } }
private static void CastR(Obj_AI_Base target) { if (!spells[Spells.R].IsReady() || !target.LSIsValidTarget(spells[Spells.R].Range) || !getCheckBoxItem(cMenu, "ElLux.Combo.R") || target.IsZombie || target.IsDead) { return; } if (getCheckBoxItem(cMenu, "ElLux.Combo.R.AOE")) { const float LuxRDistance = 3340; const float LuxRWidth = 70; var minREnemies = getSliderItem(cMenu, "ElLux.Combo.R.Count") ; foreach (var enemy in HeroManager.Enemies) { var startPos = enemy.ServerPosition; var endPos = Player.ServerPosition.LSExtend( startPos, Player.Distance(enemy) + LuxRDistance); var rectangle = new LeagueSharp.Common.Geometry.Polygon.Rectangle(startPos, endPos, LuxRWidth); if (HeroManager.Enemies.Count(x => rectangle.IsInside(x)) >= minREnemies) { spells[Spells.R].Cast(enemy); } } } if (getCheckBoxItem(cMenu, "ElLux.Combo.R.Rooted")) { if (target.HasBuff("LuxLightBindingMis")) { var prediction = spells[Spells.Q].GetPrediction(target); if (prediction.Hitchance >= HitChance.High) { spells[Spells.R].Cast(prediction.CastPosition); } } } if (spells[Spells.R].GetDamage(target) > GetHealth(target) && getCheckBoxItem(cMenu, "ElLux.Combo.R.Kill")) { var prediction = spells[Spells.R].GetPrediction(target); if (prediction.Hitchance >= HitChance.High) { spells[Spells.R].Cast(prediction.CastPosition); } } }
private void Cast_QE(string source, Obj_AI_Base target = null) { var qeTarget = TargetSelector.GetTarget(_qe.Range, TargetSelector.DamageType.Magical); if (qeTarget == null || !Q.IsReady() || !E.IsReady()) { return; } var qTarget = TargetSelector.GetTarget(E.Range, TargetSelector.DamageType.Magical); if (qTarget.IsValidTarget(E.Range)) { var pred = Q.GetPrediction(qTarget); if (pred.Hitchance >= HitChanceManager.GetQEHitChance(source)) { Q.Cast(pred.CastPosition); W.LastCastAttemptT = Utils.TickCount + 500; _qe.LastCastAttemptT = Utils.TickCount; } } else { var startPos = Player.ServerPosition.To2D().Extend(qeTarget.ServerPosition.To2D(), Q.Range).To3D(); double rangeLeft = 100 + (-0.6 * Player.Distance(startPos) + 950); var endPos = startPos + Vector3.Normalize(startPos - Player.ServerPosition) * (float)rangeLeft; _qe.From = startPos; _qe.Delay = E.Delay + Q.Range / E.Speed; var qePred = _qe.GetPrediction(qeTarget); var poly = new Geometry.Polygon.Rectangle(startPos, endPos, _qe.Width); if (!poly.IsInside(qePred.UnitPosition)) { return; } poly.Draw(Color.LawnGreen); if (qePred.Hitchance >= HitChanceManager.GetQEHitChance(source)) { Q.Cast(startPos); W.LastCastAttemptT = Utils.TickCount + 500; _qe.LastCastAttemptT = Utils.TickCount; } } }
private static void BardQ(AIHeroClient Target, bool Type, bool Draw = false) { // Type 0: no sturn / 1: only sturn // If Draw is true, return draw /* return * target1, target2, type */ Range1 = new LeagueSharp.Common.Geometry.Polygon.Rectangle(Player.Position, Player.Position.LSExtend(Target.Position, _Q.Range), _Q.Width); Range2 = null; if (Draw) { Range1.Draw(Color.Red); } cnt = 0; BardQTarget1 = Player; BardQTarget2 = Player; foreach (var item in ObjectManager.Get <Obj_AI_Base>().OrderBy(f => f.Distance(f.Position))) { if (item.Distance(Player.Position) < _Q.Range) { if (item is AIHeroClient || item is Obj_AI_Minion) { if (item.IsEnemy && !item.IsDead) { if (cnt == 2) { break; } if (cnt == 0 && Range1.IsInside(item.Position)) { BardQTarget1 = item; Range2 = new LeagueSharp.Common.Geometry.Polygon.Rectangle(Player.Position.Extend(BardQTarget1.Position, Player.Distance(BardQTarget1.Position)), Player.Position.Extend(BardQTarget1.Position, Player.Distance(BardQTarget1.Position) + 450), _Q.Width); if (Draw) { Range2.Draw(Color.Yellow); } cnt++; } if (cnt == 1 && Range2.IsInside(item.Position)) { BardQTarget2 = item; cnt++; } } } } } }
private static rUtility Find_R_BestPos(Obj_AI_Base target) { rUtility result = new rUtility(new Vector3(), 0); Vector3 bestPos = new Vector3(); int unitHit = 1; int maxHit = 1; foreach (var unit in HeroManager.Enemies) { if (unit.NetworkId != target.NetworkId && unit.IsValidTarget()) { var pred = LeagueSharp.Common.Prediction.GetPrediction(unit, 300); if (target.Position.Distance(pred.UnitPosition) < 900) { Vector3 startPos = target.Position; Vector3 endPos = pred.UnitPosition; endPos = startPos + (endPos - startPos).Normalized() * 900; var zone = new LeagueSharp.Common.Geometry.Polygon.Rectangle(startPos, endPos, target.BoundingRadius - 5); foreach (var unit2 in HeroManager.Enemies) { if (unit2.NetworkId != target.NetworkId && unit2.NetworkId != unit.NetworkId && unit2.IsValidTarget()) { pred = LeagueSharp.Common.Prediction.GetPrediction(unit2, 300); if (zone.IsInside(pred.UnitPosition)) { unitHit++; if (unitHit > maxHit) { maxHit = unitHit; bestPos = target.Position + (target.Position - unit2.Position).Normalized() * 250; result.pos = bestPos; result.hit = maxHit; } } } } if (maxHit == 1) { maxHit = 2; bestPos = target.Position + (target.Position - unit.Position).Normalized() * 250; result.pos = bestPos; result.hit = maxHit; } } } } return(result); }
private void SmartKs() { if (!Menu.Item("smartKS", true).GetValue <bool>()) { return; } foreach (var target in ObjectManager.Get <Obj_AI_Hero>().Where(x => x.IsValidTarget(QExtend.Range) && !x.IsDead && !x.HasBuffOfType(BuffType.Invulnerability))) { if (Q.IsKillable(target) && Player.Distance(target.Position) < QExtend.Range && Q.IsReady()) { if (target.IsValidTarget(Q.Range)) { Q.Cast(target); } else { var pred = QExtend.GetPrediction(target, true); var collisions = MinionManager.GetMinions(Player.ServerPosition, Q.Range, MinionTypes.All, MinionTeam.NotAlly); if (!collisions.Any() || (!target.IsMoving && Menu.Item("MovementCheck", true).GetValue <bool>())) { return; } foreach (var minion in collisions) { var poly = new Geometry.Polygon.Rectangle(Player.ServerPosition, Player.ServerPosition.Extend(minion.ServerPosition, QExtend.Range), QExtend.Width); if (poly.IsInside(pred.UnitPosition)) { if (Q.Cast(minion) == Spell.CastStates.SuccessfullyCasted) { Q.LastCastAttemptT = Utils.TickCount; return; } } } } } if (W.IsKillable(target) && Player.Distance(target.Position) < W.Range && W.IsReady()) { W.Cast(target); } } }
private void Harass() { if (!ManaManager.HasMana("Harass")) { return; } if (Menu.Item("UseQHarass", true).GetValue <bool>() && Q.IsReady()) { var target = TargetSelector.GetTarget(QExtend.Range, TargetSelector.DamageType.Physical); if (target != null) { if (target.IsValidTarget(Q.Range)) { Q.Cast(target); } else if (target.IsValidTarget(QExtend.Range) && Menu.Item("UseQExtendHarass", true).GetValue <bool>()) { var pred = QExtend.GetPrediction(target, true); var collisions = MinionManager.GetMinions(Player.ServerPosition, Q.Range, MinionTypes.All, MinionTeam.NotAlly); if (!collisions.Any() || (!target.IsMoving && Menu.Item("MovementCheck", true).GetValue <bool>())) { return; } foreach (var minion in collisions) { var poly = new Geometry.Polygon.Rectangle(Player.ServerPosition, Player.ServerPosition.Extend(minion.ServerPosition, QExtend.Range), QExtend.Width); if (poly.IsInside(pred.UnitPosition)) { Q.Cast(minion); } } } } } if (Menu.Item("UseWHarass", true).GetValue <bool>() && W.IsReady()) { SpellCastManager.CastBasicSkillShot(W, W.Range, TargetSelector.DamageType.Magical, HitChance.VeryHigh); } }
private void CastQ(string source) { if (!Q.IsReady()) { return; } var target = TargetSelector.GetTarget(Q.Range, TargetSelector.DamageType.Physical); if (target != null && target.IsValidTarget(Q.Range)) { SpellCastManager.CastBasicSkillShot(Q, Q.Range, TargetSelector.DamageType.Magical, HitChanceManager.GetQHitChance(source)); } target = TargetSelector.GetTarget(QExtend.Range, TargetSelector.DamageType.Physical); if (target == null) { return; } var pred = QExtend.GetPrediction(target, true); var collisions = MinionManager.GetMinions(Player.ServerPosition, Q.Range, MinionTypes.All, MinionTeam.NotAlly); if (!collisions.Any()) { return; } foreach (var minion in collisions) { var poly = new Geometry.Polygon.Rectangle(Player.ServerPosition, Player.ServerPosition.Extend(minion.ServerPosition, QExtend.Range), QExtend.Width); if (poly.IsInside(pred.UnitPosition)) { if (Q.Cast(minion) == Spell.CastStates.SuccessfullyCasted) { Q.LastCastAttemptT = Utils.TickCount; return; } } } }
private static void BardQ(AIHeroClient Target, bool Type, bool Draw = false) { // Type 0: no sturn / 1: only sturn // If Draw is true, return draw /* return target1, target2, type */ Range1 = new LeagueSharp.Common.Geometry.Polygon.Rectangle(Player.Position, Player.Position.LSExtend(Target.Position, _Q.Range), _Q.Width); Range2 = null; if (Draw) Range1.Draw(Color.Red); cnt = 0; BardQTarget1 = Player; BardQTarget2 = Player; foreach (var item in ObjectManager.Get<Obj_AI_Base>().OrderBy(f => f.LSDistance(f.Position))) { if (item.LSDistance(Player.Position) < _Q.Range) if (item is AIHeroClient || item is Obj_AI_Minion) if (item.IsEnemy && !item.IsDead) { if (cnt == 2) break; if (cnt == 0 && Range1.IsInside(item.Position)) { BardQTarget1 = item; Range2 = new LeagueSharp.Common.Geometry.Polygon.Rectangle(Player.Position.LSExtend(BardQTarget1.Position, Player.LSDistance(BardQTarget1.Position)), Player.Position.LSExtend(BardQTarget1.Position, Player.LSDistance(BardQTarget1.Position) + 450), _Q.Width); if (Draw) Range2.Draw(Color.Yellow); cnt++; } if (cnt == 1 && Range2.IsInside(item.Position)) { BardQTarget2 = item; cnt++; } } } }
private static void Combo() { #region R combos var unit = HeroManager.Enemies.Where(x => x.Distance(Player) < 500 && !x.IsDead && x.IsValidTarget(500) && x.Health < R.GetDamage(x) + 50) .OrderBy(x => x.Distance(Player)).FirstOrDefault(); if (unit != null) { foreach ( var targets in HeroManager.Enemies.Where( x => !x.IsDead && x.IsValidTarget() && x.IsVisible && x.Distance(unit) < 1000 && x.Distance(unit) > 300 && x.NetworkId != unit.NetworkId && x.Health < R.GetDamage(x))) { var prediction = Prediction.GetPrediction(targets, 0.1f); var pos = prediction.UnitPosition.Extend(unit.ServerPosition, prediction.UnitPosition.Distance(unit.ServerPosition) + 250); RCombo = pos; var slot = Items.GetWardSlot(); if (unit.Distance(Player) > 500) { RCombo = null; } if (W.IsReady() && R.IsReady() && Player.ServerPosition.Distance(unit.ServerPosition) < 500 && slot != null) { if (!_processw && Player.GetSpell(SpellSlot.W).Name == "BlindMonkWOne") { Player.Spellbook.CastSpell(slot.SpellSlot, pos); _lastwarr = Environment.TickCount; } if (Player.GetSpell(SpellSlot.W).Name == "blindmonkwtwo") { _lastwards = Environment.TickCount; } } } if (Player.IsDead) { ultPoly = null; ultPolyExpectedPos = null; return; } ultPoly = new Geometry.Polygon.Rectangle(Player.ServerPosition, Player.ServerPosition.Extend(unit.Position, 1100), unit.BoundingRadius + 30); var counts = HeroManager.Enemies.Where(x => x.Distance(Player) < 1100 && x.IsValidTarget(1100) && x.Health < R.GetDamage(x)) .Count(h => h.NetworkId != unit.NetworkId && ultPoly.IsInside(h.ServerPosition)); if (counts >= 1 && R.IsReady() && created && R.IsReady()) { R.Cast(unit); } } #endregion #region Regular combo var target = TargetSelector.GetTarget(Q.Range, TargetSelector.DamageType.Physical); if (!target.IsValidTarget()) return; var useq = GetBool("useq", typeof (bool)); var usee = GetBool("usee", typeof (bool)); var user = GetBool("user", typeof (bool)); var usew = GetBool("wardjumpcombo", typeof (bool)); var smite = GetBool("usessmite", typeof (bool)); if (GetStringValue("hydrati") == 0 || GetStringValue("hydrati") == 2) { if (target.IsValidTarget(400) && (ItemReady(Tiamat) || ItemReady(Hydra)) && (HasItem(Tiamat) || HasItem(Hydra))) { SelfCast(HasItem(Hydra) ? Hydra : Tiamat); } } if (GetBool("youm", typeof (bool)) && HasItem(Youm) && ItemReady(Youm) && target.Distance(Player) < Q.Range - 300) { SelfCast(Youm); } if (GetBool("omen", typeof (bool)) && HasItem(Omen) && ItemReady(Omen) && Player.CountAlliesInRange(400) >= GetValue("minrand")) { SelfCast(Omen); } if (usew) { if (Environment.TickCount - _lastqc > 300 && Environment.TickCount - _laste > 300 && Environment.TickCount - lastwcombo > 300) { if (W.IsReady() && target.Distance(Player) <= Player.AttackRange && Player.Spellbook.GetSpell(SpellSlot.W).Name == "BlindMonkWOne") { W.Cast(Player); lastwcombo = Environment.TickCount; } if (W.IsReady() && target.Distance(Player) <= Player.AttackRange && Player.Spellbook.GetSpell(SpellSlot.W).Name == "blindmonkwtwo" && !HasPassive()) { W.Cast(); } } } if (useq) { if (Environment.TickCount - _lastqc > 300 && Environment.TickCount - _laste > 300 && Environment.TickCount - lastwcombo > 300) { var qpred = Q.GetPrediction(target); if (Q.IsReady() && Player.Spellbook.GetSpell(SpellSlot.Q).Name == "BlindMonkQOne" && (qpred.Hitchance >= HitChance.Medium || qpred.Hitchance == HitChance.Immobile || qpred.Hitchance == HitChance.Dashing)) { Q.Cast(qpred.CastPosition); _lastqc = Environment.TickCount; } if (Player.Spellbook.GetSpell(SpellSlot.Q).Name == "blindmonkqtwo" && Q.IsReady() && GetBool("useq2", typeof (bool))) { Utility.DelayAction.Add(GetValue("secondqdelay"), () => Q.Cast()); _lastqc = Environment.TickCount; } } } if (usee) { if (Environment.TickCount - _lastqc > 300 && Environment.TickCount - _laste > 300 && Environment.TickCount - lastwcombo > 300) { if (target.Distance(Player) <= E.Range && Player.GetSpell(SpellSlot.E).Name == "BlindMonkEOne") { E.Cast(); _laste = Environment.TickCount; } if ((Player.Distance(target) > Player.AttackRange + Player.BoundingRadius + target.BoundingRadius + 100 || Environment.TickCount - _laste > 2700) && Player.GetSpell(SpellSlot.E).Name == "blindmonketwo") { E.Cast(); _laste = Environment.TickCount; } } } if (user && target.IsValidTarget(R.Range) && R.IsReady()) { if (Q.IsReady() && target.Health <= R.GetDamage(target) + GetQDamage(target) + Player.GetAutoAttackDamage(target) && Q.IsReady() && target.Health > GetQDamage(target)) { R.Cast(target); } if (target.Health <= R.GetDamage(target) + Q.GetDamage(target) && Q.IsReady() && Player.Mana > 30) { R.Cast(target); } } if (Smite.IsReady() && target.Distance(Player) < 500 && smite) { Player.Spellbook.CastSpell(Smite, target); } #endregion }
private void Cast_Q(Obj_AI_Hero forceTarget = null) { if (!Q.IsReady() || !PassiveCheck()) return; var target = TargetSelector.GetTarget(Q.Range, TargetSelector.DamageType.Physical); if (forceTarget != null) target = forceTarget; if (target != null && target.IsValidTarget(Q.Range)) { if (Q.Cast(target) == Spell.CastStates.SuccessfullyCasted) { Q.LastCastAttemptT = Utils.TickCount; return; } } target = TargetSelector.GetTarget(QExtend.Range, TargetSelector.DamageType.Physical); if (forceTarget != null) target = forceTarget; if (target == null || !menu.Item("UseQExtendCombo", true).GetValue<bool>()) return; var pred = QExtend.GetPrediction(target, true); var collisions = MinionManager.GetMinions(Player.ServerPosition, Q.Range, MinionTypes.All, MinionTeam.NotAlly); if (!collisions.Any() || (!target.IsMoving && menu.Item("MovementCheck", true).GetValue<bool>())) return; foreach (var minion in collisions) { var poly = new Geometry.Polygon.Rectangle(Player.ServerPosition, Player.ServerPosition.Extend(minion.ServerPosition, QExtend.Range), QExtend.Width); if (poly.IsInside(pred.UnitPosition)) { if (Q.Cast(minion) == Spell.CastStates.SuccessfullyCasted) { Q.LastCastAttemptT = Utils.TickCount; return; } } } }
private void Cast_QE(string source, Obj_AI_Base target = null) { var qeTarget = TargetSelector.GetTarget(_qe.Range, TargetSelector.DamageType.Magical); if (qeTarget == null || !Q.IsReady() || !E.IsReady()) return; var qTarget = TargetSelector.GetTarget(E.Range, TargetSelector.DamageType.Magical); if (qTarget.IsValidTarget(E.Range)) { var pred = Q.GetPrediction(qTarget); if (pred.Hitchance >= HitChanceManager.GetQEHitChance(source)) { Q.Cast(pred.CastPosition); W.LastCastAttemptT = Utils.TickCount + 500; _qe.LastCastAttemptT = Utils.TickCount; } } else { var startPos = Player.ServerPosition.To2D().Extend(qeTarget.ServerPosition.To2D(), Q.Range).To3D(); double rangeLeft = 100 + (-0.6*Player.Distance(startPos) + 950); var endPos = startPos + Vector3.Normalize(startPos - Player.ServerPosition)*(float) rangeLeft; _qe.From = startPos; _qe.Delay = E.Delay + Q.Range / E.Speed; var qePred = _qe.GetPrediction(qeTarget); var poly = new Geometry.Polygon.Rectangle(startPos, endPos, _qe.Width); if (!poly.IsInside(qePred.UnitPosition)) return; poly.Draw(Color.LawnGreen); if (qePred.Hitchance >= HitChanceManager.GetQEHitChance(source)) { Q.Cast(startPos); W.LastCastAttemptT = Utils.TickCount + 500; _qe.LastCastAttemptT = Utils.TickCount; } } }
private static void AutoUlt() { // Hoes code below var target = HeroManager.Enemies.Where(x => x.Distance(Player) < R.Range && !x.IsDead && x.IsValidTarget(R.Range)) .OrderBy(x => x.Distance(Player)).FirstOrDefault(); if (target == null || Player.IsDead) { ultPoly = null; ultPolyExpectedPos = null; return; } ultPoly = new Geometry.Polygon.Rectangle(Player.ServerPosition, Player.ServerPosition.Extend(target.Position, 1100), target.BoundingRadius + 10); var counts = HeroManager.Enemies.Where(x => x.Distance(Player) < 1100 && x.IsValidTarget(1100)) .Count(h => h.NetworkId != target.NetworkId && ultPoly.IsInside(h.ServerPosition)); if (counts >= GetValue("autoron") && R.IsReady()) { R.Cast(target); } //// HyunMi code here //var enemies = Playerpos.GetEnemiesInRange(2800); //byte minEnemHitConstraint = (byte)Config.Item("xeminhit").GetValue<Slider>().Value; //if (enemies.Count < minEnemHitConstraint) return; //bool xeallowFlash = Config.Item("xeflash").GetValue<bool>(); //bool allowWard = Config.Item("xeward").GetValue<bool>(); //bool canUseWard = false, canUseFlash = false; //if (FlashSlot.IsReady() && FlashSlot != SpellSlot.Unknown && xeallowFlash) //{ // canUseFlash = true; //} ////TODO: check if player has a ward and w is ready if so canUseWard == true only if AllowWard = true }
private static void OnProcessSpell(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args) { try { if (!(sender is AIHeroClient) || Player.LSIsRecalling()) return; // Auto W if (getCheckBoxItem(Misc, "Braum_AutoW") && _W.IsReady()) { if (!(sender is AIHeroClient) || !sender.IsEnemy) return; if (args.Target != null) if (args.SData.Name.ToLower().Contains("attack") && args.Target.Position.LSDistance(Player.Position) < _W.Range) if (args.Target.IsAlly && args.Target is AIHeroClient) { if (args.Target.IsMe && Player.HealthPercent < 20) { _W.CastOnUnit((Obj_AI_Base)args.Target, true); } else { _W.CastOnUnit((Obj_AI_Base)args.Target, true); } } } // Auto E if (getCheckBoxItem(Misc, "Braum_AutoE") && _E.IsReady()) { if (!(sender is AIHeroClient) || !sender.IsEnemy || !PortAIO.OrbwalkerManager.CanAttack()) return; var enemyskill = new LeagueSharp.Common.Geometry.Polygon.Rectangle(args.Start, args.End, args.SData.BounceRadius + 20); var myteam = HeroManager.Allies.Where(f => f.LSDistance(Player.Position) < 200); var count = myteam.Count(f => enemyskill.IsInside(f.Position)); if (args.Target != null && args.Target.Position.LSDistance(Player.Position) < 200) { if (args.Target.Name == Player.Name && Player.HealthPercent < 20) { _E.Cast(sender.Position, true); } else if (args.Target.Position.LSDistance(Player.Position) < 200 && args.Target is AIHeroClient) { if (_W.IsReady() && args.Target.Position.LSDistance(Player.Position) < _W.Range) _W.CastOnUnit((Obj_AI_Base)args.Target, true); _E.Cast(sender.Position, true); } } else if (args.Target == null) { if (Player.HealthPercent < 20 && count == 1) { _E.Cast(sender.Position, true); } else if (count >= 2) { _E.Cast(sender.Position, true); } } } } catch (Exception) { if (NowTime() > ErrorTime) { Chat.Print(ChampName + " in FreshBooster isn't Load. Error Code 08"); ErrorTime = TickCount(10000); } } }
private static void OnProcessSpell(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args) { try { if (args.Target is Obj_AI_Minion || !(sender is AIHeroClient)) { return; } if (getCheckBoxItem(miscMenu, "Janna_AutoE")) { if (sender.IsEnemy) { var StartPos = args.Start; var EndPos = args.End; var NonTRange = new LeagueSharp.Common.Geometry.Polygon.Rectangle(StartPos, EndPos, sender.BoundingRadius + 30); var Target = HeroManager.Allies.FirstOrDefault(f => f.Position.LSDistance(Player.Position) <= _E.Range && NonTRange.IsInside(f.Position)); if (Target == Player && getCheckBoxItem(miscMenu, "Janna_AutoE1")) { return; } if (Target != null) { _E.CastOnUnit(Target, true); return; } if (args.Target != null && args.Target.Position.LSDistance(Player.Position) <= _E.Range && args.Target is AIHeroClient) { var ShieldTarget = HeroManager.Allies.FirstOrDefault(f => f.Position.LSDistance(args.Target.Position) <= 10); _E.CastOnUnit(ShieldTarget, true); return; } } if (sender.IsAlly && args.Target is AIHeroClient) { if (sender.Position.LSDistance(Player.Position) <= _E.Range && args.Target != null && args.SData.Name.ToLower().Contains("attack")) { _E.CastOnUnit(sender, true); return; } } } } catch (Exception) { if (NowTime() > ErrorTime) { Chat.Print(ChampName + " in FreshBooster isn't Load. Error Code 08"); ErrorTime = TickCount(10000); } } }
protected override void Drawing_OnDraw(EventArgs args) { if (Menu.Item("Draw_Disabled", true).GetValue <bool>()) { return; } if (Menu.Item("Draw_Q", true).GetValue <bool>()) { if (Q.Level > 0) { Render.Circle.DrawCircle(Player.Position, Q.Range, Q.IsReady() ? Color.Green : Color.Red); } } if (Menu.Item("Draw_QE", true).GetValue <bool>()) { if (Q.Level > 0 && E.Level > 0) { Render.Circle.DrawCircle(Player.Position, SpellManager.QE.Range, Q.IsReady() && E.IsReady() ? Color.Green : Color.Red); } } if (Menu.Item("Draw_W", true).GetValue <bool>()) { if (W.Level > 0) { Render.Circle.DrawCircle(Player.Position, W.Range, W.IsReady() ? Color.Green : Color.Red); } } if (Menu.Item("Draw_E", true).GetValue <bool>()) { if (E.Level > 0) { Render.Circle.DrawCircle(Player.Position, E.Range, E.IsReady() ? Color.Green : Color.Red); } } if (Menu.Item("Draw_R", true).GetValue <bool>()) { if (R.Level > 0) { Render.Circle.DrawCircle(Player.Position, R.Range, R.IsReady() ? Color.Green : Color.Red); } } if (Get_Current_Orb() != null) { Render.Circle.DrawCircle(Get_Current_Orb().Position, W.Width, Color.Green); } if (Menu.Item("Draw_QE_Line", true).GetValue <bool>()) { var qeTarget = TargetSelector.GetTarget(SpellManager.QE.Range, TargetSelector.DamageType.Magical); if (qeTarget == null || !Q.IsReady() || !E.IsReady()) { return; } var qTarget = TargetSelector.GetTarget(E.Range, TargetSelector.DamageType.Magical); if (qTarget.IsValidTarget(E.Range)) { var pred = Q.GetPrediction(qTarget); if (pred.Hitchance >= HitChance.VeryHigh) { var poly = new Geometry.Polygon.Rectangle(pred.CastPosition, Player.ServerPosition.Extend(pred.CastPosition, SpellManager.QE.Range), SpellManager.QE.Width); poly.Draw(Color.LawnGreen); var line = new Geometry.Polygon.Line(Player.Position, Player.ServerPosition.Extend(pred.CastPosition, SpellManager.QE.Range)); line.Draw(Color.LawnGreen); Render.Circle.DrawCircle(pred.CastPosition, Q.Width / 2, Color.Aquamarine); Render.Circle.DrawCircle(Player.ServerPosition.Extend(pred.CastPosition, SpellManager.QE.Range), Q.Width / 2, Color.SpringGreen); } } else { var startPos = Player.ServerPosition.To2D().Extend(qeTarget.ServerPosition.To2D(), Q.Range).To3D(); var rangeLeft = 100 + (-0.6 * Player.Distance(startPos) + 950); var endPos = startPos + Vector3.Normalize(startPos - Player.ServerPosition) * (float)rangeLeft; SpellManager.QE.From = startPos; SpellManager.QE.Delay = E.Delay + Q.Range / E.Speed; var qePred = SpellManager.QE.GetPrediction(qeTarget); var poly = new Geometry.Polygon.Rectangle(startPos, endPos, SpellManager.QE.Width); if (!poly.IsInside(qePred.UnitPosition)) { return; } if (qePred.Hitchance >= HitChance.VeryHigh) { poly.Draw(Color.LawnGreen); var line = new Geometry.Polygon.Line(Player.Position, endPos); line.Draw(Color.LawnGreen); Render.Circle.DrawCircle(startPos, Q.Width / 2, Color.Aquamarine); Render.Circle.DrawCircle(endPos, Q.Width / 2, Color.SpringGreen); } } } if (Menu.Item("Draw_R_Killable", true).GetValue <bool>() && R.IsReady()) { foreach (var wts in from unit in ObjectManager.Get <Obj_AI_Hero>().Where(x => x.IsValidTarget(2000) && !x.IsDead && x.IsEnemy).OrderByDescending(GetComboDamage) let health = unit.Health + unit.HPRegenRate + 10 where Get_Ult_Dmg(unit) > health select Drawing.WorldToScreen(unit.Position)) { Drawing.DrawText(wts[0] - 20, wts[1], Color.White, "KILL!!!"); } } }
private void CastQ(string source) { if (!Q.IsReady()) return; var target = TargetSelector.GetTarget(Q.Range, TargetSelector.DamageType.Physical); if (target != null && target.IsValidTarget(Q.Range)) { SpellCastManager.CastBasicSkillShot(Q, Q.Range, TargetSelector.DamageType.Magical, HitChanceManager.GetQHitChance(source)); } target = TargetSelector.GetTarget(QExtend.Range, TargetSelector.DamageType.Physical); if (target == null) return; var pred = QExtend.GetPrediction(target, true); var collisions = MinionManager.GetMinions(Player.ServerPosition, Q.Range, MinionTypes.All, MinionTeam.NotAlly); if (!collisions.Any()) return; foreach (var minion in collisions) { var poly = new Geometry.Polygon.Rectangle(Player.ServerPosition, Player.ServerPosition.Extend(minion.ServerPosition, QExtend.Range), QExtend.Width); if (poly.IsInside(pred.UnitPosition)) { if (Q.Cast(minion) == Spell.CastStates.SuccessfullyCasted) { Q.LastCastAttemptT = Utils.TickCount; return; } } } }
private static void CastR(Obj_AI_Base target) { if (!spells[Spells.R].IsReady() || !target.LSIsValidTarget(spells[Spells.R].Range) || !getCheckBoxItem(cMenu, "ElLux.Combo.R") || target.IsZombie || target.IsDead) { return; } if (getCheckBoxItem(cMenu, "ElLux.Combo.R.AOE")) { const float LuxRDistance = 3340; const float LuxRWidth = 70; var minREnemies = getSliderItem(cMenu, "ElLux.Combo.R.Count") ; foreach (var enemy in HeroManager.Enemies) { var startPos = enemy.ServerPosition; var endPos = Player.ServerPosition.LSExtend( startPos, Player.Distance(enemy) + LuxRDistance); var rectangle = new LeagueSharp.Common.Geometry.Polygon.Rectangle(startPos, endPos, LuxRWidth); if (HeroManager.Enemies.Count(x => rectangle.IsInside(x)) >= minREnemies) { spells[Spells.R].Cast(enemy); } } } if (getCheckBoxItem(cMenu, "ElLux.Combo.R.Rooted")) { if (target.HasBuff("LuxLightBindingMis")) { var prediction = spells[Spells.Q].GetPrediction(target); if (prediction.HitChance >= EloBuddy.SDK.Enumerations.HitChance.High) { spells[Spells.R].Cast(prediction.CastPosition); } } } if (spells[Spells.R].GetDamage(target) > GetHealth(target) && getCheckBoxItem(cMenu, "ElLux.Combo.R.Kill")) { var prediction = spells[Spells.R].GetPrediction(target); if (prediction.HitChance >= EloBuddy.SDK.Enumerations.HitChance.High) { spells[Spells.R].Cast(prediction.CastPosition); } } }
private static void Game_OnUpdate(EventArgs args) { switch (Program.insecmode) { case 0: var hero = HeroManager.Allies.Where(x => !x.IsMe && !x.IsDead) .OrderByDescending(x => x.LSDistance(Player.Position)).LastOrDefault(); if (hero != null) InsecPoint = hero.Position; break; case 1: var turret = GameObjects.AllyTurrets.OrderByDescending(x => x.LSDistance(Player.Position)).LastOrDefault(); if (turret != null) InsecPoint = turret.Position; break; case 2: InsecPoint = Game.CursorPos; break; case 3: InsecPoint = LastLeftClick; break; } if (!Program.insec) return; if (Orbwalker.CanMove) { Orbwalker.MoveTo(Game.CursorPos); } if (!InsecPoint.IsValid()) return; var target = TargetSelector.SelectedTarget; if (!target.LSIsValidTarget() || target.IsZombie) return; if (!Program._r2.IsReady()) return; //case 1 Vector2 start1 = Player.Position.LSTo2D().LSExtend(InsecPoint.LSTo2D(), -300); Vector2 end1 = start1.LSExtend(Player.Position.LSTo2D(), 750); float width1 = Program._r.Level == 3 ? 125 * 6 / 2 : Program._r.Level == 2 ? 125 * 5 / 2 : 125 * 4 / 2; var Rect1 = new LeagueSharp.Common.Geometry.Polygon.Rectangle(start1, end1, width1 - 100); var Predicted1 = LeagueSharp.Common.Prediction.GetPrediction(target, Game.Ping / 1000f + 0.25f).UnitPosition; if (Rect1.IsInside(target.Position) && Rect1.IsInside(Predicted1)) { Program._r2.Cast(InsecPoint); return; } if (Environment.TickCount - LastJump < 1500) return; if (!Program._e.IsReady()) return; //case 2 var sold2 = Soldiers.soldier .Where(x => Player.LSDistance(x.Position) <= 1100) .OrderBy(x => x.Position.LSDistance(target.Position)).FirstOrDefault(); if (sold2 != null) { if (!Program._q2.IsReady()) { var time = Player.Position.LSDistance(sold2.Position) / 1700f; var predicted2 = LeagueSharp.Common.Prediction.GetPrediction(target, time).UnitPosition; Vector2 start2 = sold2.Position.LSTo2D().LSExtend(InsecPoint.LSTo2D(), -300); Vector2 end2 = start2.LSExtend(InsecPoint.LSTo2D(), 750); float width2 = Program._r.Level == 3 ? 125 * 6 / 2 : Program._r.Level == 2 ? 125 * 5 / 2 : 125 * 4 / 2; var Rect2 = new LeagueSharp.Common.Geometry.Polygon.Rectangle(start2, end2, width2 - 100); if (Rect2.IsInside(target.Position) && Rect2.IsInside(predicted2)) { Program._e.Cast(sold2.Position); LastJump = Environment.TickCount; return; } } if (Program._q2.IsReady() && target.LSDistance(sold2.Position) <= 875 - 100) { var time = (Player.LSDistance(sold2.Position) + sold2.Position.LSDistance(target.Position)) / 1700f; var predicted2 = LeagueSharp.Common.Prediction.GetPrediction(target, time).UnitPosition; Vector2 start2 = target.Position.LSTo2D().LSExtend(InsecPoint.LSTo2D(), -300); Vector2 end2 = start2.LSExtend(InsecPoint.LSTo2D(), 750); float width2 = Program._r.Level == 3 ? 125 * 6 / 2 : Program._r.Level == 2 ? 125 * 5 / 2 : 125 * 4 / 2; var Rect2 = new LeagueSharp.Common.Geometry.Polygon.Rectangle(start2, end2, width2 - 100); if (Rect2.IsInside(target.Position) && Rect2.IsInside(predicted2)) { var timetime = sold2.Position.LSDistance(Player.Position) * 1000 / 1700; Program._e.Cast(sold2.Position); LeagueSharp.Common.Utility.DelayAction.Add((int)timetime - 150 - Program.EQdelay, () => Program._q2.Cast(target.Position)); LastJump = Environment.TickCount; return; } } } if(Program._w.IsReady()) { var posWs = GeoAndExten.GetWsPosition(target.Position.LSTo2D()).Where(x => x != null); foreach (var posW in posWs) { if (!Program._q2.IsReady()) { var time = Player.Position.LSTo2D().LSDistance((Vector2)posW) / 1700f + 0.3f; var predicted2 = LeagueSharp.Common.Prediction.GetPrediction(target, time).UnitPosition; Vector2 start2 = ((Vector2)posW).LSExtend(InsecPoint.LSTo2D(), -300); Vector2 end2 = start2.LSExtend(InsecPoint.LSTo2D(), 750); float width2 = Program._r.Level == 3 ? 125 * 6 / 2 : Program._r.Level == 2 ? 125 * 5 / 2 : 125 * 4 / 2; var Rect2 = new LeagueSharp.Common.Geometry.Polygon.Rectangle(start2, end2, width2 - 100); if (Rect2.IsInside(target.Position) && Rect2.IsInside(predicted2)) { var timetime = ((Vector2)posW).LSDistance(Player.Position) * 1000 / 1700; Program._w.Cast(Player.Position.LSTo2D().LSExtend((Vector2)posW, Program._w.Range)); LeagueSharp.Common.Utility.DelayAction.Add(0, () => Program._e.Cast((Vector2)posW)); LeagueSharp.Common.Utility.DelayAction.Add((int)timetime + 300 - 150 - Program.EQdelay, () => Program._q2.Cast(target.Position)); LastJump = Environment.TickCount; return; } } if (Program._q2.IsReady() && target.LSDistance((Vector2)posW) <= 875 - 100) { var time = (Player.LSDistance((Vector2)posW) + ((Vector2)posW).LSDistance(target.Position)) / 1700f + 0.3f; var predicted2 = LeagueSharp.Common.Prediction.GetPrediction(target, time).UnitPosition; Vector2 start2 = target.Position.LSTo2D().LSExtend(InsecPoint.LSTo2D(), -300); Vector2 end2 = start2.LSExtend(InsecPoint.LSTo2D(), 750); float width2 = Program._r.Level == 3 ? 125 * 6 / 2 : Program._r.Level == 2 ? 125 * 5 / 2 : 125 * 4 / 2; var Rect2 = new LeagueSharp.Common.Geometry.Polygon.Rectangle(start2, end2, width2 - 100); if (Rect2.IsInside(target.Position) && Rect2.IsInside(predicted2)) { var timetime = ((Vector2)posW).LSDistance(Player.Position) * 1000 / 1700; Program._w.Cast(Player.Position.LSTo2D().LSExtend((Vector2)posW, Program._w.Range)); LeagueSharp.Common.Utility.DelayAction.Add(0, () => Program._e.Cast((Vector2)posW)); LeagueSharp.Common.Utility.DelayAction.Add((int)timetime + 300 - 150 - Program.EQdelay, () => Program._q2.Cast(target.Position)); LastJump = Environment.TickCount; return; } } } } }
/// <summary> /// Called when the game updates /// </summary> /// <param name="args">The <see cref="EventArgs" /> instance containing the event data.</param> private static void OnUpdate(EventArgs args) { try { if (Player.IsDead) { return; } if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo)) { OnCombo(); } if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Harass)) { OnHarass(); } if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.LaneClear) || Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.JungleClear)) { OnLaneclear(); OnJungleclear(); } if (getCheckBoxItem(ksMenu, "Killsteal.Active")) { OnKillsteal(); } if (getCheckBoxItem(ksMenu, "Ignite")) { HandleIgnite(); } if (getCheckBoxItem(miscMenu, "Misc.Auto.W")) { if (HasPassive() && Player.GetEnemiesInRange(2000f).Count == 0) { W.Cast(); } } if (getCheckBoxItem(comboMenu, "Combo.R.Multiple")) { float RDistance = 1420; float RWidth = 120; var minREnemies = getSliderItem(comboMenu, "Combo.R.Count"); foreach (var enemy in HeroManager.Enemies) { var startPos = enemy.ServerPosition; var endPos = Player.ServerPosition.LSExtend(startPos, Player.Distance(enemy) + RDistance); var rectangle = new Geometry.Polygon.Rectangle(startPos, endPos, RWidth); if (HeroManager.Enemies.Count(x => rectangle.IsInside(x)) >= minREnemies) { R.Cast(enemy); } } } } catch (Exception exception) { Console.WriteLine(exception); } }
private static void Game_OnUpdate(EventArgs args) { switch (Program.insecmode) { case 0: var hero = HeroManager.Allies.Where(x => !x.IsMe && !x.IsDead) .OrderByDescending(x => x.LSDistance(Player.Position)).LastOrDefault(); if (hero != null) { InsecPoint = hero.Position; } break; case 1: var turret = GameObjects.AllyTurrets.OrderByDescending(x => x.LSDistance(Player.Position)).LastOrDefault(); if (turret != null) { InsecPoint = turret.Position; } break; case 2: InsecPoint = Game.CursorPos; break; case 3: InsecPoint = LastLeftClick; break; } if (!Program.insec) { return; } if (Orbwalker.CanMove) { Orbwalker.MoveTo(Game.CursorPos); } if (!InsecPoint.IsValid()) { return; } var target = TargetSelector.SelectedTarget; if (!target.LSIsValidTarget() || target.IsZombie) { return; } if (!Program._r2.IsReady()) { return; } //case 1 Vector2 start1 = Player.Position.LSTo2D().LSExtend(InsecPoint.LSTo2D(), -300); Vector2 end1 = start1.LSExtend(Player.Position.LSTo2D(), 750); float width1 = Program._r.Level == 3 ? 125 * 6 / 2 : Program._r.Level == 2 ? 125 * 5 / 2 : 125 * 4 / 2; var Rect1 = new LeagueSharp.Common.Geometry.Polygon.Rectangle(start1, end1, width1 - 100); var Predicted1 = LeagueSharp.Common.Prediction.GetPrediction(target, Game.Ping / 1000f + 0.25f).UnitPosition; if (Rect1.IsInside(target.Position) && Rect1.IsInside(Predicted1)) { Program._r2.Cast(InsecPoint); return; } if (Environment.TickCount - LastJump < 1500) { return; } if (!Program._e.IsReady()) { return; } //case 2 var sold2 = Soldiers.soldier .Where(x => Player.LSDistance(x.Position) <= 1100) .OrderBy(x => x.Position.LSDistance(target.Position)).FirstOrDefault(); if (sold2 != null) { if (!Program._q2.IsReady()) { var time = Player.Position.LSDistance(sold2.Position) / 1700f; var predicted2 = LeagueSharp.Common.Prediction.GetPrediction(target, time).UnitPosition; Vector2 start2 = sold2.Position.LSTo2D().LSExtend(InsecPoint.LSTo2D(), -300); Vector2 end2 = start2.LSExtend(InsecPoint.LSTo2D(), 750); float width2 = Program._r.Level == 3 ? 125 * 6 / 2 : Program._r.Level == 2 ? 125 * 5 / 2 : 125 * 4 / 2; var Rect2 = new LeagueSharp.Common.Geometry.Polygon.Rectangle(start2, end2, width2 - 100); if (Rect2.IsInside(target.Position) && Rect2.IsInside(predicted2)) { Program._e.Cast(sold2.Position); LastJump = Environment.TickCount; return; } } if (Program._q2.IsReady() && target.LSDistance(sold2.Position) <= 875 - 100) { var time = (Player.LSDistance(sold2.Position) + sold2.Position.LSDistance(target.Position)) / 1700f; var predicted2 = LeagueSharp.Common.Prediction.GetPrediction(target, time).UnitPosition; Vector2 start2 = target.Position.LSTo2D().LSExtend(InsecPoint.LSTo2D(), -300); Vector2 end2 = start2.LSExtend(InsecPoint.LSTo2D(), 750); float width2 = Program._r.Level == 3 ? 125 * 6 / 2 : Program._r.Level == 2 ? 125 * 5 / 2 : 125 * 4 / 2; var Rect2 = new LeagueSharp.Common.Geometry.Polygon.Rectangle(start2, end2, width2 - 100); if (Rect2.IsInside(target.Position) && Rect2.IsInside(predicted2)) { var timetime = sold2.Position.LSDistance(Player.Position) * 1000 / 1700; Program._e.Cast(sold2.Position); LeagueSharp.Common.Utility.DelayAction.Add((int)timetime - 150 - Program.EQdelay, () => Program._q2.Cast(target.Position)); LastJump = Environment.TickCount; return; } } } if (Program._w.IsReady()) { var posWs = GeoAndExten.GetWsPosition(target.Position.LSTo2D()).Where(x => x != null); foreach (var posW in posWs) { if (!Program._q2.IsReady()) { var time = Player.Position.LSTo2D().LSDistance((Vector2)posW) / 1700f + 0.3f; var predicted2 = LeagueSharp.Common.Prediction.GetPrediction(target, time).UnitPosition; Vector2 start2 = ((Vector2)posW).LSExtend(InsecPoint.LSTo2D(), -300); Vector2 end2 = start2.LSExtend(InsecPoint.LSTo2D(), 750); float width2 = Program._r.Level == 3 ? 125 * 6 / 2 : Program._r.Level == 2 ? 125 * 5 / 2 : 125 * 4 / 2; var Rect2 = new LeagueSharp.Common.Geometry.Polygon.Rectangle(start2, end2, width2 - 100); if (Rect2.IsInside(target.Position) && Rect2.IsInside(predicted2)) { var timetime = ((Vector2)posW).LSDistance(Player.Position) * 1000 / 1700; Program._w.Cast(Player.Position.LSTo2D().LSExtend((Vector2)posW, Program._w.Range)); LeagueSharp.Common.Utility.DelayAction.Add(0, () => Program._e.Cast((Vector2)posW)); LeagueSharp.Common.Utility.DelayAction.Add((int)timetime + 300 - 150 - Program.EQdelay, () => Program._q2.Cast(target.Position)); LastJump = Environment.TickCount; return; } } if (Program._q2.IsReady() && target.LSDistance((Vector2)posW) <= 875 - 100) { var time = (Player.LSDistance((Vector2)posW) + ((Vector2)posW).LSDistance(target.Position)) / 1700f + 0.3f; var predicted2 = LeagueSharp.Common.Prediction.GetPrediction(target, time).UnitPosition; Vector2 start2 = target.Position.LSTo2D().LSExtend(InsecPoint.LSTo2D(), -300); Vector2 end2 = start2.LSExtend(InsecPoint.LSTo2D(), 750); float width2 = Program._r.Level == 3 ? 125 * 6 / 2 : Program._r.Level == 2 ? 125 * 5 / 2 : 125 * 4 / 2; var Rect2 = new LeagueSharp.Common.Geometry.Polygon.Rectangle(start2, end2, width2 - 100); if (Rect2.IsInside(target.Position) && Rect2.IsInside(predicted2)) { var timetime = ((Vector2)posW).LSDistance(Player.Position) * 1000 / 1700; Program._w.Cast(Player.Position.LSTo2D().LSExtend((Vector2)posW, Program._w.Range)); LeagueSharp.Common.Utility.DelayAction.Add(0, () => Program._e.Cast((Vector2)posW)); LeagueSharp.Common.Utility.DelayAction.Add((int)timetime + 300 - 150 - Program.EQdelay, () => Program._q2.Cast(target.Position)); LastJump = Environment.TickCount; return; } } } } }
protected override void Drawing_OnDraw(EventArgs args) { if (menu.Item("Draw_Disabled", true).GetValue<bool>()) return; if (menu.Item("Draw_Q", true).GetValue<bool>()) if (Q.Level > 0) Render.Circle.DrawCircle(Player.Position, Q.Range, Q.IsReady() ? Color.Green : Color.Red); if (menu.Item("Draw_QE", true).GetValue<bool>()) if (Q.Level > 0 && E.Level > 0) Render.Circle.DrawCircle(Player.Position, _qe.Range, Q.IsReady() && E.IsReady() ? Color.Green : Color.Red); if (menu.Item("Draw_W", true).GetValue<bool>()) if (W.Level > 0) Render.Circle.DrawCircle(Player.Position, W.Range, W.IsReady() ? Color.Green : Color.Red); if (menu.Item("Draw_E", true).GetValue<bool>()) if (E.Level > 0) Render.Circle.DrawCircle(Player.Position, E.Range, E.IsReady() ? Color.Green : Color.Red); if (menu.Item("Draw_R", true).GetValue<bool>()) if (R.Level > 0) Render.Circle.DrawCircle(Player.Position, R.Range, R.IsReady() ? Color.Green : Color.Red); if (Get_Current_Orb() != null) Render.Circle.DrawCircle(Get_Current_Orb().Position, W.Width, Color.Green); //draw EQ if (menu.Item("Draw_QE_Line", true).GetValue<bool>()) { var qeTarget = TargetSelector.GetTarget(_qe.Range, TargetSelector.DamageType.Magical); if (qeTarget == null || !Q.IsReady() || !E.IsReady()) return; var qTarget = TargetSelector.GetTarget(E.Range, TargetSelector.DamageType.Magical); if (qTarget.IsValidTarget(E.Range)) { var pred = Q.GetPrediction(qTarget); if (pred.Hitchance >= HitChanceManager.GetQEHitChance("Combo")) { var poly = new Geometry.Polygon.Rectangle(pred.CastPosition, Player.ServerPosition.Extend(pred.CastPosition, _qe.Range), _qe.Width); poly.Draw(Color.LawnGreen); var line = new Geometry.Polygon.Line(Player.Position, Player.ServerPosition.Extend(pred.CastPosition, _qe.Range)); line.Draw(Color.LawnGreen); Render.Circle.DrawCircle(pred.CastPosition, Q.Width / 2, Color.Aquamarine); Render.Circle.DrawCircle(Player.ServerPosition.Extend(pred.CastPosition, _qe.Range), Q.Width / 2, Color.SpringGreen); } } else { var startPos = Player.ServerPosition.To2D().Extend(qeTarget.ServerPosition.To2D(), Q.Range).To3D(); double rangeLeft = 100 + (-0.6 * Player.Distance(startPos) + 950); var endPos = startPos + Vector3.Normalize(startPos - Player.ServerPosition) * (float)rangeLeft; _qe.From = startPos; _qe.Delay = E.Delay + Q.Range / E.Speed; var qePred = _qe.GetPrediction(qeTarget); var poly = new Geometry.Polygon.Rectangle(startPos, endPos, _qe.Width); if (!poly.IsInside(qePred.UnitPosition)) return; if (qePred.Hitchance >= HitChanceManager.GetQEHitChance("Combo")) { poly.Draw(Color.LawnGreen); var line = new Geometry.Polygon.Line(Player.Position, endPos); line.Draw(Color.LawnGreen); Render.Circle.DrawCircle(startPos, Q.Width/2, Color.Aquamarine); Render.Circle.DrawCircle(endPos, Q.Width/2, Color.SpringGreen); } } } if (menu.Item("Draw_R_Killable", true).GetValue<bool>() && R.IsReady()) { foreach (var wts in from unit in ObjectManager.Get<Obj_AI_Hero>().Where(x => x.IsValidTarget(2000) && !x.IsDead && x.IsEnemy).OrderByDescending(GetComboDamage) let health = unit.Health + unit.HPRegenRate + 10 where Get_Ult_Dmg(unit) > health select Drawing.WorldToScreen(unit.Position)) { Drawing.DrawText(wts[0] - 20, wts[1], Color.White, "KILL!!!"); } } }
private static void OnProcessSpell(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args) { try { if (!(sender is AIHeroClient) || Player.LSIsRecalling()) { return; } // Auto W if (getCheckBoxItem(Misc, "Braum_AutoW") && _W.IsReady()) { if (!(sender is AIHeroClient) || !sender.IsEnemy) { return; } if (args.Target != null) { if (args.SData.Name.ToLower().Contains("attack") && args.Target.Position.LSDistance(Player.Position) < _W.Range) { if (args.Target.IsAlly && args.Target is AIHeroClient) { if (args.Target.IsMe && Player.HealthPercent < 20) { _W.CastOnUnit((Obj_AI_Base)args.Target, true); } else { _W.CastOnUnit((Obj_AI_Base)args.Target, true); } } } } } // Auto E if (getCheckBoxItem(Misc, "Braum_AutoE") && _E.IsReady()) { if (!(sender is AIHeroClient) || !sender.IsEnemy || !Orbwalker.CanAutoAttack) { return; } var enemyskill = new LeagueSharp.Common.Geometry.Polygon.Rectangle(args.Start, args.End, args.SData.BounceRadius + 20); var myteam = HeroManager.Allies.Where(f => f.LSDistance(Player.Position) < 200); var count = myteam.Count(f => enemyskill.IsInside(f.Position)); if (args.Target != null && args.Target.Position.LSDistance(Player.Position) < 200) { if (args.Target.Name == Player.Name && Player.HealthPercent < 20) { _E.Cast(sender.Position, true); } else if (args.Target.Position.LSDistance(Player.Position) < 200 && args.Target is AIHeroClient) { if (_W.IsReady() && args.Target.Position.LSDistance(Player.Position) < _W.Range) { _W.CastOnUnit((Obj_AI_Base)args.Target, true); } _E.Cast(sender.Position, true); } } else if (args.Target == null) { if (Player.HealthPercent < 20 && count == 1) { _E.Cast(sender.Position, true); } else if (count >= 2) { _E.Cast(sender.Position, true); } } } } catch (Exception) { if (NowTime() > ErrorTime) { Chat.Print(ChampName + " in FreshBooster isn't Load. Error Code 08"); ErrorTime = TickCount(10000); } } }
private static void OnProcessSpell(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args) { try { if (args.Target is Obj_AI_Minion || !(sender is AIHeroClient)) return; if (getCheckBoxItem(miscMenu, "Janna_AutoE")) { if (sender.IsEnemy) { var StartPos = args.Start; var EndPos = args.End; var NonTRange = new LeagueSharp.Common.Geometry.Polygon.Rectangle(StartPos, EndPos, sender.BoundingRadius + 30); var Target = HeroManager.Allies.FirstOrDefault(f => f.Position.LSDistance(Player.Position) <= _E.Range && NonTRange.IsInside(f.Position)); if (Target == Player && getCheckBoxItem(miscMenu, "Janna_AutoE1")) return; if (Target != null) { _E.CastOnUnit(Target, true); return; } if (args.Target != null && args.Target.Position.LSDistance(Player.Position) <= _E.Range && args.Target is AIHeroClient) { var ShieldTarget = HeroManager.Allies.FirstOrDefault(f => f.Position.LSDistance(args.Target.Position) <= 10); _E.CastOnUnit(ShieldTarget, true); return; } } if (sender.IsAlly && args.Target is AIHeroClient) { if (sender.Position.LSDistance(Player.Position) <= _E.Range && args.Target != null && args.SData.Name.ToLower().Contains("attack")) { _E.CastOnUnit(sender, true); return; } } } } catch (Exception) { if (NowTime() > ErrorTime) { Chat.Print(ChampName + " in FreshBooster isn't Load. Error Code 08"); ErrorTime = TickCount(10000); } } }
private static void AutoKick() { if (getSliderItem(miscMenu, "LeeSin_AutoKick") == 0 || getKeyBindItem(miscMenu, "LeeSin_InsecKick")) return; var target = HeroManager.Enemies.Where(x => x.LSDistance(Player) < 375 && !x.IsDead && x.LSIsValidTarget(375)) .OrderBy(x => x.LSDistance(Player)).FirstOrDefault(); if (target == null) return; var ultPoly = new LeagueSharp.Common.Geometry.Polygon.Rectangle(Player.ServerPosition, Player.ServerPosition.LSExtend(target.Position, 1100), target.BoundingRadius + 10); var count = HeroManager.Enemies.Where(x => x.LSDistance(Player) < 1100 && x.LSIsValidTarget(1100)) .Count(h => h.NetworkId != target.NetworkId && ultPoly.IsInside(h.ServerPosition)); if (count >= getSliderItem(miscMenu, "LeeSin_AutoKick") && _R.IsReady()) { _R.Cast(target); } }
private static void OnSpells(EventArgs args) { if (Player.IsDead) return; if (ultPoly != null) { ultPoly.UpdatePolygon(); ultPoly.Draw(Color.Red); } if (RCombo != null) Render.Circle.DrawCircle((Vector3) RCombo, 100, Color.Red, 5, true); if (!GetBool("spellsdraw", typeof (bool))) return; if (!GetBool("ovdrawings", typeof (bool))) return; if (GetBool("qrange", typeof (bool)) && Q.Level > 0) { var color = Q.IsReady() ? Color.DodgerBlue : Color.Red; Render.Circle.DrawCircle(Player.Position, Q.Range, color); } if (GetBool("wrange", typeof (bool)) && W.Level > 0) { var colorw = W.IsReady() ? Color.BlueViolet : Color.Red; Render.Circle.DrawCircle(Player.Position, W.Range, colorw); } if (GetBool("erange", typeof (bool)) && E.Level > 0) { var colore = E.IsReady() ? Color.Plum : Color.Red; Render.Circle.DrawCircle(Player.Position, E.Range, colore); } if (GetBool("rrange", typeof (bool)) && R.Level > 0) { var colorr = R.IsReady() ? Color.LawnGreen : Color.Red; Render.Circle.DrawCircle(Player.Position, R.Range, colorr); } var target = HeroManager.Enemies.Where(x => x.Distance(Player) < R.Range && !x.IsDead && x.IsValidTarget(R.Range)) .OrderBy(x => x.Distance(Player)).FirstOrDefault(); if (target == null || Player.IsDead) { ultPoly = null; ultPolyExpectedPos = null; return; } ultPoly = new Geometry.Polygon.Rectangle(Player.ServerPosition, Player.ServerPosition.Extend(target.Position, 1100), target.BoundingRadius + 20); var counts = HeroManager.Enemies.Where(x => x.Distance(Player) < 1200 && x.IsValidTarget(1200)) .Count(h => h.NetworkId != target.NetworkId && ultPoly.IsInside(h.ServerPosition)); Drawing.DrawText(Drawing.WorldToScreen(Player.Position).X, Drawing.WorldToScreen(Player.Position).Y, Color.Magenta, "Ult Will Hit " + counts); }
/// <summary> /// Called when the game updates /// </summary> /// <param name="args">The <see cref="EventArgs" /> instance containing the event data.</param> private static void OnUpdate(EventArgs args) { try { if (Player.IsDead) { return; } if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo)) { OnCombo(); } if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Harass)) { OnHarass(); } if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.LaneClear) || Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.JungleClear)) { OnLaneclear(); OnJungleclear(); } if (getCheckBoxItem(ksMenu, "Killsteal.Active")) { OnKillsteal(); } if (getCheckBoxItem(ksMenu, "Ignite")) { HandleIgnite(); } if (getCheckBoxItem(miscMenu, "Misc.Auto.W")) { if (HasPassive() && Player.GetEnemiesInRange(2000f).Count == 0) { W.Cast(); } } if (getCheckBoxItem(comboMenu, "Combo.R.Multiple")) { float RDistance = 1420; float RWidth = 120; var minREnemies = getSliderItem(comboMenu, "Combo.R.Count"); foreach (var enemy in HeroManager.Enemies) { var startPos = enemy.ServerPosition; var endPos = Player.ServerPosition.LSExtend(startPos, Player.LSDistance(enemy) + RDistance); var rectangle = new Geometry.Polygon.Rectangle(startPos, endPos, RWidth); if (HeroManager.Enemies.Count(x => rectangle.IsInside(x)) >= minREnemies) { R.Cast(enemy); } } } } catch (Exception exception) { Console.WriteLine(exception); } }
private void Obj_AI_Base_OnProcessSpellCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args) { PredictionInput input = null; if (sender.IsMe || sender.IsEnemy || !(sender is Obj_AI_Hero)) { return; } if (!Spells.Contains(args.SData.Name) || Config.SubMenu("AutoCombo_Spells").Item(args.SData.Name).GetValue <bool>() == false) { return; } var targetable = false; var line = false; var aoe = false; drawTime = Game.Time; var result = SpellDatabase.GetByName(args.SData.Name); if (result != null) { switch (result.Type) { case SkillShotType.SkillshotLine: _skillshot = new Geometry.Polygon.Rectangle(sender.Position, sender.Position.Extend(args.End, result.Range), result.Radius); line = true; break; case SkillShotType.SkillshotMissileLine: _skillshot = new Geometry.Polygon.Rectangle(sender.Position, sender.Position.Extend(args.End, result.Range), result.Radius); line = true; break; case SkillShotType.SkillshotCircle: _skillshotAoe = new Geometry.Polygon.Circle(args.End, result.Radius); aoe = true; break; case SkillShotType.SkillshotRing: _skillshotAoe = new Geometry.Polygon.Circle(args.End, result.Radius); aoe = true; break; } } foreach ( var enemy in ObjectManager.Get <Obj_AI_Hero>() .Where(enemy => enemy.IsEnemy && enemy.Distance(Player) <= Config.SubMenu("AutoCombo").Item("Range").GetValue <Slider>().Value)) { if (!aoe && !line && args.Target.Position == enemy.Position) { targetable = true; } if (!aoe && !line && !targetable) { continue; } //Game.PrintChat(sender.BaseSkinName + " Ultimate Damage is : " + Allydamage.CalculatedDamage); //Game.PrintChat("My Ultimate Damage is : " + Mydamage.CalculatedDamage); //Game.PrintChat("Total damage is : " + (Allydamage.CalculatedDamage + Mydamage.CalculatedDamage)); if (Config.Item("Killable").GetValue <bool>()) { Allydamage = sender.GetDamageSpell(enemy, args.SData.Name); Mydamage = Player.GetDamageSpell(enemy, SpellSlot.R); if ((Allydamage.CalculatedDamage + Mydamage.CalculatedDamage) < enemy.Health && Allydamage.CalculatedDamage > enemy.Health) { return; } } if (line) { input = new PredictionInput { Unit = enemy, Type = SkillshotType.SkillshotLine, Speed = result.MissileSpeed, From = sender.Position, Delay = result.Delay, Aoe = false, Radius = result.Radius, Range = result.Range, Collision = false }; } else { if (aoe) { input = new PredictionInput { Unit = enemy, Type = SkillshotType.SkillshotCircle, Speed = result.MissileSpeed, From = sender.Position, Delay = result.Delay, Aoe = true, Radius = result.Radius, Range = result.Range, Collision = false }; } } if (!targetable) { var output = Prediction.GetPrediction(input); var unit = output.CastPosition; if (line) { if (!_skillshot.IsInside(unit) && !_skillshot.IsInside(enemy)) { continue; } } else { if (!_skillshotAoe.IsInside(unit) && !_skillshotAoe.IsInside(enemy)) { continue; } } } R.Cast(enemy.Position); if (enemy.Distance(Player.Position) <= Config.SubMenu("AutoCombo").Item("Range").GetValue <Slider>().Value) { R.Cast(enemy); R.CastOnUnit(enemy); } } }