private static void Orbwalker_OnPreAttack(EloBuddy.AttackableUnit target, EloBuddy.SDK.Orbwalker.PreAttackArgs args) { if (EloBuddy.SDK.Orbwalker.ActiveModesFlags.HasFlag(EloBuddy.SDK.Orbwalker.ActiveModes.Combo) && args.Target is EloBuddy.AIHeroClient && args.Target.Distance(EloBuddy.Player.Instance) > 400 && (W.IsReady() || E.IsReady() || Q.IsReady()) && BlockAA) { args.Process = false; } }
private void BeforeAttack(EloBuddy.AttackableUnit unit, EloBuddy.SDK.Orbwalker.PreAttackArgs args) { if (!Q.IsReady() || !qMenu["autoQ"].Cast <CheckBox>().CurrentValue || !FishBoneActive) { return; } var t = args.Target as EloBuddy.AIHeroClient; if (t != null) { var realDistance = GetRealDistance(t) - 50; if (Program.Combo && (realDistance < GetRealPowPowRange(t) || (Player.Mana < RMANA + 20 && Player.LSGetAutoAttackDamage(t) * 3 < t.Health))) { Q.Cast(); } else if (Program.Farm && qMenu["Qharras"].Cast <CheckBox>().CurrentValue&& (realDistance > bonusRange() || realDistance < GetRealPowPowRange(t) || Player.Mana < RMANA + EMANA + WMANA + WMANA)) { Q.Cast(); } } var minion = args.Target as EloBuddy.Obj_AI_Minion; if (Program.Farm && minion != null) { var realDistance = GetRealDistance(minion); if (realDistance < GetRealPowPowRange(minion) || Player.ManaPercent < farmMenu["Mana"].Cast <Slider>().CurrentValue) { Q.Cast(); } } }
private static void OnDoCastLC(EloBuddy.Obj_AI_Base Sender, EloBuddy.GameObjectProcessSpellCastEventArgs args) { if (!Sender.IsMe || !Orbwalking.IsAutoAttack((args.SData.Name))) return; QTarget = (EloBuddy.Obj_AI_Base)args.Target; if (args.Target is EloBuddy.Obj_AI_Minion) { if (Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.LaneClear) { var Minions = MinionManager.GetMinions(70 + 120 + Player.BoundingRadius); if (HasTitan()) { CastTitan(); return; } if (Q.IsReady() && LaneQ) { ForceItem(); Utility.DelayAction.Add(1, () => ForceCastQ(Minions[0])); } if ((!Q.IsReady() || (Q.IsReady() && !LaneQ)) && W.IsReady() && LaneW != 0 && Minions.Count >= LaneW) { ForceItem(); Utility.DelayAction.Add(1, ForceW); } if ((!Q.IsReady() || (Q.IsReady() && !LaneQ)) && (!W.IsReady() || (W.IsReady() && LaneW == 0) || Minions.Count < LaneW) && E.IsReady() && LaneE) { E.Cast(Minions[0].Position); Utility.DelayAction.Add(1, ForceItem); } } } }
private static void ForceCastQ(EloBuddy.AttackableUnit target) { forceQ = true; QTarget = target; }
private static void OnDoCast(EloBuddy.Obj_AI_Base sender, EloBuddy.GameObjectProcessSpellCastEventArgs args) { var spellName = args.SData.Name; if (!sender.IsMe || !Orbwalking.IsAutoAttack(spellName)) return; QTarget = (EloBuddy.Obj_AI_Base)args.Target; if (args.Target is EloBuddy.Obj_AI_Minion) { if (Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.LaneClear) { var Mobs = MinionManager.GetMinions(120 + 70 + Player.BoundingRadius, MinionTypes.All, MinionTeam.Neutral, MinionOrderTypes.MaxHealth); if (Mobs.Count != 0) { if (HasTitan()) { CastTitan(); return; } if (Q.IsReady()) { ForceItem(); Utility.DelayAction.Add(1, () => ForceCastQ(Mobs[0])); } else if (W.IsReady()) { ForceItem(); Utility.DelayAction.Add(1, ForceW); } else if (E.IsReady()) { E.Cast(Mobs[0].Position); } } } } if (args.Target is EloBuddy.Obj_AI_Turret || args.Target is EloBuddy.Obj_Barracks || args.Target is EloBuddy.Obj_BarracksDampener || args.Target is EloBuddy.Obj_Building) if (args.Target.IsValid && args.Target != null && Q.IsReady() && LaneQ && Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.LaneClear) ForceCastQ((EloBuddy.Obj_AI_Base)args.Target); if (args.Target is EloBuddy.AIHeroClient) { var target = (EloBuddy.AIHeroClient)args.Target; if (KillstealR && R.IsReady() && R.Instance.Name == IsSecondR) if (target.Health < (Rdame(target, target.Health) + Player.LSGetAutoAttackDamage(target)) && target.Health > Player.LSGetAutoAttackDamage(target)) R.Cast(target.Position); if (KillstealW && W.IsReady()) if (target.Health < (W.GetDamage(target) + Player.LSGetAutoAttackDamage(target)) && target.Health > Player.LSGetAutoAttackDamage(target)) W.Cast(); if (Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Combo) { if (HasTitan()) { CastTitan(); return; } if (Q.IsReady()) { ForceItem(); Utility.DelayAction.Add(1, () => ForceCastQ(target)); } else if (W.IsReady() && InWRange(target)) { ForceItem(); Utility.DelayAction.Add(1, ForceW); } else if (E.IsReady() && !Orbwalking.InAutoAttackRange(target)) E.Cast(target.Position); } if (Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.FastHarass) { if (HasTitan()) { CastTitan(); return; } if (W.IsReady() && InWRange(target)) { ForceItem(); Utility.DelayAction.Add(1, ForceW); Utility.DelayAction.Add(2, () => ForceCastQ(target)); } else if (Q.IsReady()) { ForceItem(); Utility.DelayAction.Add(1, () => ForceCastQ(target)); } else if (E.IsReady() && !Orbwalking.InAutoAttackRange(target) && !InWRange(target)) { E.Cast(target.Position); } } if (Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Mixed) { if (HasTitan()) { CastTitan(); return; } if (QStack == 2 && Q.IsReady()) { ForceItem(); Utility.DelayAction.Add(1, () => ForceCastQ(target)); } } if (Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Burst) { if (HasTitan()) { CastTitan(); return; } if (R.IsReady() && R.Instance.Name == IsSecondR) { ForceItem(); Utility.DelayAction.Add(1, ForceR2); } else if (Q.IsReady()) { ForceItem(); Utility.DelayAction.Add(1, () => ForceCastQ(target)); } } } }
private void Orbwalker_OnPreAttack(EloBuddy.AttackableUnit target, EloBuddy.SDK.Orbwalker.PreAttackArgs args) { if (args.Process) { IsWindingUp = true; } else { IsWindingUp = false; } if (R.IsReady() && EloBuddy.SDK.Orbwalker.ActiveModesFlags.HasFlag(EloBuddy.SDK.Orbwalker.ActiveModes.Combo) && UseRBool && args.Target is EloBuddy.AIHeroClient && (!(args.Target as EloBuddy.AIHeroClient).IsUnderEnemyTurret() || EloBuddy.ObjectManager.Player.IsUnderEnemyTurret()) && EloBuddy.ObjectManager.Player.CountAllyHeroesInRange(800) >= EloBuddy.ObjectManager.Player.CountEnemyHeroesInRange(800)) { R.Cast(); } var possible2WTarget = ValidTargets.FirstOrDefault( h => h.ServerPosition.Distance(EloBuddy.ObjectManager.Player.ServerPosition) < 500 && h.GetBuffCount("vaynesilvereddebuff") == 2); if (TryToFocus2WBool && possible2WTarget.LSIsValidTarget()) { EloBuddy.SDK.Orbwalker.ForcedTarget = possible2WTarget; } if (EloBuddy.ObjectManager.Player.HasBuff("vaynetumblefade") && DontAttackWhileInvisibleAndMeelesNearBool) { if ( ValidTargets.Any( e => e.ServerPosition.Distance(EloBuddy.ObjectManager.Player.ServerPosition) < 350 && e.IsMelee)) { args.Process = false; } } var possibleTarget = EloBuddy.SDK.TargetSelector.GetTarget(615, EloBuddy.DamageType.Physical); if (possibleTarget != null && args.Target is EloBuddy.Obj_AI_Minion && UseQBonusOnEnemiesNotCS && EloBuddy.ObjectManager.Player.HasBuff("vaynetumblebonus")) { EloBuddy.SDK.Orbwalker.ForcedTarget = possibleTarget; args.Process = false; } var possibleNearbyMeleeChampion = ValidTargets.FirstOrDefault( e => e.ServerPosition.Distance(EloBuddy.ObjectManager.Player.ServerPosition) < 350); if (possibleNearbyMeleeChampion.LSIsValidTarget()) { if (Q.IsReady() && UseQBool) { var pos = EloBuddy.ObjectManager.Player.ServerPosition.LSExtend(possibleNearbyMeleeChampion.ServerPosition, -350); if (!IsDangerousPosition(pos)) { Q.Cast(pos); args.Process = false; } } if (UseEWhenMeleesNearBool && !Q.IsReady() && E.IsReady()) { var possibleMeleeChampionsGapclosers = from tuplet in CachedGapclosers where tuplet.Item1 == possibleNearbyMeleeChampion.CharData.BaseSkinName select tuplet.Item2; if (possibleMeleeChampionsGapclosers.FirstOrDefault() != null) { if ( possibleMeleeChampionsGapclosers.Any( gapcloserEntry => possibleNearbyMeleeChampion.Spellbook.GetSpell(gapcloserEntry.Slot).IsReady())) { return; } } if ( LeagueSharp.SDK.Core.Utils.MathUtils.GetWaypoints(possibleNearbyMeleeChampion) .LastOrDefault() .Distance(EloBuddy.ObjectManager.Player.ServerPosition) < possibleNearbyMeleeChampion.AttackRange) { if (EDelaySlider > 0) { var thisEnemy = possibleNearbyMeleeChampion; LeagueSharp.SDK.Core.Utils.DelayAction.Add(EDelaySlider, () => E.CastOnUnit(thisEnemy)); return; } E.CastOnUnit(possibleNearbyMeleeChampion); } } } }
private void Orbwalker_OnPostAttack(EloBuddy.AttackableUnit target, EventArgs args) { EloBuddy.SDK.Orbwalker.ForcedTarget = null; var possible2WTarget = ValidTargets.FirstOrDefault( h => h.ServerPosition.Distance(EloBuddy.ObjectManager.Player.ServerPosition) < 500 && h.GetBuffCount("vaynesilvereddebuff") == 2); if (!EloBuddy.SDK.Orbwalker.ActiveModesFlags.HasFlag(EloBuddy.SDK.Orbwalker.ActiveModes.Combo)) { if (possible2WTarget.LSIsValidTarget() && UseEAs3rdWProcBool && LeagueSharp.SDK.Core.Utils.MathUtils.GetWaypoints(possible2WTarget).LastOrDefault().Distance(EloBuddy.ObjectManager.Player.ServerPosition) < 1000) { if (EDelaySlider > 0) { var thisEnemy = possible2WTarget; LeagueSharp.SDK.Core.Utils.DelayAction.Add(EDelaySlider, () => E.CastOnUnit(thisEnemy)); return; } E.CastOnUnit(possible2WTarget); } } if (target is EloBuddy.AIHeroClient && UseQBool) { if (Q.IsReady()) { var tg = target as EloBuddy.AIHeroClient; if (tg != null) { var mode = QModeStringList; var tumblePosition = EloBuddy.Game.CursorPos; switch (mode) { case 1: tumblePosition = GetTumblePos(tg); break; default: tumblePosition = EloBuddy.Game.CursorPos; break; } if (tumblePosition.Distance(EloBuddy.ObjectManager.Player.Position) > 2000 || IsDangerousPosition(tumblePosition)) { return; } Q.Cast(tumblePosition); } } } if (target is EloBuddy.Obj_AI_Minion && EloBuddy.SDK.Orbwalker.ActiveModesFlags.HasFlag(EloBuddy.SDK.Orbwalker.ActiveModes.LaneClear)) { var tg = target as EloBuddy.Obj_AI_Minion; if (E.IsReady()) { if (this.IsMinionCondemnable(tg) && GameObjects.Jungle.Any(m => m.NetworkId == tg.NetworkId) && tg.LSIsValidTarget() && this.UseEJungleFarm) { if (this.EDelaySlider > 0) { var thisEnemy = tg; LeagueSharp.SDK.Core.Utils.DelayAction.Add(EDelaySlider, () => E.CastOnUnit(thisEnemy)); return; } E.CastOnUnit(tg); } } if (this.UseQFarm && this.Q.IsReady()) { if (tg.CharData.BaseSkinName.Contains("SRU_") && !tg.CharData.BaseSkinName.Contains("Mini") && tg.LSIsValidTarget() && !this.IsDangerousPosition(EloBuddy.Game.CursorPos)) { Q.Cast(EloBuddy.Game.CursorPos); } if (EloBuddy.ObjectManager.Player.UnderAllyTurret() && GameObjects.EnemyMinions.Count( m => m.Position.Distance(EloBuddy.ObjectManager.Player.Position) < 550 && m.Health < EloBuddy.ObjectManager.Player.GetAutoAttackDamage(m) && Health.GetPrediction(m, (int)(100 + (EloBuddy.Game.Ping / 2) + EloBuddy.ObjectManager.Player.AttackCastDelay * 1000)) > 3) > 1 && !this.IsDangerousPosition(EloBuddy.Game.CursorPos)) { Q.Cast(EloBuddy.Game.CursorPos); } if (EloBuddy.ObjectManager.Player.UnderAllyTurret()) { if (GameObjects.EnemyMinions.Count( m => m.Position.Distance(EloBuddy.ObjectManager.Player.Position) < 550 && m.Health < EloBuddy.ObjectManager.Player.GetAutoAttackDamage(m) + Q.GetDamage(m)) > 0 && !this.IsDangerousPosition(EloBuddy.Game.CursorPos)) { Q.Cast(EloBuddy.Game.CursorPos); } } } } if (UseQOnlyAt2WStacksBool && !EloBuddy.SDK.Orbwalker.ActiveModesFlags.HasFlag(EloBuddy.SDK.Orbwalker.ActiveModes.Combo) && possible2WTarget.LSIsValidTarget()) { Q.Cast(GetTumblePos(possible2WTarget)); } }