private static void OnPing(GamePingEventArgs args) { foreach (var hero in HeroManager.Allies.Where(x => !x.IsMe)) { if (args.Source.NetworkId != Player.NetworkId) // most likely redundant, keeping it anyways { if (args.Source.NetworkId == hero.NetworkId) { if (GetBool("disableall" + hero.ChampionName, typeof (bool))) { args.Process = false; } } } } foreach (var hero in HeroManager.Allies.Where(x => !x.IsMe)) { if (args.Source.NetworkId != Player.NetworkId) // most likely redundant, keeping it anyways { foreach (var types in PingCategorys) { if (GetBool("useon" + types + hero.ChampionName, typeof (bool)) && args.Source.NetworkId == hero.NetworkId && args.PingType == types) { args.Process = false; } } } } }
/// <summary> /// Raises the <see cref="E:Ping" /> event. /// </summary> /// <param name="args">The <see cref="GamePingEventArgs"/> instance containing the event data.</param> private void OnPing(GamePingEventArgs args) { if (!args.Source.IsMe && ShouldRun() && (args.Source is Obj_AI_Hero)) { var pingType = args.PingType; var srcHero = args.Source as Obj_AI_Hero; if (pingType == PingCategory.Normal) { var textObject = new Render.Text( srcHero.ChampionName, new Vector2( Drawing.WorldToScreen(args.Position.To3D()).X, Drawing.WorldToScreen(args.Position.To3D()).Y + 15), 17, SharpDX.Color.White) { PositionUpdate = () => new Vector2( Drawing.WorldToScreen(args.Position.To3D()).X, Drawing.WorldToScreen(args.Position.To3D()).Y + 30), Centered = true }; textObject.Add(0); LeagueSharp.Common.Utility.DelayAction.Add(1000, () => { textObject.Remove(); }); } } }
private static void OnPing(GamePingEventArgs args) { foreach (var hero in HeroManager.Allies.Where(x => !x.IsMe)) { if (args.Source.NetworkId != Player.NetworkId) // most likely redundant, keeping it anyways { if (args.Source.NetworkId == hero.NetworkId) { if (GetBool("disableall" + hero.ChampionName, typeof(bool))) { args.Process = false; } } } } foreach (var hero in HeroManager.Allies.Where(x => !x.IsMe)) { if (args.Source.NetworkId != Player.NetworkId) // most likely redundant, keeping it anyways { foreach (var types in PingCategorys) { if (GetBool("useon" + types + hero.ChampionName, typeof(bool)) && args.Source.NetworkId == hero.NetworkId && args.PingType == types) { args.Process = false; } } } } }
void Game_OnPing(GamePingEventArgs args) { if (!IsActive()) { return; } Obj_AI_Hero hero = args.Source as Obj_AI_Hero; if (hero != null && hero.IsValid) { PingInfo pingInfoN = new PingInfo(hero.NetworkId, args.Position, Game.Time + 2, args.PingType); pingInfo.Add(pingInfoN); switch (args.PingType) { case PingCategory.AssistMe: CreateSprites(pingInfoN); break; case PingCategory.Danger: CreateSprites(pingInfoN); break; } } }
static void Game_OnPing(GamePingEventArgs args) { if (args.Source is Obj_AI_Hero) { Obj_AI_Hero sender = args.Source as Obj_AI_Hero; if (Menu.SubMenu("Ping").SubMenu("Ping.Ally").Item(sender.CharData.BaseSkinName).GetValue<bool>()) args.Process = false; } }
private void Game_OnPing(GamePingEventArgs args) { try { GameObject srcObject = args.Source; Obj_AI_Hero src = srcObject as Obj_AI_Hero; if (src == null) { return; } MenuItem blockItem = _menu.Item(src.Name); if (blockItem != null && blockItem.GetValue<bool>()) { args.Process = false; return; } GameObject target = args.Target; if (args.PingType == PingCategory.OnMyWay || !src.IsValid) return; Color c = Color.White; switch (args.PingType) { case PingCategory.Fallback: case PingCategory.EnemyMissing: c = Color.LightYellow; break; case PingCategory.AssistMe: c = Color.LightBlue; break; case PingCategory.Danger: c = new Color(255, 204, 203); break; } int selectedIndex = _menu.Item("print").GetValue<StringList>().SelectedIndex; String name; switch (selectedIndex) { case 0: name = src.ChampionName; break; case 1: name = src.Name; break; default: name = src.Name + " (" + src.ChampionName + ")"; break; } _pings.Add(new Ping(name, Game.ClockTime + 2f, args.Position.X, args.Position.Y, target, c)); } catch (Exception e) { Console.WriteLine(e); } }
private static void Game_OnPing(GamePingEventArgs args) { var unit = args.Source as Obj_AI_Hero; if (!Enabled || unit == null || !unit.IsValid || unit.IsMe || !ChampMenus[unit.NetworkId].Item("Ping").IsActive()) { return; } args.Process = false; }
void Game_OnPing(GamePingEventArgs args) { if (!IsActive()) { return; } Obj_AI_Hero hero = args.Source as Obj_AI_Hero; if (hero != null && hero.IsValid) { //if (hero.IsMe) // return; foreach (var info in pingInfo) { if (info.NetworkId == hero.NetworkId && info.Time - 2 < Game.Time && info.Type == args.PingType) { return; } } PingInfo pingInfoN = new PingInfo(hero.NetworkId, args.Position, Game.Time + 4, args.PingType); pingInfo.Add(pingInfoN); switch (args.PingType) { case PingCategory.AssistMe: CreateSprites(pingInfoN); break; case PingCategory.Danger: CreateSprites(pingInfoN); break; case PingCategory.OnMyWay: CreateSprites(pingInfoN); break; case PingCategory.EnemyMissing: CreateSprites(pingInfoN); break; case PingCategory.Fallback: CreateSprites(pingInfoN); break; } } }
private void OnGamePing(GamePingEventArgs args) { try { var hero = args.Source as Obj_AI_Hero; if (hero != null && hero.IsValid && args.PingType != PingCategory.OnMyWay) { _pingItems.Add( new PingItem( hero.ChampionName, Game.Time + (args.PingType == PingCategory.Danger ? 1f : 1.8f), args.Position, args.Target)); } } catch (Exception ex) { Global.Logger.AddItem(new LogItem(ex)); } }
public static void OnPing(GamePingEventArgs args) { if (!MenuConfig.WJungler || !Spells.W.IsReady()) { return; } var allyJungler = args.Source as Obj_AI_Hero; if (allyJungler == null || allyJungler.Distance(Player.ServerPosition) <= Spells.W.Range + 550 || !allyJungler.Spellbook.GetSpell(SpellSlot.Summoner1).Name.ToLower().Contains("smite") || !allyJungler.Spellbook.GetSpell(SpellSlot.Summoner2).Name.ToLower().Contains("smite") || args.PingType != PingCategory.Fallback || args.PingType != PingCategory.Danger) { return; } Utility.DelayAction.Add(330, () => Spells.W.Cast(args.Position.To3D())); }
void Game_OnPing(GamePingEventArgs args) { //if jungler pings OnMyWay //give him lantern for easy gank if (!Config.Item("autoW5", true).GetValue <bool>()) { return; } var jungler = args.Source as Obj_AI_Hero; if (jungler != null && jungler.Distance(Player.Position) <= W.Range + 500) { if (jungler.Spellbook.GetSpell(SpellSlot.Summoner1).Name.ToLower().Contains("smite") || jungler.Spellbook.GetSpell(SpellSlot.Summoner2).Name.ToLower().Contains("smite")) { if (args.PingType == PingCategory.OnMyWay) { int random = new Random().Next(350, 750); // so it wont happen too fast Utility.DelayAction.Add(random, () => CastW(args.Position.To3D())); } } } }
/// <summary> /// Subscribe to the GameOnPing event. /// </summary> /// <param name="args"> /// The args. /// </param> private static void GameOnPing(GamePingEventArgs args) { var hero = (Obj_AI_Hero)args.Source; if (!m.Item("Status").GetValue <bool>() || !m.Item("Ping").GetValue <bool>() || hero == null || !hero.IsValid || hero.IsMe || !HeroCount.ContainsKey(hero.NetworkId)) { return; } HeroCount[hero.NetworkId].Value++; if (HeroCount[hero.NetworkId].Value < 3) { return; } args.Process = false; }
private static void Game_OnPing(GamePingEventArgs args) { args.Process = PingBlocker.Item(args.Source.Name).GetValue <bool>(); }
public static void OnPing(GamePingEventArgs args) { if (args.Source.Name != Core.Carry.Name) return; Console.WriteLine(args.PingType); if (args.PingType == PingCategory.Normal) { PingManager.WardLocation = null; PingManager.SweepLocation = null; if (args.Target != null) Console.WriteLine(args.Target.Name); Obj_AI_Base newTarget = args.Target as Obj_AI_Base; if (newTarget != null) { Target = newTarget; Mode = BehaviourMode.AGGRO; } else { Location = args.Position.To3D(); Mode = BehaviourMode.PASSIVE; } } else if (args.PingType == PingCategory.Fallback) { Mode = BehaviourMode.PASSIVE; Location = null; Target = null; PingManager.WardLocation = null; PingManager.SweepLocation = null; RecallManager.UserRecallRequest = false; } else if (args.PingType == PingCategory.Danger) { WardLocation = args.Position.To3D(); Console.WriteLine("WardLocation " + WardLocation); } else if (args.PingType == PingCategory.EnemyMissing) { SweepLocation = args.Position.To3D(); Console.WriteLine("SweepLocation " + SweepLocation); } else if (args.PingType == PingCategory.AssistMe) { var deltaX = args.Position.X - Core.Carry.Position.X; var deltaY = args.Position.Y - Core.Carry.Position.Y; var angle = Math.Atan2(deltaY, deltaX); Positioning? newPositioning = null; if (checkAngle(Math.PI/2.0, angle)) newPositioning = Positioning.N; if (checkAngle(Math.PI/4.0, angle)) newPositioning = Positioning.NE; if (checkAngle(0, angle)) newPositioning = Positioning.E; if (checkAngle(7.0*Math.PI/4.0 - 2.0 * Math.PI, angle)) newPositioning = Positioning.SE; if (checkAngle(3.0*Math.PI/ 2.0 - 2.0 * Math.PI, angle)) newPositioning = Positioning.S; if (checkAngle(5.0*Math.PI/ 4.0 - 2.0 * Math.PI, angle)) newPositioning = Positioning.SW; if (checkAngle(Math.PI - 2.0 * Math.PI, angle)) newPositioning = Positioning.W; if (checkAngle(Math.PI, angle)) newPositioning = Positioning.W; if (checkAngle(3.0*Math.PI/4.0, angle)) newPositioning = Positioning.NW; if (newPositioning != null) { HeatMap.Pos = newPositioning.Value; Console.WriteLine("POSITIONING " + newPositioning + " angle " + angle); } else { Console.WriteLine("POSITIONING NULL angle " + angle); } Mode = BehaviourMode.PASSIVE; Location = null; PingManager.WardLocation = null; PingManager.SweepLocation = null; int distance = (int)Core.Carry.Position.Distance(args.Position.To3D()); Core.MaxDistanceFromCarry = distance; Console.WriteLine(distance); } }
void Game_OnPing(GamePingEventArgs args) { if (!IsActive()) return; Obj_AI_Hero hero = args.Source as Obj_AI_Hero; if (hero != null && hero.IsValid) { foreach (var ally in ObjectManager.Get<Obj_AI_Hero>()) { if (ally.Name.Equals(hero.Name)) args.Process = false; } pingInfo.Add(new PingInfo(hero.ChampionName, args.Position, Game.Time + 2)); } }
private void Game_OnPing(GamePingEventArgs args) { try { GameObject srcObject = args.Source; Obj_AI_Hero src = srcObject as Obj_AI_Hero; if (src == null) { return; } MenuItem blockItem = _menu.Item(src.Name); if (blockItem != null && blockItem.GetValue <bool>()) { args.Process = false; return; } GameObject target = args.Target; if (args.PingType == PingCategory.OnMyWay || !src.IsValid) { return; } Color c = Color.White; switch (args.PingType) { case PingCategory.Fallback: case PingCategory.EnemyMissing: c = Color.LightYellow; break; case PingCategory.AssistMe: c = Color.LightBlue; break; case PingCategory.Danger: c = new Color(255, 204, 203); break; } int selectedIndex = _menu.Item("print").GetValue <StringList>().SelectedIndex; String name; switch (selectedIndex) { case 0: name = src.ChampionName; break; case 1: name = src.Name; break; default: name = src.Name + " (" + src.ChampionName + ")"; break; } _pings.Add(new Ping(name, Game.ClockTime + 2f, args.Position.X, args.Position.Y, target, c)); } catch (Exception e) { Console.WriteLine(e); } }
void Game_OnPing(GamePingEventArgs args) { if (!IsActive()) return; Obj_AI_Hero hero = args.Source as Obj_AI_Hero; if (hero != null && hero.IsValid) { PingInfo pingInfoN = new PingInfo(hero.NetworkId, args.Position, Game.Time + 2, args.PingType); pingInfo.Add(pingInfoN); switch (args.PingType) { case PingCategory.AssistMe: CreateSprites(pingInfoN); break; case PingCategory.Danger: CreateSprites(pingInfoN); break; } } }
void Game_OnPing(GamePingEventArgs args) { //if jungler pings OnMyWay //give him lantern for easy gank if(!Config.Item("autoW5",true).GetValue<bool>())return; var jungler = args.Source as Obj_AI_Hero; if (jungler != null && jungler.Distance(Player.Position)<=W.Range+500) { if (jungler.Spellbook.GetSpell(SpellSlot.Summoner1).Name.ToLower().Contains("smite") || jungler.Spellbook.GetSpell(SpellSlot.Summoner2).Name.ToLower().Contains("smite")) { if (args.PingType == PingCategory.OnMyWay) { int random = new Random().Next(350, 750); // so it wont happen too fast Utility.DelayAction.Add(random,() => CastW(args.Position.To3D())); } } } }