Пример #1
0
 public static bool CanCondemn(Vector3 fromPosition, Obj_AI_Base target)
 {
     var line = new Geometry.Polygon.Line(target.Position, Program.Efinishpos(target));
     if (line.Points.Any(point => point.To3D().IsWall()))
     {
         return true;
     }
     /*        if (Program.Efinishpos(target).IsWall())
                 return true;*/
     return false;
 }
Пример #2
0
        private static void OnDraw(EventArgs args)
        {
            if (Config.Item("Draw_Disabled").GetValue<bool>())
                return;

            var pos = Drawing.WorldToScreen(ObjectManager.Player.Position);

            if (Config.Item("ah").GetValue<bool>())
            Drawing.DrawText(pos.X - 50, pos.Y + 30, System.Drawing.Color.Gold, "AutoHarass:");
            if (Config.Item("jg").GetValue<bool>())
            Drawing.DrawText(pos.X - 50, pos.Y + 50, System.Drawing.Color.Gold, "Junglesteal:");

            if (Config.Item("jungleks").GetValue<KeyBind>().Active && Config.Item("jg").GetValue<bool>())
            {
                Drawing.DrawText(pos.X + 41, pos.Y + 50, System.Drawing.Color.LawnGreen, "On");
            }
            else if (Config.Item("jg").GetValue<bool>())
            {
                Drawing.DrawText(pos.X + 41, pos.Y + 50, System.Drawing.Color.Tomato, "Off");
            }
            if (Config.Item("autoharass").GetValue<KeyBind>().Active && Config.Item("ah").GetValue<bool>())
            {
                Drawing.DrawText(pos.X + 43, pos.Y + 30, System.Drawing.Color.LawnGreen, "On");
            }
            else if (Config.Item("ah").GetValue<bool>())
            {
                Drawing.DrawText(pos.X + 43, pos.Y + 30, System.Drawing.Color.Tomato, "Off");
            }
            {
                if (Config.Item("Qdraw").GetValue<Circle>().Active)
                    if (Q.Level > 0)
                        Render.Circle.DrawCircle(ObjectManager.Player.Position, Q.Range,
                            Q.IsReady() ? Config.Item("Qdraw").GetValue<Circle>().Color : System.Drawing.Color.Red);

                if (Config.Item("Wdraw").GetValue<Circle>().Active)
                    if (W.Level > 0)
                        Render.Circle.DrawCircle(ObjectManager.Player.Position, W.Range,
                            W.IsReady() ? Config.Item("Wdraw").GetValue<Circle>().Color : System.Drawing.Color.Red);

                if (Config.Item("Edraw").GetValue<Circle>().Active)
                    if (E.Level > 0)
                        Render.Circle.DrawCircle(ObjectManager.Player.Position, E.Range - 1,
                            E.IsReady() ? Config.Item("Edraw").GetValue<Circle>().Color : System.Drawing.Color.Red);

                if (Config.Item("Rdraw").GetValue<Circle>().Active)
                    if (R.Level > 0)
                        Render.Circle.DrawCircle(ObjectManager.Player.Position, R.Range - 2,
                            R.IsReady() ? Config.Item("Rdraw").GetValue<Circle>().Color : System.Drawing.Color.Red);

                {
                    var target = TargetSelector.GetTarget(R.Range, TargetSelector.DamageType.Magical);
                    if (target == null)
                        return;
                    if (target.IsInvulnerable)
                        return;

                    var orbwalkert = Orbwalker.GetTarget();
                    if (orbwalkert.IsValidTarget(R.Range))
                        Render.Circle.DrawCircle(orbwalkert.Position, 80, System.Drawing.Color.DeepSkyBlue, 7);

                    var rdebugp = R.GetPrediction(target);
                    var qdebugp = Q.GetPrediction(target);
                    var edebugp = E.GetPrediction(target);
                    var rdebug = new Geometry.Polygon.Line(player.Position, rdebugp.CastPosition, R.Range);
                    var qdebug = new Geometry.Polygon.Line(player.Position, qdebugp.CastPosition, Q.Range + 200);
                    var edebug = new Geometry.Polygon.Line(player.Position, edebugp.CastPosition, E.Range + 200);

                    if (!Config.Item("Debug").GetValue<bool>())
                        return;

                    if (qdebugp.Hitchance >= HitChance.VeryHigh && Config.Item("qdebug").GetValue<Circle>().Active)
                        qdebug.Draw(Config.Item("qdebug").GetValue<Circle>().Color, 2);
                    if (edebugp.Hitchance >= HitChance.VeryHigh && Config.Item("edebug").GetValue<Circle>().Active)
                        edebug.Draw(Config.Item("edebug").GetValue<Circle>().Color, 3);
                    if (rdebugp.Hitchance >= HitChance.VeryHigh && Config.Item("rdebug").GetValue<Circle>().Active)
                        rdebug.Draw(Config.Item("rdebug").GetValue<Circle>().Color, 4);
                }
            }
        }
