コード例 #1
0
        private static void Drawing_OnDraw(EventArgs args)
        {
            System.Drawing.Color drawColor = System.Drawing.Color.Blue;

            if (MenuHandler.GetCheckboxValue(MenuHandler.Drawing, "Draw Q"))
            {
                Q.DrawRange(drawColor, 3);
            }

            if (MenuHandler.GetCheckboxValue(MenuHandler.Drawing, "Draw W"))
            {
                W.DrawRange(drawColor, 3);
            }

            if (MenuHandler.GetCheckboxValue(MenuHandler.Drawing, "Draw E"))
            {
                E.DrawRange(drawColor, 3);
            }

            if (MenuHandler.GetCheckboxValue(MenuHandler.Drawing, "Draw R"))
            {
                R.DrawRange(drawColor, 3);
            }

            if (MenuHandler.GetCheckboxValue(MenuHandler.Drawing, "Draw Killable Text"))
            {
                foreach (AIHeroClient enemy in EntityManager.Heroes.Enemies.Where(a => a.MeetsCriteria() && a.Health < a.ComboDamage()))
                {
                    Drawing.DrawText(enemy.Position.WorldToScreen(), System.Drawing.Color.GreenYellow, "Killable", 15);
                }
            }
        }
コード例 #2
0
        private static void Drawing_OnDraw(EventArgs args)
        {
            System.Drawing.Color drawColor = System.Drawing.Color.Blue;

            if (MenuHandler.GetCheckboxValue(MenuHandler.Drawing, "Draw Q"))
            {
                Q.DrawRange(drawColor, 3);
            }

            if (MenuHandler.GetCheckboxValue(MenuHandler.Drawing, "Draw E"))
            {
                E.DrawRange(drawColor, 3);
            }

            Obj_AI_Base hoverObject = EntityManager.Enemies.Where(a => !a.IsDead && a.IsTargetable && a.IsInRange(Vi, E.Range) && a.Distance(Game.CursorPos) <= 75).OrderBy(a => a.Distance(Game.CursorPos)).FirstOrDefault();

            if (hoverObject != null && MenuHandler.GetCheckboxValue(MenuHandler.Drawing, "Draw E Sector on Target"))
            {
                new Geometry.Polygon.Sector(Vi.Position, hoverObject.Position, (float)(45 * Math.PI / 180), 600).Draw(drawColor);
            }

            if (MenuHandler.GetCheckboxValue(MenuHandler.Drawing, "Draw R"))
            {
                R.DrawRange(drawColor, 3);
            }

            if (MenuHandler.GetCheckboxValue(MenuHandler.Drawing, "Draw Killable Text"))
            {
                foreach (AIHeroClient enemy in EntityManager.Heroes.Enemies.Where(a => a.MeetsCriteria() && a.Health < a.ComboDamage()))
                {
                    Drawing.DrawText(enemy.Position.WorldToScreen(), System.Drawing.Color.GreenYellow, "Killable", 15);
                }
            }
        }
コード例 #3
0
        private static void Drawing_OnDraw(EventArgs args)
        {
            if (Kha.IsDead)
            {
                return;
            }

            Menu menu = MenuHandler.Drawing;

            System.Drawing.Color drawColor = System.Drawing.Color.Blue;

            if (menu.GetCheckboxValue("Draw Q Range"))
            {
                Q.DrawRange(drawColor);
            }
            if (menu.GetCheckboxValue("Draw W Range"))
            {
                W.DrawRange(drawColor);
            }
            if (menu.GetCheckboxValue("Draw E Range"))
            {
                E.DrawRange(drawColor);
            }
            if (menu.GetCheckboxValue("Draw R Run Range"))
            {
                R.DrawRange(drawColor);
            }
        }
