public static void Interceptiontest(Obj_AI_Hero Enemy, float delay, float Range, float varRange) { Geometry.Polygon.Circle Qspellpoly = new Geometry.Polygon.Circle(LastQCastpos, Q.Width); Qspellpoly.Draw(System.Drawing.Color.Khaki); Paths subjs = new Paths(); foreach (var Waypoint in WPPolygon(Enemy, delay).ToPolygons()) { subjs.Add(Waypoint.ToClipperPath()); } Paths clips = new Paths(1); clips.Add(Qspellpoly.ToClipperPath()); Paths solution = new Paths(); Clipper c = new Clipper(); c.AddPaths(subjs, PolyType.ptSubject, true); c.AddPaths(clips, PolyType.ptClip, true); c.Execute(ClipType.ctIntersection, solution); foreach (var bli in solution.ToPolygons()) { bli.Draw(System.Drawing.Color.Blue); } }
public static void Interceptiontest(AIHeroClient Enemy, float delay, float Range) { Geometry.Polygon.Circle Qspellpoly = new Geometry.Polygon.Circle(PreCastPos(Enemy, Range, delay), 130f); Qspellpoly.Draw(System.Drawing.Color.Khaki); Paths subjs = new Paths(); foreach (var bla in WPPolygon(Enemy, delay).ToPolygons()) { subjs.Add(bla.ToClipperPath()); } Paths clips = new Paths(1); clips.Add(Qspellpoly.ToClipperPath()); Paths solution = new Paths(); Clipper c = new Clipper(); c.AddPaths(subjs, PolyType.ptSubject, true); c.AddPaths(clips, PolyType.ptClip, true); c.Execute(ClipType.ctIntersection, solution); foreach (var bli in solution.ToPolygons()) { bli.Draw(System.Drawing.Color.Blue); } }
private static int GetWHits(Obj_AI_Base target, List <Obj_AI_Base> targets = null) { if (targets != null && ComboMode == ComboMode.Mode2xW) { targets = targets.Where(t => t.IsValidTarget((W.Range + W.Width))).ToList(); var pred = W.GetPrediction(target); if (pred.Hitchance >= HitChance.Medium) { var circle = new Geometry.Polygon.Circle(pred.UnitPosition, target.BoundingRadius + W.Width); circle.Draw(System.Drawing.Color.Aqua, 5); return(1 + (from t in targets.Where(x => x.NetworkId != target.NetworkId) let pred2 = W.GetPrediction(t) where pred2.Hitchance >= HitChance.Medium select new Geometry.Polygon.Circle(pred2.UnitPosition, t.BoundingRadius * 0.9f)).Count( circle2 => circle2.Points.Any(p => circle.IsInside(p)))); } } if (W.IsInRange(target)) { return(1); } return(0); }
private static void OnDraw(EventArgs args) { if (CurrentTarget != null && Config.Drawings.CurrentTarget) { var polygon = new Geometry.Polygon.Circle(CurrentTarget.Position, CurrentTarget.BoundingRadius); polygon.Draw(Color.DeepPink, 3); } }
public void DrawSimplePolygon() { for (int i = -30; i <= 30; i += 10) { var rotatedDirection = Direction.Rotated(i * (float)Math.PI / 180); var c = new Geometry.Polygon.Circle(StartPosition + rotatedDirection.To3D() * distance, OwnSpellData.Radius); c.Draw(Color.White); } }
private static void OnDraw(EventArgs args) { if (DrawingsMenu["DrawQHitBox"].Cast <CheckBox>().CurrentValue) { AIHeroClient target = TargetSelector.GetTarget(Q.Range, DamageType.Magical, Player.Instance.Position); //var qpred = Prediction.Manager.GetPrediction(QDATA); if (Q.IsReady() && target != null) { var qpred = Q.GetPrediction(target); Geometry.Polygon.Rectangle prediction2 = new Geometry.Polygon.Rectangle( Player.Instance.Position.To2D(), qpred.CastPosition.To2D(), Q.Width); prediction2.Draw(Color.Color.Yellow, 1); } } if (DrawingsMenu["DrawWHitBox"].Cast <CheckBox>().CurrentValue) { AIHeroClient target = TargetSelector.GetTarget(W.Range, DamageType.Magical, Player.Instance.Position); //var qpred = Prediction.Manager.GetPrediction(QDATA); if (W.IsReady() && target != null) { Geometry.Polygon.Circle prediction2 = new Geometry.Polygon.Circle(Player.Instance.Position, W.Range); prediction2.Draw(Color.Color.Green, 1); } } if (DrawingsMenu["DrawEHitBox"].Cast <CheckBox>().CurrentValue) { AIHeroClient target = TargetSelector.GetTarget(E.Range, DamageType.Magical, Player.Instance.Position); //var qpred = Prediction.Manager.GetPrediction(QDATA); if (E.IsReady() && target != null) { var epred = E.GetPrediction(target); Geometry.Polygon.Rectangle prediction2 = new Geometry.Polygon.Rectangle( Player.Instance.Position.To2D(), epred.CastPosition.To2D(), E.Width); prediction2.Draw(Color.Color.Orange, 1); } } if (DrawingsMenu["DrawRHitBox"].Cast <CheckBox>().CurrentValue) { AIHeroClient target = TargetSelector.GetTarget(R.Range, DamageType.Magical, Player.Instance.Position); //var qpred = Prediction.Manager.GetPrediction(QDATA); if (IsCastingUlt && target != null) { Geometry.Polygon.Circle prediction2 = new Geometry.Polygon.Circle(Player.Instance.Position, R.Range); prediction2.Draw(Color.Color.Red, 1); } } }
private static void OnDraw(EventArgs args) { if (Config.IsChecked(MenuBuilder.MenuNames.Drawing, "draw.Q.range")) { var circle = new Geometry.Polygon.Circle(ObjectManager.Player.Position, Q.Range, 50); circle.Draw(Q.IsReady() ? Color.Green : Color.Brown); } if (Config.IsChecked(MenuBuilder.MenuNames.Drawing, "draw.Q.prediction")) { var target = TargetSelector.GetTarget(ObjectManager.Get <AIHeroClient>().Where(u => u.IsEnemy && !u.IsDead && u.IsValidTarget(Q.Range) && !Config.IsChecked(MenuBuilder.MenuNames.BlackList, u.ChampionName)), DamageType.Magical); if (target != null) { var pred = Q.GetProdiction(target); var rect = new Geometry.Polygon.Rectangle(ObjectManager.Player.Position, pred.CastPosition, Q.Width); rect.Draw((pred.Hitchance >= HitChance.High && Q.IsReady()) ? Color.Blue : Color.Brown); Drawing.DrawText(pred.CastPosition.WorldToScreen(), Color.Wheat, pred.Hitchance.ToString(), 2); } } }
private static void OnDraw(EventArgs args) { if (Config.IsChecked(MenuBuilder.MenuNames.Drawing, "draw.Q.range")) { var circle = new Geometry.Polygon.Circle(ObjectManager.Player.Position, Q.Range, 50); circle.Draw(Q.IsReady() ? Color.Green : Color.Brown); } if (Config.IsChecked(MenuBuilder.MenuNames.Drawing, "draw.Q.prediction")) { var target = ObjectManager.Get <Obj_AI_Base>() .Where(u => u.IsValidTarget(Q.Range) && !u.IsDead && !u.IsAlly && u.Type == GameObjectType.AIHeroClient) .OrderBy(u => u.Distance(ObjectManager.Player)) .FirstOrDefault(); if (target != null) { var rect = new Geometry.Polygon.Rectangle(ObjectManager.Player.Position, ObjectManager.Player.Position.V3E(target.Position, Q.Range), 50); rect.Draw(Q.IsReady() ? Color.Blue : Color.Brown); } } }
private static void OnDraw(EventArgs args) { var drawq = GetBool("displayQrange", typeof(bool)); var draww = GetBool("displayWrange", typeof(bool)); var drawe = GetBool("displayErange", typeof(bool)); var drawr = GetBool("displayRrange", typeof(bool)); var draw = GetBool("displayrange", typeof(bool)); if (!draw) { return; } if (Cage != null && newCircle != null) { newCircle.Draw(Color.Blue); } if (drawq) { Render.Circle.DrawCircle(Player.Position, R.Range, Color.Magenta); } if (draww) { Render.Circle.DrawCircle(Player.Position, W.Range, Color.Aqua); } if (drawe) { Render.Circle.DrawCircle(Player.Position, E.Range, Color.Brown); } if (drawr) { Render.Circle.DrawCircle(Player.Position, R.Range, Color.Red); } }
private void DravenOnDraw(EventArgs args) { if (Utilities.Enabled("draw.catch.modes")) { switch (Initializer.Config.Item("catch.logic", true).GetValue <StringList>().SelectedIndex) { case 0: //Sector var sectorpoly = new Geometry.Polygon.Sector( ObjectManager.Player.Position.To2D(), Game.CursorPos.To2D(), 100 * (float)Math.PI / 180, Utilities.Slider("catch.radius")); sectorpoly.Draw(Color.Gold); break; case 1: // Circle var circlepoly = new Geometry.Polygon.Circle(ObjectManager.Player.Position.Extend(Game.CursorPos, Utilities.Slider("catch.radius")), Utilities.Slider("catch.radius")); circlepoly.Draw(Color.Gold); break; } } if (Utilities.Enabled("draw.axe.positions")) { foreach (var axe in AxeSpots) { if (CatchableAxes(axe)) { Render.Circle.DrawCircle(axe.Object.Position, 100, Color.GreenYellow); Drawing.DrawText(Drawing.WorldToScreen(axe.Object.Position).X - 40, Drawing.WorldToScreen(axe.Object.Position).Y, Color.Gold, (((float)(axe.EndTick - Environment.TickCount))) + " ms"); } } } }
//complete private static void Drawing_OnDraw(EventArgs args) { if (Yasuo.IsDead) return; System.Drawing.Color drawColor = System.Drawing.Color.Blue; if (MenuHandler.GetCheckboxValue(MenuHandler.Drawing, "Draw Q") && !Yasuo.HasBuff("YasuoQ3W") && Q.IsLearned) Q.DrawRange(drawColor); if (MenuHandler.GetCheckboxValue(MenuHandler.Drawing, "Draw Q") && Yasuo.HasBuff("YasuoQ3W") && Q.IsLearned) Q3.DrawRange(drawColor); if (MenuHandler.GetCheckboxValue(MenuHandler.Drawing, "Draw W") && W.IsLearned) W.DrawRange(drawColor); if (MenuHandler.GetCheckboxValue(MenuHandler.Drawing, "Draw E") && E.IsLearned) E.DrawRange(drawColor); if (MenuHandler.GetCheckboxValue(MenuHandler.Drawing, "Draw EQ") && E.IsLearned && Q.IsLearned) EQ.DrawRange(drawColor); if (MenuHandler.GetCheckboxValue(MenuHandler.Drawing, "Draw R") && R.IsLearned) R.DrawRange(drawColor); if (MenuHandler.GetCheckboxValue(MenuHandler.Drawing, "Draw Beyblade") && R.IsLearned && Flash != null && E.IsLearned && Q.IsLearned) Drawing.DrawCircle(Yasuo.Position, E.Range + Flash.Range + (EQ.Range / 2), System.Drawing.Color.Red); if (MenuHandler.GetCheckboxValue(MenuHandler.Drawing, "Draw Turret Range")) foreach (Obj_AI_Turret turret in EntityManager.Turrets.Enemies.Where(a => !a.IsDead)) turret.DrawCircle((int)turret.GetAutoAttackRange() + 35, drawColor); Obj_AI_Base hoverObject = EntityManager.Enemies.Where(a => !a.IsDead && a.IsTargetable && a.IsInRange(Yasuo, E.Range) && a.Distance(Game.CursorPos) <= 75).OrderBy(a => a.Distance(Game.CursorPos)).FirstOrDefault(); if (hoverObject != null) { if (MenuHandler.GetCheckboxValue(MenuHandler.Drawing, "Draw EQ on Target")) Drawing.DrawCircle(YasuoCalcs.GetDashingEnd(hoverObject), EQ.Range, drawColor); if (MenuHandler.GetCheckboxValue(MenuHandler.Drawing, "Draw E End Position on Target")) Drawing.DrawLine(Yasuo.Position.WorldToScreen(), YasuoCalcs.GetDashingEnd(hoverObject).WorldToScreen(), 3, drawColor); if (MenuHandler.GetCheckboxValue(MenuHandler.Drawing, "Draw E End Position on Target - Detailed")) { Vector3 startPos = Yasuo.Position, dashEndPos = YasuoCalcs.GetDashingEnd(hoverObject), fakeEndPos = startPos.To2D().Extend(dashEndPos.To2D(), 1000).To3D() + new Vector3(0, 0, startPos.Z), slope = new Vector3(dashEndPos.X - startPos.X, dashEndPos.Y - startPos.Y, 0), fakeSlope = new Vector3(fakeEndPos.X - startPos.X, fakeEndPos.Y - startPos.Y, 0); List<Vector3> pointsAlongPath = new List<Vector3>(); List<Vector3> straightLinePath = new List<Vector3>(); int points = 100; pointsAlongPath.Add(startPos); //get all points in a line from start to fake end for(int i = 0; i < points; i++) straightLinePath.Add(startPos + (i * (fakeSlope / points))); bool isWall = false; //get all wall start and end positions for (int i = 0; i < points; i++) { //wall start if (!isWall && straightLinePath[i].IsWall()) { pointsAlongPath.Add(straightLinePath[i]); isWall = true; } //wall end if (isWall && !straightLinePath[i].IsWall()) { pointsAlongPath.Add(straightLinePath[i]); isWall = false; } } pointsAlongPath.Add(fakeEndPos); for(int i = 0; i < pointsAlongPath.Count() - 1; i++) { System.Drawing.Color color = (pointsAlongPath[i].IsWall()) ? System.Drawing.Color.Red : System.Drawing.Color.Green; Drawing.DrawLine(pointsAlongPath[i].WorldToScreen(), pointsAlongPath[i + 1].WorldToScreen(), 2, color); } Vector3 closestWall = pointsAlongPath.Where(a => a.IsWall()).OrderBy(a => a.Distance(dashEndPos)).FirstOrDefault(), closestWallsEndPosition = (pointsAlongPath.IndexOf(closestWall) + 1 == pointsAlongPath.Count) ? Vector3.Zero : pointsAlongPath[pointsAlongPath.IndexOf(closestWall) + 1]; Drawing.DrawText(closestWall.WorldToScreen(), drawColor, "start", 15); Drawing.DrawText(closestWallsEndPosition.WorldToScreen(), drawColor, "end", 15); Drawing.DrawText(((closestWall + closestWallsEndPosition) / 2).WorldToScreen(), drawColor, closestWall.Distance(closestWallsEndPosition).ToString(), 15); Drawing.DrawText(dashEndPos.WorldToScreen(), drawColor, startPos.Distance(closestWallsEndPosition).ToString(), 15); //none of the points are a wall so the end point is the dash position if (!pointsAlongPath.Any(a => a.IsWall())) Drawing.DrawCircle(dashEndPos, 50, drawColor); // OR none of the walls are in the E range else if (pointsAlongPath.Where(a => a.IsWall()).OrderBy(a => a.Distance(startPos)).FirstOrDefault() != null && pointsAlongPath.Where(a => a.IsWall()).OrderBy(a => a.Distance(startPos)).FirstOrDefault().Distance(startPos) > E.Range) Drawing.DrawCircle(dashEndPos, 50, drawColor); //or the dashing end is not a wall else if (!dashEndPos.IsWall()) Drawing.DrawCircle(dashEndPos, 50, drawColor); //find the nearest wall to the dash position else if (closestWall != Vector3.Zero && closestWallsEndPosition != Vector3.Zero && closestWall != null && closestWallsEndPosition != null && closestWallsEndPosition.Distance(dashEndPos) < closestWall.Distance(dashEndPos) && startPos.Distance(closestWallsEndPosition) <= 630) Drawing.DrawCircle(closestWallsEndPosition, 50, drawColor); //the end position is the first wall else Drawing.DrawCircle(pointsAlongPath.First(a => a.IsWall()), 50, drawColor); } } if (MenuHandler.GetCheckboxValue(MenuHandler.Drawing, "Draw Wall Dashes") && E.IsLearned) foreach (WallDash wd in YasuoWallDashDatabase.wallDashDatabase.Where(a=>a.startPosition.Distance(Yasuo) <= 1300)) if (EntityManager.MinionsAndMonsters.Combined.Where(a => a.MeetsCriteria() && a.Name == wd.unitName && a.ServerPosition.Distance(wd.dashUnitPosition) <= 2).FirstOrDefault() != null) { wd.startPosition.DrawArrow(wd.endPosition, System.Drawing.Color.Red, 1); Geometry.Polygon.Circle dashCircle = new Geometry.Polygon.Circle(wd.endPosition, 120); dashCircle.Draw(System.Drawing.Color.Red, 1); } }
//complete private static void Drawing_OnDraw(EventArgs args) { if (Yasuo.IsDead) { return; } Menu menu = MenuHandler.Drawing; System.Drawing.Color drawColor = System.Drawing.Color.Blue; //Drawing.DrawText(Yasuo.Position.WorldToScreen(), drawColor, Animation, 15); //Vector3 yasuoQStartPos = Yasuo.Position + new Vector3(0, 0, 150f), // yasuoQEndPos = yasuoQStartPos.To2D().Extend(Game.CursorPos, Q.Range).To3D((int)yasuoQStartPos.Z - 75); //yasuoQStartPos.DrawArrow(yasuoQEndPos, drawColor); //Drawing.DrawLine(yasuoQStartPos.WorldToScreen(), yasuoQEndPos.WorldToScreen(), 5, drawColor); if (menu.GetCheckboxValue("Draw Q") && !Yasuo.HasBuff("YasuoQ3W") && Q.IsLearned) { //Drawing.DrawCircle(yasuoQStartPos, Q.Range, drawColor); Q.DrawRange(drawColor); } if (menu.GetCheckboxValue("Draw Q") && Yasuo.HasBuff("YasuoQ3W") && Q.IsLearned) { Q3.DrawRange(drawColor); } if (menu.GetCheckboxValue("Draw W") && W.IsLearned) { W.DrawRange(drawColor); } if (menu.GetCheckboxValue("Draw E") && E.IsLearned) { E.DrawRange(drawColor); } if (menu.GetCheckboxValue("Draw EQ") && E.IsLearned && Q.IsLearned) { EQ.DrawRange(drawColor); } if (menu.GetCheckboxValue("Draw R") && R.IsLearned) { R.DrawRange(drawColor); } if (menu.GetCheckboxValue("Draw Beyblade") && R.IsLearned && Flash != null && E.IsLearned && Q.IsLearned) { Drawing.DrawCircle(Yasuo.Position, E.Range + Flash.Range + (EQ.Range / 2), System.Drawing.Color.Red); } if (menu.GetCheckboxValue("Draw Turret Range")) { foreach (Obj_AI_Turret turret in EntityManager.Turrets.Enemies.Where(a => !a.IsDead && a.VisibleOnScreen)) { turret.DrawCircle((int)turret.GetAutoAttackRange() + 35, drawColor); } } Obj_AI_Base hoverObject = EntityManager.Enemies.Where(a => !a.IsDead && a.IsTargetable && a.IsInRange(Yasuo, E.Range) && a.Distance(Game.CursorPos) <= 75).OrderBy(a => a.Distance(Game.CursorPos)).FirstOrDefault(); if (hoverObject != null) { if (menu.GetCheckboxValue("Draw EQ on Target")) { Drawing.DrawCircle(YasuoCalcs.GetDashingEnd(hoverObject), EQ.Range, drawColor); } if (menu.GetCheckboxValue("Draw E End Position on Target")) { Drawing.DrawLine(Yasuo.Position.WorldToScreen(), YasuoCalcs.GetDashingEnd(hoverObject).WorldToScreen(), 3, drawColor); } if (menu.GetCheckboxValue("Draw E End Position on Target - Detailed")) { Vector3 startPos = Yasuo.Position, dashEndPos = YasuoCalcs.GetDashingEnd(hoverObject), fakeEndPos = startPos.To2D().Extend(dashEndPos.To2D(), 1000).To3D() + new Vector3(0, 0, startPos.Z), slope = new Vector3(dashEndPos.X - startPos.X, dashEndPos.Y - startPos.Y, 0), fakeSlope = new Vector3(fakeEndPos.X - startPos.X, fakeEndPos.Y - startPos.Y, 0); List <Vector3> pointsAlongPath = new List <Vector3>(); List <Vector3> straightLinePath = new List <Vector3>(); int points = 100; pointsAlongPath.Add(startPos); //get all points in a line from start to fake end for (int i = 0; i < points; i++) { straightLinePath.Add(startPos + (i * (fakeSlope / points))); } bool isWall = false; //get all wall start and end positions for (int i = 0; i < points; i++) { //wall start if (!isWall && straightLinePath[i].IsWall()) { pointsAlongPath.Add(straightLinePath[i]); isWall = true; } //wall end if (isWall && !straightLinePath[i].IsWall()) { pointsAlongPath.Add(straightLinePath[i]); isWall = false; } } pointsAlongPath.Add(fakeEndPos); for (int i = 0; i < pointsAlongPath.Count() - 1; i++) { System.Drawing.Color color = (pointsAlongPath[i].IsWall()) ? System.Drawing.Color.Red : System.Drawing.Color.Green; Drawing.DrawLine(pointsAlongPath[i].WorldToScreen(), pointsAlongPath[i + 1].WorldToScreen(), 2, color); } Vector3 closestWall = pointsAlongPath.Where(a => a.IsWall()).OrderBy(a => a.Distance(dashEndPos)).FirstOrDefault(), closestWallsEndPosition = (pointsAlongPath.IndexOf(closestWall) + 1 == pointsAlongPath.Count) ? Vector3.Zero : pointsAlongPath[pointsAlongPath.IndexOf(closestWall) + 1]; Drawing.DrawText(closestWall.WorldToScreen(), drawColor, "start", 15); Drawing.DrawText(closestWallsEndPosition.WorldToScreen(), drawColor, "end", 15); Drawing.DrawText(((closestWall + closestWallsEndPosition) / 2).WorldToScreen(), drawColor, closestWall.Distance(closestWallsEndPosition).ToString(), 15); Drawing.DrawText(dashEndPos.WorldToScreen(), drawColor, startPos.Distance(closestWallsEndPosition).ToString(), 15); //none of the points are a wall so the end point is the dash position if (!pointsAlongPath.Any(a => a.IsWall())) { Drawing.DrawCircle(dashEndPos, 50, drawColor); } // OR none of the walls are in the E range else if (pointsAlongPath.Where(a => a.IsWall()).OrderBy(a => a.Distance(startPos)).FirstOrDefault() != null && pointsAlongPath.Where(a => a.IsWall()).OrderBy(a => a.Distance(startPos)).FirstOrDefault().Distance(startPos) > E.Range) { Drawing.DrawCircle(dashEndPos, 50, drawColor); } //or the dashing end is not a wall else if (!dashEndPos.IsWall()) { Drawing.DrawCircle(dashEndPos, 50, drawColor); } //find the nearest wall to the dash position else if (closestWall != Vector3.Zero && closestWallsEndPosition != Vector3.Zero && closestWall != null && closestWallsEndPosition != null && closestWallsEndPosition.Distance(dashEndPos) < closestWall.Distance(dashEndPos) && startPos.Distance(closestWallsEndPosition) <= 630) { Drawing.DrawCircle(closestWallsEndPosition, 50, drawColor); } //the end position is the first wall else { Drawing.DrawCircle(pointsAlongPath.First(a => a.IsWall()), 50, drawColor); } } } if (menu.GetCheckboxValue("Draw Wall Dashes") && E.IsLearned) { foreach (WallDash wd in YasuoWallDashDatabase.wallDashDatabase.Where(a => a.startPosition.Distance(Yasuo) <= 1300)) { if (EntityManager.MinionsAndMonsters.Combined.Where(a => a.MeetsCriteria() && a.VisibleOnScreen && a.Name == wd.unitName && a.ServerPosition.Distance(wd.dashUnitPosition) <= 2).FirstOrDefault() != null) { wd.startPosition.DrawArrow(wd.endPosition, System.Drawing.Color.Red, 1); Geometry.Polygon.Circle dashCircle = new Geometry.Polygon.Circle(wd.endPosition, 120); dashCircle.Draw(System.Drawing.Color.Red, 1); } } } }