Пример #3
0
        private static void Gapcloserdraw(EventArgs args)
        {
            var rstacks = Player.Buffs.Find(buff => buff.Name == "AkaliShadowDance").Count;
            var target = TargetSelector.GetTarget(R.Range * 2 + 300, TargetSelector.DamageType.Magical);

            if (target.Position.Distance(Player.Position) < R.Range + 75)
                return;

            foreach (var minion in
                ObjectManager.Get<Obj_AI_Minion>().Where(minion => minion.IsValidTarget() && minion.IsEnemy &&
                                                                   minion.Distance(Player.ServerPosition) <=
                                                                   R.Range * 2))
            {
                if (Config.Item("rlines").GetValue<bool>() && rstacks > 1 &&
                    minion.Distance(target.Position) < R.Range && Player.Distance(target.Position) >= R.Range && minion.IsValidTarget(R.Range))
                {
                    var rdraw = new Geometry.Polygon.Line(Player.Position, GetFarthestMinion(minion.Position, target.Position).Position);
                    var rmdraw = new Geometry.Polygon.Line(GetFarthestMinion(minion.Position, target.Position).Position, target.Position);
                    rdraw.Draw(Color.White, 1);
                    rmdraw.Draw(Color.White, 1);
                }

                foreach (var h in
                    ObjectManager.Get<Obj_AI_Hero>().Where(h => h.IsValidTarget() && h.IsEnemy &&
                                                                h.Distance(Player.ServerPosition) <=
                                                                R.Range * 2))
                {
                    if (Config.Item("rlines").GetValue<bool>() && rstacks > 1 &&
                        Player.Distance(target.Position) >= R.Range && h.Distance(target.Position) < R.Range && h.IsValidTarget(R.Range))
                    {
                        var rdraw = new Geometry.Polygon.Line(Player.Position, h.Position);
                        var rmdraw = new Geometry.Polygon.Line(h.Position, target.Position);
                        rdraw.Draw(Color.White, 1);
                        rmdraw.Draw(Color.White, 1);
                    }
                }
            }
        }
