Esempio n. 1
0
        public override void Drawing_OnDraw(EventArgs args)
        {
            var t = TargetSelector.GetTarget(R.Range, TargetSelector.DamageType.Physical);

            if (t.IsValidTarget())
            {
                var toPolygon = new CommonGeometry.Rectangle(ObjectManager.Player.Position.To2D(), ObjectManager.Player.Position.To2D().Extend(t.Position.To2D(), R.Range), 80).ToPolygon();
                toPolygon.Draw(System.Drawing.Color.Red, 1);
            }

            var enemyCount =
                HeroManager.Enemies.Where(e => e.Distance(ObjectManager.Player) < 1100 && e.IsValidTarget(1100))
                .Count(e => e.NetworkId != t.NetworkId && !e.IsDead && toPolygon.IsInside(e.ServerPosition));


            foreach (var e in HeroManager.Enemies.Where(e => e.IsValidTarget(R.Range * 2)))
            {
                var heropos = Drawing.WorldToScreen(e.Position);
                Drawing.DrawText(heropos.X, heropos.Y, Color.Red, GetRTotalDamage(e).ToString(CultureInfo.InvariantCulture));
            }

            Spell[] spellList = { Q, qExtended, W, E, R };
            foreach (var spell in spellList)
            {
                var menuItem = GetValue <Circle>("Draw" + spell.Slot);
                if (!menuItem.Active || spell.Level < 0 && spell.IsReady())
                {
                    return;
                }

                Render.Circle.DrawCircle(ObjectManager.Player.Position, spell.Range, menuItem.Color);
            }
        }
Esempio n. 2
0
        public override void Drawing_OnDraw(EventArgs args)
        {
            direction = ObjectManager.Player.ServerPosition.Extend(ObjectManager.Player.Direction, -1500);
            //var radian = (float)Math.PI / 180f;
            //var targetPosition = ObjectManager.Player.Position;

            ////new Geometry.Polygon.Sector(targetPosition, direction, 40f * radian, 450f).Draw(Color.Red);
            ////new CommonGeometry.Rectangle(targetPosition.To2D(), direction.To2D(), 50).ToPolygon().Draw(Colo
            var x = ObjectManager.Player.Direction.To2D();

            var toPolygon =
                new CommonGeometry.Rectangle(ObjectManager.Player.Position.To2D(),
                                             ObjectManager.Player.Position.To2D()
                                             .Extend(direction.To2D(), 800), 50).ToPolygon();

            toPolygon.Draw(System.Drawing.Color.Red, 1);



            var t = TargetSelector.GetTarget(R.Range, TargetSelector.DamageType.Physical);

            if (!t.IsValidTarget())
            {
                return;
            }
            var xCol = CollisionObjects(W, ObjectManager.Player, t, new[] { CollisionableObjects.Heroes, CollisionableObjects.YasuoWall });

            Console.WriteLine(xCol.Count.ToString());
            foreach (
                var colminion in
                CollisionObjects(W, ObjectManager.Player, t, new[] { CollisionableObjects.Heroes, CollisionableObjects.YasuoWall }))
            {
                Render.Circle.DrawCircle(colminion.Position, 105f, Color.Yellow);
                Console.WriteLine(colminion.CharData.BaseSkinName);
            }
            return;

            foreach (var buff in ObjectManager.Player.Buffs)
            {
                Console.WriteLine(buff.Name + " : " + buff.Count);
            }
            Console.WriteLine("-------------------");
            return;

            Spell[] spellList = { Q, W, E };
            foreach (var spell in spellList)
            {
                var menuItem = GetValue <Circle>("Draw" + spell.Slot);
                if (menuItem.Active)
                {
                    Render.Circle.DrawCircle(ObjectManager.Player.Position, spell.Range, menuItem.Color);
                }
            }
        }