コード例 #4
0
        private static void Drawing_OnDraw(EventArgs args)
        {
            if (Camille.IsDead)
            {
                return;
            }

            Menu menu = MenuHandler.Drawing;

            System.Drawing.Color drawColor = System.Drawing.Color.Blue;

            if (menu.GetCheckboxValue("Draw W Inner Range"))
            {
                W2.DrawRange(drawColor);
            }
            if (menu.GetCheckboxValue("Draw W Inner Range"))
            {
                W.DrawRange(drawColor);
            }
            if (menu.GetCheckboxValue("Draw E Range"))
            {
                E.DrawRange(drawColor);
            }
            if (menu.GetCheckboxValue("Draw R Range"))
            {
                R.DrawRange(drawColor);
            }

            if (menu.GetCheckboxValue("Draw Walls for E") && E.IsReady())
            {
                if (E.Name == "CamilleE")
                {
                    List <Vector2> wallPos = GetWallPositions(Camille.Position);
                    for (int i = 0; i < wallPos.Count() - 1; i++)
                    {
                        if (wallPos[i].IsWall() && wallPos[i + 1].IsWall() && wallPos[i].IsInRange(wallPos[i + 1], 100) && wallPos[i + 1].IsInRange(Camille, Program.E.Range - 50))
                        {
                            Drawing.DrawLine(wallPos[i].To3D().WorldToScreen(), wallPos[i + 1].To3D().WorldToScreen(), 1, System.Drawing.Color.Red);
                        }
                    }
                }
                else if (Camille.HasBuff("camilleeonwall"))
                {
                    List <Vector2> dashablePos = GetDashablePositions(Camille.Position);

                    for (int i = 0; i < dashablePos.Count() - 1; i++)
                    {
                        if (dashablePos[i].IsInRange(dashablePos[i + 1], 50))
                        {
                            Drawing.DrawLine(dashablePos[i].To3D().WorldToScreen(), dashablePos[i + 1].To3D().WorldToScreen(), 1, System.Drawing.Color.Red);
                        }
                    }
                }
            }
        }
コード例 #5
0
        //Draw E chains should not be drawing multiple lines between each barrel. It should also merge them into one polygon
        private static void Drawing_OnDraw(EventArgs args)
        {
            if (Gangplank.IsDead)
                return;
            Menu menu = MenuHandler.Drawing;

            System.Drawing.Color drawColor = System.Drawing.Color.Blue;

            if (menu.GetCheckboxValue("Draw Q") && Q.IsLearned)
                Q.DrawRange(drawColor);
            if (menu.GetCheckboxValue("Draw E") && E.IsLearned)
                E.DrawRange(drawColor);
            if (menu.GetCheckboxValue("Draw E Circle on Mouse") && E.IsLearned)
                Game.CursorPos.DrawCircle((int)barrelRadius, Color.Blue);
            if (menu.GetCheckboxValue("Draw Enemies Killable with E") && E.IsLearned)
                foreach (Obj_AI_Base ob in EntityManager.Enemies.Where(ob => ob.VisibleOnScreen))
                    if (ob.MeetsCriteria() && ob.Health <= Calculations.E(ob, false))
                        ob.DrawCircle(65, Color.Yellow);
            if (menu.GetCheckboxValue("Draw Enemies Killable with E + Q") && E.IsLearned && Q.IsLearned)
                foreach (Obj_AI_Base ob in EntityManager.Enemies.Where(ob=>ob.VisibleOnScreen))
                    if (ob.MeetsCriteria() && ob.Health <= Calculations.E(ob, true))
                        ob.DrawCircle(50, Color.Green);

            if (menu.GetCheckboxValue("Draw Silver Serpent Notifier") && Gangplank.GetBuffCount("gangplankbilgewatertoken") >= 500)
                Drawing.DrawText(Gangplank.Position.WorldToScreen(), drawColor, "You have enough silver serpents", 15);

            if (menu.GetCheckboxValue("Draw Shiny Barrels"))
                foreach (Barrel b in barrels.Where(ob => ob.barrel.VisibleOnScreen))
                    b.barrel.DrawCircle((int)barrelRadius, Color.Gold, 50);


            if (menu.GetCheckboxValue("Draw E Chains") && E.IsLearned)
            {
                List<Tuple<Geometry.Polygon.Circle, int>> polygons = new List<Tuple<Geometry.Polygon.Circle, int>>();
                foreach(Barrel b in barrels)
                    polygons.Add(Tuple.Create(new Geometry.Polygon.Circle(b.barrel.Position, barrelRadius), (int)b.barrel.Position.Z));

                foreach (Tuple<Geometry.Polygon.Circle, int> b in polygons)
                {
                    b.Item1.CenterOfPolygon().To3D(b.Item2).DrawCircle((int)barrelRadius, Color.Red, 1);
                    foreach (Tuple<Geometry.Polygon.Circle, int> linkedBarrel in polygons.Where(a=>a.Item1.CenterOfPolygon().Distance(b.Item1.CenterOfPolygon()) <= barrelDiameter))
                        Drawing.DrawLine(linkedBarrel.Item1.CenterOfPolygon().To3D(linkedBarrel.Item2).WorldToScreen(), b.Item1.CenterOfPolygon().To3D(b.Item2).WorldToScreen(), 5, drawColor);
                }
            }
            
            if (menu.GetCheckboxValue("Draw Killable Text"))
                foreach (AIHeroClient enemy in EntityManager.Heroes.Enemies.Where(a => a.VisibleOnScreen && a.MeetsCriteria() && a.Health < Gangplank.ComboDamage(a)))
                    Drawing.DrawText(enemy.Position.WorldToScreen(), System.Drawing.Color.GreenYellow, "Killable", 15);
        }