Пример #4
0
        protected override void Drawing_OnDraw(EventArgs args)
        {
            if (menu.Item("Draw_Disabled", true).GetValue<bool>())
                return;

            if (menu.Item("Draw_Q", true).GetValue<bool>())
                if (Q.Level > 0)
                    Render.Circle.DrawCircle(Player.Position, Q.Range, Q.IsReady() ? Color.Green : Color.Red);
            if (menu.Item("Draw_QE", true).GetValue<bool>())
                if (Q.Level > 0 && E.Level > 0)
                    Render.Circle.DrawCircle(Player.Position, _qe.Range, Q.IsReady() && E.IsReady() ? Color.Green : Color.Red);
            if (menu.Item("Draw_W", true).GetValue<bool>())
                if (W.Level > 0)
                    Render.Circle.DrawCircle(Player.Position, W.Range, W.IsReady() ? Color.Green : Color.Red);

            if (menu.Item("Draw_E", true).GetValue<bool>())
                if (E.Level > 0)
                    Render.Circle.DrawCircle(Player.Position, E.Range, E.IsReady() ? Color.Green : Color.Red);

            if (menu.Item("Draw_R", true).GetValue<bool>())
                if (R.Level > 0)
                    Render.Circle.DrawCircle(Player.Position, R.Range, R.IsReady() ? Color.Green : Color.Red);

            if (Get_Current_Orb() != null)
                Render.Circle.DrawCircle(Get_Current_Orb().Position, W.Width, Color.Green);

            //draw EQ
            if (menu.Item("Draw_QE_Line", true).GetValue<bool>())
            {
                var qeTarget = TargetSelector.GetTarget(_qe.Range, TargetSelector.DamageType.Magical);
                if (qeTarget == null || !Q.IsReady() || !E.IsReady())
                    return;

                var qTarget = TargetSelector.GetTarget(E.Range, TargetSelector.DamageType.Magical);
                if (qTarget.IsValidTarget(E.Range))
                {
                    var pred = Q.GetPrediction(qTarget);

                    if (pred.Hitchance >= HitChanceManager.GetQEHitChance("Combo"))
                    {
                        var poly = new Geometry.Polygon.Rectangle(pred.CastPosition, Player.ServerPosition.Extend(pred.CastPosition, _qe.Range), _qe.Width);
                        poly.Draw(Color.LawnGreen);
                        var line = new Geometry.Polygon.Line(Player.Position, Player.ServerPosition.Extend(pred.CastPosition, _qe.Range));
                        line.Draw(Color.LawnGreen);
                        Render.Circle.DrawCircle(pred.CastPosition, Q.Width / 2, Color.Aquamarine);
                        Render.Circle.DrawCircle(Player.ServerPosition.Extend(pred.CastPosition, _qe.Range), Q.Width / 2, Color.SpringGreen);
                    }
                }
                else
                {
                    var startPos = Player.ServerPosition.To2D().Extend(qeTarget.ServerPosition.To2D(), Q.Range).To3D();
                    double rangeLeft = 100 + (-0.6 * Player.Distance(startPos) + 950);
                    var endPos = startPos + Vector3.Normalize(startPos - Player.ServerPosition) * (float)rangeLeft;

                    _qe.From = startPos;
                    _qe.Delay = E.Delay + Q.Range / E.Speed;

                    var qePred = _qe.GetPrediction(qeTarget);

                    var poly = new Geometry.Polygon.Rectangle(startPos, endPos, _qe.Width);

                    if (!poly.IsInside(qePred.UnitPosition))
                        return;

                    if (qePred.Hitchance >= HitChanceManager.GetQEHitChance("Combo"))
                    {
                        poly.Draw(Color.LawnGreen);
                        var line = new Geometry.Polygon.Line(Player.Position, endPos);
                        line.Draw(Color.LawnGreen);
                        Render.Circle.DrawCircle(startPos, Q.Width/2, Color.Aquamarine);
                        Render.Circle.DrawCircle(endPos, Q.Width/2, Color.SpringGreen);
                    }
                }
            }

            if (menu.Item("Draw_R_Killable", true).GetValue<bool>() && R.IsReady())
            {
                foreach (var wts in from unit in ObjectManager.Get<Obj_AI_Hero>().Where(x => x.IsValidTarget(2000) && !x.IsDead && x.IsEnemy).OrderByDescending(GetComboDamage)
                                    let health = unit.Health + unit.HPRegenRate + 10
                                    where Get_Ult_Dmg(unit) > health
                                    select Drawing.WorldToScreen(unit.Position))
                {
                    Drawing.DrawText(wts[0] - 20, wts[1], Color.White, "KILL!!!");
                }
            }
        }
Пример #5
0
        private static void Obj_AI_Hero_OnProcessSpellCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
        {
            if (sender == null || !sender.IsValid)
            {
                return;
            }

            if (sender.IsMe && args.SData.Name.Equals("FioraE"))
            {
                Orbwalking.ResetAutoAttackTimer();
                return;
            }

            var autoW = Menu.Item("WSpells").IsActive() && W.IsReady();
            var blockableSpell = sender is Obj_AI_Hero && sender.IsEnemy && SpellBlock.Contains(sender, args);
            var type = args.SData.TargettingType;

            if (!autoW || !blockableSpell)
            {
                return;
            }

            if (type.IsSkillShot())
            {
                var rectangle = new Geometry.Polygon.Line(args.Start, args.End);
                if (rectangle.Points.Any(point => point.Distance(Player.ServerPosition.To2D()) < 50))
                {
                    CastW(sender);
                }
            }
            else if (type.IsTargeted() && args.Target != null && args.Target.IsMe)
            {
                if (Menu.Item("WTurret").IsActive() && Player.UnderTurret(true))
                {
                    return;
                }

                CastW(sender);
            }
            else if (args.End.Distance(Player.ServerPosition) < 100)
            {
                CastW(sender);
            }
        }
