Ejemplo n.º 1
0
        private void Drawing_OnDraw(EventArgs args)
        {
            foreach (var target in HeroManager.Enemies.Where(target => target.IsValidTarget(R.Range + R.Width)))
            {
                var predictionCircle = R.GetPrediction(target, true);
                var predictionLine   = R1.GetPrediction(target, true);
                Utility.DrawCircle(target.Position, 60, System.Drawing.Color.Pink, 1, 1);
                if (predictionCircle.AoeTargetsHitCount > 0 || predictionLine.AoeTargetsHitCount > 0)
                {
                    if (predictionCircle.AoeTargetsHitCount > 0)
                    {
                        Utility.DrawCircle(predictionCircle.CastPosition, 50, System.Drawing.Color.GreenYellow, 1, 1);
                    }

                    if (predictionLine.AoeTargetsHitCount > 0)
                    {
                        Utility.DrawCircle(predictionLine.CastPosition, 70, System.Drawing.Color.OrangeRed, 1, 1);
                    }
                }
            }


            if (HeroMenu.Item("qRange", true).GetValue <bool>())
            {
                if (HeroMenu.Item("onlyRdy", true).GetValue <bool>())
                {
                    if (Q.IsReady())
                    {
                        Utility.DrawCircle(Player.Position, Q.Range, System.Drawing.Color.Gray, 1, 1);
                    }
                }
                else
                {
                    Utility.DrawCircle(Player.Position, Q.Range, System.Drawing.Color.Gray, 1, 1);
                }
            }

            if (HeroMenu.Item("wRange", true).GetValue <bool>())
            {
                if (HeroMenu.Item("onlyRdy", true).GetValue <bool>())
                {
                    if (W.IsReady())
                    {
                        Utility.DrawCircle(Player.Position, W.Range, System.Drawing.Color.Gray, 1, 1);
                    }
                }
                else
                {
                    Utility.DrawCircle(Player.Position, W.Range, System.Drawing.Color.Gray, 1, 1);
                }
            }

            if (HeroMenu.Item("rRange", true).GetValue <bool>())
            {
                if (HeroMenu.Item("onlyRdy", true).GetValue <bool>())
                {
                    if (R.IsReady())
                    {
                        Utility.DrawCircle(Player.Position, R.Range, System.Drawing.Color.Gray, 1, 1);
                    }
                }
                else
                {
                    Utility.DrawCircle(Player.Position, R.Range, System.Drawing.Color.Gray, 1, 1);
                }
            }
        }
Ejemplo n.º 2
0
        private void LogicR()
        {
            bool rKs = HeroMenu.Item("rKs", true).GetValue <bool>();
            var  ts  = HeroMenu.Item("ts", true).GetValue <bool>();

            if (!Program.Combo)
            {
                return;
            }

            Vector3 bestRposition = new Vector3();
            int     aoeCount      = 0;

            foreach (var target in HeroManager.Enemies.Where(target => target.IsValidTarget(R.Range)))
            {
                var predictionCircle = R.GetPrediction(target, true);
                var predictionLine   = R1.GetPrediction(target, true);

                if (predictionLine.AoeTargetsHitCount > 0 && aoeCount > predictionLine.AoeTargetsHitCount && predictionLine.Hitchance >= HitChance.Medium)
                {
                    bestRposition = predictionLine.CastPosition;
                    aoeCount      = predictionLine.AoeTargetsHitCount;
                }
                if (predictionCircle.AoeTargetsHitCount > 0 && aoeCount >= predictionLine.AoeTargetsHitCount && predictionCircle.Hitchance >= HitChance.Medium)
                {
                    bestRposition = predictionCircle.CastPosition;
                    aoeCount      = predictionCircle.AoeTargetsHitCount;
                }
            }

            if (aoeCount > 0 && aoeCount + 1 >= HeroMenu.Item("Raoe", true).GetValue <Slider>().Value)
            {
                if (bestRposition.CountAlliesInRange(1000) > 0)
                {
                    R.Cast(bestRposition);
                }
            }

            return;

            if (R.IsReady() && Program.Combo)
            {
                if (rKs)
                {
                    foreach (var target in HeroManager.Enemies.Where(target => target.IsValidTarget(R.Range)))
                    {
                        if (R.GetDamage(target) > target.Health * 1.8)
                        {
                            // TODO recalculate, use behind
                            Program.CastSpell(R, target);
                        }
                    }
                }
                if (ts && QMANA + WMANA + EMANA + RMANA < Player.Mana)
                {
                    var target = TargetSelector.GetTarget(R.Range, TargetSelector.DamageType.Magical);

                    if (target.IsValidTarget(R.Range) &&
                        Player.Distance(target.ServerPosition) > Player.AttackRange)
                    {
                        Program.CastSpell(R, target);
                    }
                }
            }
        }