示例#1
0
        static void Misc()
        {
            if (misc.check("QKS") && Q1.IsReady())
            {
                var target = TargetSelector.GetTarget(Q1.Range, DamageType.Physical);

                if (target != null && Q1.GetDamage(target) > target.Health)
                {
                    Q1.CastIfHitchanceMinimum(target, hitchance);
                }
            }

            if (misc.check("AUTOPOT") && !myhero.HasBuffOfType(BuffType.Heal) && myhero.HealthPercent <= slider(misc, "POTMIN") && !myhero.InShop())
            {
                if (Items.CanUseItem(myhero, Potion.Id))
                {
                    Potion.Cast();
                }

                else if (Items.CanUseItem(myhero, Biscuit.Id))
                {
                    Biscuit.Cast();
                }

                else if (Items.CanUseItem(myhero, RPotion.Id))
                {
                    RPotion.Cast();
                }

                else if (Items.CanUseItem(myhero, CPotion.Id))
                {
                    CPotion.Cast();
                }
            }
        }
示例#2
0
        private static void Misc()
        {
            if (menu.check("usee") && E.IsReady()) // Spaghetti shield
            {
                var closee = GameObjects.EnemyHeroes.Where(x => myhero.InAARangeOf(x) && (x.IsFacing(myhero) || x.GetWaypoints().LastOrDefault().DistanceToPlayer() < 100f));

                if (gotAggro && !closee.Any())
                {
                    gotAggro = false;
                }
                else if (gotAggro && closee.Any())
                {
                    E.Cast();
                }
            }

            if (!myhero.HasBuffOfType(BuffType.Heal) && myhero.HealthPercent <= slider(menu, "autopm")) // auto pot
            {
                if (Items.CanUseItem(myhero, Potion.Id))
                {
                    Potion.Cast();
                }

                else if (Items.CanUseItem(myhero, Biscuit.Id))
                {
                    Biscuit.Cast();
                }

                else if (Items.CanUseItem(myhero, RPotion.Id))
                {
                    RPotion.Cast();
                }

                else if (Items.CanUseItem(myhero, CPotion.Id))
                {
                    CPotion.Cast();
                }
            }

            if (menu.check("wks") && W.IsReady() && myhero.CountEnemyHeroesInRange(W.Range) > 0)
            {
                foreach (var target in GameObjects.EnemyHeroes.Where(x => x.IsValidTarget() && W.CanCast(x) && W.GetDamage(x) > x.Health))
                {
                    W.CastIfHitchanceMinimum(target, HitChance.Medium);
                }
            }

            if (skinchange)
            {
                myhero.SetSkin(comb(menu, "skin"));
                skinchange = false;
            }

            menu["autopm"].GetValue <MenuSlider>().Visible = menu["autop"].GetValue <MenuBool>().Enabled;
        }