예제 #1
0
 public static void Hydra()
 {
     var hydra = new Item(ItemId.Ravenous_Hydra_Melee_Only, 400);
     if (hydra.IsOwned() && hydra.IsReady())
     {
         hydra.Cast();
     }
 }
예제 #2
0
 public static void Tiamath()
 {
     var tiamat = new Item(ItemId.Tiamat_Melee_Only, 400);
     if (tiamat.IsOwned() && tiamat.IsReady())
     {
         tiamat.Cast();
     }
 }
예제 #3
0
파일: Helpers.cs 프로젝트: infyhr/EloBuddy
        public static Item zhonya; // Zhonya test

        #endregion Fields

        #region Methods

        /// <summary>
        /// Casts zhonya if Katarina is low on health.
        /// </summary>
        /// <param name="myHero">AIHeroClient reference -- ourselves</param>
        /// <returns>true if zhonya suceeded</returns>
        public static bool CastZhonya(AIHeroClient myHero, int zHealth)
        {
            zhonya = new Item((int)ItemId.Zhonyas_Hourglass);
            if(zhonya == null || !zhonya.IsReady() || !zhonya.IsOwned()) return false;

            if(myHero.HealthPercent <= zHealth) {
                zhonya.Cast();
                return true;
            }

            return false;
        }
예제 #4
0
        private static void Clear()
        {
            if (!Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.JungleClear) &&
                !Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.LaneClear))
            {
                return;
            }

            var minionObj =
                ObjectManager.Get<Obj_AI_Minion>()
                    .Where(minion => !minion.IsAlly && minion.Distance(Player.Instance) < Spells.E.Range);
            if (!minionObj.Any())
            {
                return;
            }

            var clearE = Menu.ClearMenu["Clear.E"].Cast<CheckBox>().CurrentValue;
            if (clearE && Spells.E.IsReady())
            {
                var obj = minionObj.FirstOrDefault(minion => minion.Health < SpellSlot.E.GetDamage(minion));
                if (obj == null && !minionObj.Any(minion => Player.Instance.IsInAutoAttackRange(minion)))
                {
                    obj = minionObj.MinOrDefault(minion => minion.Health);
                }

                if (obj != null)
                {
                    Spells.E.Cast(obj);
                }
            }

            var clearHydra = Menu.ClearMenu["Clear.Hydra"].Cast<CheckBox>().CurrentValue;
            if (clearHydra)
            {
                var hydra = new Item((int) ItemId.Ravenous_Hydra_Melee_Only, 250);
                var tiamat = new Item((int) ItemId.Tiamat_Melee_Only, 250);
                var item = hydra.IsReady() ? hydra : tiamat;
                if ((Item.HasItem((int) ItemId.Ravenous_Hydra_Melee_Only, Player.Instance) ||
                     Item.HasItem((int) ItemId.Tiamat_Melee_Only, Player.Instance)) && item.IsReady() &&
                    (minionObj.Count(i => item.IsInRange(i)) > 2 ||
                     minionObj.Any(i => i.MaxHealth >= 1200 && i.Distance(Player.Instance) < item.Range - 80)))
                {
                    item.Cast();
                }
            }
        }
예제 #5
0
파일: Brain.cs 프로젝트: FireBuddy/zilean
 private static void Potions()
 {
     if (Utils.isChecked(MenuX.Misc, "usePot") && !Utils._Player.IsInShopRange() &&
         !Utils._Player.HasBuff("recall"))
     {
         var hpPot = new Item(2003);
         var manaPot = new Item(2004);
         var flask = new Item(2041);
         if ((hpPot.IsReady() || flask.IsReady()) &&
             (!Utils._Player.HasBuff("RegenerationPotion") || Utils._Player.HasBuff("ItemCrystalFlask")))
         {
             if (Utils._Player.CountEnemiesInRange(700) > 0 &&
                 Utils._Player.Health + 200 < Utils._Player.MaxHealth)
             {
                 if (Item.HasItem(hpPot.Id))
                 {
                     hpPot.Cast();
                 }
                 else
                 {
                     flask.Cast();
                 }
             }
             else if (Utils._Player.Health < Utils._Player.MaxHealth*0.6)
             {
                 if (Item.HasItem(hpPot.Id))
                 {
                     hpPot.Cast();
                 }
                 else
                 {
                     flask.Cast();
                 }
             }
         }
         if (manaPot.IsReady() && !Utils._Player.HasBuff("FlaskOfCrystalWater"))
         {
             if (Utils._Player.Mana < Utils._Player.MaxMana*0.6)
             {
                 manaPot.Cast();
             }
         }
     }
 }
