public static List <Obj_AI_Base> GetUnitsHitBySpell(this Spell.Skillshot.BestPosition bestpos, Spell.Skillshot spell, List <Obj_AI_Base> enemies) { List <Obj_AI_Base> units = new List <Obj_AI_Base>(); Geometry.Polygon shape = new Geometry.Polygon(); if (spell.Type == SkillShotType.Circular) { shape = new Geometry.Polygon.Circle(bestpos.CastPosition, spell.Radius); } else if (spell.Type == SkillShotType.Cone) { shape = new Geometry.Polygon.Arc(Player.Instance.Position, bestpos.CastPosition, MathUtil.DegreesToRadians(spell.ConeAngleDegrees), spell.Radius); } foreach (Obj_AI_Base o in enemies) { if (shape.IsInside(o.PredictedPositionInTime(spell.CastDelay))) { units.Add(o); } } return(units); }
public static CustomPolygon CreateCone(SpellInfo info, Vector3 startPosition, Vector3 endPosition, float coneAngle, float range) { Geometry.Polygon cone = new Geometry.Polygon.Arc(startPosition, endPosition, MathUtil.DegreesToRadians(coneAngle * 2), range); cone.Add(startPosition); //CustomPolygon cone = new CustomPolygon.Sector(startPosition, endPosition, MathUtil.DegreesToRadians(coneAngle * 2), range); return(new CustomPolygon(cone, info)); }
public Skillshot(DetectionType detectionType, SpellData spellData, int startT, Vector2 start, Vector2 end, Obj_AI_Base unit) { DetectionType = detectionType; SpellData = spellData; StartTick = startT; Start = start; End = end; MissilePosition = start; Direction = (end - start).Normalized(); Unit = unit; bestAllies = GameObjects.AllyHeroes .Where(t => t.Distance(ObjectManager.GetLocalPlayer()) < Support_AIO.Bases.Champion.W.Range) .OrderBy(x => x.Health); foreach (var ally in bestAllies) { switch (spellData.Type) { case SkillShotType.SkillshotCircle: Circle = new Geometry.Polygon.Circle(CollisionEnd, spellData.Radius, 22); break; case SkillShotType.SkillshotLine: Rectangle = new Geometry.Polygon.Rectangle(Start, CollisionEnd, spellData.Radius); break; case SkillShotType.SkillshotMissileLine: Rectangle = new Geometry.Polygon.Rectangle(Start, CollisionEnd, spellData.Radius); break; case SkillShotType.SkillshotCone: Sector = new Geometry.Polygon.Sector( start, CollisionEnd - start, spellData.Radius * (float)Math.PI / 180, spellData.Range, 22); break; case SkillShotType.SkillshotRing: Ring = new Geometry.Polygon.Ring(CollisionEnd, spellData.Radius, spellData.RingRadius, 22); break; case SkillShotType.SkillshotArc: Arc = new Geometry.Polygon.Arc(start, end, EvadeManager.SkillShotsExtraRadius + (int)ally.BoundingRadius, 22); break; } } UpdatePolygon(); }
public Skillshot( DetectionType detectionType, SpellData spellData, int startT, Vector2 start, Vector2 end, Obj_AI_Base unit) { this.DetectionType = detectionType; this.SpellData = spellData; this.StartTick = startT; this.Start = start; this.End = end; this.Direction = (end - start).Normalized(); this.Unit = unit; switch (spellData.Type) { case SkillShotType.SkillshotCircle: this.Circle = new Geometry.Polygon.Circle(this.CollisionEnd, spellData.Radius, 22); break; case SkillShotType.SkillshotLine: case SkillShotType.SkillshotMissileLine: this.Rectangle = new Geometry.Polygon.Rectangle(this.Start, this.CollisionEnd, spellData.Radius); break; case SkillShotType.SkillshotCone: this.Sector = new Geometry.Polygon.Sector( start, this.CollisionEnd - start, spellData.Radius * (float)Math.PI / 180, spellData.Range, 22); break; case SkillShotType.SkillshotRing: this.Ring = new Geometry.Polygon.Ring(this.CollisionEnd, spellData.Radius, spellData.RingRadius, 22); break; case SkillShotType.SkillshotArc: this.Arc = new Geometry.Polygon.Arc( start, end, Configs.SkillShotsExtraRadius + (int)ObjectManager.Player.BoundingRadius, 22); break; } this.UpdatePolygon(); }
public Skillshot(DetectionType detectionType, SpellData spellData, int startT, Vector2 start, Vector2 end, Obj_AI_Base unit) { DetectionType = detectionType; SpellData = spellData; StartTick = startT; Start = start; End = end; MissilePosition = start; Direction = (end - start).Normalized(); Unit = unit; switch (spellData.Type) { case SkillShotType.SkillshotCircle: Circle = new Geometry.Polygon.Circle(CollisionEnd, spellData.Radius, 22); break; case SkillShotType.SkillshotLine: Rectangle = new Geometry.Polygon.Rectangle(Start, CollisionEnd, spellData.Radius); break; case SkillShotType.SkillshotMissileLine: Rectangle = new Geometry.Polygon.Rectangle(Start, CollisionEnd, spellData.Radius); break; case SkillShotType.SkillshotCone: Sector = new Geometry.Polygon.Sector( start, CollisionEnd - start, spellData.Radius * (float)Math.PI / 180, spellData.Range, 22); break; case SkillShotType.SkillshotRing: Ring = new Geometry.Polygon.Ring(CollisionEnd, spellData.Radius, spellData.RingRadius, 22); break; case SkillShotType.SkillshotArc: Arc = new Geometry.Polygon.Arc(start, end, EvadeManager.SkillShotsExtraRadius + (int)ObjectManager.GetLocalPlayer().BoundingRadius, 22); break; } UpdatePolygon(); }
private static void AIHeroClient_OnProcessSpellCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args) { if ((args.Slot == SpellSlot.Q || args.Slot == SpellSlot.W || args.Slot == SpellSlot.E || args.Slot == SpellSlot.R) && sender.IsEnemy && _e.IsReady()) { if (args.SData.TargettingType == SpellDataTargetType.Unit || args.SData.TargettingType == SpellDataTargetType.SelfAndUnit || args.SData.TargettingType == SpellDataTargetType.Self) { if ((args.Target.NetworkId == Player.Instance.NetworkId && args.Time < 1.5 || args.End.Distance(Player.Instance.ServerPosition) <= Player.Instance.BoundingRadius*3) && MainMenu.Misc[args.SData.Name].Cast<CheckBox>().CurrentValue) { _e.Cast(); } } else if (args.SData.TargettingType == SpellDataTargetType.LocationAoe) { var castvector = new Geometry.Polygon.Circle(args.End, args.SData.CastRadius).IsInside( Player.Instance.ServerPosition); if (castvector && MainMenu.Misc[args.SData.Name].Cast<CheckBox>().CurrentValue) { _e.Cast(); } } else if (args.SData.TargettingType == SpellDataTargetType.Cone) { var castvector = new Geometry.Polygon.Arc(args.Start, args.End, args.SData.CastConeAngle, args.SData.CastRange) .IsInside(Player.Instance.ServerPosition); if (castvector && MainMenu.Misc[args.SData.Name].Cast<CheckBox>().CurrentValue) { _e.Cast(); } } else if (args.SData.TargettingType == SpellDataTargetType.SelfAoe) { var castvector = new Geometry.Polygon.Circle(sender.ServerPosition, args.SData.CastRadius).IsInside( Player.Instance.ServerPosition); if (castvector && MainMenu.Misc[args.SData.Name].Cast<CheckBox>().CurrentValue) { _e.Cast(); } } else { var castvector = new Geometry.Polygon.Rectangle(args.Start, args.End, args.SData.LineWidth).IsInside( Player.Instance.ServerPosition); if (castvector && MainMenu.Misc[args.SData.Name].Cast<CheckBox>().CurrentValue) { _e.Cast(); } } } }
public Skillshot(DetectionType detectionType, SpellData spellData, int startT, Vector2 start, Vector2 end, AIBaseClient unit) { DetectionType = detectionType; SpellData = spellData; StartTick = startT; Start = start; End = end; MissilePosition = start; Direction = (Vector2)(end - start).ToVector3().Normalized(); Unit = unit; //if (ObjectManager.Player.CharacterName == "Janna" || // ObjectManager.Player.CharacterName == "Rakan" || ObjectManager.Player.CharacterName == "Ivern" || // ObjectManager.Player.CharacterName == "Lulu" || // ObjectManager.Player.CharacterName == "Karma") //{ // bestAllies = GameObjects.AllyHeroes // .Where(t => // t.Distance(ObjectManager.Player) < Helper.Spells[Helper.E].Range) // .OrderBy(x => x.Health); //} //if (ObjectManager.Player.CharacterName == "Lux" || // ObjectManager.Player.CharacterName == "Sona" || // ObjectManager.Player.CharacterName == "Taric") //{ // bestAllies = GameObjects.AllyHeroes // .Where(t => // t.Distance(ObjectManager.Player) < Helper.Spells[Helper.W].Range) // .OrderBy(x => x.Health); //} foreach (var ally in bestAllies) { switch (spellData.Type) { case SkillShotType.SkillshotCircle: Circle = new Geometry.Polygon.Circle(CollisionEnd, spellData.Radius, 22); break; case SkillShotType.SkillshotLine: Rectangle = new Geometry.Polygon.Rectangle(Start, CollisionEnd, spellData.Radius); break; case SkillShotType.SkillshotMissileLine: Rectangle = new Geometry.Polygon.Rectangle(Start, CollisionEnd, spellData.Radius); break; case SkillShotType.SkillshotCone: Sector = new Geometry.Polygon.Sector( start, CollisionEnd - start, spellData.Radius * (float)Math.PI / 180, spellData.Range, 22); break; case SkillShotType.SkillshotRing: Ring = new Geometry.Polygon.Ring(CollisionEnd, spellData.Radius, spellData.RingRadius, 22); break; case SkillShotType.SkillshotArc: Arc = new Geometry.Polygon.Arc(start, end, EvadeManager.SkillShotsExtraRadius + (int)ally.BoundingRadius, 22); break; } } UpdatePolygon(); }
private static void AIHeroClient_OnProcessSpellCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args) { if ((args.Slot == SpellSlot.Q || args.Slot == SpellSlot.W || args.Slot == SpellSlot.E || args.Slot == SpellSlot.R) && sender.IsEnemy && _e.IsReady()) { if (args.SData.TargettingType == SpellDataTargetType.Unit || args.SData.TargettingType == SpellDataTargetType.SelfAndUnit || args.SData.TargettingType == SpellDataTargetType.Self) { if ((args.Target.NetworkId == Player.Instance.NetworkId && args.Time < 1.5 || args.End.Distance(Player.Instance.ServerPosition) <= Player.Instance.BoundingRadius * 3) && MainMenu.Misc[args.SData.Name].Cast <CheckBox>().CurrentValue) { _e.Cast(); } } else if (args.SData.TargettingType == SpellDataTargetType.LocationAoe) { var castvector = new Geometry.Polygon.Circle(args.End, args.SData.CastRadius).IsInside( Player.Instance.ServerPosition); if (castvector && MainMenu.Misc[args.SData.Name].Cast <CheckBox>().CurrentValue) { _e.Cast(); } } else if (args.SData.TargettingType == SpellDataTargetType.Cone) { var castvector = new Geometry.Polygon.Arc(args.Start, args.End, args.SData.CastConeAngle, args.SData.CastRange) .IsInside(Player.Instance.ServerPosition); if (castvector && MainMenu.Misc[args.SData.Name].Cast <CheckBox>().CurrentValue) { _e.Cast(); } } else if (args.SData.TargettingType == SpellDataTargetType.SelfAoe) { var castvector = new Geometry.Polygon.Circle(sender.ServerPosition, args.SData.CastRadius).IsInside( Player.Instance.ServerPosition); if (castvector && MainMenu.Misc[args.SData.Name].Cast <CheckBox>().CurrentValue) { _e.Cast(); } } else { var castvector = new Geometry.Polygon.Rectangle(args.Start, args.End, args.SData.LineWidth).IsInside( Player.Instance.ServerPosition); if (castvector && MainMenu.Misc[args.SData.Name].Cast <CheckBox>().CurrentValue) { _e.Cast(); } } } }
private static void AIHeroClient_OnProcessSpellCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args) { var useW = ComboMenu["WLowHp"].Cast <CheckBox>().CurrentValue; var MinHealth = ComboMenu["minHealth"].Cast <Slider>().CurrentValue; if (useW && !_Player.IsRecalling() && !_Player.IsInShopRange() && _Player.CountEnemiesInRange(425) >= 1) { if (Player.Instance.HealthPercent <= MinHealth) { W.Cast(); } } if ((args.Slot == SpellSlot.Q || args.Slot == SpellSlot.W || args.Slot == SpellSlot.E || args.Slot == SpellSlot.R) && sender.IsEnemy && Q.IsReady() && _Player.Distance(sender) <= args.SData.CastRange && Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo)) { if (args.SData.TargettingType == SpellDataTargetType.Unit || args.SData.TargettingType == SpellDataTargetType.SelfAndUnit || args.SData.TargettingType == SpellDataTargetType.Self) { if ((args.Target.NetworkId == Player.Instance.NetworkId && args.Time < 1.5 || args.End.Distance(Player.Instance.ServerPosition) <= Player.Instance.BoundingRadius * 3) && Evade[args.SData.Name].Cast <CheckBox>().CurrentValue) { QEvade(); } } else if (args.SData.TargettingType == SpellDataTargetType.LocationAoe) { var castvector = new Geometry.Polygon.Circle(args.End, args.SData.CastRadius).IsInside( Player.Instance.ServerPosition); if (castvector && Evade[args.SData.Name].Cast <CheckBox>().CurrentValue) { QEvade(); } } else if (args.SData.TargettingType == SpellDataTargetType.Cone) { var castvector = new Geometry.Polygon.Arc(args.Start, args.End, args.SData.CastConeAngle, args.SData.CastRange) .IsInside(Player.Instance.ServerPosition); if (castvector && Evade[args.SData.Name].Cast <CheckBox>().CurrentValue) { QEvade(); } } else if (args.SData.TargettingType == SpellDataTargetType.SelfAoe) { var castvector = new Geometry.Polygon.Circle(sender.ServerPosition, args.SData.CastRadius).IsInside( Player.Instance.ServerPosition); if (castvector && Evade[args.SData.Name].Cast <CheckBox>().CurrentValue) { QEvade(); } } else { var castvector = new Geometry.Polygon.Rectangle(args.Start, args.End, args.SData.LineWidth).IsInside( Player.Instance.ServerPosition); if (castvector && Evade[args.SData.Name].Cast <CheckBox>().CurrentValue) { QEvade(); } } if (args.SData.Name == "yasuoq3w") { QEvade(); } if (args.SData.Name == "ZedR") { if (Q.IsReady()) { Core.DelayAction(() => QEvade(), 2000 - Game.Ping - 200); } else { if (W.IsReady()) { Core.DelayAction(() => W.Cast(), 500); } } } if (args.SData.Name == "KarthusFallenOne") { Core.DelayAction(() => QEvade(), 2000 - Game.Ping - 200); } if (args.SData.Name == "SoulShackles") { Core.DelayAction(() => QEvade(), 2000 - Game.Ping - 200); } if (args.SData.Name == "AbsoluteZero") { Core.DelayAction(() => QEvade(), 2000 - Game.Ping - 200); } if (args.SData.Name == "NocturneUnspeakableHorror") { Core.DelayAction(() => QEvade(), 2000 - Game.Ping - 200); } } }
private static void AIHeroClient_OnProcessSpellCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args) { if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo)) { if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Harass)) { if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.LaneClear)) { if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Flee)) { if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.None)) { if ((args.Slot == SpellSlot.Q || args.Slot == SpellSlot.W || args.Slot == SpellSlot.E || args.Slot == SpellSlot.R) && sender.IsEnemy && W.IsReady()) { if (args.SData.TargettingType == SpellDataTargetType.Unit || args.SData.TargettingType == SpellDataTargetType.SelfAndUnit || args.SData.TargettingType == SpellDataTargetType.Self) { if ((args.Target.NetworkId == Player.NetworkId && args.Time < 1.5 || args.End.Distance(Player.ServerPosition) <= Player.BoundingRadius * 3) && VladimirTheTrollMeNu.EvadeMenu[args.SData.Name].Cast <CheckBox>() .CurrentValue) { W1.Cast(); } } else if (args.SData.TargettingType == SpellDataTargetType.LocationAoe) { var castvector = new Geometry.Polygon.Circle(args.End, args.SData.CastRadius).IsInside( Player.ServerPosition); if (castvector && VladimirTheTrollMeNu.EvadeMenu[args.SData.Name].Cast <CheckBox>() .CurrentValue) { W1.Cast(); } } else if (args.SData.TargettingType == SpellDataTargetType.Cone) { var castvector = new Geometry.Polygon.Arc(args.Start, args.End, args.SData.CastConeAngle, args.SData.CastRange) .IsInside(Player.ServerPosition); if (castvector && VladimirTheTrollMeNu.EvadeMenu[args.SData.Name].Cast <CheckBox>() .CurrentValue) { W1.Cast(); } } else if (args.SData.TargettingType == SpellDataTargetType.SelfAoe) { var castvector = new Geometry.Polygon.Circle(sender.ServerPosition, args.SData.CastRadius) .IsInside( Player.ServerPosition); if (castvector && VladimirTheTrollMeNu.EvadeMenu[args.SData.Name].Cast <CheckBox>() .CurrentValue) { W1.Cast(); } } else { var castvector = new Geometry.Polygon.Rectangle(args.Start, args.End, args.SData.LineWidth) .IsInside( Player.ServerPosition); if (castvector && VladimirTheTrollMeNu.EvadeMenu[args.SData.Name].Cast <CheckBox>() .CurrentValue) { W1.Cast(); } } } } } } } } }
public static void OnProcessSpellCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args) { if (sender.IsMe || sender.IsAlly) { return; } var SpellShield = ModesMenu3["SpellShield"].Cast <CheckBox>().CurrentValue; if (SpellShield) { var Gold = ModesMenu3["GoldCard"].Cast <CheckBox>().CurrentValue; var Red = ModesMenu3["RedCard"].Cast <CheckBox>().CurrentValue; if (Gold && sender.HasBuff("Pick A Card Gold") && E.IsReady() && (args.Target != null && args.Target.IsMe)) { E.Cast(); } if (Red && sender.HasBuff("Pick A Card Red") && E.IsReady() && (args.Target != null && args.Target.IsMe)) { E.Cast(); } if (!(args.Target != null)) { return; } if ((args.Slot == SpellSlot.Q || args.Slot == SpellSlot.W || args.Slot == SpellSlot.E || args.Slot == SpellSlot.R) && sender.IsEnemy && E.IsReady()) { if (args.SData.TargettingType == SpellDataTargetType.Unit || args.SData.TargettingType == SpellDataTargetType.SelfAndUnit || args.SData.TargettingType == SpellDataTargetType.Self) { if ((args.Target.NetworkId == Player.Instance.NetworkId && args.Time < 1.5 || args.End.Distance(Player.Instance.ServerPosition) <= Player.Instance.BoundingRadius * 3) && ModesMenu3[args.SData.Name].Cast <CheckBox>().CurrentValue) { E.Cast(); } } else if (args.SData.TargettingType == SpellDataTargetType.LocationAoe) { var castvector = new Geometry.Polygon.Circle(args.End, args.SData.CastRadius).IsInside( Player.Instance.ServerPosition); if (castvector && ModesMenu3[args.SData.Name].Cast <CheckBox>().CurrentValue) { E.Cast(); } } else if (args.SData.TargettingType == SpellDataTargetType.Cone) { var castvector = new Geometry.Polygon.Arc(args.Start, args.End, args.SData.CastConeAngle, args.SData.CastRange) .IsInside(Player.Instance.ServerPosition); if (castvector && ModesMenu3[args.SData.Name].Cast <CheckBox>().CurrentValue) { E.Cast(); } } else if (args.SData.TargettingType == SpellDataTargetType.SelfAoe) { var castvector = new Geometry.Polygon.Circle(sender.ServerPosition, args.SData.CastRadius).IsInside( Player.Instance.ServerPosition); if (castvector && ModesMenu3[args.SData.Name].Cast <CheckBox>().CurrentValue) { E.Cast(); } } else { var castvector = new Geometry.Polygon.Rectangle(args.Start, args.End, args.SData.LineWidth).IsInside( Player.Instance.ServerPosition); if (castvector && ModesMenu3[args.SData.Name].Cast <CheckBox>().CurrentValue) { E.Cast(); } } } } }