コード例 #6
0
 private static void Drawing_OnDraw(EventArgs args)
 {
     if (UseQ)
     {
         Q.DrawRange(Q.IsReady() ? Color.Chartreuse : Color.OrangeRed);
     }
     if (UseW)
     {
         W.DrawRange(W.IsReady() ? Color.Chartreuse : Color.OrangeRed);
     }
     if (UseE)
     {
         E.DrawRange(E.IsReady() ? Color.Chartreuse : Color.OrangeRed);
     }
 }
コード例 #7
0
ファイル: Program.cs プロジェクト: spall9/FrOnDaL
 /*SpellDraw*/
 private static void SpellDraw(EventArgs args)
 {
     if (_drawings["q"].Cast <CheckBox>().CurrentValue)
     {
         _q.DrawRange(Color.FromArgb(130, Color.Green));
     }
     if (_drawings["w"].Cast <CheckBox>().CurrentValue)
     {
         _w.DrawRange(Color.FromArgb(130, Color.Green));
     }
     if (_drawings["r"].Cast <CheckBox>().CurrentValue)
     {
         _r.DrawRange(Color.FromArgb(130, Color.Green));
     }
 }
コード例 #8
0
ファイル: Fiddle.cs プロジェクト: Worthy1/EBScript
 private static void Drawing_OnDraw(EventArgs args)
 {
     if (DrawMenu["Q"].Cast <CheckBox>().CurrentValue)
     {
         Circle.Draw(SharpDX.Color.Green, ComboMenu["Draw Q"].Cast <Slider>().CurrentValue, Caoujter);
     }
     if (DrawMenu["W"].Cast <CheckBox>().CurrentValue)
     {
         W.DrawRange(Color.FromArgb(130, Color.Green));
     }
     if (DrawMenu["E"].Cast <CheckBox>().CurrentValue)
     {
         Circle.Draw(SharpDX.Color.Green, ComboMenu["Draw E"].Cast <Slider>().CurrentValue, Caoujter);
     }
     if (DrawMenu["R"].Cast <CheckBox>().CurrentValue)
     {
         R.DrawRange(Color.FromArgb(130, Color.Green));
     }
 }
コード例 #9
0
 private static void OnDraw(EventArgs args)
 {
     if (Draws["DQ"].Cast <CheckBox>().CurrentValue&& Q.IsReady())
     {
         Q.DrawRange(System.Drawing.Color.LightBlue);
     }
     if (Draws["DW"].Cast <CheckBox>().CurrentValue&& W.IsReady())
     {
         W.DrawRange(System.Drawing.Color.Crimson);
     }
     if (Draws["DE"].Cast <CheckBox>().CurrentValue&& E.IsReady())
     {
         E.DrawRange(System.Drawing.Color.Crimson);
     }
     if (Draws["DR"].Cast <CheckBox>().CurrentValue&& R.IsReady())
     {
         R.DrawRange(System.Drawing.Color.LawnGreen);
     }
 }