예제 #6
0
 private static void Potions()
 {
     if (MenuX.Misc.UsePot && !_Player.IsInShopRange() && !_Player.HasBuff("recall"))
     {
         var hpPot = new Item(2003);
         var manaPot = new Item(2004);
         var biscuit = new Item(2010);
         if ((hpPot.IsReady() || biscuit.IsReady()) &&
             (!_Player.HasBuff("RegenerationPotion") || _Player.HasBuff("ItemMiniRegenPotion")))
         {
             if (_Player.CountEnemiesInRange(700) > 0 && _Player.Health + 200 < _Player.MaxHealth)
             {
                 if (Item.HasItem(hpPot.Id))
                 {
                     hpPot.Cast();
                 }
                 else
                 {
                     biscuit.Cast();
                 }
             }
             else if (_Player.Health < _Player.MaxHealth*0.6)
             {
                 if (Item.HasItem(hpPot.Id))
                 {
                     hpPot.Cast();
                 }
                 else
                 {
                     biscuit.Cast();
                 }
             }
         }
         if (manaPot.IsReady() && !_Player.HasBuff("FlaskOfCrystalWater"))
         {
             if (_Player.Mana < _Player.MaxMana*0.6)
             {
                 manaPot.Cast();
             }
         }
     }
 }
예제 #7
0
파일: Brain.cs 프로젝트: FireBuddy/zilean
        public static void Combo()
        {
            BTRK1 = new Item((int)ItemId.Blade_of_the_Ruined_King);
            BTRK2 = new Item((int)ItemId.Bilgewater_Cutlass);
            YOMU = new Item((int)ItemId.Youmuus_Ghostblade);
            var target = TargetSelector2.GetTarget(Program.Spells[SpellSlot.W].Range, DamageType.Physical);
            if (target == null) return;
            if (MenuX.ComboMenu["useWCombo"].Cast<CheckBox>().CurrentValue)
            {
                if (target.IsValidTarget(Program.Spells[SpellSlot.W].Range) && Program.Spells[SpellSlot.W].IsReady())
                {
                    Program.Spells[SpellSlot.W].Cast(target);
                }
            }
            if (MenuX.ComboMenu["useRCombo"].Cast<CheckBox>().CurrentValue)
            {
                foreach (
                    var enemy in
                        ObjectManager.Get<AIHeroClient>()
                            .Where(enemy => enemy.Distance(_Player) <= Program.Spells[SpellSlot.R].Range))
                {
                    if (enemy.CountEnemiesInRange(850) >= MenuX.ComboMenu["minRCombo"].Cast<Slider>().CurrentValue)
                    {
                        Program.Spells[SpellSlot.R].Cast();
                    }
                }
            }
            if (target.HealthPercent <= 80 && (BTRK1.IsOwned() || BTRK2.IsOwned()) && (BTRK1.IsReady() || BTRK2.IsReady()))
            {
                BTRK1.Cast(target);
                BTRK2.Cast(target);
            }
            if (target.HealthPercent <= 75 && YOMU.IsOwned() && YOMU.IsReady())
            {
                YOMU.Cast();
            }

        }
예제 #8
0
        // Combo Draw Damage
        private static void Tick(EventArgs args)
        {
            QHitChance = PredMenu["predq"].Cast<CheckBox>().CurrentValue ? HitChance.Medium : HitChance.High;
            EHitChance = PredMenu["prede"].Cast<CheckBox>().CurrentValue ? HitChance.Medium : HitChance.High;
            Killsteal();
            // AutoCast();

            {
                if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo))
                    Combo();
            }

            if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.LaneClear) ||
                Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.JungleClear))
            {
                LaneClear();
            }

            if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Harass))
            {
                Harass();
            }

            //Auto Ignite
            {
                if (!ComboMenu["useignite"].Cast<CheckBox>().CurrentValue ||
                    !Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo))
                    return;
                foreach (
                    var source in
                        ObjectManager.Get<AIHeroClient>()
                            .Where(
                                a =>
                                    a.IsEnemy && a.IsValidTarget(Ignite.Range) &&
                                    a.Health < 50 + 20*Me.Level - (a.HPRegenRate/5*3)))
                {
                    Ignite.Cast(source);
                    return;
                }
            }

            //Auto Zhonias

            var zhoniascheck = MiscMenu["zhonias"].Cast<CheckBox>().CurrentValue;
            var zpercent = MiscMenu["ZPercent"].Cast<Slider>().CurrentValue;
            var zhonias = new Item((int)ItemId.Zhonyas_Hourglass);

            if (zhoniascheck && zhonias.IsReady())
            {
                if (Me.HealthPercent <= zpercent)
                {
                    zhonias.Cast();
                }
            }
        }
