static void Game_OnUpdate(EventArgs args) { if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo)) { ModesManager.Combo(); } if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Harass)) { ModesManager.Harass(); } if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.LaneClear)) { ModesManager.LaneClear(); } if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.JungleClear)) { ModesManager.JungleClear(); } if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.LastHit)) { ModesManager.LastHit(); } }
private void InitializeDataBinding() { // Log data _qsoLog = new QSOLog(Properties.Settings.Default.LogPath); qsoGrid.ItemsSource = _qsoLog.QSOs; // Type data _typeDataDb = new TypeDataDb(); _bandsManager = new BandsManager(_typeDataDb); _modesManager = new ModesManager(_typeDataDb); _countriesManager = new CountriesManager(_typeDataDb); _statesManager = new StatesManager(_typeDataDb); _bandsManager.LoadAndUpdate(); _modesManager.LoadAndUpdate(); _countriesManager.LoadAndUpdate(); _statesManager.LoadAndUpdate(); bandTxt.ItemsSource = _bandsManager.Bands; modeTxt.ItemsSource = _modesManager.Modes; countryTxt.ItemsSource = _countriesManager.Countries; stateTxt.ItemsSource = _statesManager.States; }
/// <summary> /// Decisions picking for the bot. /// </summary> public static void Decisions() { // Picks best position for the bot. Pathing.BestPosition(); // Ticks for the modes manager. ModesManager.OnTick(); // Moves to the Bot selected Position. if (Pathing.Position != Vector3.Zero && Pathing.Position != null) { Pathing.MoveTo(Pathing.Position); } // Removes HealthRelics if a hero is in range with them. var HR = ObjectsManager.HealthRelics.FirstOrDefault(h => EntityManager.Heroes.AllHeroes.Any(a => !a.IsDead && a.IsInRange(h, h.BoundingRadius * 2))); if (HR != null) { ObjectsManager.HealthRelics.Remove(HR); Chat.Print("Removed HR"); } var trap = ObjectsManager.EnemyTraps.FirstOrDefault(h => EntityManager.Heroes.Allies.Any(a => !a.IsDead && a.IsInRange(h, h.BoundingRadius * 2))); if (trap != null) { ObjectsManager.EnemyTraps.Remove(trap); Chat.Print("remove trap"); } }
/// <summary> /// Decisions picking for the bot. /// </summary> public static void Decisions() { // Picks best position for the bot. if (Core.GameTickCount - LastUpdate > 75) { /* * foreach (var hero in EntityManager.Heroes.AllHeroes.Where(a => a != null && a.IsValidTarget() && !a.Added() && ObjectsManager.HealthRelics.Any(hr => a.Path.LastOrDefault().Distance(hr.Position) <= 1))) * { * hero.Add(); * Logger.Send("Added: " + hero.BaseSkinName + " - " + hero.NetworkId, Logger.LogLevel.Warn); * }*/ Pathing.BestPosition(); LastUpdate = Core.GameTickCount; } // Ticks for the modes manager. ModesManager.OnTick(); if (!(Program.Moveto.Contains("Enemy") || Program.Moveto.Contains("AllySpawn")) && !(ModesManager.Flee || ModesManager.None) && Player.Instance.IsRanged && ObjectsManager.NearestEnemy != null && Pathing.Position.CountEnemiesInRange(Player.Instance.GetAutoAttackRange()) > 1) { Pathing.Position = ObjectsManager.NearestEnemy.Position.Extend(ObjectsManager.AllySpawn, Misc.KiteDistance(ObjectsManager.NearestEnemy)).To3D(); } if (Pathing.Position.UnderEnemyTurret() && !Misc.SafeToDive && ObjectsManager.AllySpawn != null) { Pathing.Position = Pathing.Position.Extend(ObjectsManager.AllySpawn.Position, 250).To3D(); } // Moves to the Bot selected Position. if (Pathing.Position != Vector3.Zero && Pathing.Position.IsValid() && !Pathing.Position.IsZero) { Pathing.MoveTo(Pathing.Position); } }
/// <summary> /// Init bot functions. /// </summary> public static void Init() { try { // Initialize Genesis Spell Library. SpellManager.Initialize(); SpellLibrary.Initialize(); // Initialize The ModesManager ModesManager.Init(); // Initialize ObjectsManager. ObjectsManager.Init(); // Initialize Special Champions Logic. SpecialChamps.Init(); // Initialize Cache. Cache.Init(); // Overrides Orbwalker Movements Orbwalker.OverrideOrbwalkPosition += OverrideOrbwalkPosition; // Initialize AutoLvlup. LvlupSpells.Init(); // Initialize TeamFights Detector. Detector.Init(); Spellbook.OnCastSpell += delegate(Spellbook sender, SpellbookCastSpellEventArgs args) { if (sender.Owner.IsMe && RunningItDownMid) { args.Process = false; Logger.Send("Blocked: " + args.Slot + " Reason: Running It Down Mid"); } }; Obj_AI_Base.OnBasicAttack += Obj_AI_Base_OnBasicAttack; Gapcloser.OnGapcloser += SpellsCasting.GapcloserOnOnGapcloser; Interrupter.OnInterruptableSpell += SpellsCasting.Interrupter_OnInterruptableSpell; //Obj_AI_Base.OnBasicAttack += SpellsCasting.Obj_AI_Base_OnBasicAttack; //Obj_AI_Base.OnProcessSpellCast += SpellsCasting.Obj_AI_Base_OnProcessSpellCast; } catch (Exception ex) { Logger.Send("There was an Error While Initialize Brain", ex, Logger.LogLevel.Error); } }
public static void Game_OnTick(EventArgs args) { ModesManager.AutoQ(); ModesManager.KillSteal(); }
/// <summary> /// Decisions picking for the bot. /// </summary> public static void Decisions() { //Orbwalker.DisableAttacking = !Misc.SafeToAttack && Orbwalker.GetTarget().IsChampion(); // Picks best position for the bot. if (Core.GameTickCount - LastUpdate > Misc.ProtectFPS) { // Ticks for the modes manager. ModesManager.OnTick(); Pathing.BestPosition(); LastPickPosition = Pathing.Position; LastUpdate = Core.GameTickCount; } if (LastPing != Game.Ping) { PingUpdates++; PingsStore += Game.Ping; LastPing = Game.Ping; } if (Misc.TeamFight) { LastTeamFight = Core.GameTickCount; } var NearestEnemy = ObjectsManager.NearestEnemy; if (Config.FixedKite && !(Program.Moveto.Contains("Enemy") || Program.Moveto.Contains("AllySpawn")) && !(ModesManager.Flee || ModesManager.None) && NearestEnemy != null && Pathing.Position.CountEnemyHeros(Config.SafeValue * 0.35f) > 0) { Program.Moveto = "FixedToKitingPosition"; Pathing.Position = NearestEnemy.KitePos(ObjectsManager.AllySpawn); } if (Config.TryFixDive && Pathing.Position.UnderEnemyTurret() && !Misc.SafeToDive) { Program.Moveto = "FixedToAntiDivePosition"; for (int i = 0; Pathing.Position.UnderEnemyTurret(); i += 10) { Pathing.Position = LastPickPosition.Extend(ObjectsManager.AllySpawn.Position.Random(), i + Player.Instance.BoundingRadius + 50).To3D(); } } if (Config.CreateAzirTower && ObjectsManager.AzirTower != null) { Program.Moveto = "CreateAzirTower"; Player.UseObject(ObjectsManager.AzirTower); } if (Config.EnableHighPing && Game.Ping > 666 && ObjectsManager.AllySpawn != null) { Program.Moveto = "Moving to AllySpawn HIGH PING"; Pathing.Position = ObjectsManager.AllySpawn.Position.Random(); } RunningItDownMid = Config.Tyler1 && Player.Instance.Gold >= Config.Tyler1g && !Player.Instance.IsZombie() && ObjectsManager.EnemySpawn != null && !Buy.FullBuild && !TeamFightActive && (ObjectsManager.AllySpawn != null && Player.Instance.Distance(ObjectsManager.AllySpawn) > 4000 || EntityManager.Heroes.Enemies.Count(e => !e.IsDead && e.IsValid) == 0) && EntityManager.Heroes.Allies.Count(a => a.IsActive()) > 2 && !Program.Moveto.Contains("NearestEnemyObject"); if (RunningItDownMid && ObjectsManager.EnemySpawn != null) { Program.Moveto = "RUNNING IT DOWN MID"; Pathing.Position = ObjectsManager.EnemySpawn.Position.Random(); } // Moves to the Bot selected Position. if (Pathing.Position.IsValid() && !Pathing.Position.IsZero) { Pathing.MoveTo(Pathing.Position); } }
/// <summary> /// Decisions picking for the bot. /// </summary> public static void Decisions() { // Picks best position for the bot. if (Core.GameTickCount - LastUpdate > Misc.ProtectFPS) { // Ticks for the modes manager. ModesManager.OnTick(); Pathing.BestPosition(); LastPickPosition = Pathing.Position; LastUpdate = Core.GameTickCount; } foreach (var hero in EntityManager.Heroes.AllHeroes.Where(a => a.IsValidTarget() && !DetectedBots.Contains(a))) { if (ObjectsManager.HealthRelics.Any(hr => hero.Path.LastOrDefault().Distance(hr.Position) <= 3)) { DetectedBots.Add(hero); //Logger.Send("BOT DETECTED: [" + hero.ChampionName + " - " + hero.Name + "] Case: Dead Center click on HR", Logger.LogLevel.Warn); } if (EntityManager.Heroes.AllHeroes.Count(b => !hero.IdEquals(b) && hero.Distance(b) <= 2) > 0) { DetectedBots.Add(hero); //Logger.Send("BOT DETECTED: [" + hero.ChampionName + " - " + hero.Name + "] Case: Stacked bots", Logger.LogLevel.Warn); } } if (LastPing != Game.Ping) { PingUpdates++; PingsStore += Game.Ping; LastPing = Game.Ping; } if (Misc.TeamFight) { LastTeamFight = Core.GameTickCount; } if (Config.FixedKite && !(Program.Moveto.Contains("Enemy") || Program.Moveto.Contains("AllySpawn")) && !(ModesManager.Flee || ModesManager.None) && ObjectsManager.NearestEnemy != null && Pathing.Position.CountEnemyHeros((int)(Misc.KiteDistance(ObjectsManager.NearestEnemy) + Player.Instance.BoundingRadius)) > 0) { Program.Moveto = "FixedToKitingPosition"; Pathing.Position = ObjectsManager.NearestEnemy.KitePos(ObjectsManager.AllySpawn); } if (Config.TryFixDive && Pathing.Position.UnderEnemyTurret() && !Misc.SafeToDive) { Program.Moveto = "FixedToAntiDivePosition"; for (int i = 0; Pathing.Position.UnderEnemyTurret(); i += 10) { Pathing.Position = LastPickPosition.Extend(ObjectsManager.AllySpawn.Position.Random(), i + Player.Instance.BoundingRadius + 50).To3D(); } } if (Config.CreateAzirTower && ObjectsManager.AzirTower != null) { Program.Moveto = "CreateAzirTower"; Player.UseObject(ObjectsManager.AzirTower); } if (Config.EnableHighPing && Game.Ping > 666 && ObjectsManager.AllySpawn != null) { Program.Moveto = "Moving to AllySpawn HIGH PING"; Pathing.Position = ObjectsManager.AllySpawn.Position.Random(); } RunningItDownMid = Config.Tyler1 && Player.Instance.Gold >= Config.Tyler1g && !Player.Instance.IsZombie() && ObjectsManager.EnemySpawn != null && !AutoShop.Sequences.Buy.FullBuild && Core.GameTickCount - LastTeamFight > 1500 && (ObjectsManager.AllySpawn != null && Player.Instance.Distance(ObjectsManager.AllySpawn) > 4000 || EntityManager.Heroes.Enemies.Count(e => !e.IsDead && e.IsValid) == 0) && EntityManager.Heroes.Allies.Count(a => a.IsActive()) > 2 && (Orbwalker.GetTarget() != null && !(Orbwalker.GetTarget().Type == GameObjectType.obj_HQ || Orbwalker.GetTarget().Type == GameObjectType.obj_BarracksDampener) || Orbwalker.GetTarget() == null); if (RunningItDownMid && ObjectsManager.EnemySpawn != null) { Program.Moveto = "RUNNING IT DOWN MID"; Pathing.Position = ObjectsManager.EnemySpawn.Position.Random(); } // Moves to the Bot selected Position. if (Pathing.Position.IsValid() && !Pathing.Position.IsZero) { Pathing.MoveTo(Pathing.Position); } }