private static void Escape() { if (CheckHandler.BuffedEnemy.IsValidTarget() && CheckHandler.BuffedEnemy.IsValid<Obj_AI_Hero>()) { InitQ = false; return; } if (InitQ) { foreach (Vector3 point in JunglePos) { if (Player.Distance(point) < 100 || CheckHandler.LastQ2 + 2000 < Environment.TickCount) { InitQ = false; } } } _rect = new Geometry.Rectangle( Player.Position.To2D(), Player.Position.To2D().Extend(Game.CursorPos.To2D(), 1050), 100).ToPolygon(); if (CheckHandler.QState && CheckHandler._spells[SpellSlot.Q].IsReady()) { foreach (Vector3 pos in JunglePos.Where(pos => !_rect.IsOutside(pos.To2D()))) { InitQ = true; CheckHandler._spells[SpellSlot.Q].Cast(pos); return; } } else if (CheckHandler._spells[SpellSlot.Q].IsReady() && !CheckHandler.QState) { CheckHandler._spells[SpellSlot.Q].Cast(); InitQ = true; } }
private static void Escape() { Program.Orbwalk(Game.CursorPos); if (BuffedEnemy.IsValidTarget() && BuffedEnemy.IsValid<AIHeroClient>()) { InitQ = false; return; } if (InitQ) { foreach (var point in JunglePos) { if (Player.Distance(point) < 100 || Program.LastQ2 + 2000 < Environment.TickCount) { InitQ = false; } } } rect = new Geometry.Polygon.Rectangle( Player.Position.To2D(), Player.Position.To2D().Extend(Game.CursorPos.To2D(), 1050), 100); if (Program.QState && Program.spells[Program.Spells.Q].IsReady()) { foreach (var pos in JunglePos) { if (rect.IsOutside(pos.To2D())) { continue; } InitQ = true; Program.spells[Program.Spells.Q].Cast(pos); return; } } else if (Program.spells[Program.Spells.Q].IsReady() && !Program.QState) { Program.spells[Program.Spells.Q].Cast(); InitQ = true; } }
public bool IsSafe(Vector2 point) { return(Polygon.IsOutside(point)); }