public static void PreCastTumble(Obj_AI_Base target) { if (!target.IsValidTarget(ObjectManager.Player.AttackRange + 65f + 65f + 300f)) { return; } var menuOption = Variables.Menu.Item( string.Format("dz191.vhr.{0}.q.2wstacks", Variables.Orbwalker.ActiveMode.ToString().ToLower())); var TwoWQ = menuOption != null?menuOption.GetValue <bool>() : false; if (target is Obj_AI_Hero) { var tg = target as Obj_AI_Hero; //TargetSelector.SetTarget(tg); //<---- TODO if (TwoWQ && (tg.GetWBuff() != null && tg.GetWBuff().Count < 1) && Variables.spells[SpellSlot.W].Level > 0) { return; } } var smartQPosition = TumblePositioning.GetSmartQPosition(); var smartQCheck = smartQPosition != Vector3.Zero; var QPosition = smartQCheck ? smartQPosition : Game.CursorPos; OnCastTumble(target, QPosition); }
public static void PreCastTumble(Obj_AI_Base target) { if (!target.LSIsValidTarget(ObjectManager.Player.AttackRange + 65f + 65f + 300f)) { Orbwalker.ForcedTarget = null; return; } var menuOption = Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo) ? MenuGenerator.comboMenu["dz191.vhr.combo.q.2wstacks"] : MenuGenerator.harassMenu["dz191.vhr.mixed.q.2wstacks"]; var TwoWQ = menuOption != null?menuOption.Cast <CheckBox>().CurrentValue : false; if (target is AIHeroClient) { var tg = target as AIHeroClient; //TargetSelector.SetTarget(tg); //<---- TODO if (TwoWQ && (tg.GetWBuff() != null && tg.GetWBuff().Count < 1) && Variables.spells[SpellSlot.W].Level > 0) { return; } } var smartQPosition = TumblePositioning.GetSmartQPosition(); var smartQCheck = smartQPosition != Vector3.Zero; var QPosition = smartQCheck ? smartQPosition : Game.CursorPos; OnCastTumble(target, QPosition); }
public static void PreCastTumble(Obj_AI_Base target) { if (!target.IsValidTarget(ObjectManager.Player.AttackRange + 65f + 45f + 300f)) { return; } var menuOption = Variables.Menu.Item($"dz191.vhr.{Variables.Orbwalker.ActiveMode.ToString().ToLower()}.q.2wstacks"); var TwoWQ = menuOption?.GetValue <bool>() ?? false; if (target is AIHeroClient) { var tg = target as AIHeroClient; if (TwoWQ && (tg.GetWBuff() != null && tg.GetWBuff().Count < 1) && Variables.spells[SpellSlot.W].Level > 0) { return; } } var smartQPosition = TumblePositioning.GetSmartQPosition(); var smartQCheck = smartQPosition != Vector3.Zero; var QPosition = smartQCheck ? smartQPosition : Game.CursorPos; OnCastTumble(target, QPosition); }
private static void DefaultQCast(Vector3 position, Obj_AI_Base Target) { var afterTumblePosition = PlayerHelper.GetAfterTumblePosition(Game.CursorPos); var CursorPos = Game.CursorPos; var EnemyPoints = TumblePositioning.GetEnemyPoints(); if (afterTumblePosition.IsSafe(true) || (!EnemyPoints.Contains(Game.CursorPos.To2D())) || (Variables.EnemiesClose.Count() == 1)) { if (afterTumblePosition.Distance(Target.ServerPosition) <= Orbwalking.GetRealAutoAttackRange(Target)) { CastQ(position); } } }
private static void OnCastTumble(Obj_AI_Base target, Vector3 position) { var afterTumblePosition = ObjectManager.Player.ServerPosition.Extend(position, 300f); var distanceToTarget = afterTumblePosition.Distance(target.ServerPosition, true); if ((distanceToTarget < Math.Pow(ObjectManager.Player.AttackRange + 65, 2) && distanceToTarget > 110 * 110) || MenuExtensions.GetItemValue <bool>("dz191.vhr.misc.tumble.qspam")) { switch (MenuExtensions.GetItemValue <StringList>("dz191.vhr.misc.condemn.qlogic").SelectedIndex) { case 0: var smartQPosition = TumblePositioning.GetSmartQPosition(); var smartQCheck = smartQPosition != Vector3.Zero; var QPosition = smartQCheck ? smartQPosition : Game.CursorPos; var QPosition2 = VHRQLogic.GetVHRQPosition() != Vector3.Zero ? VHRQLogic.GetVHRQPosition() : QPosition; CastQ(QPosition2); break; case 1: //To mouse DefaultQCast(position, target); break; case 2: //Away from melee enemies if (Variables.MeleeEnemiesTowardsMe.Any() && !Variables.MeleeEnemiesTowardsMe.All(m => m.HealthPercent <= 15)) { var Closest = Variables.MeleeEnemiesTowardsMe.OrderBy(m => m.Distance(ObjectManager.Player)).First(); var whereToQ = Closest.ServerPosition.Extend( ObjectManager.Player.ServerPosition, Closest.Distance(ObjectManager.Player) + 300f); if (whereToQ.IsSafe()) { CastQ(whereToQ); } } else { DefaultQCast(position, target); } break; case 3: //Credits to Kurisu's Graves! var range = Orbwalking.GetRealAutoAttackRange(target); var path = LeagueSharp.Common.Geometry.CircleCircleIntersection(ObjectManager.Player.ServerPosition.To2D(), Prediction.GetPrediction(target, 0.25f).UnitPosition.To2D(), 300f, range); if (path.Count() > 0) { var TumblePosition = path.MinOrDefault(x => x.Distance(Game.CursorPos)).To3D(); if (!TumblePosition.IsSafe(true)) { CastQ(TumblePosition); } } else { DefaultQCast(position, target); } break; } } }