public override void Game_OnGameUpdate(EventArgs args) { PortAIO.OrbwalkerManager.SetAttack(Game.Time > rqTumbleBuffEndOfTime); if (JungleClearActive) { ExecJungleClear(); } if ((ComboActive || HarassActive)) { if (Program.combo["FocusW"].Cast <CheckBox>().CurrentValue) { var silverBuffMarkedEnemy = VayneData.GetSilverBuffMarkedEnemy; if (silverBuffMarkedEnemy != null) { Orbwalker.ForcedTarget = ((silverBuffMarkedEnemy)); } else { var attackRange = Orbwalking.GetRealAutoAttackRange(ObjectManager.Player); Orbwalker.ForcedTarget = ((TargetSelector.GetTarget(attackRange, DamageType.Physical))); } } var useQ = Program.combo["Combo.UseQ"].Cast <ComboBox>().CurrentValue; var t = TargetSelector.GetTarget(Q.Range + Orbwalking.GetRealAutoAttackRange(null), DamageType.Physical); if (Q.IsReady() && t.LSIsValidTarget() && useQ != 0) { switch (useQ) { case 1: { Q.Cast(Game.CursorPos); break; } case 2: { var silverEnemy = VayneData.GetSilverBuffMarkedEnemy; if (silverEnemy != null && t.ChampionName == silverEnemy.ChampionName && VayneData.GetSilverBuffMarkedCount == 2) { Q.Cast(Game.CursorPos); Orbwalker.ForcedTarget = ((t)); } break; } case 3: { if (t.LSDistance(ObjectManager.Player.Position) > Orbwalking.GetRealAutoAttackRange(null) && Q.IsPositionSafe(t.Position.LSTo2D())) { Q.Cast(t.Position); } else if (Q.IsPositionSafe(Game.CursorPos.LSTo2D())) { Q.Cast(Game.CursorPos); } Orbwalker.ForcedTarget = ((t)); break; } } } var useE = Program.combo["UseEC"].Cast <ComboBox>().CurrentValue; if (E.IsReady() && useE != 0) { t = TargetSelector.GetTarget(E.Range + Q.Range, DamageType.Physical); if (useE == 1) { if (t.LSIsValidTarget()) { CastE(t); } } else { foreach (var e in HeroManager.Enemies.Where(e => e.LSIsValidTarget(E.Range) && !e.IsZombie)) { CastE(e); } } /* * foreach (var hero in * from hero in ObjectManager.Get<AIHeroClient>().Where(hero => hero.LSIsValidTarget(550f)) * let prediction = E.GetPrediction(hero) * where * NavMesh.GetCollisionFlags( * prediction.UnitPosition.LSTo2D() * .LSExtend( * ObjectManager.Player.ServerPosition.LSTo2D(), * -GetValue<Slider>("PushDistance").Value) * .To3D()).HasFlag(CollisionFlags.Wall) || * NavMesh.GetCollisionFlags( * prediction.UnitPosition.LSTo2D() * .LSExtend( * ObjectManager.Player.ServerPosition.LSTo2D(), * -(GetValue<Slider>("PushDistance").Value/2)) * .To3D()).HasFlag(CollisionFlags.Wall) * select hero) * { * E.Cast(hero); * } */ } } if (LaneClearActive) { var useQ = Program.laneclear["UseQL"].Cast <CheckBox>().CurrentValue; if (Q.IsReady() && useQ) { var vMinions = MinionManager.GetMinions(ObjectManager.Player.Position, Q.Range); foreach (var minions in vMinions.Where( minions => minions.Health < ObjectManager.Player.LSGetSpellDamage(minions, SpellSlot.Q))) { Q.Cast(minions); } } } }
private void OnDoCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs Args) { if (!sender.IsMe || !Orbwalking.IsAutoAttack(Args.SData.Name)) { return; } switch (Orbwalker.ActiveMode) { case Orbwalking.OrbwalkingMode.Combo: if (Menu.Item("ComboQ", true).GetValue <bool>()) { var target = (Obj_AI_Hero)Args.Target; if (target != null && !target.IsDead && !target.IsZombie) { if (Menu.Item("ComboSaveMana", true).GetValue <bool>() && Me.Mana < (R.IsReady() ? R.Instance.ManaCost : 0) + W.Instance.ManaCost + Q.Instance.ManaCost) { return; } if (Me.HasBuff("asheqcastready")) { Q.Cast(); Orbwalking.ResetAutoAttackTimer(); } } } break; case Orbwalking.OrbwalkingMode.LaneClear: if (Menu.Item("JungleClearQ", true).GetValue <bool>() && Me.ManaPercent >= Menu.Item("JungleClearMana", true).GetValue <Slider>().Value&& Args.Target is Obj_AI_Minion) { var Mobs = MinionManager.GetMinions(Me.Position, Orbwalking.GetRealAutoAttackRange(Me), MinionTypes.All, MinionTeam.Neutral, MinionOrderTypes.MaxHealth); foreach (var mob in Mobs) { if (mob == null) { continue; } if (!mob.IsValidTarget(Orbwalking.GetRealAutoAttackRange(Me)) || !(mob.Health > Me.GetAutoAttackDamage(mob) * 2)) { continue; } if (Me.HasBuff("asheqcastready")) { Q.Cast(); Orbwalking.ResetAutoAttackTimer(); } } } break; } }
private void OnSpellCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs Args) { if (!sender.IsMe || !Orbwalking.IsAutoAttack(Args.SData.Name)) { return; } if (Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Combo) { var target = (AIHeroClient)Args.Target; if (target != null && !target.IsDead && !target.IsZombie) { if (Menu.Item("ComboW", true).GetValue <bool>() && W.IsReady() && target.IsValidTarget(W.Range)) { W.Cast(); } if (Menu.Item("ComboR", true).GetValue <bool>() && R.IsReady() && Menu.Item("ComboRLimit", true).GetValue <Slider>().Value >= GetRCount && target.IsValidTarget(R.Range)) { R.CastTo(target); } if (Menu.Item("ComboQ", true).GetValue <bool>() && Q.IsReady() && target.IsValidTarget(Q.Range)) { Q.CastTo(target); } if (Menu.Item("ComboE", true).GetValue <bool>() && E.IsReady() && target.IsValidTarget(E.Range)) { E.CastTo(target); } } } if (Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.LaneClear) { if (Me.ManaPercent >= Menu.Item("JungleClearMana", true).GetValue <Slider>().Value) { var mobs = MinionManager.GetMinions(Me.Position, R.Range, MinionTypes.All, MinionTeam.Neutral, MinionOrderTypes.MaxHealth); if (mobs.Any()) { var mob = mobs.FirstOrDefault(); var bigmob = mobs.FirstOrDefault(x => !x.Name.ToLower().Contains("mini")); if (Menu.Item("JungleClearW", true).GetValue <bool>() && W.IsReady() && bigmob != null && bigmob.IsValidTarget(W.Range)) { W.Cast(); } if (Menu.Item("JungleClearR", true).GetValue <bool>() && R.IsReady() && Menu.Item("JungleClearRLimit", true).GetValue <Slider>().Value >= GetRCount && bigmob != null) { R.Cast(bigmob); } if (Menu.Item("JungleClearE", true).GetValue <bool>() && E.IsReady()) { if (bigmob != null && bigmob.IsValidTarget(E.Range)) { E.Cast(bigmob); } else { var eMobs = MinionManager.GetMinions(Me.Position, E.Range, MinionTypes.All, MinionTeam.Neutral, MinionOrderTypes.MaxHealth); var eFarm = E.GetLineFarmLocation(eMobs, E.Width); if (eFarm.MinionsHit >= 2) { E.Cast(eFarm.Position); } } } if (Menu.Item("JungleClearQ", true).GetValue <bool>() && Q.IsReady() && mob != null && mob.IsValidTarget(Q.Range)) { Q.Cast(mob); } } } } }
private static bool PredictCastMinionE(Vector2 fromPosition, int requiredHitNumber = 1) { var farmLocation = GetBestLaserFarmLocation(fromPosition, MinionManager.GetMinionsPredictedPositions(MinionManager.GetMinions(fromPosition.To3D(), lengthE), E.Delay, E.Width, speedE, fromPosition.To3D(), lengthE, false, SkillshotType.SkillshotLine), E.Width, lengthE); if (farmLocation.MinionsHit >= requiredHitNumber) { Player.CastSpell(SpellSlot.E, fromPosition.To3D(), farmLocation.Position.To3D()); return(true); } return(false); }
private static void Orbwalking_AfterAttack(AttackableUnit unit, AttackableUnit target) { var useQ = _config.Item("UseQC").GetValue <bool>(); var useW = _config.Item("UseWC").GetValue <bool>(); var useQH = _config.Item("UseQH").GetValue <bool>(); var useWH = _config.Item("UseWH").GetValue <bool>(); var useqlast = _config.Item("UseQLH").GetValue <bool>(); var useqlane = _config.Item("UseQL").GetValue <bool>(); var lastmana = (100 * (_player.Mana / _player.MaxMana)) > _config.Item("lastmana").GetValue <Slider>().Value; var lanemana = (100 * (_player.Mana / _player.MaxMana)) > _config.Item("Lanemana").GetValue <Slider>().Value || (100 * (_player.Mana / _player.MaxMana)) > _config.Item("Junglemana").GetValue <Slider>().Value; var harassmana = (100 * (_player.Mana / _player.MaxMana)) > _config.Item("Harrasmana").GetValue <Slider>().Value; var combo = _orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Combo; var harass = _orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Mixed || _config.Item("harasstoggle").GetValue <KeyBind>().Active; var lastHit = _orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.LastHit; var laneClear = _orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.LaneClear; var t = target as Obj_AI_Hero; /*if (combo && target is Obj_AI_Hero) //unit.IsMe) * { * if (useQ && _q.IsReady() && t.IsValidTarget(_q.Range)) * { * var qpred = _q.GetPrediction(t); * if ( qpred.CollisionObjects.Count == 0 && _q.GetPrediction(t).Hitchance >= HitChance.High) * { * _q.Cast(t); * } * } * if (useW && _w.IsReady() && t.IsValidTarget(_w.Range)) * { * if ( _w.GetPrediction(t).Hitchance >= HitChance.High) * { * _w.Cast(t, false, true); * } * } * } * if (harass && target is Obj_AI_Hero && harassmana && !combo) * { * if (useQH && _q.IsReady()) * { * var qpred = _q.GetPrediction(t); * if (t.IsValidTarget(_q.Range) && qpred.CollisionObjects.Count == 0 && _q.GetPrediction(t).Hitchance >= HitChance.High) * { * _q.Cast(t); * } * } * if (useWH && _w.IsReady()) * { * if (t.IsValidTarget(_w.Range) && _w.GetPrediction(t).Hitchance >= HitChance.High) * { * _w.Cast(t, false, true); * } * } * }*/ //Creditc FlapperDoodle if (_q.IsReady() && ((lastHit && lastmana && useqlast) || (laneClear && lanemana && useqlane))) { int countMinions = 0; foreach (var minionDie in MinionManager.GetMinions(_q.Range) .Where( minion => target.NetworkId != minion.NetworkId && minion.IsEnemy && /*&& * HealthPrediction.GetHealthPrediction(minion, * (int) ((_player.AttackDelay*600)*2.65f + Game.Ping/1.5), 0) <= 0*/ (_q.GetDamage(minion) >= minion.Health || minion.Health < Player.GetAutoAttackDamage(minion) || minion.Health < _q.GetDamage(minion) + Player.GetAutoAttackDamage(minion))) ) { countMinions++; if (countMinions >= 1 && _q.GetPrediction(minionDie).Hitchance >= HitChance.High && _q.GetPrediction(minionDie).CollisionObjects.Count == 0) { _q.Cast(minionDie); } } } }
private static void OnDoCast() { Obj_AI_Base.OnSpellCast += (sender, args) => { //if (!sender.IsMe || !Orbwalking.IsAutoAttack((args.SData.Name))) return; if (sender.IsMe && args.SData.IsAutoAttack()) { if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo) || Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Harass)) { if (getCheckBoxItem(comboMenu, "useW") && W.IsReady()) { W.Cast(); } } // Jungleclear if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.LaneClear) || Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.JungleClear)) { if (args.Target is Obj_AI_Minion) { var allJungleMinions = MinionManager.GetMinions(Q.Range, MinionTypes.All, MinionTeam.Neutral, MinionOrderTypes.MaxHealth); if (allJungleMinions.Count != 0) { if (getCheckBoxItem(jungleclear, "jungleclearQ") && Q.IsReady()) { foreach (var minion in allJungleMinions) { if (minion.LSIsValidTarget()) { Q.CastOnUnit(minion); } } } if (getCheckBoxItem(jungleclear, "jungleclearW") && W.IsReady()) { foreach (var minion in allJungleMinions) { if (minion.LSIsValidTarget()) { W.Cast(minion); } } } } } } // Laneclear if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.LaneClear) || Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.JungleClear)) { if (args.Target is Obj_AI_Minion) { var allLaneMinions = MinionManager.GetMinions(Q.Range); //Lane if (getCheckBoxItem(laneclear, "laneclearW") && W.IsReady()) { foreach (var minion in allLaneMinions) { if (minion.LSIsValidTarget()) { W.Cast(minion); } } } } } } }; }
private void Game_OnUpdate(EventArgs args) { if (!ObjectManager.Player.IsDead) { if (MenuProvider.Champion.Misc.GetBoolValue("Auto Catch Axe")) { var bestObject = _axeDropObjectDataList.Where(x => x.Object.IsValid) .OrderBy(x => x.ExpireTime) .FirstOrDefault( x => Game.CursorPos.Distance(x.Object.Position) <= MenuProvider.Champion.Misc.GetSliderValue("Axe Catch Range").Value); if (bestObject != null) { _bestDropObject = bestObject.Object; if (ObjectManager.Player.GetPath(bestObject.Object.Position).ToList().To2D().PathLength() / ObjectManager.Player.MoveSpeed + Environment.TickCount >= bestObject.ExpireTime) { switch (MenuProvider.Orbwalker.ActiveMode) { case Orbwalking.OrbwalkingMode.Combo: if (MenuProvider.Champion.Combo.UseW) { _w.Cast(); } break; case Orbwalking.OrbwalkingMode.Mixed: if (MenuProvider.Champion.Harass.UseW) { _w.Cast(); } break; } } if (bestObject.Object.Position.Distance(ObjectManager.Player.Position) < 120) { if (MenuProvider.Orbwalker.ActiveMode != Orbwalking.OrbwalkingMode.None) { MenuProvider.Orbwalker.SetOrbwalkingPoint(Game.CursorPos); } } else { if (MenuProvider.Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.None) { EloBuddy.Player.IssueOrder(GameObjectOrder.MoveTo, bestObject.Object.Position); } else { MenuProvider.Orbwalker.SetOrbwalkingPoint(bestObject.Object.Position); } } } else { _bestDropObject = null; MenuProvider.Orbwalker.SetOrbwalkingPoint(Game.CursorPos); } } else { MenuProvider.Orbwalker.SetOrbwalkingPoint(Game.CursorPos); } if (Orbwalking.CanMove(100)) { switch (MenuProvider.Orbwalker.ActiveMode) { case Orbwalking.OrbwalkingMode.Combo: { if (MenuProvider.Champion.Combo.UseW) { if (_w.IsReadyPerfectly()) { if (!ObjectManager.Player.HasBuff("dravenfurybuff")) { if (HeroManager.Enemies.Any(x => x.IsValid && Orbwalking.InAutoAttackRange(x))) { _w.Cast(); } } } } if (MenuProvider.Champion.Combo.UseE && ObjectManager.Player.ManaPercent >= MenuProvider.Champion.Combo.GetSliderValue("Min Mana % to use E").Value) { if (_e.IsReadyPerfectly()) { var target = TargetSelector.GetTarget(_e.Range, _e.DamageType); if (target != null) { _e.Cast(target); } } } if (MenuProvider.Champion.Combo.UseR) { if (_r.IsReadyPerfectly()) { var target = HeroManager.Enemies.FirstOrDefault( x => !Orbwalking.InAutoAttackRange(x) && x.IsKillableAndValidTarget(_r.GetDamage(x) * 2, TargetSelector.DamageType.Physical, _r.Range)); if (target != null) { _r.Cast(target); } } } break; } case Orbwalking.OrbwalkingMode.Mixed: { if (MenuProvider.Champion.Harass.UseW) { if (ObjectManager.Player.IsManaPercentOkay(MenuProvider.Champion.Harass.IfMana)) { if (_w.IsReadyPerfectly()) { if (!ObjectManager.Player.HasBuff("dravenfurybuff")) { if ( HeroManager.Enemies.Any( x => x.IsValid && Orbwalking.InAutoAttackRange(x))) { _w.Cast(); } } } } } if (MenuProvider.Champion.Harass.UseE) { if (ObjectManager.Player.IsManaPercentOkay(MenuProvider.Champion.Harass.IfMana)) { if (_e.IsReadyPerfectly()) { var target = TargetSelector.GetTarget(_e.Range, _e.DamageType); if (target != null) { _e.Cast(target); } } } } break; } case Orbwalking.OrbwalkingMode.LaneClear: { //Laneclear if (MenuProvider.Champion.Laneclear.UseE) { if (ObjectManager.Player.IsManaPercentOkay(MenuProvider.Champion.Laneclear.IfMana)) { if (_e.IsReadyPerfectly()) { var farmLocation = _e.GetLineFarmLocation(MinionManager.GetMinions(_e.Range)); if (farmLocation.MinionsHit >= 3) { _e.Cast(farmLocation.Position); } } } } //Jungleclear if (MenuProvider.Champion.Jungleclear.UseE) { if (ObjectManager.Player.IsManaPercentOkay(MenuProvider.Champion.Jungleclear.IfMana)) { if (_e.IsReadyPerfectly()) { var target = MinionManager.GetMinions(_e.Range, MinionTypes.All, MinionTeam.Neutral, MinionOrderTypes.MaxHealth) .FirstOrDefault(x => x.IsValidTarget(_e.Range)); if (target != null) { _e.Cast(target); } } } } break; } } } } }
private void Farm() { var allMinionsQ = MinionManager.GetMinions(Player.ServerPosition, Q.Range, MinionTypes.All, MinionTeam.NotAlly); var allMinionsQ2 = MinionManager.GetMinions(Player.ServerPosition, Q2.Range, MinionTypes.All, MinionTeam.NotAlly); var allMinionsE = MinionManager.GetMinions(Player.ServerPosition, E.Range, MinionTypes.All, MinionTeam.NotAlly); var useQ = menu.Item("UseQFarm", true).GetValue <bool>(); var useE = menu.Item("UseEFarm", true).GetValue <bool>(); var useQ3 = menu.Item("UseQ3Farm", true).GetValue <bool>(); var min = menu.Item("LaneClear_useQ_minHit", true).GetValue <Slider>().Value; if (useQ && useE && Q.IsReady() && E.IsReady()) { foreach (var minion in allMinionsE.Where(CanCastE)) { var dashVec = Player.ServerPosition + Vector3.Normalize(minion.ServerPosition - Player.ServerPosition) * 475; var count = MinionManager.GetMinions(dashVec, 300, MinionTypes.All, MinionTeam.NotAlly).Count - 1; if (!menu.Item("E_UnderTower_Farm", true).GetValue <bool>() && dashVec.UnderTurret(true)) { continue; } if (count >= min) { E.CastOnUnit(minion, packets()); Obj_AI_Base minion1 = minion; Utility.DelayAction.Add(200, () => Q.Cast(minion1.ServerPosition, packets())); } } } if (useQ && Q.IsReady()) { if (!ThirdQ()) { var pred = Q.GetLineFarmLocation(allMinionsQ); if (pred.MinionsHit >= min) { Q.Cast(pred.Position, packets()); } } else if (useQ3) { var pred = Q.GetLineFarmLocation(allMinionsQ2); if (pred.MinionsHit >= min) { Q.Cast(pred.Position, packets()); } } } if (useE && E.IsReady()) { foreach (var minion in allMinionsE.Where(CanCastE)) { var dashVec = Player.ServerPosition + Vector3.Normalize(minion.ServerPosition - Player.ServerPosition) * 475; if (!menu.Item("E_UnderTower_Farm", true).GetValue <bool>() && dashVec.UnderTurret(true)) { continue; } var predHealth = HealthPrediction.GetHealthPrediction(minion, (int)(Player.Distance(minion) * 1000 / 2000)); if (predHealth <= Player.GetSpellDamage(minion, SpellSlot.E)) { E.CastOnUnit(minion, packets()); } } } }
private static void OnDraw(EventArgs args) { if (!_drawing) return; if (Menu.Item("orb_Draw_AARange").GetValue<Circle>().Active) { Render.Circle.DrawCircle(MyHero.Position, GetAutoAttackRange(), Menu.Item("orb_Draw_AARange").GetValue<Circle>().Color); } if (Menu.Item("orb_Draw_AARange_Enemy").GetValue<Circle>().Active || Menu.Item("orb_Draw_hitbox").GetValue<Circle>().Active) { foreach (var enemy in AllEnemys.Where(enemy => enemy.IsValidTarget(1500))) { if (Menu.Item("orb_Draw_AARange_Enemy").GetValue<Circle>().Active) Render.Circle.DrawCircle(enemy.Position, GetAutoAttackRange(enemy, MyHero), Menu.Item("orb_Draw_AARange_Enemy").GetValue<Circle>().Color); if (Menu.Item("orb_Draw_hitbox").GetValue<Circle>().Active) Render.Circle.DrawCircle(enemy.Position, enemy.BoundingRadius, Menu.Item("orb_Draw_hitbox").GetValue<Circle>().Color); } } if (Menu.Item("orb_Draw_AARange_Enemy").GetValue<Circle>().Active) { foreach (var enemy in AllEnemys.Where(enemy => enemy.IsValidTarget(1500))) { Render.Circle.DrawCircle(enemy.Position, GetAutoAttackRange(enemy, MyHero), Menu.Item("orb_Draw_AARange_Enemy").GetValue<Circle>().Color); } } if (Menu.Item("orb_Draw_Holdzone").GetValue<Circle>().Active) { Render.Circle.DrawCircle(MyHero.Position, Menu.Item("orb_Misc_Holdzone").GetValue<Slider>().Value, Menu.Item("orb_Draw_Holdzone").GetValue<Circle>().Color); } if (Menu.Item("orb_Draw_MinionHPBar").GetValue<Circle>().Active || Menu.Item("orb_Draw_Lasthit").GetValue<Circle>().Active || Menu.Item("orb_Draw_nearKill").GetValue<Circle>().Active) { var minionList = MinionManager.GetMinions(MyHero.Position, GetAutoAttackRange() + 500, MinionTypes.All, MinionTeam.Enemy, MinionOrderTypes.MaxHealth); foreach (var minion in minionList.Where(minion => minion.IsValidTarget(GetAutoAttackRange() + 500))) { var attackToKill = Math.Ceiling(minion.MaxHealth / MyHero.GetAutoAttackDamage(minion, true)); var hpBarPosition = minion.HPBarPosition; var barWidth = minion.IsMelee() ? 75 : 80; if (minion.HasBuff("turretshield")) barWidth = 70; var barDistance = (float)(barWidth / attackToKill); if (Menu.Item("orb_Draw_MinionHPBar").GetValue<Circle>().Active) { for (var i = 1; i < attackToKill; i++) { var startposition = hpBarPosition.X + 48 + barDistance * i; Drawing.DrawLine( new Vector2(startposition, hpBarPosition.Y + 19), new Vector2(startposition, hpBarPosition.Y + 23), Menu.Item("orb_Draw_MinionHPBar_thickness").GetValue<Slider>().Value, Menu.Item("orb_Draw_MinionHPBar").GetValue<Circle>().Color); } } if (Menu.Item("orb_Draw_Lasthit").GetValue<Circle>().Active && minion.Health <= MyHero.GetAutoAttackDamage(minion, true)) Render.Circle.DrawCircle(minion.Position, minion.BoundingRadius, Menu.Item("orb_Draw_Lasthit").GetValue<Circle>().Color); else if (Menu.Item("orb_Draw_nearKill").GetValue<Circle>().Active && minion.Health <= MyHero.GetAutoAttackDamage(minion, true) * 2) Render.Circle.DrawCircle(minion.Position, minion.BoundingRadius, Menu.Item("orb_Draw_nearKill").GetValue<Circle>().Color); } } }
/// <summary> /// Does the combo. /// </summary> private static void Combo() { var useQ = Menu.Item("useQ").GetValue<bool>(); var useW = Menu.Item("useW").GetValue<bool>(); var useE = Menu.Item("useE").GetValue<bool>(); var useR = Menu.Item("useR").GetValue<bool>(); var minQRange = Menu.Item("minQRange").GetValue<Slider>().Value; var useEStun = Menu.Item("useEStun").GetValue<bool>(); var useQGapclose = Menu.Item("useQGapclose").GetValue<bool>(); var useWBeforeQ = Menu.Item("useWBeforeQ").GetValue<bool>(); var procSheen = Menu.Item("procSheen").GetValue<bool>(); var useIgnite = Menu.Item("useIgnite").GetValue<bool>(); var useRGapclose = Menu.Item("useRGapclose").GetValue<bool>(); var target = TargetSelector.GetTarget(Q.Range, TargetSelector.DamageType.Physical); if (target == null && useQGapclose) { /** var minionQ = ObjectManager.Get<Obj_AI_Minion>() .Where(x => x.IsValidTarget()) .Where(x => Player.GetSpellDamage(x, SpellSlot.Q) > x.Health) .FirstOrDefault( x => x.Distance(TargetSelector.GetTarget(Q.Range * 5, TargetSelector.DamageType.Physical)) < Q.Range);*/ var minionQ = MinionManager.GetMinions(Q.Range, MinionTypes.All, MinionTeam.NotAlly) .FirstOrDefault( x => Q.IsKillable(x) && Q.IsInRange(x) && x.Distance(HeroManager.Enemies.OrderBy(y => y.Distance(Player)).FirstOrDefault()) < Player.Distance(HeroManager.Enemies.OrderBy(z => z.Distance(Player)).FirstOrDefault())); if (minionQ != null && Player.Mana > Q.ManaCost * 2) { Q.CastOnUnit(minionQ); return; } if (useRGapclose) { var minionR = ObjectManager.Get<Obj_AI_Minion>() .Where( x => x.IsValidTarget() && x.Distance(Player) < Q.Range && x.CountEnemiesInRange(Q.Range) >= 1) .FirstOrDefault( x => x.Health - Player.GetSpellDamage(x, SpellSlot.R) < Player.GetSpellDamage(x, SpellSlot.Q)); if (minionR != null) { R.Cast(minionR); } } } // Get target that is in the R range var rTarget = TargetSelector.GetTarget(R.Range, TargetSelector.DamageType.Physical); if (useR && UltActivated && rTarget.IsValidTarget()) { if (procSheen) { // Fire Ult if player is out of AA range, with Q not up or not in range if (target.Distance(Player) > Orbwalking.GetRealAutoAttackRange(Player)) { R.Cast(rTarget); } else { if (!HasSheenBuff) { R.Cast(rTarget); } } } else { R.Cast(rTarget); } } if (!target.IsValidTarget()) { return; } if (Botrk.IsReady()) { Botrk.Cast(target); } if (Cutlass.IsReady()) { Cutlass.Cast(target); } if (Omen.IsReady() && Omen.IsInRange(target) && target.Distance(Player) > Orbwalking.GetRealAutoAttackRange(Player)) { Omen.Cast(); } if (useIgnite && target != null && target.IsValidTarget(600) && (IgniteSlot.IsReady() && Player.GetSummonerSpellDamage(target, Damage.SummonerSpell.Ignite) > target.Health)) { Player.Spellbook.CastSpell(IgniteSlot, target); } if (useWBeforeQ) { if (useW && W.IsReady()) { W.Cast(); } if (useQ && Q.IsReady() && target.Distance(Player.ServerPosition) > minQRange) { Q.CastOnUnit(target); } } else { if (useQ && Q.IsReady() && target.Distance(Player.ServerPosition) > minQRange) { Q.CastOnUnit(target); } if (useW && W.IsReady()) { W.Cast(); } } if (useEStun) { if (target.CanStunTarget() && useE && E.IsReady()) { E.Cast(target); } } else { if (useE && E.IsReady()) { E.Cast(target); } } if (useR && R.IsReady() && !UltActivated) { R.Cast(target); } }
private void Cast_E() { var target = TargetSelector.GetTarget(Q2.Range, TargetSelector.DamageType.Physical); if (target == null || !E.IsReady() || !CanCastE(target)) { return; } if (E.IsKillable(target) && Player.Distance(target) < E.Range + target.BoundingRadius && EturretCheck(target)) { E.CastOnUnit(target, packets()); } //EQ3 if (ThirdQ() && Player.ServerPosition.To2D().Distance(target.ServerPosition.To2D()) < E.Range) { if (EturretCheck(target)) { E.CastOnUnit(target); Utility.DelayAction.Add(200, () => Q.Cast(target, packets())); return; } } if (Player.ServerPosition.To2D().Distance(target.ServerPosition.To2D()) <= menu.Item("E_Min_Dist", true).GetValue <Slider>().Value) { return; } //gapclose if (menu.Item("E_GapClose", true).GetValue <bool>()) { var allMinionQ = MinionManager.GetMinions(Player.ServerPosition, E.Range, MinionTypes.All, MinionTeam.NotAlly); if (allMinionQ.Count > 0) { Obj_AI_Base bestMinion = allMinionQ[0]; Vector3 bestVec = Player.ServerPosition + Vector3.Normalize(bestMinion.ServerPosition - Player.ServerPosition) * 475; foreach (var minion in allMinionQ.Where(CanCastE)) { var dashVec = Player.ServerPosition + Vector3.Normalize(minion.ServerPosition - Player.ServerPosition) * 475; if (target.Distance(Player) > target.Distance(bestVec) - 50 && target.Distance(bestVec) > target.Distance(dashVec)) { bestMinion = minion; bestVec = dashVec; } } if (target.Distance(Player) > target.Distance(bestVec) - 50 && bestMinion != null) { if (EturretCheck(bestMinion)) { E.CastOnUnit(bestMinion, packets()); return; } } } } if (Q.IsReady() && Player.Distance(target) > menu.Item("E_Min_Dist", true).GetValue <Slider>().Value&& Player.Distance(target) < E.Range) { if (EturretCheck(target)) { E.CastOnUnit(target, packets()); Utility.DelayAction.Add(200, () => Q.Cast(target, packets())); return; } } if (Player.ServerPosition.To2D().Distance(target.ServerPosition.To2D()) > menu.Item("E_Min_Dist", true).GetValue <Slider>().Value&& Player.Distance(target) < E.Range + target.BoundingRadius) { if (EturretCheck(target)) { E.CastOnUnit(target, packets()); } } }
public static int GetNumberOfMinionsHitByE(Obj_AI_Hero target) { var minions = MinionManager.GetMinions(BallManager.BallPosition, 2000); return(E.CountHits(minions, target.ServerPosition)); }
private static void Farm(bool laneClear) { if (!Config.Item("EnabledFarm").GetValue <bool>()) { return; } var allMinions = MinionManager.GetMinions(ObjectManager.Player.ServerPosition, Q.Range + W.Width, MinionTypes.All); var rangedMinions = MinionManager.GetMinions(ObjectManager.Player.ServerPosition, Q.Range + W.Width, MinionTypes.Ranged); var useQi = Config.Item("UseQFarm").GetValue <StringList>().SelectedIndex; var useWi = Config.Item("UseWFarm").GetValue <StringList>().SelectedIndex; var useEi = Config.Item("UseWFarm").GetValue <StringList>().SelectedIndex; var useQ = (laneClear && (useQi == 1 || useQi == 2)) || (!laneClear && (useQi == 0 || useQi == 2)); var useW = (laneClear && (useWi == 1 || useWi == 2)) || (!laneClear && (useWi == 0 || useWi == 2)); var useE = (laneClear && (useEi == 1 || useEi == 2)) || (!laneClear && (useEi == 0 || useEi == 2)); if (useQ && QIsReady) { if (useW) { var qLocation = Q.GetCircularFarmLocation(allMinions, W.Range); var q2Location = Q.GetCircularFarmLocation(rangedMinions, W.Range); var bestLocation = (qLocation.MinionsHit > q2Location.MinionsHit + 1) ? qLocation : q2Location; if (bestLocation.MinionsHit > 0) { Q.Cast(bestLocation.Position, true); return; } } else { foreach (var minion in allMinions.FindAll(m => !Orbwalking.InAutoAttackRange(m))) { if (HealthPrediction.GetHealthPrediction(minion, Math.Max((int)(minion.ServerPosition.Distance(BallManager.BallPosition) / Q.Speed * 1000) - 100, 0)) < 50) { Q.Cast(minion.ServerPosition, true); return; } } } } if (useW && WIsReady) { var n = 0; var d = 0; foreach (var m in allMinions) { if (m.Distance(BallManager.BallPosition) <= W.Range) { n++; if (W.GetDamage(m) > m.Health) { d++; } } } if (n >= 3 || d >= 2) { W.Cast(Player.ServerPosition, true); return; } } if (useE && EIsReady) { if (W.CountHits(allMinions, Player.ServerPosition) >= 3) { E.CastOnUnit(Player, true); return; } } }
private void Farm() { var allMinionsQ = MinionManager.GetMinions(Player.ServerPosition, Q.Range + Q.Width, MinionTypes.All, MinionTeam.NotAlly); var allMinionsW = MinionManager.GetMinions(Player.ServerPosition, W.Range, MinionTypes.All, MinionTeam.NotAlly); var useQ = menu.Item("UseQFarm", true).GetValue <bool>(); var min = menu.Item("qFarm", true).GetValue <Slider>().Value; if (useQ && (Q.IsReady() || QSpell.State == SpellState.Surpressed)) { int hit; if (soilderCount() > 0) { var slaves = xSLxOrbwalker.Soilders.ToList(); foreach (var slave in slaves) { foreach (var enemy in allMinionsQ) { hit = 0; var prediction = GetP(slave.Position, Q, enemy, true); if (Q.IsReady() && Player.Distance(enemy) <= Q.Range) { hit += allMinionsQ.Count(enemy2 => enemy2.Distance(prediction.CastPosition) < 200 && Q.IsReady()); if (hit >= min) { if (Q.IsReady()) { Q.Cast(prediction.CastPosition, packets()); return; } } } } } } if (W.IsReady()) { var wpred = W.GetCircularFarmLocation(allMinionsW); if (wpred.MinionsHit > 0) { W.Cast(wpred.Position); } foreach (var enemy in allMinionsQ) { hit = 0; var prediction = GetP(Player.ServerPosition, Q, enemy, true); if (Q.IsReady() && Player.Distance(enemy) <= Q.Range) { hit += allMinionsQ.Count(enemy2 => enemy2.Distance(prediction.CastPosition) < 200 && Q.IsReady()); if (hit >= min) { if (Q.IsReady()) { Q.Cast(prediction.CastPosition, packets()); return; } } } } } } }
public static void Init() { Drawing.OnDraw += args => { if (Activator.Origin.Item("acdebug").GetValue <bool>()) { foreach (var hero in Activator.Allies()) { var mpos = Drawing.WorldToScreen(hero.Player.Position); if (!hero.Player.IsDead) { Drawing.DrawText(mpos[0] - 40, mpos[1] - 15, Color.White, "Ability Damage: " + hero.AbilityDamage); Drawing.DrawText(mpos[0] - 40, mpos[1] + 0, Color.White, "Tower Damage: " + hero.TowerDamage); Drawing.DrawText(mpos[0] - 40, mpos[1] + 15, Color.White, "Buff Damage: " + hero.BuffDamage); Drawing.DrawText(mpos[0] - 40, mpos[1] + 30, Color.White, "Troy Damage: " + hero.TroyDamage); Drawing.DrawText(mpos[0] - 40, mpos[1] + 45, Color.White, "Minion Damage: " + hero.MinionDamage); } } } if (Activator.Origin.Item("acdebug2").GetValue <bool>()) { Drawing.DrawText(200f, 250f, Color.Wheat, "Item Priority (Debug)"); var prior = Lists.Priorities.Values.Where(ii => ii.Needed()) .OrderByDescending(ii => ii.Menu().Item("prior" + ii.Name()).GetValue <Slider>().Value); foreach (var item in prior) { for (int i = 0; i < prior.Count(); i++) { Drawing.DrawText(200, 265 + 5 * (i * 3), Color.White, item.Name() + " / Needed: " + item.Needed() + " / Ready: " + item.Ready() + " :: " + item.Position); } } } if (Activator.Origin.Item("acdebug3").GetValue <bool>()) { var player = Activator.Allies().FirstOrDefault(x => x.Player.IsMe); if (player != null) { Drawing.DrawText(900f, 250f, Color.Wheat, "Qleanse/QSS (Debug)"); Drawing.DrawText(900f, 265f, Color.Wheat, "QSSBuffCount: " + player.QSSBuffCount); Drawing.DrawText(900f, 280f, Color.Wheat, "QSSHighestBuffTime: " + player.QSSHighestBuffTime); Drawing.DrawText(900f, 295f, Color.Wheat, "CleanseBuffCount: " + player.CleanseBuffCount); Drawing.DrawText(900f, 310f, Color.Wheat, "CleanseHighestBuffTime: " + player.CleanseHighestBuffTime); } } if (!Activator.SmiteInGame) { return; } if (Activator.Origin.Item("drawsmitet").GetValue <bool>()) { var wts = Drawing.WorldToScreen(Activator.Player.Position); if (Activator.Origin.Item("usesmite").GetValue <KeyBind>().Active) { Drawing.DrawText(wts[0] - 35, wts[1] + 55, Color.White, "Smite: ON"); } if (!Activator.Origin.Item("usesmite").GetValue <KeyBind>().Active) { Drawing.DrawText(wts[0] - 35, wts[1] + 55, Color.Gray, "Smite: OFF"); } } if (Activator.Origin.Item("drawsmite").GetValue <bool>()) { if (Activator.Origin.Item("usesmite").GetValue <KeyBind>().Active) { Render.Circle.DrawCircle(Activator.Player.Position, 500f, Color.White, 2); } if (!Activator.Origin.Item("usesmite").GetValue <KeyBind>().Active) { Render.Circle.DrawCircle(Activator.Player.Position, 500f, Color.Gray, 2); } } if (!Activator.Player.IsDead && Activator.Origin.Item("drawfill").GetValue <bool>()) { if (Activator.MapId != (int)MapType.SummonersRift) { return; } var spell = Data.Smitedata.CachedSpellList.FirstOrDefault(); var minionlist = MinionManager.GetMinions(Activator.Player.Position, 1200f, MinionTypes.All, MinionTeam.Neutral); foreach (var minion in minionlist.Where(th => Helpers.IsEpicMinion(th) || Helpers.IsLargeMinion(th))) { var yoffset = Offsets[minion.Name].Y; var xoffset = Offsets[minion.Name].X; var width = Offsets[minion.Name].Width; var height = Offsets[minion.Name].Height; if (!minion.IsHPBarRendered) { continue; } var barPos = minion.HPBarPosition; var sdamage = spell != null && Activator.Player.GetSpell(spell.Slot).State == SpellState.Ready ? Activator.Player.GetSpellDamage(minion, spell.Slot, spell.Stage) : 0; var smite = Activator.Player.GetSpell(Activator.Smite).State == SpellState.Ready ? Activator.Player.GetSummonerSpellDamage(minion, Damage.SummonerSpell.Smite) : 0; var damage = smite + sdamage; var pctafter = Math.Max(0, minion.Health - damage) / minion.MaxHealth; var yaxis = barPos.Y + yoffset; var xaxisdmg = (float)(barPos.X + xoffset + width * pctafter); var xaxisnow = barPos.X + xoffset + width * minion.Health / minion.MaxHealth; var ana = xaxisnow - xaxisdmg; var pos = barPos.X + xoffset + 12 + (139 * pctafter); for (var i = 0; i < ana; i++) { if (Activator.Origin.Item("usesmite").GetValue <KeyBind>().Active) { Drawing.DrawLine((float)pos + i, yaxis, (float)pos + i, yaxis + height, 1, Color.White); } if (!Activator.Origin.Item("usesmite").GetValue <KeyBind>().Active) { Drawing.DrawLine((float)pos + i, yaxis, (float)pos + i, yaxis + height, 1, Color.Gray); } } } } }; }
public static AttackableUnit GetPossibleTarget() { if (ForcedTarget != null) { if (InAutoAttackRange(ForcedTarget)) return ForcedTarget; ForcedTarget = null; } AttackableUnit tempTarget = null; if (Menu.Item("orb_Misc_Priority_Unit").GetValue<StringList>().SelectedIndex == 1 && (CurrentMode == Mode.Harass || CurrentMode == Mode.LaneClear)) { tempTarget = GetBestHeroTarget(); if (tempTarget != null) return tempTarget; } //last hit if (CurrentMode == Mode.Harass || CurrentMode == Mode.Lasthit || CurrentMode == Mode.LaneClear || CurrentMode == Mode.LaneFreeze) { if (MyHero.ChampionName == "Azir" && Soilders.Count > 0) { var minions = MinionManager.GetMinions(ObjectManager.Player.ServerPosition, 800, MinionTypes.All, MinionTeam.NotAlly); foreach (var minion in from minion in minions.Where(minion => minion.IsValidTarget() && minion.Name != "Beacon" && InSoldierAttackRange(minion)) let t = (int)(MyHero.AttackCastDelay * 1000) - 100 + Game.Ping / 2 + 1000 * (int)MyHero.Distance(minion) / (int)MyProjectileSpeed() let predHealth = HealthPrediction.GetHealthPrediction(minion, t, FarmDelay()) where minion.Team != GameObjectTeam.Neutral && predHealth > 0 && predHealth <= GetAzirAaSandwarriorDamage(minion) select minion) return minion; } foreach ( var minion in from minion in ObjectManager.Get<Obj_AI_Minion>().Where(minion => minion.IsValidTarget() && minion.Name != "Beacon" && InAutoAttackRange(minion)) let t = (int)(MyHero.AttackCastDelay * 1000) - 100 + Game.Ping / 2 + 1000 * (int)MyHero.Distance(minion) / (int)MyProjectileSpeed() let predHealth = HealthPrediction.GetHealthPrediction(minion, t, FarmDelay()) where minion.Team != GameObjectTeam.Neutral && predHealth > 0 && predHealth <= MyHero.GetAutoAttackDamage(minion, true) select minion) return minion; } if (CurrentMode != Mode.Lasthit) { tempTarget = GetBestHeroTarget(); if (tempTarget != null) return tempTarget; } if (CurrentMode == Mode.Harass || CurrentMode == Mode.LaneClear || CurrentMode == Mode.LaneFreeze) { foreach ( var turret in ObjectManager.Get<Obj_AI_Turret>().Where(turret => turret.IsValidTarget(GetAutoAttackRange(MyHero, turret)))) return turret; } //jungle float[] maxhealth; if (CurrentMode == Mode.LaneClear || CurrentMode == Mode.Harass || CurrentMode == Mode.LaneFreeze) { if (MyHero.ChampionName == "Azir" && Soilders.Count > 0) { maxhealth = new float[] { 0 }; var maxhealth1 = maxhealth; var minions = MinionManager.GetMinions(ObjectManager.Player.ServerPosition, 800, MinionTypes.All, MinionTeam.Neutral); foreach ( var minion in minions .Where(minion => InSoldierAttackRange(minion) && minion.Name != "Beacon" && minion.IsValidTarget()) .Where(minion => minion.MaxHealth >= maxhealth1[0] || Math.Abs(maxhealth1[0] - float.MaxValue) < float.Epsilon)) { tempTarget = minion; maxhealth[0] = minion.MaxHealth; } if (tempTarget != null) return tempTarget; } maxhealth = new float[] { 0 }; var maxhealth2 = maxhealth; foreach (var minion in ObjectManager.Get<Obj_AI_Minion>().Where(minion => minion.IsValidTarget(GetAutoAttackRange(MyHero, minion)) && minion.Name != "Beacon" && minion.Team == GameObjectTeam.Neutral).Where(minion => minion.MaxHealth >= maxhealth2[0] || Math.Abs(maxhealth2[0] - float.MaxValue) < float.Epsilon)) { tempTarget = minion; maxhealth[0] = minion.MaxHealth; } if (tempTarget != null) return tempTarget; } //LANE CLEAR if (CurrentMode != Mode.LaneClear || ShouldWait()) { //ResetAutoAttackTimer(); return null; } if (MyHero.ChampionName == "Azir" && Soilders.Count > 0) { maxhealth = new float[] { 0 }; float[] maxhealth1 = maxhealth; var minions = MinionManager.GetMinions(ObjectManager.Player.ServerPosition, 800, MinionTypes.All, MinionTeam.NotAlly); foreach (var minion in from minion in minions .Where(minion => minion.IsValidTarget() && minion.Name != "Beacon" && InSoldierAttackRange(minion)) let predHealth = HealthPrediction.LaneClearHealthPrediction(minion, (int)((MyHero.AttackDelay * 1000) * LaneClearWaitTimeMod), FarmDelay()) where predHealth >= GetAzirAaSandwarriorDamage(minion) + MyHero.GetAutoAttackDamage(minion, true) || Math.Abs(predHealth - minion.Health) < float.Epsilon where minion.Health >= maxhealth1[0] || Math.Abs(maxhealth1[0] - float.MaxValue) < float.Epsilon select minion) { tempTarget = minion; maxhealth[0] = minion.MaxHealth; } if (tempTarget != null) return tempTarget; } else { maxhealth = new float[] { 0 }; foreach (var minion in from minion in ObjectManager.Get<Obj_AI_Minion>() .Where(minion => minion.IsValidTarget(GetAutoAttackRange(MyHero, minion)) && minion.Name != "Beacon") let predHealth = HealthPrediction.LaneClearHealthPrediction(minion, (int)((MyHero.AttackDelay * 1000) * LaneClearWaitTimeMod), FarmDelay()) where predHealth >= 2 * MyHero.GetAutoAttackDamage(minion, true) || Math.Abs(predHealth - minion.Health) < float.Epsilon where minion.Health >= maxhealth[0] || Math.Abs(maxhealth[0] - float.MaxValue) < float.Epsilon select minion) { tempTarget = minion; maxhealth[0] = minion.MaxHealth; } if (tempTarget != null) return tempTarget; } return null; }
public void Moon() { if (m_target == null && ComboReady()) { m_target = TargetSelector.GetTarget(2000, TargetSelector.DamageType.Magical); } if (!LXOrbwalkerEnabled) { Orbwalking.Orbwalk(m_target, Game.CursorPos); } else { LXOrbwalker.Orbwalk(Game.CursorPos, m_target); } if (m_target != null) { var minion = MinionManager.GetMinions(Spells[R].Range, MinionTypes.All, MinionTeam.Enemy, MinionOrderTypes.None).Where(p => p.HasBuff("dianamoonlight")).OrderByDescending(q => q.ServerPosition.Distance(ObjectManager.Player.ServerPosition)).OrderBy(r => r.ServerPosition.Distance(Game.CursorPos)).FirstOrDefault(); if (minion == null) { minion = MinionManager.GetMinions(Spells[Q].Range, MinionTypes.All, MinionTeam.Enemy, MinionOrderTypes.None).Where(p => p.Health > Spells[Q].GetDamage(p)).OrderByDescending(q => q.ServerPosition.Distance(ObjectManager.Player.ServerPosition)).ThenByDescending(t => t.Health).FirstOrDefault(); if (minion != null && !m_moon_r_casted) { Spells[Q].Cast(minion.ServerPosition); m_moon_start_tick = Environment.TickCount; m_moon_r_casted = false; } } if (minion != null) { if (minion.ServerPosition.Distance(m_target.ServerPosition) < Spells[E].Range - 10 && Environment.TickCount - m_moon_start_tick > 500) { if (Spells[E].IsReady() && !m_moon_r_casted && Spells[R].IsInRange(minion)) //because r->e combo { Spells[R].CastOnUnit(minion); m_moon_r_casted = true; } } } if (m_moon_r_casted) { if (Spells[E].IsReady() && !m_target.IsDead) { Spells[E].Cast(); } if (Spells[W].IsReady() && !m_target.IsDead) { Spells[W].Cast(); } if (Spells[Q].IsReady() && !m_target.IsDead) { Spells[Q].SPredictionCastArc(m_target, HitChance.High, Config.Item("QPREDTYPE").GetValue <StringList>().SelectedIndex == 0, 100); } if (Spells[R].IsReady() && !m_target.IsDead && HasMoonlight(m_target)) { Spells[R].Cast(); } m_moon_start_tick = 0; } } }
private void Game_OnUpdate(EventArgs args) { if (!ObjectManager.Player.IsDead) { if (Orbwalking.CanMove(10)) { switch (MenuProvider.Orbwalker.ActiveMode) { case Orbwalking.OrbwalkingMode.Combo: { if (MenuProvider.Champion.Combo.UseQ) { if (Q.isReadyPerfectly()) { if (Q.IsCharging) { if (Q.Range >= Q.ChargedMaxRange) { Q.CastOnBestTarget(); } } else if (TargetSelector.GetTarget(Q.ChargedMaxRange, Q.DamageType) != null) { Q.StartCharging(); } } } if (MenuProvider.Champion.Combo.UseE) { if (E.isReadyPerfectly()) { E.CastOnBestTarget(); } } if (MenuProvider.Champion.Combo.UseR) { if (R.isReadyPerfectly()) { R.CastOnBestTarget(-500); } } break; } case Orbwalking.OrbwalkingMode.Mixed: { if (MenuProvider.Champion.Harass.UseQ) { if (Q.isReadyPerfectly()) { if (Q.IsCharging) { if (Q.Range >= Q.ChargedMaxRange) { Q.CastOnBestTarget(); } } else if (ObjectManager.Player.isManaPercentOkay(MenuProvider.Champion.Harass.IfMana)) { if (TargetSelector.GetTarget(Q.ChargedMaxRange, Q.DamageType) != null) { Q.StartCharging(); } } } } if (MenuProvider.Champion.Harass.UseE) { if (ObjectManager.Player.isManaPercentOkay(MenuProvider.Champion.Harass.IfMana)) { if (E.isReadyPerfectly()) { E.CastOnBestTarget(); } } } break; } case Orbwalking.OrbwalkingMode.LaneClear: { //Laneclear if (MenuProvider.Champion.Laneclear.UseQ) { if (Q.isReadyPerfectly()) { var FarmLocation = Q.GetLineFarmLocation(MinionManager.GetMinions(Q.ChargedMaxRange)); if (Q.IsCharging) { if (Q.Range >= Q.ChargedMaxRange) { Q.Cast(FarmLocation.Position); } } else if (FarmLocation.MinionsHit >= 4) { if (ObjectManager.Player.isManaPercentOkay(MenuProvider.Champion.Laneclear.IfMana)) { Q.StartCharging(); } } } } if (MenuProvider.Champion.Laneclear.UseE) { if (ObjectManager.Player.isManaPercentOkay(MenuProvider.Champion.Laneclear.IfMana)) { if (E.isReadyPerfectly()) { var FarmLocation = E.GetCircularFarmLocation(MinionManager.GetMinions(E.Range)); if (FarmLocation.MinionsHit >= 4) { E.Cast(FarmLocation.Position); } } } } //Jungleclear if (MenuProvider.Champion.Jungleclear.UseQ) { if (Q.isReadyPerfectly()) { var Target = MinionManager.GetMinions(Q.ChargedMaxRange, MinionTypes.All, MinionTeam.Neutral).FirstOrDefault(x => x.IsValidTarget(Q.ChargedMaxRange)); if (Target != null) { if (Q.IsCharging) { if (Q.Range >= Q.ChargedMaxRange) { Q.Cast(Target); } } else if (ObjectManager.Player.isManaPercentOkay(MenuProvider.Champion.Jungleclear.IfMana)) { Q.StartCharging(); } } } } if (MenuProvider.Champion.Jungleclear.UseE) { if (ObjectManager.Player.isManaPercentOkay(MenuProvider.Champion.Jungleclear.IfMana)) { if (E.isReadyPerfectly()) { var Target = MinionManager.GetMinions(E.Range, MinionTypes.All, MinionTeam.Neutral).FirstOrDefault(x => x.IsValidTarget(E.Range)); if (Target != null) { E.Cast(Target); } } } } break; } } } } }
private void Orbwalking_BeforeAttack(Orbwalking.BeforeAttackEventArgs args) { _axeDropObjectDataList.RemoveAll(x => !x.Object.IsValid); if (args.Unit.IsMe) { switch (MenuProvider.Orbwalker.ActiveMode) { case Orbwalking.OrbwalkingMode.Combo: if (args.Target.Type == GameObjectType.AIHeroClient) { if (MenuProvider.Champion.Combo.UseQ) { if (AxeCount < 2) { if (_q.IsReadyPerfectly()) { _q.Cast(); } } } } break; case Orbwalking.OrbwalkingMode.Mixed: if (args.Target.Type == GameObjectType.AIHeroClient) { if (MenuProvider.Champion.Harass.UseQ) { if (ObjectManager.Player.IsManaPercentOkay(MenuProvider.Champion.Harass.IfMana)) { if (AxeCount < 2) { if (_q.IsReadyPerfectly()) { _q.Cast(); } } } } } break; case Orbwalking.OrbwalkingMode.LaneClear: if (MinionManager.GetMinions(float.MaxValue).Any(x => x.NetworkId == args.Target.NetworkId)) { if (MenuProvider.Champion.Laneclear.UseQ) { if (ObjectManager.Player.IsManaPercentOkay(MenuProvider.Champion.Laneclear.IfMana)) { if (AxeCount < 2) { if (_q.IsReadyPerfectly()) { _q.Cast(); } } } } } if ( MinionManager.GetMinions(float.MaxValue, MinionTypes.All, MinionTeam.Neutral) .Any(x => x.NetworkId == args.Target.NetworkId)) { if (MenuProvider.Champion.Jungleclear.UseQ) { if (ObjectManager.Player.IsManaPercentOkay(MenuProvider.Champion.Jungleclear.IfMana)) { if (AxeCount < 2) { if (_q.IsReadyPerfectly()) { _q.Cast(); } } } } } break; } } }
public static Vector2 GetCollisionPoint(Skillshot skillshot) { var collisions = new List<DetectedCollision>(); var from = skillshot.GetMissilePosition(0); skillshot.ForceDisabled = false; foreach (var cObject in skillshot.SpellData.CollisionObjects) { switch (cObject) { case CollisionObjectTypes.Minion: collisions.AddRange( from minion in MinionManager.GetMinions( @from.To3D(), 1200, MinionTypes.All, skillshot.Unit.Team == ObjectManager.Player.Team ? MinionTeam.NotAlly : MinionTeam.NotAllyForEnemy) let pred = FastPrediction( @from, minion, Math.Max( 0, skillshot.SpellData.Delay - (Environment.TickCount - skillshot.StartTick)), skillshot.SpellData.MissileSpeed) let pos = pred.PredictedPosVector2 let w = skillshot.SpellData.RawRadius + (!pred.IsMoving ? (minion.BoundingRadius - 15) : 0) - pos.LSDistance(@from, skillshot.End, true) where w > 0 select new DetectedCollision { PositionVector2 = pos.LSProjectOn(skillshot.End, skillshot.Start).LinePoint + skillshot.Direction * 30, UnitAiBase = minion, Type = CollisionObjectTypes.Minion, Distance = pos.LSDistance(@from), Difference = w }); break; case CollisionObjectTypes.Champion: collisions.AddRange( from hero in ObjectManager.Get<AIHeroClient>() .Where( h => (h.LSIsValidTarget(1200, false) && h.Team == ObjectManager.Player.Team && !h.IsMe || h.Team != ObjectManager.Player.Team)) let pred = FastPrediction( @from, hero, Math.Max( 0, skillshot.SpellData.Delay - (Environment.TickCount - skillshot.StartTick)), skillshot.SpellData.MissileSpeed) let pos = pred.PredictedPosVector2 let w = skillshot.SpellData.RawRadius + 30 - pos.LSDistance(@from, skillshot.End, true) where w > 0 select new DetectedCollision { PositionVector2 = pos.LSProjectOn(skillshot.End, skillshot.Start).LinePoint + skillshot.Direction * 30, UnitAiBase = hero, Type = CollisionObjectTypes.Minion, Distance = pos.LSDistance(@from), Difference = w }); break; case CollisionObjectTypes.YasuoWall: if ( !ObjectManager.Get<AIHeroClient>() .Any( hero => hero.LSIsValidTarget(float.MaxValue, false) && hero.Team == ObjectManager.Player.Team && hero.ChampionName == "Yasuo")) { break; } GameObject wall = null; foreach ( var gameObject in ObjectManager.Get<GameObject>() .Where( gameObject => gameObject.IsValid && Regex.IsMatch( gameObject.Name, "_w_windwall.\\.troy", RegexOptions.IgnoreCase))) { wall = gameObject; } if (wall == null) { break; } var level = wall.Name.Substring(wall.Name.Length - 6, 1); var wallWidth = (300 + 50 * Convert.ToInt32(level)); var wallDirection = (wall.Position.LSTo2D() - _yasuoWallVector2).LSNormalized().LSPerpendicular(); var fraction = wallWidth / 0x2; // 0x2 = 2 var wallStart = wall.Position.LSTo2D() + fraction * wallDirection; var wallEnd = wallStart - wallWidth * wallDirection; var wallPolygon = new Geometry.Rectangle(wallStart, wallEnd, 75).ToPolygon(); var intersections = new List<Vector2>(); for (var i = 0; i < wallPolygon.Points.Count; i++) { var inter = wallPolygon.Points[i].LSIntersection( wallPolygon.Points[i != wallPolygon.Points.Count - 1 ? i + 1 : 0], from, skillshot.End); if (inter.Intersects) { intersections.Add(inter.Point); } } if (intersections.Count > 0) { var intersection = intersections.OrderBy(item => item.LSDistance(from)).ToList()[0]; var collisionT = Environment.TickCount + Math.Max( 0, skillshot.SpellData.Delay - (Environment.TickCount - skillshot.StartTick)) + 100 + (1000 * intersection.LSDistance(from)) / skillshot.SpellData.MissileSpeed; if (collisionT - _wallCastTick < 4000) { if (skillshot.SpellData.Type != SkillShotType.SkillshotMissileLine) { skillshot.ForceDisabled = true; } return intersection; } } break; } } return collisions.Count > 0 ? collisions.OrderBy(c => c.Distance).ToList()[0].PositionVector2 : new Vector2(); }
private static bool PredictCastMinionE(int requiredHitNumber = -1) { int hitNum = 0; Vector2 startPos = new Vector2(0, 0); Vector2 endPos = new Vector2(0, 0); foreach (var minion in MinionManager.GetMinions(player.Position, rangeE)) { var farmLocation = GetBestLaserFarmLocation(minion.Position.LSTo2D(), (from mnion in MinionManager.GetMinions(minion.Position, lengthE) select mnion.Position.LSTo2D()).ToList <Vector2>(), E.Width, lengthE); if (farmLocation.MinionsHit > hitNum) { hitNum = farmLocation.MinionsHit; startPos = minion.Position.LSTo2D(); endPos = farmLocation.Position; } } if (startPos.X != 0 && startPos.Y != 0) { return(PredictCastMinionE(startPos, requiredHitNumber)); } return(false); }
public static PositionInfo GetBestPositionTargetedDash(EvadeSpellData spell) { /*if (spell.spellDelay > 0) * { * if (CheckWindupTime(spell.spellDelay)) * { * return null; * } * }*/ var extraDelayBuffer = ObjectCache.menuCache.cache["ExtraPingBuffer"].GetValue <Slider>().Value; var extraEvadeDistance = 100;// Evade.menu.SubMenu("MiscSettings").SubMenu("ExtraBuffers").Item("ExtraEvadeDistance").GetValue<Slider>().Value; var extraDist = ObjectCache.menuCache.cache["ExtraCPADistance"].GetValue <Slider>().Value; Vector2 heroPoint = ObjectCache.myHeroCache.serverPos2DPing; Vector2 lastMovePos = Game.CursorPos.To2D(); List <PositionInfo> posTable = new List <PositionInfo>(); List <int> spellList = SpellDetector.GetSpellList(); int minDistance = 50; //Math.Min(spell.range, minDistance) int maxDistance = int.MaxValue; if (spell.fixedRange) { minDistance = maxDistance = (int)spell.range; } List <Obj_AI_Base> collisionCandidates = new List <Obj_AI_Base>(); if (spell.spellTargets.Contains(SpellTargets.Targetables)) { foreach (var obj in ObjectManager.Get <Obj_AI_Base>() .Where(h => !h.IsMe && h.IsValidTarget(spell.range, false))) { if (!obj.IsValid <Obj_AI_Turret>()) { collisionCandidates.Add(obj); } } } else { List <Obj_AI_Hero> heroList = new List <Obj_AI_Hero>(); if (spell.spellTargets.Contains(SpellTargets.EnemyChampions) && spell.spellTargets.Contains(SpellTargets.AllyChampions)) { heroList = HeroManager.AllHeroes; } else if (spell.spellTargets.Contains(SpellTargets.EnemyChampions)) { heroList = HeroManager.Enemies; } else if (spell.spellTargets.Contains(SpellTargets.AllyChampions)) { heroList = HeroManager.Allies; } foreach (var hero in heroList.Where(h => !h.IsMe && h.IsValidTarget(spell.range))) { collisionCandidates.Add(hero); } List <Obj_AI_Base> minionList = new List <Obj_AI_Base>(); if (spell.spellTargets.Contains(SpellTargets.EnemyMinions) && spell.spellTargets.Contains(SpellTargets.AllyMinions)) { minionList = MinionManager.GetMinions(spell.range, MinionTypes.All, MinionTeam.All); } else if (spell.spellTargets.Contains(SpellTargets.EnemyMinions)) { minionList = MinionManager.GetMinions(spell.range, MinionTypes.All, MinionTeam.Enemy); } else if (spell.spellTargets.Contains(SpellTargets.AllyMinions)) { minionList = MinionManager.GetMinions(spell.range, MinionTypes.All, MinionTeam.Ally); } foreach (var minion in minionList.Where(h => h.IsValidTarget(spell.range))) { collisionCandidates.Add(minion); } } foreach (var candidate in collisionCandidates) { var pos = candidate.ServerPosition.To2D(); PositionInfo posInfo; if (spell.spellName == "YasuoDashWrapper") { bool hasDashBuff = false; foreach (var buff in candidate.Buffs) { if (buff.Name == "YasuoDashWrapper") { hasDashBuff = true; break; } } if (hasDashBuff) { continue; } } if (spell.behindTarget) { var dir = (pos - heroPoint).Normalized(); pos = pos + dir * (candidate.BoundingRadius + ObjectCache.myHeroCache.boundingRadius); } if (spell.infrontTarget) { var dir = (pos - heroPoint).Normalized(); pos = pos - dir * (candidate.BoundingRadius + ObjectCache.myHeroCache.boundingRadius); } if (spell.fixedRange) { var dir = (pos - heroPoint).Normalized(); pos = heroPoint + dir * spell.range; } if (spell.evadeType == EvadeType.Dash) { posInfo = CanHeroWalkToPos(pos, spell.speed, extraDelayBuffer + ObjectCache.gamePing, extraDist); posInfo.isDangerousPos = pos.CheckDangerousPos(6); posInfo.distanceToMouse = pos.GetPositionValue(); posInfo.spellList = spellList; } else { bool isDangerousPos = pos.CheckDangerousPos(6); var dist = pos.GetPositionValue(); posInfo = new PositionInfo(pos, isDangerousPos, dist); } posInfo.target = candidate; posTable.Add(posInfo); } if (spell.evadeType == EvadeType.Dash) { var sortedPosTable = posTable.OrderBy(p => p.isDangerousPos) .ThenBy(p => p.posDangerLevel) .ThenBy(p => p.posDangerCount) .ThenBy(p => p.distanceToMouse); var first = sortedPosTable.FirstOrDefault(); if (first != null && Evade.lastPosInfo != null && first.isDangerousPos == false && Evade.lastPosInfo.posDangerLevel > first.posDangerLevel) { return(first); } } else { var sortedPosTable = posTable.OrderBy(p => p.isDangerousPos) //.ThenByDescending(p => p.hasComfortZone) //.ThenBy(p => p.hasExtraDistance) .ThenBy(p => p.distanceToMouse); var first = sortedPosTable.FirstOrDefault(); return(first); } return(null); }
internal static void Game_OnUpdate(EventArgs args) { R.Range = ProSeries.Player.Buffs.Any( h => h.Name.ToLower().Contains("corkimissilebarragecounterbig")) ? 1500f : 1300f; if (ProSeries.CanCombo()) { var qtarget = TargetSelector.GetTarget(Q.Range, TargetSelector.DamageType.Magical); if (qtarget.IsValidTarget() && Q.IsReady()) { if (ProSeries.Config.Item("usecomboq", true).GetValue <bool>()) { Q.CastIfHitchanceEquals(qtarget, HitChance.High); } } var etarget = HeroManager.Enemies.FirstOrDefault(h => h.IsValidTarget(E.Range)); if (etarget.IsValidTarget() && E.IsReady()) { if (ProSeries.Config.Item("usecomboe", true).GetValue <bool>() && E.Cast(etarget) == Spell.CastStates.SuccessfullyCasted) { return; } } var rtarget = TargetSelector.GetTarget(R.Range, TargetSelector.DamageType.Magical); if (rtarget.IsValidTarget() && R.IsReady()) { if (ProSeries.Config.Item("usecombor", true).GetValue <bool>()) { R.CastIfHitchanceEquals(rtarget, HitChance.High); } } } if (ProSeries.CanHarass()) { var qtarget = TargetSelector.GetTarget(Q.Range, TargetSelector.DamageType.Magical); if (qtarget.IsValidTarget() && Q.IsReady() && ProSeries.IsWhiteListed(qtarget)) { if (ProSeries.Config.Item("useharassq", true).GetValue <bool>()) { Q.CastIfHitchanceEquals(qtarget, HitChance.High); } } var etarget = HeroManager.Enemies.FirstOrDefault(h => h.IsValidTarget(E.Range)); if (etarget.IsValidTarget() && E.IsReady() && ProSeries.IsWhiteListed(etarget)) { if (ProSeries.Config.Item("useharasse", true).GetValue <bool>()) { if (E.Cast(etarget) == Spell.CastStates.SuccessfullyCasted) { return; } } } var rtarget = TargetSelector.GetTarget(R.Range, TargetSelector.DamageType.Magical); if (rtarget.IsValidTarget() && R.IsReady() && ProSeries.IsWhiteListed(rtarget)) { if (ProSeries.Config.Item("useharassr", true).GetValue <bool>() && R.Instance.Ammo > 3) { R.CastIfHitchanceEquals(rtarget, HitChance.High); } } } if (ProSeries.CanClear()) { foreach (var neutral in ProSeries.JungleMobsInRange(650)) { if (ProSeries.Config.Item("useclearq", true).GetValue <bool>() && Q.IsReady()) { Q.Cast(neutral); } if (ProSeries.Config.Item("usecleare", true).GetValue <bool>() && E.IsReady()) { if (E.Cast(neutral) == Spell.CastStates.SuccessfullyCasted) { return; } } } if (E.IsReady() && ProSeries.Config.Item("usecleare", true).GetValue <bool>()) { if (ObjectManager.Get <Obj_AI_Minion>().Count(h => h.IsValidTarget(E.Range) && !h.Name.Contains("Ward")) >= 3) { if (E.Cast(ObjectManager.Get <Obj_AI_Minion>().FirstOrDefault(h => h.IsValidTarget(E.Range))) == Spell.CastStates.SuccessfullyCasted) { return; } } } if (Q.IsReady() && ProSeries.Config.Item("useclearq", true).GetValue <bool>()) { var farmLocation = Q.GetCircularFarmLocation(MinionManager.GetMinions(Q.Range)); if (farmLocation.MinionsHit >= 3) { Q.Cast(farmLocation.Position); } } } }
private void Orbwalking_AfterAttack(AttackableUnit unit, AttackableUnit Target) { if (unit.IsMe) { switch (MenuProvider.Orbwalker.ActiveMode) { case Orbwalking.OrbwalkingMode.Combo: { if (Target.Type == GameObjectType.obj_AI_Hero) { if (MenuProvider.Champion.Combo.UseQ) { if (Q.isReadyPerfectly()) { if (ObjectManager.Player.Position.Extend(Game.CursorPos, 700).CountEnemiesInRange(700) <= 1) { Q.Cast(Game.CursorPos); } } } } break; } case Orbwalking.OrbwalkingMode.Mixed: { if (Target.Type == GameObjectType.obj_AI_Hero) { if (MenuProvider.Champion.Harass.UseQ) { if (Q.isReadyPerfectly()) { if (ObjectManager.Player.isManaPercentOkay(MenuProvider.Champion.Harass.IfMana)) { if (ObjectManager.Player.Position.Extend(Game.CursorPos, 700).CountEnemiesInRange(700) <= 1) { if (!ObjectManager.Player.Position.Extend(Game.CursorPos, 300).UnderTurret(true)) { Q.Cast(Game.CursorPos); } } } } } } break; } case Orbwalking.OrbwalkingMode.LaneClear: { //Lane if (MinionManager.GetMinions(float.MaxValue).Any(x => x.NetworkId == Target.NetworkId)) { if (MenuProvider.Champion.Laneclear.UseQ) { if (ObjectManager.Player.isManaPercentOkay(MenuProvider.Champion.Laneclear.IfMana)) { if (Q.isReadyPerfectly()) { if (ObjectManager.Player.Position.Extend(Game.CursorPos, 700).CountEnemiesInRange(700) <= 1) { if (!ObjectManager.Player.Position.Extend(Game.CursorPos, 300).UnderTurret(true)) { if (MinionManager.GetMinions(ObjectManager.Player.Position.Extend(Game.CursorPos, 300), 615, MinionTypes.All, MinionTeam.Enemy).Any(x => x.NetworkId != Target.NetworkId && x.isKillableAndValidTarget(ObjectManager.Player.GetAutoAttackDamage(x) + Q.GetDamage(x), TargetSelector.DamageType.Physical))) { Q.Cast(Game.CursorPos); } } } } } } } //Jungle if (MinionManager.GetMinions(float.MaxValue, MinionTypes.All, MinionTeam.Neutral, MinionOrderTypes.MaxHealth).Any(x => x.NetworkId == Target.NetworkId)) { if (MenuProvider.Champion.Jungleclear.UseQ) { if (ObjectManager.Player.isManaPercentOkay(MenuProvider.Champion.Jungleclear.IfMana)) { if (Q.isReadyPerfectly()) { Q.Cast(Game.CursorPos); } } } } break; } } } }
private static void Usepotion() { var mobs = MinionManager.GetMinions(_player.ServerPosition, _q.Range, MinionTypes.All, MinionTeam.Neutral, MinionOrderTypes.MaxHealth); var iusehppotion = _config.Item("usehppotions").GetValue <bool>(); var iusepotionhp = _player.Health <= (_player.MaxHealth * (_config.Item("usepotionhp").GetValue <Slider>().Value) / 100); var iusemppotion = _config.Item("usemppotions").GetValue <bool>(); var iusepotionmp = _player.Mana <= (_player.MaxMana * (_config.Item("usepotionmp").GetValue <Slider>().Value) / 100); if (_player.InFountain() || Player.HasBuff("Recall")) { return; } if (Utility.CountEnemiesInRange(800) > 0 || (mobs.Count > 0 && _config.Item("ActiveJungle").GetValue <KeyBind>().Active)) { if (iusepotionhp && iusehppotion && !(Player.HasBuff("RegenerationPotion") || Player.HasBuff("ItemMiniRegenPotion") || Player.HasBuff("ItemCrystalFlask") || Player.HasBuff("ItemCrystalFlaskJungle") || Player.HasBuff("ItemDarkCrystalFlask"))) { if (Items.HasItem(2010) && Items.CanUseItem(2010)) { Items.UseItem(2010); } if (Items.HasItem(2003) && Items.CanUseItem(2003)) { Items.UseItem(2003); } if (Items.HasItem(2031) && Items.CanUseItem(2031)) { Items.UseItem(2031); } if (Items.HasItem(2032) && Items.CanUseItem(2032)) { Items.UseItem(2032); } if (Items.HasItem(2033) && Items.CanUseItem(2033)) { Items.UseItem(2033); } } if (iusepotionmp && iusemppotion && !(Player.HasBuff("ItemDarkCrystalFlask") || Player.HasBuff("ItemMiniRegenPotion") || Player.HasBuff("ItemCrystalFlaskJungle") || Player.HasBuff("ItemCrystalFlask"))) { if (Items.HasItem(2041) && Items.CanUseItem(2041)) { Items.UseItem(2041); } if (Items.HasItem(2010) && Items.CanUseItem(2010)) { Items.UseItem(2010); } if (Items.HasItem(2032) && Items.CanUseItem(2032)) { Items.UseItem(2032); } if (Items.HasItem(2033) && Items.CanUseItem(2033)) { Items.UseItem(2033); } } } }
private void Orbwalking_AfterAttack(AttackableUnit unit, AttackableUnit target) { if (unit.IsMe) { switch (MenuProvider.Orbwalker.ActiveMode) { case Orbwalking.OrbwalkingMode.Combo: if (target.Type == GameObjectType.obj_AI_Hero) { if (MenuProvider.Champion.Combo.UseQ) { if (Q.isReadyPerfectly()) { if (ObjectManager.Player.Position.Extend(Game.CursorPos, 400).CountEnemiesInRange(400) <= 1) { if (Q.Cast(Game.CursorPos)) { if (MenuProvider.Champion.Combo.UseW) { if (W.isReadyPerfectly()) { W.Cast(); } } } } } } if (MenuProvider.Champion.Combo.UseW) { if (W.isReadyPerfectly()) { W.Cast(); } } } break; case Orbwalking.OrbwalkingMode.Mixed: if (target.Type == GameObjectType.obj_AI_Hero) { if (MenuProvider.Champion.Harass.UseQ) { if (ObjectManager.Player.isManaPercentOkay(MenuProvider.Champion.Harass.IfMana)) { if (Q.isReadyPerfectly()) { if (ObjectManager.Player.Position.Extend(Game.CursorPos, 400).CountEnemiesInRange(400) <= 1) { if (Q.Cast(Game.CursorPos)) { if (MenuProvider.Champion.Harass.UseW) { if (W.isReadyPerfectly()) { W.Cast(); } } } } } } } if (MenuProvider.Champion.Harass.UseW) { if (ObjectManager.Player.isManaPercentOkay(MenuProvider.Champion.Harass.IfMana)) { if (W.isReadyPerfectly()) { W.Cast(); } } } } break; case Orbwalking.OrbwalkingMode.LaneClear: if (target.Type == GameObjectType.obj_AI_Minion) { if (MinionManager.GetMinions(float.MaxValue).Any(x => x.NetworkId == target.NetworkId)) { if (MenuProvider.Champion.Laneclear.UseQ) { if (ObjectManager.Player.isManaPercentOkay(MenuProvider.Champion.Laneclear.IfMana)) { if (Q.isReadyPerfectly()) { if (ObjectManager.Player.Position.Extend(Game.CursorPos, 400).CountEnemiesInRange(400) <= 1) { if (Q.Cast(Game.CursorPos)) { if (MenuProvider.Champion.Laneclear.UseW) { if (W.isReadyPerfectly()) { W.Cast(); } } } } } } } if (MenuProvider.Champion.Laneclear.UseW) { if (ObjectManager.Player.isManaPercentOkay(MenuProvider.Champion.Laneclear.IfMana)) { if (W.isReadyPerfectly()) { W.Cast(); } } } } if (MinionManager.GetMinions(float.MaxValue, MinionTypes.All, MinionTeam.Neutral).Any(x => x.NetworkId == target.NetworkId)) { if (MenuProvider.Champion.Jungleclear.UseQ) { if (ObjectManager.Player.isManaPercentOkay(MenuProvider.Champion.Jungleclear.IfMana)) { if (Q.isReadyPerfectly()) { if (ObjectManager.Player.Position.Extend(Game.CursorPos, 400).CountEnemiesInRange(400) <= 1) { if (Q.Cast(Game.CursorPos)) { if (MenuProvider.Champion.Jungleclear.UseW) { if (W.isReadyPerfectly()) { W.Cast(); } } } } } } } if (MenuProvider.Champion.Jungleclear.UseW) { if (ObjectManager.Player.isManaPercentOkay(MenuProvider.Champion.Jungleclear.IfMana)) { if (W.isReadyPerfectly()) { W.Cast(); } } } } } break; } } }
private void Game_OnUpdate(EventArgs args) { _r.Range = 1500 + 500 * _r.Level; if (!ObjectManager.Player.IsDead) { if (Orbwalking.CanMove(100)) { switch (MenuProvider.Orbwalker.ActiveMode) { case Orbwalking.OrbwalkingMode.Combo: { if (MenuProvider.Champion.Combo.UseQ) { if (_q.IsReadyPerfectly()) { if ( HeroManager.Enemies.Count( x => x.IsValidTarget() && Orbwalking.InAutoAttackRange(x)) == 0) { var target = TargetSelector.GetTarget(_q.Range, _q.DamageType); if (target != null) { if (ConfigMenu.SelectedPrediction.SelectedIndex == 0) { _q.SPredictionCast(target, HitChance.High); } else { _q.Cast(target, false, true); } } } else { var immobileTarget = HeroManager.Enemies.Where( x => x.IsValidTarget(_q.Range) && _q.GetPrediction(x).Hitchance >= HitChance.Immobile) .OrderByDescending(x => TargetSelector.GetPriority(x)) .FirstOrDefault(); if (immobileTarget != null) { _q.Cast(immobileTarget, false, true); } else { var killableTarget = HeroManager.Enemies.FirstOrDefault( x => x.IsKillableAndValidTarget(_q.GetDamage(x), TargetSelector.DamageType.Physical, _q.Range)); if (killableTarget != null) { _q.Cast(killableTarget, false, true); } } } } } if (MenuProvider.Champion.Combo.UseR) { if (_r.IsReadyPerfectly()) { var target = HeroManager.Enemies.FirstOrDefault( x => !Orbwalking.InAutoAttackRange(x) && x.IsKillableAndValidTarget(_r.GetDamage(x), TargetSelector.DamageType.Physical, _r.Range)); if (target != null) { if ( ObjectManager.Player.GetEnemiesInRange(1500f) .Count(x => target.NetworkId != x.NetworkId) <= 0) { if ( target.GetEnemiesInRange(500f) .Count(x => target.NetworkId != x.NetworkId) <= 0) { var collision = Collision.GetCollision(new List <Vector3> { target.ServerPosition }, new PredictionInput { UseBoundingRadius = true, Unit = ObjectManager.Player, Delay = 0.5f, Speed = 1500f, Radius = 500f, CollisionObjects = new[] { CollisionableObjects.Heroes } }) .Any(x => x.NetworkId != target.NetworkId); if (!collision) { _r.CastOnUnit(target); } } } } } } break; } case Orbwalking.OrbwalkingMode.Mixed: { if (MenuProvider.Champion.Harass.UseQ) { if (ObjectManager.Player.IsManaPercentOkay(MenuProvider.Champion.Harass.IfMana)) { if (_q.IsReadyPerfectly()) { var target = TargetSelector.GetTarget(_q.Range, _q.DamageType); if (target != null) { _q.Cast(target, false, true); } } } } break; } case Orbwalking.OrbwalkingMode.LaneClear: { //Laneclear if (MenuProvider.Champion.Laneclear.UseQ) { if (ObjectManager.Player.IsManaPercentOkay(MenuProvider.Champion.Laneclear.IfMana)) { if (_q.IsReadyPerfectly()) { var farmLocation = _q.GetLineFarmLocation(MinionManager.GetMinions(_q.Range)); if (farmLocation.MinionsHit >= 4) { _q.Cast(farmLocation.Position); } } } } //Jungleclear if (MenuProvider.Champion.Jungleclear.UseQ) { if (ObjectManager.Player.IsManaPercentOkay(MenuProvider.Champion.Jungleclear.IfMana)) { if (_q.IsReadyPerfectly()) { var target = MinionManager.GetMinions(600, MinionTypes.All, MinionTeam.Neutral, MinionOrderTypes.MaxHealth).FirstOrDefault(x => x.IsValidTarget(600)); if (target != null) { _q.Cast(target); } } } } break; } } if (MenuProvider.Champion.Misc.GetBoolValue("Auto R on Killable Target")) { if (_r.IsReadyPerfectly()) { var target = HeroManager.Enemies.FirstOrDefault( x => !Orbwalking.InAutoAttackRange(x) && x.IsKillableAndValidTarget(_r.GetDamage(x), TargetSelector.DamageType.Physical, _r.Range)); if (target != null) { if ( ObjectManager.Player.GetEnemiesInRange(1500f) .Count(x => target.NetworkId != x.NetworkId) <= 0) { if (target.GetEnemiesInRange(500f).Count(x => target.NetworkId != x.NetworkId) <= 0) { var collision = Collision.GetCollision(new List <Vector3> { target.ServerPosition }, new PredictionInput { Unit = ObjectManager.Player, Delay = 0.5f, Speed = 1500f, Radius = 500f, CollisionObjects = new[] { CollisionableObjects.Heroes } }) .Any(x => x.NetworkId != target.NetworkId); if (!collision) { _r.CastOnUnit(target); } } } } } } if (MenuProvider.Champion.Misc.GetBoolValue("Auto W on Immobile Target")) { if (_w.IsReadyPerfectly()) { var target = HeroManager.Enemies.FirstOrDefault( x => x.IsValidTarget(_w.Range) && x.IsImmobileUntil() > 0.5f); if (target != null) { if (!_myTrapList.Any(x => x.IsValid && target.Position.Distance(x.Position) <= 100)) { _w.Cast(target.Position); } } } } } if (MenuProvider.Champion.Misc.GetKeyBindValue("Dash to Cursor Position (With E)").Active) { if (_e.IsReadyPerfectly()) { _e.Cast(ObjectManager.Player.Position.Extend(Game.CursorPos, -(_e.Range / 2))); } } if (MenuProvider.Champion.Misc.GetBoolValue("Auto Attack Trapped Target")) { foreach (var enemy in HeroManager.Enemies.Where(x => x.IsValidTarget(1300))) { if (!Orbwalking.CanAttack()) { continue; } var trapbuff = enemy.GetBuff("caitlynyordletrapinternal"); if (trapbuff != null && trapbuff.IsValid) { EloBuddy.Player.IssueOrder(GameObjectOrder.AttackUnit, enemy); } } } } }
private void Game_OnUpdate(EventArgs args) { if (!ObjectManager.Player.IsDead) { if (Orbwalking.CanMove(100)) { switch (MenuProvider.Orbwalker.ActiveMode) { case Orbwalking.OrbwalkingMode.Combo: { if (MenuProvider.Champion.Combo.UseE) { if (E.isReadyPerfectly()) { var Target = TargetSelector.GetTarget(E.Range, E.DamageType); if (Target != null) { E.CastOnUnit(Target); } } } break; } case Orbwalking.OrbwalkingMode.Mixed: { if (MenuProvider.Champion.Harass.UseE) { if (ObjectManager.Player.isManaPercentOkay(MenuProvider.Champion.Harass.IfMana)) { if (E.isReadyPerfectly()) { var Target = TargetSelector.GetTarget(E.Range, E.DamageType); if (Target != null) { E.CastOnUnit(Target); } } } } break; } case Orbwalking.OrbwalkingMode.LaneClear: { if (MenuProvider.Champion.Jungleclear.UseE) { if (ObjectManager.Player.isManaPercentOkay(MenuProvider.Champion.Jungleclear.IfMana)) { if (E.isReadyPerfectly()) { var Target = MinionManager.GetMinions(E.Range, MinionTypes.All, MinionTeam.Neutral, MinionOrderTypes.MaxHealth).FirstOrDefault(); if (Target != null) { E.CastOnUnit(Target); } } } } break; } } } if (MenuProvider.ChampionMenuInstance.Item("Misc.Auto R.ForMe", true).GetValue <bool>()) { if (R.isReadyPerfectly()) { if (ObjectManager.Player.HealthPercent < MenuProvider.ChampionMenuInstance.Item("Misc.Auto R.ifHealth", true).GetValue <Slider>().Value) { if (ObjectManager.Player.CountEnemiesInRange(800f) >= 2) { R.Cast(ObjectManager.Player); } } } } if (MenuProvider.ChampionMenuInstance.Item("Misc.Auto R.ForAlly", true).GetValue <bool>()) { if (R.isReadyPerfectly()) { foreach (var Target in HeroManager.Allies.Where(x => x.IsValidTarget(R.Range) && !x.IsZombie && !x.IsMe && x.CountEnemiesInRange(800f) >= 2 && x.HealthPercent < MenuProvider.ChampionMenuInstance.Item("Misc.Auto R.ifHealth", true).GetValue <Slider>().Value).OrderBy(x => x.Health)) { if (R.CastOnUnit(Target)) { break; } } } } } }
private static void Usepotion() { var mobs = MinionManager.GetMinions(_player.ServerPosition, _q.Range, MinionTypes.All, MinionTeam.Neutral, MinionOrderTypes.MaxHealth); var iusehppotion = _config.Item("usehppotions").GetValue <bool>(); var iusepotionhp = _player.Health <= (_player.MaxHealth * (_config.Item("usepotionhp").GetValue <Slider>().Value) / 100); var iusemppotion = _config.Item("usemppotions").GetValue <bool>(); var iusepotionmp = _player.Mana <= (_player.MaxMana * (_config.Item("usepotionmp").GetValue <Slider>().Value) / 100); if (ObjectManager.Player.InFountain() || ObjectManager.Player.HasBuff("Recall")) { return; } if (ObjectManager.Player.CountEnemiesInRange(800) > 0 || (mobs.Count > 0 && _config.Item("Activejungle").GetValue <KeyBind>().Active&& (Items.HasItem(1039) || SmiteBlue.Any(i => Items.HasItem(i)) || SmiteRed.Any(i => Items.HasItem(i)) || SmitePurple.Any(i => Items.HasItem(i)) || SmiteBlue.Any(i => Items.HasItem(i)) || SmiteGrey.Any(i => Items.HasItem(i)) ))) { if (iusepotionhp && iusehppotion && !(ObjectManager.Player.HasBuff("RegenerationPotion", true) || ObjectManager.Player.HasBuff("ItemCrystalFlask", true) || ObjectManager.Player.HasBuff("ItemMiniRegenPotion", true))) { if (Items.HasItem(2041) && Items.CanUseItem(2041)) { Items.UseItem(2041); } else if (Items.HasItem(2010) && Items.CanUseItem(2010)) { Items.UseItem(2010); } else if (Items.HasItem(2003) && Items.CanUseItem(2003)) { Items.UseItem(2003); } } if (iusepotionmp && iusemppotion && !(ObjectManager.Player.HasBuff("FlaskOfCrystalWater", true) || ObjectManager.Player.HasBuff("ItemCrystalFlask", true) || ObjectManager.Player.HasBuff("ItemMiniRegenPotion", true))) { if (Items.HasItem(2041) && Items.CanUseItem(2041)) { Items.UseItem(2041); } else if (Items.HasItem(2010) && Items.CanUseItem(2010)) { Items.UseItem(2010); } else if (Items.HasItem(2004) && Items.CanUseItem(2004)) { Items.UseItem(2004); } } } }
private void LogicR() { if (RMissile == null) { var t = TargetSelector.GetTarget(R.Range + 400, TargetSelector.DamageType.Magical); if (t.IsValidTarget()) { if (R.GetDamage(t) > t.Health) { R.Cast(t, true, true); } else if (Player.Mana > RMANA + EMANA && E.GetDamage(t) * 2 + R.GetDamage(t) > t.Health) { R.Cast(t, true, true); } if (Player.Mana > RMANA + EMANA + QMANA + WMANA && Program.Combo) { R.Cast(t, true, true); } } if (Program.LaneClear && Player.ManaPercent > Config.Item("Mana", true).GetValue <Slider>().Value&& Config.Item("farmR", true).GetValue <bool>()) { var allMinions = MinionManager.GetMinions(Player.ServerPosition, R.Range); var farmPos = R.GetCircularFarmLocation(allMinions, R.Width); if (farmPos.MinionsHit >= Config.Item("LCminions", true).GetValue <Slider>().Value) { R.Cast(farmPos.Position); } } } else { if (Program.LaneClear && Config.Item("farmR", true).GetValue <bool>()) { var allMinions = MinionManager.GetMinions(RMissile.Position, R.Width); var mobs = MinionManager.GetMinions(RMissile.Position, R.Width, MinionTypes.All, MinionTeam.Neutral, MinionOrderTypes.MaxHealth); if (mobs.Count > 0) { if (!Config.Item("jungleR", true).GetValue <bool>()) { R.Cast(); } } else if (allMinions.Count > 0) { if (allMinions.Count < 2 || Player.ManaPercent < Config.Item("Mana", true).GetValue <Slider>().Value) { R.Cast(); } else if (Player.ManaPercent < Config.Item("Mana", true).GetValue <Slider>().Value) { R.Cast(); } } else { R.Cast(); } } else if (!Program.None && (RMissile.Position.CountEnemiesInRange(470) == 0 || Player.Mana < EMANA + QMANA)) { R.Cast(); } } }