Esempio n. 1
0
        private static void Drawing_OnEndScene(EventArgs args)
        {
            if (myHero.IsDead)
            {
                return;
            }
            if (!DrawMenu["damagein"].Cast <CheckBox>().CurrentValue)
            {
                return;
            }
            foreach (var aiHeroClient in EntityManager.Heroes.Enemies)
            {
                if (!aiHeroClient.IsHPBarRendered || !aiHeroClient.VisibleOnScreen)
                {
                    continue;
                }

                var pos     = new Vector2(aiHeroClient.HPBarPosition.X + _xOffset, aiHeroClient.HPBarPosition.Y + _yOffset);
                var fullbar = (_barLength) * (aiHeroClient.HealthPercent / 100);
                var damage  = (_barLength) *
                              ((DamageIndicators.getComboDamage(aiHeroClient) / aiHeroClient.MaxHealth) > 1
                                     ? 1
                                     : (DamageIndicators.getComboDamage(aiHeroClient) / aiHeroClient.MaxHealth));
                Line.DrawLine(System.Drawing.Color.DarkRed, 9f, new Vector2(pos.X, pos.Y),
                              new Vector2(pos.X + (damage > fullbar ? fullbar : damage), pos.Y));
                Line.DrawLine(System.Drawing.Color.Black, 9, new Vector2(pos.X + (damage > fullbar ? fullbar : damage) - 2, pos.Y), new Vector2(pos.X + (damage > fullbar ? fullbar : damage) + 2, pos.Y));
            }
        }
Esempio n. 2
0
        private static void Combo()
        {
            if (ComboMenu["ComboW"].Cast <CheckBox>().CurrentValue)
            {
                var t = EntityManager.Heroes.Enemies.Find(x => x.IsValidTarget(W.Range) && !x.HasBuffOfType(BuffType.SpellShield));

                if (t != null)
                {
                    if (W.IsReady() && !Orbwalker.CanAutoAttack)


                    {
                        W.Cast();
                    }

                    UseItems(t);
                    UseItems2(t);
                }
            }

            if (E.IsReady())
            {
                var t = EntityManager.Heroes.Enemies.Where(e => e.IsValidTarget(E.Range + myHero.GetAutoAttackRange()));

                if (t == null)
                {
                    return;
                }

                if (ComboMenu["ComboE"].Cast <CheckBox>().CurrentValue)
                {
                    var t1 = t.OrderByDescending(e => TargetSelector.GetPriority(e)).FirstOrDefault();

                    if (t1 != null)
                    {
                        E.Cast(t1.ServerPosition);
                    }
                }
            }

            {
                if (ComboMenu["RForce"].Cast <KeyBind>().CurrentValue)
                {
                    if (R1.IsReady())
                    {
                        if (ComboMenu["RForce"].Cast <KeyBind>().CurrentValue&& !myHero.HasBuff("RivenFengShuiEngine"))
                        {
                            var t = TargetSelector.GetTarget(700, DamageType.Physical);
                            if (t == null)
                            {
                                return;
                            }
                            if (t.Distance(myHero.ServerPosition) < E.Range + myHero.AttackRange && myHero.CountEnemiesInRange(500) >= 1)
                            {
                                R1.Cast();
                            }
                        }

                        if (myHero.HasBuff("RivenFengShuiEngine"))
                        {
                            var t = TargetSelector.GetTarget(900, DamageType.Physical);
                            if (t == null)
                            {
                                return;
                            }

                            {
                                if (ComboBox(ComboMenu, "UseRType") == 0)
                                {
                                    var target = TargetSelector.SelectedTarget;
                                    if (DamageIndicators.Rdmg(t, t.Health) > t.Health && t.IsValidTarget(R2.Range) && t.Distance(myHero.ServerPosition) < 600)
                                    {
                                        R2.Cast(t.ServerPosition);
                                    }
                                    else
                                    {
                                        CastR2 = false;
                                    }
                                }
                                else if (ComboBox(ComboMenu, "UseRType") == 1)
                                {
                                    var prediction = R2.GetPrediction(t);
                                    if (t.HealthPercent < 50 && t.Health > DamageIndicators.Rdmg(t, t.Health) + Damage.GetAutoAttackDamage(myHero, t) * 2)
                                    {
                                        R2.Cast(t.ServerPosition);
                                    }
                                    else
                                    {
                                        CastR2 = false;
                                    }
                                }

                                else if (ComboBox(ComboMenu, "UseRType") == 2)
                                {
                                    if (t.IsValidTarget(R2.Range) && t.Distance(myHero.ServerPosition) < 200)
                                    {
                                        R2.Cast(t.ServerPosition);
                                    }
                                    else
                                    {
                                        CastR2 = false;
                                    }
                                }
                                else if (ComboBox(ComboMenu, "UseRType") == 3)
                                {
                                    CastR2 = false;
                                }
                            }

                            if (CastR2)
                            {
                                R2.Cast(t);
                            }
                        }
                    }
                }
            }
        }