Пример #6
0
        private static void DrawAxeTimes()
        {
            if (PlayerObjects.AxeObject == null)
            {
                return;
            }

            var drawAxePosition = MenuLocal["Draw.AxePosition"].Cast<ComboBox>().CurrentValue;

            var exTime = TimeSpan.FromSeconds(PlayerObjects.EndTime - Game.Time).TotalSeconds;
            var color = exTime > 4 ? Color.White : Color.Red;
            switch (drawAxePosition)
            {
                case 1:
                    {
                        var circle1 = new CommonGeometry.Circle2(new Vector2(PlayerObjects.AxeObject.Position.X + 3, PlayerObjects.AxeObject.Position.Y - 3), 150f, Game.Time * 100 - PlayerObjects.StartTime * 100, PlayerObjects.EndTime * 100 - PlayerObjects.StartTime * 100).ToPolygon();
                        circle1.Draw(Color.Black, 4);

                        var circle = new CommonGeometry.Circle2(PlayerObjects.AxeObject.Position.LSTo2D(), 150f, Game.Time * 100 - PlayerObjects.StartTime * 100, PlayerObjects.EndTime * 100 - PlayerObjects.StartTime * 100).ToPolygon();
                        circle.Draw(TimeSpan.FromSeconds(PlayerObjects.EndTime - Game.Time).TotalSeconds > 4 ? Color.White : Color.Red, 4);
                        break;
                    }
                case 2:
                    {
                        var startpos = ObjectManager.Player.Position.LSTo2D();
                        var endpos = PlayerObjects.AxeObject.Position.LSTo2D();
                        if (startpos.LSDistance(endpos) > 100)
                        {
                            var endpos1 = PlayerObjects.AxeObject.Position + (startpos - endpos).LSNormalized().LSRotated(25 * (float)Math.PI / 180).To3D() * 75;
                            var endpos2 = PlayerObjects.AxeObject.Position + (startpos - endpos).LSNormalized().LSRotated(-25 * (float)Math.PI / 180).To3D() * 75;

                            var x1 = new LeagueSharp.Common.Geometry.Polygon.Line(startpos, endpos);
                            x1.Draw(color, 1);
                            var y1 = new LeagueSharp.Common.Geometry.Polygon.Line(endpos.To3D(), endpos1);
                            y1.Draw(color, 2);
                            var z1 = new LeagueSharp.Common.Geometry.Polygon.Line(endpos.To3D(), endpos2);
                            z1.Draw(color, 2);
                        }
                        break;
                    }

                case 3:
                    {
                        var circle1 = new CommonGeometry.Circle2(new Vector2(PlayerObjects.AxeObject.Position.X + 3, PlayerObjects.AxeObject.Position.Y - 3), 150f, Game.Time * 100 - PlayerObjects.StartTime * 100, PlayerObjects.EndTime * 100 - PlayerObjects.StartTime * 100).ToPolygon();
                        circle1.Draw(Color.Black, 4);

                        var circle = new CommonGeometry.Circle2(PlayerObjects.AxeObject.Position.LSTo2D(), 150f, Game.Time * 100 - PlayerObjects.StartTime * 100, PlayerObjects.EndTime * 100 - PlayerObjects.StartTime * 100).ToPolygon();
                        circle.Draw(TimeSpan.FromSeconds(PlayerObjects.EndTime - Game.Time).TotalSeconds > 4 ? Color.White : Color.Red, 4);

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

                            var x1 = new LeagueSharp.Common.Geometry.Polygon.Line(startpos, endpos);
                            x1.Draw(color, 1);
                            var y1 = new LeagueSharp.Common.Geometry.Polygon.Line(endpos.To3D(), endpos1);
                            y1.Draw(color, 2);
                            var z1 = new LeagueSharp.Common.Geometry.Polygon.Line(endpos.To3D(), endpos2);
                            z1.Draw(color, 2);
                        }

                        var line = new Geometry.Polygon.Line(ObjectManager.Player.Position, PlayerObjects.AxeObject.Position, ObjectManager.Player.LSDistance(PlayerObjects.AxeObject.Position));
                        line.Draw(color, 2);
                        break;
                    }
            }

            if (MenuLocal["Draw.AxeTime"].Cast<CheckBox>().CurrentValue)
            {
                var time = TimeSpan.FromSeconds(PlayerObjects.EndTime - Game.Time);
                var pos = Drawing.WorldToScreen(PlayerObjects.AxeObject.Position);
                var display = $"{time.Seconds:D1}";

                SharpDX.Color vTimeColor = time.TotalSeconds > 4 ? SharpDX.Color.White : SharpDX.Color.Red;
                DrawText(AxeDisplayText, display, (int)pos.X - display.Length, (int)pos.Y - 105, vTimeColor);
            }
        }
