private static void SoulBoundSaver() { if (SoulBound == null) { SoulBound = HeroManager.Allies.Find( h => !h.IsMe && h.Buffs.Any(b => b.Caster.IsMe && b.Name == "kalistacoopstrikeally")); } else if (Program.Config.Item("SoulBoundSaver").GetValue <bool>() && R.IsReady()) { if (SoulBound.HealthPercent < 5 && SoulBound.CountEnemiesInRange(500) > 0 || IncomingDamage > SoulBound.Health) { R.Cast(); } } var itemsToRemove = incomingDamage.Where(entry => entry.Key < Game.Time).ToArray(); foreach (var item in itemsToRemove) { incomingDamage.Remove(item.Key); } itemsToRemove = InstantDamage.Where(entry => entry.Key < Game.Time).ToArray(); foreach (var item in itemsToRemove) { InstantDamage.Remove(item.Key); } }
private static void Game_OnGameUpdate(EventArgs args) { // SoulBound is not found yet! if (SoulBound == null) { // TODO: Get the buff display name, I'm not at home so I needed to use xQx' method, which I don't like :D SoulBound = HeroManager.Allies.Find(h => h.Buffs.Any(b => b.Caster.IsMe && b.Name.Contains("kalistacoopstrikeally"))); } else if (R.IsEnabledAndReady("misc")) { // Ult casting if (SoulBound.HealthPercent < 5 && SoulBound.CountEnemiesInRange(500) > 0 || IncomingDamage > SoulBound.Health) { R.Cast(); } } // Check spell arrival var itemsToRemove = _incomingDamage.Where(entry => entry.Key < Game.Time).ToArray(); foreach (var item in itemsToRemove) { _incomingDamage.Remove(item.Key); } // Instant damage removal itemsToRemove = _instantDamage.Where(entry => entry.Key < Game.Time).ToArray(); foreach (var item in itemsToRemove) { _instantDamage.Remove(item.Key); } }
private static void OnTick(EventArgs args) { // SoulBound is not found yet! if (SoulBound == null) { SoulBound = HeroManager.Allies.Find(h => !h.IsMe && h.Buffs.Any(b => b.Caster.IsMe && b.Name == "kalistacoopstrikeally")); } else if (Settings.SaveSouldBound && R.IsReady()) { // Ult casting if (SoulBound.HealthPercent < 5 && SoulBound.CountEnemiesInRange(500) > 0 || IncomingDamage > SoulBound.Health) { R.Cast(); } } // Check spell arrival foreach (var entry in IncDamage.Where(entry => entry.Key < Game.Time).ToArray()) { IncDamage.Remove(entry.Key); } // Instant damage removal foreach (var entry in InstDamage.Where(entry => entry.Key < Game.Time).ToArray()) { InstDamage.Remove(entry.Key); } }
private static void OnUpdate(EventArgs args) { // SoulBound is not found yet! if (SoulBound == null) { // TODO: Get the buff display name, I'm not at home so I needed to use xQx' method, which I don't like :D SoulBound = HeroManager.Allies.Find(h => h.Buffs.Any(b => b.Caster.IsMe && b.Name.Contains("kalistacoopstrikeally"))); } else if (Settings.SaveSouldBound && R.IsReady()) { // Ult casting if (SoulBound.HealthPercentage() < 5 && SoulBound.CountEnemiesInRange(500) > 0 || IncomingDamage > SoulBound.Health) { R.Cast(); } // Get enemies foreach (var unit in ObjectManager.Get <Obj_AI_Hero>().Where(h => h.IsEnemy && h.IsHPBarRendered)) { // Get buffs for (int i = 0; i < unit.Buffs.Count(); i++) { // Check if the Soulbound is in a good range var enemy = HeroManager.Enemies.Where(x => SoulBound.Distance(x.Position) > 800); // Check if the Soulbound is a Blitzcrank // Check if the enemy is hooked // Check if target was far enough for ult if (SoulBound.ChampionName == "Blitzcrank" && unit.Buffs[i].Name == "rocketgrab2" && unit.Buffs[i].IsActive && enemy.Count() > 0 && Config.Misc.UseKaliscrank) { R.Cast(); } } } } // Check spell arrival foreach (var entry in _incomingDamage) { if (entry.Key < Game.Time) { _incomingDamage.Remove(entry.Key); } } // Instant damage removal foreach (var entry in _instantDamage) { if (entry.Key < Game.Time) { _instantDamage.Remove(entry.Key); } } }
private static void OnUpdate(EventArgs args) { // SoulBound is not found yet! if (SoulBound == null) { // TODO: Get the buff display name, I'm not at home so I needed to use xQx' method, which I don't like :D SoulBound = HeroManager.Allies.Find(h => h.Buffs.Any(b => b.Caster.IsMe && b.Name.Contains("kalistacoopstrikeally"))); } else if (Settings.SaveSouldBound && R.IsReady()) { // Ult casting if (SoulBound.HealthPercentage() < 5 && SoulBound.CountEnemiesInRange(500) > 0 || IncomingDamage > SoulBound.Health) { R.Cast(); } } // Check spell arrival foreach (var entry in _incomingDamage) { if (entry.Key < Game.Time) { _incomingDamage.Remove(entry.Key); } } // Instant damage removal foreach (var entry in _instantDamage) { if (entry.Key < Game.Time) { _instantDamage.Remove(entry.Key); } } }