Esempio n. 3
0
        private static void GetJumpPosition()
        {
            foreach (var t in HeroManager.Enemies.Where(e => e.LSIsValidTarget(2500)))
            {
                var toPolygon = new CommonGeometry.Rectangle(ObjectManager.Player.Position.LSTo2D(),
                                                             ObjectManager.Player.Position.LSTo2D().LSExtend(t.Position.LSTo2D(), t.LSDistance(ObjectManager.Player.Position)),
                                                             E.Range).ToPolygon();
                toPolygon.Draw(System.Drawing.Color.Red, 1);


                //Console.WriteLine(hero.ChampionName);

                for (int j = 20; j < 361; j += 20)
                {
                    Vector2 wcPositive = ObjectManager.Player.Position.LSTo2D() + Vector2.Normalize(t.Position.LSTo2D() - ObjectManager.Player.Position.LSTo2D()).LSRotated(j * (float)Math.PI / 180) * E.Range;
                    if (!wcPositive.LSIsWall() && t.LSDistance(wcPositive) > E.Range)
                    {
                        Render.Circle.DrawCircle(wcPositive.To3D(), 105f, Color.GreenYellow);
                    }
                    //if (!wcPositive.LSIsWall())
                    //{
                    //    ListWJumpPositions.Add(wcPositive);
                    //}

                    //Vector2 wcNegative = ObjectManager.Player.Position.LSTo2D() +
                    //                     Vector2.Normalize(hero.Position.LSTo2D() - ObjectManager.Player.Position.LSTo2D())
                    //                         .LSRotated(-j * (float)Math.PI / 180) * E.Range;

                    //Render.Circle.DrawCircle(wcNegative.To3D(), 105f, Color.White);
                    //if (!wcNegative.LSIsWall())
                    //{
                    //    ListWJumpPositions.Add(wcNegative);
                    //}
                }
            }

            //Vector2 location = ObjectManager.Player.Position.LSTo2D() +
            //                   Vector2.Normalize(t.Position.LSTo2D() - ObjectManager.Player.Position.LSTo2D()) * W.Range;
            //Vector2 wCastPosition = location;

            ////Render.Circle.DrawCircle(wCastPosition.To3D(), 105f, System.Drawing.Color.Red);


            //if (!wCastPosition.LSIsWall())
            //{
            //    xList.Add(wCastPosition);
            //}

            //if (!wCastPosition.LSIsWall())
            //{
            //    ExistingJumpPositions.Add(new ListJumpPositions
            //    {
            //        Position = wCastPosition,
            //        Name = name
            //    });

            //    ListWJumpPositions.Add(wCastPosition);
            //}

            //if (wCastPosition.LSIsWall())
            //{
            //    for (int j = 20; j < 80; j += 20)
            //    {
            //        Vector2 wcPositive = ObjectManager.Player.Position.LSTo2D() +
            //                             Vector2.Normalize(t.Position.LSTo2D() - ObjectManager.Player.Position.LSTo2D())
            //                                 .LSRotated(j * (float)Math.PI / 180) * W.Range;
            //        if (!wcPositive.LSIsWall())
            //        {
            //            ListWJumpPositions.Add(wcPositive);
            //        }

            //        Vector2 wcNegative = ObjectManager.Player.Position.LSTo2D() +
            //                             Vector2.Normalize(t.Position.LSTo2D() - ObjectManager.Player.Position.LSTo2D())
            //                                 .LSRotated(-j * (float)Math.PI / 180) * W.Range;
            //        if (!wcNegative.LSIsWall())
            //        {
            //            ListWJumpPositions.Add(wcNegative);
            //        }
            //    }

            //    float xDiff = ObjectManager.Player.Position.X - t.Position.X;
            //    float yDiff = ObjectManager.Player.Position.Y - t.Position.Y;
            //    int angle = (int)(Math.Atan2(yDiff, xDiff) * 180.0 / Math.PI);
            //}

            ////foreach (var aa in ListWJumpPositions)
            ////{
            ////    Render.Circle.DrawCircle(aa.To3D2(), 105f, System.Drawing.Color.White);
            ////}
            //var al1 = xList.OrderBy(al => al.LSDistance(t.Position)).First();

            //var color = System.Drawing.Color.DarkRed;
            //var width = 4;

            //var startpos = ObjectManager.Player.Position;
            //var endpos = al1.To3D();
            //if (startpos.LSDistance(endpos) > 100)
            //{
            //    var endpos1 = al1.To3D() +
            //                  (startpos - endpos).LSTo2D().Normalized().LSRotated(25 * (float)Math.PI / 180).To3D() * 75;
            //    var endpos2 = al1.To3D() +
            //                  (startpos - endpos).LSTo2D().Normalized().LSRotated(-25 * (float)Math.PI / 180).To3D() * 75;

            //    //var x1 = new LeagueSharp.Common.Geometry.Polygon.Line(startpos, endpos);
            //    //x1.Draw(color, width - 2);
            //    new LeagueSharp.Common.Geometry.Polygon.Line(startpos, endpos).Draw(color, width - 2);


            //    var y1 = new LeagueSharp.Common.Geometry.Polygon.Line(endpos, endpos1);
            //    y1.Draw(color, width - 2);
            //    var z1 = new LeagueSharp.Common.Geometry.Polygon.Line(endpos, endpos2);
            //    z1.Draw(color, width - 2);
            //}


            ////foreach (var al in ListWJumpPositions.OrderBy(al => al.LSDistance(t.Position)))
            ////{
            ////    Render.Circle.DrawCircle(al.To3D(), 105f, System.Drawing.Color.White);
            ////}
            ////            Render.Circle.DrawCircle(al1.To3D(), 85, System.Drawing.Color.White);
            //return al1;
        }