Пример #7
0
        public override void Drawing_OnDraw(EventArgs args)
        {
            var drawE = GetValue<StringList>("DrawE").SelectedIndex;
            if (E.IsReady() && drawE != 0)
            {
                if (drawE == 1 || drawE == 3)
                {
                    Render.Circle.DrawCircle(ObjectManager.Player.Position, E.Range, Color.BurlyWood, 1);
                }

                if (drawE == 2 || drawE == 3)
                {
                    var t = TargetSelector.GetTarget(E.Range + Q.Range, TargetSelector.DamageType.Physical);
                    if (t.IsValidTarget())
                    {
                        var color = System.Drawing.Color.Red;
                        for (var i = 1; i < 8; i++)
                        {
                            var targetBehind = t.Position +
                                               Vector3.Normalize(t.ServerPosition - ObjectManager.Player.Position)*i*50;

                            if (!targetBehind.IsWall())
                            {
                                color = System.Drawing.Color.Aqua;
                            }
                            else
                            {
                                color = System.Drawing.Color.Red;
                            }
                        }

                        var tt = t.Position + Vector3.Normalize(t.ServerPosition - ObjectManager.Player.Position)*8*50;

                        var startpos = t.Position;
                        var endpos = tt;
                        var endpos1 = tt +
                                      (startpos - endpos).To2D().Normalized().Rotated(45*(float) Math.PI/180).To3D()*
                                      t.BoundingRadius;
                        var endpos2 = tt +
                                      (startpos - endpos).To2D().Normalized().Rotated(-45*(float) Math.PI/180).To3D()*
                                      t.BoundingRadius;

                        var width = 2;

                        var x = new Geometry.Polygon.Line(startpos, endpos);
                        {
                            x.Draw(color, width);
                        }

                        var y = new Geometry.Polygon.Line(endpos, endpos1);
                        {
                            y.Draw(color, width);
                        }

                        var z = new Geometry.Polygon.Line(endpos, endpos2);
                        {
                            z.Draw(color, width);
                        }
                    }
                }
            }

            var drawQ = GetValue<StringList>("DrawQ").SelectedIndex;
            switch (drawQ)
            {
                case 1:
                    Render.Circle.DrawCircle(ObjectManager.Player.Position, Q.Range, System.Drawing.Color.Aqua);
                    break;
                case 2:
                    Render.Circle.DrawCircle(ObjectManager.Player.Position,
                        Q.Range + Marksman.Utils.Orbwalking.GetRealAutoAttackRange(null) + 65, System.Drawing.Color.Aqua);
                    break;
            }
        }
