private void OnDraw(EventArgs args) { if (DisableDrawings) { return; } if (DrawEvadePoint && CurrentEvadeResult != null) { if (CurrentEvadeResult.IsValid && CurrentEvadeResult.EnoughTime && !CurrentEvadeResult.Expired()) { var color = !CurrentEvadeResult.IsForced ? new ColorBGRA(255, 255, 255, 255) : new ColorBGRA(255, 165, 0, 255); foreach (var dot in GetPathDots(CurrentEvadeResult.WalkPoint.To2D(), Player.Instance.Position.To2D(), 10, 25)) { new Circle(color, 10, 2, true).Draw(dot.To3D()); } } } if (DrawEvadeStatus) { StatusText.Color = EvadeEnabled ? Color.White : Color.Red; if (DodgeDangerousOnly) { StatusText.Color = Color.Orange; } StatusText.TextValue = "MoonWalkEvade " + (EvadeEnabled ? "Enabled" : "Disabled"); StatusText.Position = Player.Instance.Position.WorldToScreen() - new Vector2(StatusText.Bounding.Width / 2f, -25); StatusText.Draw(); } /*Check spell block paradoxon*/ for (int i = 0; i < 4; i++) { var slot = (SpellSlot)i; var evadeSpell = EvadeMenu.MenuEvadeSpells.FirstOrDefault(spell => spell.Slot == slot); if (EvadeMenu.SpellBlockerMenu["block" + Player.Instance.ChampionName + "/" + slot].Cast <CheckBox>().CurrentValue && EvadeMenu.IsEvadeSkillhotEnabled(evadeSpell)) { WarnText.Color = Color.Red; WarnText.TextValue = "Evade spell '" + evadeSpell.SpellName + "' is checked in SpellBlocker!"; WarnText.Position = Player.Instance.Position.WorldToScreen() - new Vector2(WarnText.Bounding.Width / 2f, -50); WarnText.Draw(); } } //if (EvadeMenu.DebugMenu["debugMode"].Cast<KeyBind>().CurrentValue) // foreach (var evadePoint in GetEvadePoints(null, 900, 50)) // { // Circle.Draw(new ColorBGRA(0, 255, 0, 255), Player.Instance.BoundingRadius, 2, evadePoint.To3D()); // } }
private void OnDraw(EventArgs args) { if (EvadeMenu.DrawMenu["disableAllDrawings"].Cast <CheckBox>().CurrentValue || !EvadeMenu.DrawMenu["drawSkillshots"].Cast <CheckBox>().CurrentValue) { return; } foreach (var c in DetectedSkillshots) { if (EvadeMenu.IsSkillshotDrawingEnabled(c)) { c.OnDraw(); } } }
public void AddSkillshot(EvadeSkillshot skillshot, bool isProcessSpell = false, bool triggerEvent = true) { if (LimitDetectionRange && !skillshot.OwnSpellData.IsGlobal && skillshot.GetCurrentPosition().Distance(Player.Instance, true) > (2 * skillshot.OwnSpellData.Range).Pow()) { return; } if (SkillshotActivationDelay <= 10) { skillshot.IsActive = true; } DetectedSkillshots.Add(skillshot); if (triggerEvent && EvadeMenu.IsSkillshotEnabled(skillshot)) { OnSkillshotDetected?.Invoke(skillshot, isProcessSpell); OnUpdateSkillshots?.Invoke(skillshot, false, isProcessSpell); } }
private static void MyEvadeMenu() { EvadeMenu = _myMenu.AddSubMenu("Evade Settings", "EvadeSettings"); EvadeMenu.AddGroupLabel("Q/W Evade Option"); foreach (AIHeroClient hero in EntityManager.Heroes.Enemies) { EvadeMenu.AddGroupLabel(hero.BaseSkinName); { foreach (SpellDataInst spell in hero.Spellbook.Spells) { if (DodgeSpells.Any(el => el == spell.SData.Name)) { EvadeMenu.Add(spell.Name, new Slider(hero.BaseSkinName + " : " + spell.Slot.ToString() + " : " + spell.Name, 3, 0, 3)); EvadeMenu.AddLabel(spell.Name); } } } EvadeMenu.AddSeparator(); } }
private static void EvadeMenuPage() { EvadeMenu = _myMenu.AddSubMenu("Evade Menu", "EvadeMenu"); EvadeMenu.AddGroupLabel("Use Auto W:"); foreach (var enemy in EntityManager.Heroes.Enemies.Where(a => a.Team != Player.Instance.Team)) { foreach ( var spell in enemy.Spellbook.Spells.Where( a => a.Slot == SpellSlot.Q || a.Slot == SpellSlot.W || a.Slot == SpellSlot.E || a.Slot == SpellSlot.R)) { if (spell.Slot == SpellSlot.Q) { EvadeMenu.Add(spell.SData.Name, new CheckBox(enemy.ChampionName + " - Q - " + spell.Name, false)); } else if (spell.Slot == SpellSlot.W) { EvadeMenu.Add(spell.SData.Name, new CheckBox(enemy.ChampionName + " - W - " + spell.Name, false)); } else if (spell.Slot == SpellSlot.E) { EvadeMenu.Add(spell.SData.Name, new CheckBox(enemy.ChampionName + " - E - " + spell.Name, false)); } else if (spell.Slot == SpellSlot.R) { EvadeMenu.Add(spell.SData.Name, new CheckBox(enemy.ChampionName + " - R - " + spell.Name, false)); } } } }
public static void UpdateTask() { if (Program.Evade == null) { return; } if (_resetWall - Environment.TickCount > 3400 && Wall != null) { var level = Player.GetSpell(SpellSlot.W).Level; var wallWidth = (300 + 50 * level); var wallDirection = (Wall.Position.To2D() - YasuoWallCastedPos).Normalized().Perpendicular(); var wallStart = Wall.Position.To2D() + wallWidth / 2 * wallDirection; var wallEnd = wallStart - wallWidth * wallDirection; WallPolygon = new Geometry.Polygon.Rectangle(wallStart, wallEnd, 75); } if (_resetWall < Environment.TickCount) { Wall = null; WallPolygon = null; } if (Wall != null && YasuoWallCastedPos.IsValid() && WallPolygon != null) { foreach (var activeSkillshot in Program.Evade.SkillshotDetector.ActiveSkillshots.Where(EvadeMenu.IsSkillshotW)) { if (WallPolygon.IsInside(activeSkillshot.GetPosition())) { activeSkillshot.IsValid = false; } } } Program.Evade.CacheSkillshots(); if (Program.Evade.IsHeroInDanger(Player.Instance)) { if (Yasuo.FleeMenu["Evade.W"].Cast <CheckBox>().CurrentValue&& Player.GetSpell(SpellSlot.W).State == SpellState.Ready) { foreach (var activeSkillshot in Program.Evade.SkillshotDetector.ActiveSkillshots.Where(a => EvadeMenu.IsSkillshotW(a) && Environment.TickCount - a.TimeDetected >= Yasuo.FleeMenu["Evade.WDelay"].Cast <Slider>().CurrentValue)) { if (activeSkillshot.ToPolygon().IsInside(Player.Instance)) { Player.CastSpell(SpellSlot.W, activeSkillshot.GetPosition()); WDelay = Environment.TickCount + 500; return; } } } if (WDelay > Environment.TickCount) { return; } var poly = Program.Evade.CustomPoly(); if (Yasuo.FleeMenu["Evade.E"].Cast <CheckBox>().CurrentValue&& Player.GetSpell(SpellSlot.E).State == SpellState.Ready) { foreach ( var source in EntityManager.MinionsAndMonsters.EnemyMinions.Where( a => a.Team != Player.Instance.Team && a.Distance(Player.Instance) < 475 && a.CanDash())) { if (source.GetDashPos().IsUnderTower()) { continue; } if (Program.Evade.IsPointSafe(poly, source.GetDashPos().To2D())) { int count = 0; for (int i = 0; i < 10; i += 47) { if (!Program.Evade.IsPointSafe(poly, Player.Instance.Position.Extend(source.GetDashPos(), i))) { count++; } } if (count > 3) { continue; } Player.CastSpell(SpellSlot.E, source); break; } } foreach ( var source in EntityManager.Heroes.Enemies.Where( a => a.IsEnemy && a.Distance(Player.Instance) < 475 && a.CanDash())) { if (source.GetDashPos().IsUnderTower()) { continue; } if (Program.Evade.IsPointSafe(poly, source.GetDashPos().To2D())) { int count = 0; for (int i = 0; i < 10; i += 47) { if (!Program.Evade.IsPointSafe(poly, Player.Instance.Position.Extend(source.GetDashPos(), i))) { count++; } } if (count > 3) { continue; } Player.CastSpell(SpellSlot.E, source); break; } } } } }
private static void Evademenu() { EvadeMenu = HMenu.AddSubMenu("躲避", "asddsf"); EvadeMenu.AddGroupLabel("躲避"); EvadeMenu.AddGroupLabel("啥都没 :("); }
private static void Evademenu() { EvadeMenu = HMenu.AddSubMenu("Evade", "asddsf"); EvadeMenu.AddGroupLabel("Evade"); EvadeMenu.AddGroupLabel("Nothing here yet :("); }
public static void UpdateTask() { Program.Evade.CacheSkillshots(); GameObject wall = null; foreach (var gameObject in ObjectManager.Get <GameObject>()) { if (gameObject.IsValid && System.Text.RegularExpressions.Regex.IsMatch( gameObject.Name, "_w_windwall.\\.troy", System.Text.RegularExpressions.RegexOptions.IgnoreCase)) { wall = gameObject; } } if (wall != null) { var level = wall.Name.Substring(wall.Name.Length - 6, 1); var wallWidth = (300 + 50 * Convert.ToInt32(level)); var wallDirection = (wall.Position.To2D() - YasuoWallCastedPos).Normalized().Perpendicular(); var wallStart = wall.Position.To2D() + wallWidth / 2 * wallDirection; var wallEnd = wallStart - wallWidth * wallDirection; var wallPolygon = new Geometry.Polygon.Rectangle(wallStart, wallEnd, 75); foreach (var activeSkillshot in EvadePlus.Program.Evade.SkillshotDetector.ActiveSkillshots.Where(a => (a is LinearMissileSkillshot) && EvadeMenu.IsSkillshotW(a))) { if (wallPolygon.IsInside(activeSkillshot.GetPosition())) { activeSkillshot.IsValid = false; } } } Program.Evade.CacheSkillshots(); if (Program.Evade.IsHeroInDanger(Player.Instance)) { if (Yasuo.FleeMenu["Evade.W"].Cast <CheckBox>().CurrentValue&& Player.GetSpell(SpellSlot.W).State == SpellState.Ready) { foreach (var activeSkillshot in EvadePlus.Program.Evade.SkillshotDetector.ActiveSkillshots.Where(a => a is LinearMissileSkillshot && EvadePlus.EvadeMenu.IsSkillshotW(a))) { if (activeSkillshot.ToPolygon().IsInside(Player.Instance)) { Player.CastSpell(SpellSlot.W, activeSkillshot.GetPosition()); WDelay = Environment.TickCount + 500; return; } } } if (WDelay > Environment.TickCount) { return; } if (Yasuo.FleeMenu["Evade.E"].Cast <CheckBox>().CurrentValue&& Player.GetSpell(SpellSlot.E).State == SpellState.Ready) { foreach ( var source in EntityManager.MinionsAndMonsters.EnemyMinions.Where( a => a.Team != Player.Instance.Team && a.Distance(Player.Instance) < 475 && a.CanDash())) { if (source.GetDashPos().IsUnderTower()) { continue; } if (EvadePlus.Program.Evade.IsPointSafe(source.GetDashPos().To2D())) { int count = 0; for (int i = 0; i < 10; i += 47) { if (!EvadePlus.Program.Evade.IsPointSafe(Player.Instance.Position.Extend(source.GetDashPos(), i))) { count++; } } if (count > 3) { continue; } Player.CastSpell(SpellSlot.E, source); break; } } foreach ( var source in EntityManager.Heroes.Enemies.Where( a => a.IsEnemy && a.Distance(Player.Instance) < 475 && a.CanDash())) { if (source.GetDashPos().IsUnderTower()) { continue; } if (EvadePlus.Program.Evade.IsPointSafe(source.GetDashPos().To2D())) { int count = 0; for (int i = 0; i < 10; i += 47) { if (!EvadePlus.Program.Evade.IsPointSafe(Player.Instance.Position.Extend(source.GetDashPos(), i))) { count++; } } if (count > 3) { continue; } Player.CastSpell(SpellSlot.E, source); break; } } } } }