private static void OnSkillShotUpdate_OnUpdate(DetectedSkillshotData args) { if (args.Caster == null || !Spells.E.IsReady() || !args.IsEnemy || !args.WillHit(Player.Instance)) { return; } var spellname = args.Data.MenuItemName; var spell = EnabledSpells.FirstOrDefault(s => s.SpellName.Equals(spellname)); if (spell == null) { Logger.Warn($"{spellname} Not valid Spell"); return; } if (!spell.Enabled && (!Meniu.BlockExecute || Player.Instance.PredictHealth(args.TravelTime(Player.Instance)) > args.GetSpellDamage(Player.Instance))) { Logger.Warn($"{spellname} Not Enabled from Menu"); return; } Block(args, spell); }
public static void OnSkillShotDetected_OnDetect(DetectedSkillshotData args) { if (args.Caster == null || !args.Caster.IsEnemy || !args.WillHit(Player.Instance) || !Program.SubMenu["enabled"].Cast <CheckBox>().CurrentValue) { return; } var hero = args.Caster as AIHeroClient; var player = Player.Instance; #region Skillshots foreach (var shot in Shots.Where(shot => args.Data.MissileName == shot)) { if (player.BaseSkinName == "Zyra") { W = new Spell.SimpleSkillshot(SpellSlot.W); E = new Spell.SimpleSkillshot(SpellSlot.E); { if (hero != null && W.IsReady() && E.IsReady()) { W.Cast((Vector3)player.ServerPosition.Extend(hero.ServerPosition, 80)); E.Cast((Vector3)player.ServerPosition.Extend(hero.ServerPosition, 80)); } } } if (player.BaseSkinName == "Sivir") { E = new Spell.Active(SpellSlot.E); { if (hero != null && E.IsReady()) { E.Cast(); } } } if (player.BaseSkinName == "Heimerdinger") { Q = new Spell.SimpleSkillshot(SpellSlot.Q); { if (hero != null && Q.IsReady()) { Q.Cast((Vector3)player.ServerPosition.Extend(hero.ServerPosition, 80)); } } } if (player.BaseSkinName == "Leblanc") { R = new Spell.Active(SpellSlot.R); R1 = new Spell.SimpleSkillshot(SpellSlot.R); { if (hero != null && R.IsReady()) { if (player.Spellbook.Spells[3].Name == "LeblancR") { R.Cast(); R1.Cast((Vector3)player.ServerPosition.Extend(hero.ServerPosition, 80)); } else { R1.Cast((Vector3)player.ServerPosition.Extend(hero.ServerPosition, 80)); } } } } if (player.BaseSkinName == "Shaco") { W = new Spell.SimpleSkillshot(SpellSlot.W); { if (hero != null && W.IsReady()) { W.Cast((Vector3)player.ServerPosition.Extend(hero.ServerPosition, 80)); } } } if (player.BaseSkinName == "Fiora") { W = new Spell.SimpleSkillshot(SpellSlot.W); { if (hero != null && W.IsReady()) { W.Cast(hero.ServerPosition); } } } if (player.BaseSkinName == "Fizz") { W = new Spell.Active(SpellSlot.E); { if (hero != null && E.IsReady() && E.ToggleState != 1) { E.Cast(); } } } if (player.BaseSkinName == "Malzahar") { W = new Spell.SimpleSkillshot(SpellSlot.W); { if (hero != null && W.IsReady()) { W.Cast((Vector3)player.ServerPosition.Extend(hero.ServerPosition, 80)); } } } if (player.BaseSkinName == "MonkeyKing") { W = new Spell.Active(SpellSlot.W); { if (hero != null && W.IsReady()) { W.Cast(); } } } if (player.BaseSkinName == "Yasuo") { W = new Spell.SimpleSkillshot(SpellSlot.W); { if (hero != null && W.IsReady()) { W.Cast((Vector3)player.ServerPosition.Extend(hero.ServerPosition, 5)); } } } if (player.BaseSkinName == "Nocturne") { E = new Spell.Active(SpellSlot.E); { if (hero != null && E.IsReady()) { E.Cast(); } } } } #endregion #region Hooks foreach (var hook in Hooks.Where(hook => args.Data.MissileName == hook)) { if (player.BaseSkinName == "Zyra") { W = new Spell.SimpleSkillshot(SpellSlot.W); E = new Spell.SimpleSkillshot(SpellSlot.E); { if (hero != null && W.IsReady() && E.IsReady()) { W.Cast((Vector3)player.ServerPosition.Extend(hero.ServerPosition, 80)); E.Cast((Vector3)player.ServerPosition.Extend(hero.ServerPosition, 80)); } } } if (player.BaseSkinName == "Sivir") { E = new Spell.Active(SpellSlot.E); { if (hero != null && E.IsReady()) { E.Cast(); } } } if (player.BaseSkinName == "Anivia") { W = new Spell.SimpleSkillshot(SpellSlot.W); { if (hero != null && W.IsReady()) { Core.DelayAction(() => W.Cast((Vector3)player.ServerPosition.Extend(hero.ServerPosition, 50)), (int)player.Distance(hero) / 2); } } } if (player.BaseSkinName == "Heimerdinger") { Q = new Spell.SimpleSkillshot(SpellSlot.Q); { if (hero != null && Q.IsReady()) { Q.Cast((Vector3)player.ServerPosition.Extend(hero.ServerPosition, 80)); } } } if (player.BaseSkinName == "Leblanc") { R = new Spell.Active(SpellSlot.R); R1 = new Spell.SimpleSkillshot(SpellSlot.R); { if (hero != null && R.IsReady()) { if (player.Spellbook.Spells[3].Name == "LeblancR") { R.Cast(); R1.Cast((Vector3)player.ServerPosition.Extend(hero.ServerPosition, 80)); } else { R1.Cast((Vector3)player.ServerPosition.Extend(hero.ServerPosition, 50)); } } } } if (player.BaseSkinName == "Shaco") { W = new Spell.SimpleSkillshot(SpellSlot.W); { if (hero != null && W.IsReady()) { W.Cast((Vector3)player.ServerPosition.Extend(hero.ServerPosition, 80)); } } } if (player.BaseSkinName == "Fiora") { W = new Spell.SimpleSkillshot(SpellSlot.W); { if (hero != null && W.IsReady()) { W.Cast(hero.ServerPosition); } } } if (player.BaseSkinName == "Fizz") { E = new Spell.Active(SpellSlot.E); { if (hero != null && E.IsReady() && E.ToggleState != 1) { E.Cast(); } } } if (player.BaseSkinName == "Malzahar") { W = new Spell.SimpleSkillshot(SpellSlot.W); { if (hero != null && W.IsReady()) { W.Cast((Vector3)player.ServerPosition.Extend(hero.ServerPosition, 80)); } } } if (player.BaseSkinName == "Trundle") { E = new Spell.SimpleSkillshot(SpellSlot.E, 1000); { if (hero != null && E.IsReady()) { Core.DelayAction(() => E.Cast((Vector3)player.ServerPosition.Extend(hero.ServerPosition, 50)), (int)player.Distance(hero) / 2); } } } if (player.BaseSkinName == "MonkeyKing") { W = new Spell.Active(SpellSlot.W); { if (hero != null && W.IsReady()) { W.Cast(); } } } if (player.BaseSkinName == "Yasuo") { W = new Spell.SimpleSkillshot(SpellSlot.W); { if (hero != null && W.IsReady()) { W.Cast((Vector3)player.ServerPosition.Extend(hero.ServerPosition, 5)); } } } if (player.BaseSkinName == "Nocturne") { E = new Spell.Active(SpellSlot.E); { if (hero != null && E.IsReady()) { E.Cast(); } } } } #endregion }