Пример #8
0
        private static void OnDraw(EventArgs args)
        {
            var pos = Drawing.WorldToScreen(ObjectManager.Player.Position);
            if (Config.Item("jungleks").GetValue<KeyBind>().Active)
                Drawing.DrawText(pos.X - 50, pos.Y + 50, System.Drawing.Color.HotPink, "[R] Junglesteal Enabled");
            if (Config.Item("autoharass").GetValue<KeyBind>().Active)
                Drawing.DrawText(pos.X - 50, pos.Y + 30, System.Drawing.Color.Plum, "AutoHarass Enabled");
            if (Config.Item("Draw_Disabled").GetValue<bool>())
                return;
            {
                if (Config.Item("Qdraw").GetValue<Circle>().Active)
                    if (Q.Level > 0)
                        Render.Circle.DrawCircle(ObjectManager.Player.Position, Q.Range,
                            Q.IsReady() ? Config.Item("Qdraw").GetValue<Circle>().Color : System.Drawing.Color.Red);

                if (Config.Item("Wdraw").GetValue<Circle>().Active)
                    if (W.Level > 0)
                        Render.Circle.DrawCircle(ObjectManager.Player.Position, W.Range,
                            W.IsReady() ? Config.Item("Wdraw").GetValue<Circle>().Color : System.Drawing.Color.Red);

                if (Config.Item("Edraw").GetValue<Circle>().Active)
                    if (E.Level > 0)
                        Render.Circle.DrawCircle(ObjectManager.Player.Position, E.Range - 1,
                            E.IsReady() ? Config.Item("Edraw").GetValue<Circle>().Color : System.Drawing.Color.Red);

                if (Config.Item("Rdraw").GetValue<Circle>().Active)
                    if (R.Level > 0)
                        Render.Circle.DrawCircle(ObjectManager.Player.Position, R.Range - 2,
                            R.IsReady() ? Config.Item("Rdraw").GetValue<Circle>().Color : System.Drawing.Color.Red);

                {
                    var target = TargetSelector.GetTarget(R.Range, TargetSelector.DamageType.Magical);
                    if (target == null)
                        return;
                    if (target.IsInvulnerable)
                        return;

                    var rpredl = R.GetPrediction(target).CastPosition;
                    var rdmg = R.GetDamage(target);
                    var rpdmg = R.GetDamage(target) + 10 + (8 * player.Level) + player.FlatMagicDamageMod * 0.2;
                    var rpred = R.GetPrediction(target);
                    var rdraw = new Geometry.Polygon.Line(player.Position, rpredl, R.Range);

                    if (Config.Item("RLine").GetValue<Circle>().Active
                        && target.IsValidTarget(R.Range)
                        && R.IsReady()
                        && rpred.Hitchance >= HitChance.VeryHigh
                        && Config.Item("UseR").GetValue<bool>()
                        && target.HasBuff("luxilluminatingfraulein")
                        && target.Health < rpdmg
                        && target.IsValidTarget(R.Range)
                        && Config.Item("UseR").GetValue<bool>()
                        && R.IsReady()
                        && rpred.Hitchance >= HitChance.VeryHigh
                        && target.Health < rdmg)

                        rdraw.Draw(Config.Item("RLine").GetValue<Circle>().Color, 4);

                    var orbwalkert = Orbwalker.GetTarget();
                    if (orbwalkert.IsValidTarget(R.Range))
                        Render.Circle.DrawCircle(orbwalkert.Position, 80, System.Drawing.Color.DeepSkyBlue, 7);

                    var rdebugp = R.GetPrediction(target);
                    var qdebugp = Q.GetPrediction(target);
                    var edebugp = E.GetPrediction(target);
                    var rdebug = new Geometry.Polygon.Line(player.Position, rpredl, R.Range);
                    var qdebug = new Geometry.Polygon.Line(player.Position, qdebugp.CastPosition, Q.Range + 200);
                    var edebug = new Geometry.Polygon.Line(player.Position, edebugp.CastPosition, E.Range + 200);

                    if (!Config.Item("Debug").GetValue<bool>())
                        return;

                    if (qdebugp.Hitchance >= HitChance.VeryHigh && Config.Item("qdebug").GetValue<Circle>().Active)
                        qdebug.Draw(Config.Item("qdebug").GetValue<Circle>().Color, 2);
                    if (edebugp.Hitchance >= HitChance.VeryHigh && Config.Item("edebug").GetValue<Circle>().Active)
                        edebug.Draw(Config.Item("edebug").GetValue<Circle>().Color, 3);
                    if (rdebugp.Hitchance >= HitChance.VeryHigh && Config.Item("rdebug").GetValue<Circle>().Active)
                        rdebug.Draw(Config.Item("rdebug").GetValue<Circle>().Color, 4);
                }
            }
        }