コード例 #10
0
 private static void SpellDraw(EventArgs args)
 {
     if (_drawings["w"].Cast <CheckBox>().CurrentValue)
     {
         _w.DrawRange(Color.FromArgb(130, Color.Green));
     }
     if (_drawings["e"].Cast <CheckBox>().CurrentValue)
     {
         _e.DrawRange(Color.FromArgb(130, Color.Green));
     }
     if (_drawings["smite"].Cast <CheckBox>().CurrentValue)
     {
         _smite.DrawRange(_misc["autosmite"].Cast <KeyBind>().CurrentValue ? Color.FromArgb(130, Color.White) : Color.FromArgb(130, Color.Gray));
     }
     if (!_drawings["qTimer"].Cast <CheckBox>().CurrentValue || !ObjectManager.Player.HasBuff("TwitchHideInShadows"))
     {
         return;
     }
     QTimer.Position  = Drawing.WorldToScreen(Player.Instance.Position) - new Vector2(20, 84);
     QTimer.Color     = Color.AntiqueWhite;
     QTimer.TextValue = "Q Timer : " + $"{ObjectManager.Player.GetRemainingBuffTime("TwitchHideInShadows"):0.0}";
     QTimer.Draw();
 }
コード例 #11
0
        //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);
                    }
                }
            }
        }
コード例 #12
0
        private void Drawing_OnEndScene(EventArgs args)
        {
            foreach (var e in EntityManager.Heroes.Enemies.Where(e => e.HPBarPosition.IsOnScreen() && e.IsValidTarget()))
            {
                if (Config.drawDmg)
                {
                    e.DrawDamage(DariusStuff.ComboDamage(e, Config.calcP, Config.calcQ, Config.calcW, Config.calcR));
                }

                if (Config.stacksTimer)
                {
                    var buff = DariusStuff.GetDariusPassive(e);
                    if (buff != null)
                    {
                        var timeLeft  = buff.EndTime - Game.Time;
                        var mypos     = e.ServerPosition.WorldToScreen();
                        var buffcount = Math.Max(1, buff.Count);
                        var ra        = 51 * buffcount;
                        var ba        = 255 - ra;
                        var ga        = 255 - ra;
                        var c         = Color.FromArgb(ra, ga, ba);
                        passive.Draw($"Stacks: {buff.Count} ({timeLeft.ToString("F1")})", c, new Vector2(mypos.X, mypos.Y - 36));
                    }
                }

                if (Config.dunkable)
                {
                    var killable = R.IsReady() && DariusStuff.Rdmg(e) > e.TotalShieldHealth() && e.IsKillable(-1, true, true, true);
                    if (killable)
                    {
                        var hpos    = e.HpBarPos();
                        var drawpos = new Vector2(hpos.X, hpos.Y - 24);
                        dunktext.Draw("DUNK = KILL", Color.Red, drawpos);
                    }
                }
            }

            if (Config.ultTimer && DariusStuff.HasDariusUltResetBuff)
            {
                var x       = Drawing.Width * 0.35f;
                var y       = Drawing.Height * 0.8f;
                var drawpos = new Vector2(x, y);
                var timer   = (DariusStuff.DariusUltResetBuff.EndTime - Game.Time).ToString("F1");
                ulttext.Draw($"R Expire Timer: {timer}", Color.OrangeRed, drawpos);
            }

            var pos = qPos();

            if (pos != null && pos != Vector3.Zero)
            {
                pos.Value.DrawCircle(100, SharpDX.Color.Red);
            }

            if (Config.drawoutQ)
            {
                Circle.Draw(SharpDX.Color.AliceBlue, outerBlade, user);
            }

            if (Config.drawinQ)
            {
                Circle.Draw(SharpDX.Color.AliceBlue, bladeStart, user);
            }

            if (Config.drawE)
            {
                E.DrawRange(Color.AliceBlue);
            }

            if (Config.drawR)
            {
                R.DrawRange(Color.AliceBlue);
            }
        }