Esempio n. 4
0
        public override void DrawingOnEndScene(EventArgs args)
        {
            return;

            var nClosesEnemy = HeroManager.Enemies.Find(e => e.IsValidTarget(Orbwalking.GetRealAutoAttackRange(null)));

            if (nClosesEnemy != null)
            {
                var aaRange = Orbwalking.GetRealAutoAttackRange(null) + 65 - ObjectManager.Player.Distance(nClosesEnemy);
                Render.Circle.DrawCircle(ObjectManager.Player.Position, aaRange, Color.BurlyWood);

                Vector2 wcPositive  = ObjectManager.Player.Position.To2D() - Vector2.Normalize(nClosesEnemy.Position.To2D() - ObjectManager.Player.Position.To2D()).Rotated((float)Math.PI / 180) * aaRange;
                Vector2 wcPositive2 = ObjectManager.Player.Position.To2D() - Vector2.Normalize(nClosesEnemy.Position.To2D() - ObjectManager.Player.Position.To2D()).Rotated(30 * (float)Math.PI / 180) * aaRange;
                Vector2 wcPositive3 = ObjectManager.Player.Position.To2D() - Vector2.Normalize(nClosesEnemy.Position.To2D() - ObjectManager.Player.Position.To2D()).Rotated(-30 * (float)Math.PI / 180) * aaRange;

                Vector2 wcPositive2x = ObjectManager.Player.Position.To2D() - Vector2.Normalize(nClosesEnemy.Position.To2D() - ObjectManager.Player.Position.To2D()).Rotated(60 * (float)Math.PI / 180) * aaRange;
                Vector2 wcPositive3x = ObjectManager.Player.Position.To2D() - Vector2.Normalize(nClosesEnemy.Position.To2D() - ObjectManager.Player.Position.To2D()).Rotated(-60 * (float)Math.PI / 180) * aaRange;

                if (E.IsReady())
                {
                    var runHere = Vector2.Zero;
                    if (!wcPositive.IsWall())
                    {
                        runHere = wcPositive;
                    }
                    else if (!wcPositive2.IsWall())
                    {
                        runHere = wcPositive2;
                    }
                    else if (!wcPositive3.IsWall())
                    {
                        runHere = wcPositive3;
                    }
                    else if (!wcPositive2x.IsWall())
                    {
                        runHere = wcPositive2x;
                    }
                    else if (!wcPositive3x.IsWall())
                    {
                        runHere = wcPositive3x;
                    }

                    if (runHere != Vector2.Zero && ObjectManager.Player.Distance(runHere) > ObjectManager.Player.BoundingRadius * 2)
                    {
                        E.Cast(runHere);
                    }
                }

                Render.Circle.DrawCircle(wcPositive2.To3D(), 80f, Color.Red);
                Render.Circle.DrawCircle(wcPositive3.To3D(), 80f, Color.Yellow);
                Render.Circle.DrawCircle(wcPositive.To3D(), 80, Color.BurlyWood);

                Render.Circle.DrawCircle(wcPositive2x.To3D(), 80f, Color.Red);
                Render.Circle.DrawCircle(wcPositive3x.To3D(), 80f, Color.Yellow);
            }
            //if (Q.IsReady())
            //{
            return;

            foreach (var t in HeroManager.Enemies.Where(e => e.IsValidTarget(1100)))
            {
                var toPolygon =
                    new CommonGeometry.Rectangle(ObjectManager.Player.Position.To2D(),
                                                 ObjectManager.Player.Position.To2D()
                                                 .Extend(t.Position.To2D(), t.Distance(ObjectManager.Player.Position)), 30).ToPolygon();
                toPolygon.Draw(System.Drawing.Color.Red, 1);

                var o = ObjectManager
                        .Get <Obj_AI_Base>(
                    ).FirstOrDefault(e => e.IsEnemy && !e.IsDead && e.NetworkId != t.NetworkId && toPolygon.IsInside(e) &&
                                     ObjectManager.Player.Distance(t.Position) > ObjectManager.Player.Distance(e) && e.Distance(t) > t.BoundingRadius && e.Distance(ObjectManager.Player) > ObjectManager.Player.BoundingRadius);

                if (o != null)
                {
                    Render.Circle.DrawCircle(o.Position, 105f, Color.GreenYellow);
                    Q.CastOnUnit(o);
                }

                Vector2 wcPositive = ObjectManager.Player.Position.To2D() - Vector2.Normalize(t.Position.To2D() - ObjectManager.Player.Position.To2D()).Rotated((float)Math.PI / 180) * (E.Range - 50);
                Render.Circle.DrawCircle(wcPositive.To3D(), 60, Color.BurlyWood);
                Render.Circle.DrawCircle(wcPositive.To3D(), 80f, Color.BurlyWood);
                Render.Circle.DrawCircle(wcPositive.To3D(), 100f, Color.BurlyWood);
            }
            //}

            return;

            foreach (var t in HeroManager.Enemies.Where(e => e.IsValidTarget(1100)))
            {
                var toPolygon = new CommonGeometry.Rectangle(ObjectManager.Player.Position.To2D(), ObjectManager.Player.Position.To2D().Extend(t.Position.To2D(), t.Distance(ObjectManager.Player.Position)), 40).ToPolygon();
                toPolygon.Draw(System.Drawing.Color.Red, 1);


                foreach (var obj in ObjectManager.Get <Obj_AI_Base>())
                {
                }

                //Console.WriteLine(hero.ChampionName);

                for (int j = 20; j < 361; j += 20)
                {
                    Vector2 wcPositive = ObjectManager.Player.Position.To2D() + Vector2.Normalize(t.Position.To2D() - ObjectManager.Player.Position.To2D()).Rotated(j * (float)Math.PI / 180) * E.Range;
                    if (!wcPositive.IsWall() && t.Distance(wcPositive) > E.Range)
                    {
                        Render.Circle.DrawCircle(wcPositive.To3D(), 105f, Color.GreenYellow);
                    }
                    //if (!wcPositive.IsWall())
                    //{
                    //    ListWJumpPositions.Add(wcPositive);
                    //}

                    //Vector2 wcNegative = ObjectManager.Player.Position.To2D() +
                    //                     Vector2.Normalize(hero.Position.To2D() - ObjectManager.Player.Position.To2D())
                    //                         .Rotated(-j * (float)Math.PI / 180) * E.Range;

                    //Render.Circle.DrawCircle(wcNegative.To3D(), 105f, Color.White);
                    //if (!wcNegative.IsWall())
                    //{
                    //    ListWJumpPositions.Add(wcNegative);
                    //}
                }
            }
        }