Пример #9
0
        private static void DrawingOnOnDraw(EventArgs args)
        {
            if (ObjectManager.Player.IsDead)
            {
                return;
            }

            if (MenuLocal.Item("Jump.Draw.Status").GetValue<bool>())
            {
                var enabled = MenuLocal.Item("Jump.Enabled").GetValue<KeyBind>().Active;
                var stat = MenuLocal.Item("Jump.Mode").GetValue<StringList>().SelectedValue;
                CommonHelper.DrawText(CommonHelper.TextStatus, "Q Jump: " + stat, (int)ObjectManager.Player.HPBarPosition.X + 145, (int)ObjectManager.Player.HPBarPosition.Y + 5, enabled && stat != "Off" ? Color.White : Color.Gray);
            }

            if (!MenuLocal.Item("Jump.Draw.Arrows").GetValue<bool>())
            {
                return;
            }
            if (JumpTarget.IsValidTarget(Q.Range))
            {
                return;
            }

            if (JumpTarget.IsValidTarget() && ObjectManager.Player.Distance(JumpTarget) > Q.Range)
            {

                var toPolygon = new Common.CommonGeometry.Rectangle(ObjectManager.Player.Position.To2D(), ObjectManager.Player.Position.To2D().Extend(JumpTarget.Position.To2D(), Q.Range * 3), 250).ToPolygon();
                toPolygon.Draw(System.Drawing.Color.Red, 1);
                var otherEnemyObjects =
                    ObjectManager.Get<Obj_AI_Base>()
                        .Where(m => m.IsEnemy && !m.IsDead && !m.IsZombie && m.IsValidTarget(Q.Range) && m.NetworkId != JumpTarget.NetworkId)
                        .Where(m => toPolygon.IsInside(m))
                        .Where(m => ObjectManager.Player.Distance(JumpTarget) > ObjectManager.Player.Distance(m))
                        .Where(m => m.Health < Q.GetDamage(m))
                        .Where(m => !m.IsValidTarget(Orbwalking.GetRealAutoAttackRange(null) + 165))
                        .OrderBy(m => m.Distance(JumpTarget.Position));

                JumpObject = otherEnemyObjects.FirstOrDefault(m => m.Distance(JumpTarget.Position) <= Q.Range * 2 && m.Distance(JumpTarget.Position) > Orbwalking.GetRealAutoAttackRange(null));

                if (JumpObject != null)
                {
                    if (JumpObject.IsValidTarget(Q.Range))// && JumpTarget.Health <= ComboDamage(t, R.Instance.Ammo - 1 < 0 ? 0: R.Instance.Ammo - 1) && Utils.UltiChargeCount >= 2)
                    {
                        var startpos = ObjectManager.Player.Position;
                        var endpos = JumpObject.Position;
                        var endpos1 = JumpObject.Position + (startpos - endpos).To2D().Normalized().Rotated(30 * (float)Math.PI / 180).To3D() * ObjectManager.Player.BoundingRadius * 2;
                        var endpos2 = JumpObject.Position + (startpos - endpos).To2D().Normalized().Rotated(-30 * (float)Math.PI / 180).To3D() * ObjectManager.Player.BoundingRadius * 2;

                        var width = 1;

                        var x = new Geometry.Polygon.Line(startpos, endpos); x.Draw(System.Drawing.Color.Blue, width);
                        var y = new Geometry.Polygon.Line(endpos, endpos1); y.Draw(System.Drawing.Color.Blue, width + 1);
                        var z = new Geometry.Polygon.Line(endpos, endpos2); z.Draw(System.Drawing.Color.Blue, width + 1);

                        Vector3[] objectCenter = new[] { ObjectManager.Player.Position, JumpObject.Position };
                        var aX = Drawing.WorldToScreen(new Vector3(Common.CommonHelper.CenterOfVectors(objectCenter).X, Common.CommonHelper.CenterOfVectors(objectCenter).Y, Common.CommonHelper.CenterOfVectors(objectCenter).Z));
                        Drawing.DrawText(aX.X - 15, aX.Y - 15, System.Drawing.Color.White, "1st Jump");

                        /*---------------------------------------------------------------------------------------------------------*/
                        var xStartPos = JumpObject.Position;
                        var xEndPos = JumpTarget.Position;
                        var xEndPos1 = JumpTarget.Position + (xStartPos - xEndPos).To2D().Normalized().Rotated(30 * (float)Math.PI / 180).To3D() * JumpObject.BoundingRadius * 2;
                        var xEndPost2 = JumpTarget.Position + (xStartPos - xEndPos).To2D().Normalized().Rotated(-30 * (float)Math.PI / 180).To3D() * JumpObject.BoundingRadius * 2;

                        var xWidth = 1;

                        var x1 = new Geometry.Polygon.Line(xStartPos, xEndPos); x1.Draw(System.Drawing.Color.IndianRed, xWidth);

                        var y1 = new Geometry.Polygon.Line(xEndPos, xEndPos1); y1.Draw(System.Drawing.Color.IndianRed, xWidth + 1);
                        var z1 = new Geometry.Polygon.Line(xEndPos, xEndPost2); z1.Draw(System.Drawing.Color.IndianRed, xWidth + 1);

                        Vector3[] enemyCenter = new[] { JumpObject.Position, JumpTarget.Position };
                        var bX =
                            Drawing.WorldToScreen(new Vector3(Common.CommonHelper.CenterOfVectors(enemyCenter).X, Common.CommonHelper.CenterOfVectors(enemyCenter).Y,
                                Common.CommonHelper.CenterOfVectors(enemyCenter).Z));
                    }
                }
            }
        }