예제 #9
0
 private static void CastTitan()
 {
     var id = ObjectManager.Player.InventoryItems.FirstOrDefault(a => a.Id == (ItemId) 3748);
     if (id != null)
     {
         var HydraItem = new Item(id.Id, 300);
         if (HydraItem.IsReady())
         {
             HydraItem.Cast();
             Orbwalker.ResetAutoAttack();
         }
     }
 }
예제 #10
0
        public static void OnAttack(OnAttackArgs args)
        {
            var item = new Item(ItemId.Youmuus_Ghostblade, 0);
            if ((PortAIO.OrbwalkerManager.isComboActive || OrbwalkerPassive || OrbwalkLastClickActive))
            {
                if (item.IsReady())
                    item.Cast();
            }

        }
예제 #11
0
        private static void Itens()
        {
            var target = TargetSelector.GetTarget(500, DamageType.Physical);

            var botrk = new Item((int)ItemId.Blade_of_the_Ruined_King, 600f);
            var yommus = new Item((int)ItemId.Youmuus_Ghostblade);

            var useEr = ComboMenu["useER"].Cast<CheckBox>().CurrentValue;
            var erHealth = ComboMenu["ERHealth"].Cast<Slider>().CurrentValue;
            var useYommus = ComboMenu["UseYommus"].Cast<CheckBox>().CurrentValue;

            if (botrk.IsReady())
            {
                if (useEr && target.HealthPercent <= erHealth)
                {
                    botrk.Cast(target);
                }
            }

            if (yommus.IsReady() && useYommus)
            {
                yommus.Cast();

            }
        }
예제 #12
0
        private static void AutoPotion()
        {
            var usePotion = PotionMenu["hpPotion"].Cast<CheckBox>().CurrentValue;
            var hpporcent = PotionMenu["hp%"].Cast<Slider>().CurrentValue;

            var potionhp = new Item((int) ItemId.Health_Potion);

            if (potionhp.IsReady() &&
                usePotion && _Player.Health <= hpporcent)
            {
                potionhp.Cast();
            }
        }
예제 #13
0
        static void Orbwalker_OnPostAttack(AttackableUnit target, EventArgs args)
        {
            if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo))
            {
                var hydra = new Item((int)ItemId.Ravenous_Hydra_Melee_Only);
                var youmuus = new Item((int)ItemId.Youmuus_Ghostblade);

                if (hydra.IsOwned() && hydra.IsReady() || youmuus.IsOwned() && youmuus.IsReady())
                {
                    hydra.Cast();
                    youmuus.Cast();
                }
            }
        }
예제 #14
0
        private static void Combo()
        {
            if (!Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo))
            {
                return;
            }

            var comboR = Menu.ComboMenu["Combo.R"].Cast<CheckBox>().CurrentValue;
            if (comboR && Spells.R.IsReady() && !Player.Instance.IsDashing())
            {
                var targets =
                    EntityManager.Heroes.Enemies.Where(enemy => enemy != null && enemy.IsValidTarget(Spells.R.Range))
                        .ToList();
                var rHp = Menu.ComboMenu["Combo.R.HP"].Cast<Slider>().CurrentValue;
                var rCount = Menu.ComboMenu["Combo.R.Count"].Cast<Slider>().CurrentValue;
                if ((targets.Count > 1 &&
                     targets.Any(target => target != null && target.Health < SpellSlot.R.GetDamage(target))) ||
                    targets.Any(target => target != null && target.HealthPercent < rHp) || targets.Count >= rCount)
                {
                    Spells.R.Cast();
                }
            }

            var comboE = Menu.ComboMenu["Combo.E"].Cast<CheckBox>().CurrentValue;
            if (comboE && Spells.E.IsReady())
            {
                var target = TargetSelector.GetTarget(Spells.E.Range, DamageType.Magical);
                if (target != null &&
                    (!Player.Instance.IsInAutoAttackRange(target) || Player.Instance.Health < target.Health))
                {
                    Spells.E.Cast(target);
                }
            }

            var comboHydra = Menu.ClearMenu["Combo.Hydra"].Cast<CheckBox>().CurrentValue;
            if (comboHydra)
            {
                var hydra = new Item((int) ItemId.Ravenous_Hydra_Melee_Only, 250);
                var tiamat = new Item((int) ItemId.Tiamat_Melee_Only, 250);
                var item = hydra.IsReady() ? hydra : tiamat;
                var target = TargetSelector.GetTarget(item.Range, DamageType.Physical);
                if ((Item.HasItem((int) ItemId.Ravenous_Hydra_Melee_Only, Player.Instance) ||
                     Item.HasItem((int) ItemId.Tiamat_Melee_Only, Player.Instance)) && item.IsReady() &&
                    target.Distance(Player.Instance) < item.Range - 80)
                {
                    item.Cast();
                }
            }
        }
