internal static void TriggerOnPredictDamage(Unit unit, PredictDamageEventArgs args) { try { OnPredictDamage?.Invoke(unit, args); } catch (Exception e) { if (Menu["logerror"].As <MenuBool>().Enabled) { Console.WriteLine("== Error at ZLib.TriggerOnPredictDamage"); Console.WriteLine(e); } } }
private static void ZLib_OnPredictDamage(Base.Unit hero, PredictDamageEventArgs args) { if (Player.ChampionName == "Tryndamere") { if (hero.Instance.IsEnemy) { return; } if (hero.IncomeDamage < 0) { Helpers.ResetIncomeDamage(hero); } if (!hero.Instance.IsValidTarget(float.MaxValue, true)) { Helpers.ResetIncomeDamage(hero); } if (hero.Instance.HasBuffOfType(BuffType.Invulnerability)) { args.NoProcess = true; } var objShop = ObjectManager.Get <GameObject>() .FirstOrDefault(x => x.Type == GameObjectType.obj_Shop && x.Team == hero.Instance.Team); if (objShop != null && objShop.Distance(hero.Instance.ServerPosition) <= 1250) { args.NoProcess = true; } if (args.HpInstance.PredictedDmg * 2 >= hero.Instance.Health && R.Ready) { if (ZLib.Menu["whitelist"][hero.Instance.ChampionName.ToLower()].Enabled && hero.Instance.IsMe) { if (RootMenu["combo"]["rset"]["user"].Enabled) { R.Cast(); } } } } }
private static void ZLib_OnPredictDamage(Unit unit, PredictDamageEventArgs args) { bool useW = Menu["wsettings"]["usew"].Enabled; if (!unit.Instance.IsMe || !useW) { return; } if (unit.Instance.HasBuffOfType(BuffType.Invulnerability)) { args.NoProcess = true; } var objShop = ObjectManager.Get <GameObject>() .FirstOrDefault(x => x.Type == GameObjectType.obj_Shop && x.Team == unit.Instance.Team); if (objShop != null && objShop.Distance(unit.Instance.ServerPosition) <= 1250) { args.NoProcess = true; } var incomingDamagePercent = unit.IncomeDamage / unit.Instance.MaxHealth * 100; float whp = Menu["wsettings"]["wdmg"].As <MenuSlider>().Value; if (unit.IncomeDamage >= unit.Instance.Health || incomingDamagePercent >= whp || unit.Events.Contains(EventType.CrowdControl) || unit.Events.Contains(EventType.Ultimate)) { if (unit.Instance.IsMe) { W.Cast(); } } }
private static void ZLib_OnPredictDamage(Base.Unit hero, PredictDamageEventArgs args) { if (Player.ChampionName == "Lulu") { if (hero.Instance.IsEnemy) { return; } if (hero.IncomeDamage < 0) { Helpers.ResetIncomeDamage(hero); } if (!hero.Instance.IsValidTarget(float.MaxValue, true)) { Helpers.ResetIncomeDamage(hero); } if (hero.Instance.HasBuffOfType(BuffType.Invulnerability)) { args.NoProcess = true; } var objShop = ObjectManager.Get <GameObject>() .FirstOrDefault(x => x.Type == GameObjectType.obj_Shop && x.Team == hero.Instance.Team); if (objShop != null && objShop.Distance(hero.Instance.ServerPosition) <= 1250) { args.NoProcess = true; } if (args.HpInstance.PredictedDmg * 2 >= hero.Instance.Health && R.Ready) { if (RootMenu["combo"]["autor"].Enabled) { R.CastOnUnit(hero.Instance); } } } if (Player.ChampionName == "Zilean") { if (hero.Instance.IsEnemy) { return; } if (hero.IncomeDamage < 0) { Helpers.ResetIncomeDamage(hero); } if (!hero.Instance.IsValidTarget(float.MaxValue, true)) { Helpers.ResetIncomeDamage(hero); } if (hero.Instance.HasBuffOfType(BuffType.Invulnerability)) { args.NoProcess = true; } var objShop = ObjectManager.Get <GameObject>() .FirstOrDefault(x => x.Type == GameObjectType.obj_Shop && x.Team == hero.Instance.Team); if (objShop != null && objShop.Distance(hero.Instance.ServerPosition) <= 1250) { args.NoProcess = true; } if (args.HpInstance.PredictedDmg * 2 >= hero.Instance.Health && R.Ready) { if (ZLib.Menu["whitelist"][hero.Instance.ChampionName.ToLower()].Enabled) { R.CastOnUnit(hero.Instance); } } } if (Player.ChampionName == "Taric") { if (Bases.Champion.RootMenu["wset"]["modes"].As <MenuList>().Value == 1) { if (hero.Instance.IsEnemy) { return; } if (hero.Attacker.IsAlly) { return; } if (hero.MinionDamage > 0) { if (hero.AbilityDamage == 0 && hero.BuffDamage == 0 && hero.ItemDamage == 0 && hero.TowerDamage == 0 && hero.TroyDamage == 0) { return; } } if (hero.IncomeDamage < 0) { Helpers.ResetIncomeDamage(hero); } if (!hero.Instance.IsValidTarget(float.MaxValue, true)) { Helpers.ResetIncomeDamage(hero); } if (hero.Instance.HasBuffOfType(BuffType.Invulnerability)) { args.NoProcess = true; } if (hero.Instance.HasBuffOfType(BuffType.PhysicalImmunity) && args.HpInstance.EventType == EventType.AutoAttack) { args.NoProcess = true; } if (hero.Instance.HasBuffOfType(BuffType.SpellImmunity) && args.HpInstance.EventType == EventType.Spell) { args.NoProcess = true; } if (hero.Instance.HasBuff("sivire") && args.HpInstance.EventType == EventType.Spell) { args.NoProcess = true; } if (hero.Instance.HasBuff("bansheesviel") && args.HpInstance.EventType == EventType.Spell) { args.NoProcess = true; } var objShop = ObjectManager.Get <GameObject>() .FirstOrDefault(x => x.Type == GameObjectType.obj_Shop && x.Team == hero.Instance.Team); if (objShop != null && objShop.Distance(hero.Instance.ServerPosition) <= 1250) { args.NoProcess = true; } if (ZLib.Menu["whitelist"][hero.Instance.ChampionName.ToLower()].Enabled) { W.CastOnUnit(hero.Instance); } } } if (Player.ChampionName == "Janna" || Player.ChampionName == "Lulu" || Player.ChampionName == "Rakan" || Player.ChampionName == "Karma" || ObjectManager.GetLocalPlayer().ChampionName == "Ivern") { if (Bases.Champion.RootMenu["wset"]["modes"].As <MenuList>().Value == 1) { if (hero.Instance.IsEnemy) { return; } if (hero.Attacker.IsAlly) { return; } if (hero.MinionDamage > 0) { if (hero.AbilityDamage == 0 && hero.BuffDamage == 0 && hero.ItemDamage == 0 && hero.TowerDamage == 0 && hero.TroyDamage == 0) { return; } } if (hero.IncomeDamage < 0) { Helpers.ResetIncomeDamage(hero); } if (!hero.Instance.IsValidTarget(float.MaxValue, true)) { Helpers.ResetIncomeDamage(hero); } if (hero.Instance.HasBuffOfType(BuffType.Invulnerability)) { args.NoProcess = true; } if (hero.Instance.HasBuffOfType(BuffType.PhysicalImmunity) && args.HpInstance.EventType == EventType.AutoAttack) { args.NoProcess = true; } if (hero.Instance.HasBuffOfType(BuffType.SpellImmunity) && args.HpInstance.EventType == EventType.Spell) { args.NoProcess = true; } if (hero.Instance.HasBuff("sivire") && args.HpInstance.EventType == EventType.Spell) { args.NoProcess = true; } if (hero.Instance.HasBuff("bansheesviel") && args.HpInstance.EventType == EventType.Spell) { args.NoProcess = true; } var objShop = ObjectManager.Get <GameObject>() .FirstOrDefault(x => x.Type == GameObjectType.obj_Shop && x.Team == hero.Instance.Team); if (objShop != null && objShop.Distance(hero.Instance.ServerPosition) <= 1250) { args.NoProcess = true; } if (ZLib.Menu["whitelist"][hero.Instance.ChampionName.ToLower()].Enabled) { E.CastOnUnit(hero.Instance); } } } if (Player.ChampionName == "Sona") { if (Bases.Champion.RootMenu["wset"]["modes"].As <MenuList>().Value == 1) { if (hero.Instance.IsEnemy) { return; } if (hero.IncomeDamage < 0) { Helpers.ResetIncomeDamage(hero); } if (!hero.Instance.IsValidTarget(float.MaxValue, true)) { Helpers.ResetIncomeDamage(hero); } if (hero.Instance.HasBuffOfType(BuffType.Invulnerability)) { args.NoProcess = true; } if (hero.Instance.HasBuffOfType(BuffType.PhysicalImmunity) && args.HpInstance.EventType == EventType.AutoAttack) { args.NoProcess = true; } if (hero.Instance.HasBuffOfType(BuffType.SpellImmunity) && args.HpInstance.EventType == EventType.Spell) { args.NoProcess = true; } if (hero.Instance.HasBuff("sivire") && args.HpInstance.EventType == EventType.Spell) { args.NoProcess = true; } if (hero.Instance.HasBuff("bansheesviel") && args.HpInstance.EventType == EventType.Spell) { args.NoProcess = true; } var objShop = ObjectManager.Get <GameObject>() .FirstOrDefault(x => x.Type == GameObjectType.obj_Shop && x.Team == hero.Instance.Team); if (objShop != null && objShop.Distance(hero.Instance.ServerPosition) <= 1250) { args.NoProcess = true; } if (ZLib.Menu["whitelist"][hero.Instance.ChampionName.ToLower()].Enabled && hero.Instance.Distance(Player) < 400) { W2.CastOnUnit(hero.Instance); } } } }