예제 #15
0
 public static void Youmu()
 {
     if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo))
     {
         var youmu = new Item(ItemId.Youmuus_Ghostblade);
         if (youmu.IsOwned() && youmu.IsReady())
         {
             youmu.Cast();
         }
     }
 }
예제 #16
0
        private static void Itens()
        {
            var useEr = ItensMenu["useER"].Cast<CheckBox>().CurrentValue;
            var hpPorcent = ItensMenu["hpPorcent"].Cast<Slider>().CurrentValue;
            var mehpPorcent = ItensMenu["mehpPorcent"].Cast<Slider>().CurrentValue;
            var useYommus = ItensMenu["useYommus"].Cast<CheckBox>().CurrentValue;

            //itens 
            var botrk = new Item(ItemId.Blade_of_the_Ruined_King, 500);
            var yommus = new Item(ItemId.Youmuus_Ghostblade);

            if (botrk.IsReady() && useEr)
            {
                var targetEr = TargetSelector.GetTarget(botrk.Range, DamageType.Mixed);

                if (targetEr.IsValidTarget(500) && hpPorcent >= targetEr.HealthPercent)
                {
                    botrk.Cast();
                }
                if (Me.HealthPercent <= mehpPorcent)
                {
                    botrk.Cast();
                }

            }

            if (yommus.IsReady() && useYommus)
            {
                var targetY = TargetSelector.GetTarget(600, DamageType.Physical);

                if (targetY.IsValidTarget(600))
                {
                    yommus.Cast();
                }

            }

        }
예제 #17
0
        private static void Potions()
        {
            var usehp = PotionMenu["useHP"].Cast<CheckBox>().CurrentValue;
            var hpbar = PotionMenu["hpbar"].Cast<Slider>().CurrentValue;

            //potions instance
            var hppot = new Item(ItemId.Health_Potion);

            if (usehp && hppot.IsReady() && Me.HealthPercent <= hpbar)
            {
                hppot.Cast();

            }          


        }
예제 #18
0
파일: Program.cs 프로젝트: Xelamats/PortAIO
        public static void OnAttack(AttackableUnit target, EventArgs args)
        {
            var item = new Item(ItemId.Youmuus_Ghostblade, 0);
            if ((Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo) || OrbwalkerPassive || OrbwalkLastClickActive))
            {
                if (item.IsReady())
                    item.Cast();
            }

        }
예제 #19
0
        private static void Harass()
        {
            if (!Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Harass))
            {
                return;
            }

            var harassE = Menu.ComboMenu["Harass.E"].Cast<CheckBox>().CurrentValue;
            if (harassE && Spells.E.IsReady())
            {
                var target = TargetSelector.GetTarget(Spells.E.Range, DamageType.Magical, Player.Instance.Position);
                if (target != null &&
                    (!Player.Instance.IsInAutoAttackRange(target) || Player.Instance.Health < target.Health))
                {
                    Spells.E.Cast(target);
                }
            }

            var harassHydra = Menu.ClearMenu["Harass.Hydra"].Cast<CheckBox>().CurrentValue;
            if (harassHydra)
            {
                var hydra = new Item((int) ItemId.Ravenous_Hydra_Melee_Only, 250);
                var tiamat = new Item((int) ItemId.Tiamat_Melee_Only, 250);
                var item = hydra.IsReady() ? hydra : tiamat;
                var target = TargetSelector.GetTarget(item.Range, DamageType.Physical);
                if ((Item.HasItem((int) ItemId.Ravenous_Hydra_Melee_Only, Player.Instance) ||
                     Item.HasItem((int) ItemId.Tiamat_Melee_Only, Player.Instance)) && item.IsReady() &&
                    target.Distance(Player.Instance) < item.Range - 80)
                {
                    item.Cast();
                }
            }
        }