示例#1
0
 private static void LastHit()
 {
     if (Q.IsReady() && SubMenu["LastHit"]["Q"].Cast <CheckBox>().CurrentValue&& ManaPercent >= SubMenu["LastHit"]["LastHitMana"].Cast <Slider>().CurrentValue)
     {
         var Minions = EntityManager.MinionsAndMonsters.GetLaneMinions(EntityManager.UnitTeam.Enemy, myHero.Position, myHero.GetAutoAttackRange(), true);
         foreach (var minions in
                  Minions.Where(
                      minions => minions.Health < ObjectManager.Player.GetSpellDamage(minions, SpellSlot.Q)))
         {
             if (minions != null && minions.IsValidTarget(E.Range))
             {
                 Q.Cast(myHero.GetTumblePos());
                 orbwalker.ForceTarget(minions);
                 Console.WriteLine("lasthit Q");
             }
         }
     }
 }
示例#2
0
        private static void Combo()
        {
            if (Heal != null && SubMenu["Misc"]["heal"].Cast <CheckBox>().CurrentValue&& Heal.IsReady() && HealthPercent <= SubMenu["Misc"]["hp"].Cast <Slider>().CurrentValue &&
                myHero.CountEnemiesInRange2(600) > 0 && Heal.IsReady())
            {
                Heal.Cast();
                Console.WriteLine("heal ");
            }

            var target = TargetSelector2.GetTarget(E.Range, TargetSelector2.DamageType.Physical);

            orbwalker.ForceTarget(target);

            if (!target.IsValidTarget(E.Range))
            {
                return;
            }
            if (SubMenu["Combo"]["E"].Cast <CheckBox>().CurrentValue&& target != null && target.IsValidTarget(E.Range) && E.IsReady() &&
                SubMenu["Misc"][target.ChampionName + "E"].Cast <CheckBox>().CurrentValue)
            {
                Condemn();
                Console.WriteLine(" E");
            }
            if (SubMenu["Combo"]["R"].Cast <CheckBox>().CurrentValue&& myHero.CountEnemiesInRange2(600f) >= (SubMenu["Combo"]["R2"].Cast <Slider>().CurrentValue) && R.IsReady())
            {
                R.Cast();
                Console.WriteLine("R");
            }
            var mousePos = myHero.Position.Extend2(Game.CursorPos, Q.Range);

            if ((SubMenu["Combo"]["Qult"].Cast <CheckBox>().CurrentValue&& Q.IsReady() && myHero.HasBuff("vayneinquisition") && myHero.CountEnemiesInRange2(1500) > 0 && myHero.CountEnemiesInRange2(670) != 1))
            {
                myHero.Spellbook.CastSpell(SpellSlot.Q, mousePos, true);
                Console.WriteLine(" RQ");
            }
            if (SubMenu["Combo"]["useItems"].Cast <CheckBox>().CurrentValue)
            {
                if (Item.HasItem((int)ItemId.Blade_of_the_Ruined_King, myHero) && Item.CanUseItem((int)ItemId.Blade_of_the_Ruined_King) &&
                    HealthPercent <= SubMenu["Combo"]["myhp"].Cast <Slider>().CurrentValue)
                {
                    Item.UseItem((int)ItemId.Blade_of_the_Ruined_King, target);
                }
                if (Item.HasItem((int)ItemId.Bilgewater_Cutlass, myHero) && Item.CanUseItem((int)ItemId.Bilgewater_Cutlass) &&
                    target.IsValidTarget(myHero.GetAutoAttackRange()))
                {
                    Item.UseItem((int)ItemId.Bilgewater_Cutlass, target);
                }
                if (Item.HasItem((int)ItemId.Youmuus_Ghostblade, myHero) && Item.CanUseItem((int)ItemId.Youmuus_Ghostblade) &&
                    myHero.Distance4(target.Position) <= myHero.GetAutoAttackRange())
                {
                    Item.UseItem((int)ItemId.Youmuus_Ghostblade);
                }
            }
        }
示例#3
0
        private static void Obj_AI_Base_OnSpellCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
        {
            if (!sender.IsMe)
            {
                return;
            }

            var enemy = TargetSelector2.GetTarget(E.Range, TargetSelector2.DamageType.Physical);

            if (enemy == null)
            {
                return;
            }

            if (enemy != null)
            {
                var mousePos = myHero.Position.Extend2(Game.CursorPos, Q.Range);
                if (SubMenu["Harass"]["Q"].Cast <CheckBox>().CurrentValue&& orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Mixed &&
                    enemy.IsValidTarget(myHero.GetAutoAttackRange()) && Q.IsReady())
                {
                    myHero.Spellbook.CastSpell(SpellSlot.Q, mousePos, true);
                    orbwalker.ForceTarget(enemy);
                }

                if (SubMenu["Harass"]["E"].Cast <CheckBox>().CurrentValue&& E.IsReady() && !Q.IsReady() &&
                    orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Mixed &&
                    enemy.IsValidTarget(myHero.GetAutoAttackRange()))
                {
                    E.Cast(enemy);
                    orbwalker.ForceTarget(enemy);
                }
            }

            var LastHitE = myHero;

            foreach (var Etarget in EntityManager.Heroes.Enemies.Where(Etarget => Etarget.IsValidTarget(E.Range) && Etarget.Path.Count() < 2))
            {
                if (SubMenu["Combo"]["ELast"].Cast <CheckBox>().CurrentValue&& E.IsReady() && myHero.CountEnemiesInRange2(600) <= 1)
                {
                    var dmgE = myHero.GetSpellDamage2(Etarget, SpellSlot.E);
                    if (dmgE > Etarget.Health || (WTarget(Etarget) == 2 && dmgE + Wdmg(Etarget) > Etarget.Health))
                    {
                        LastHitE = Etarget;
                    }
                }

                if (LastHitE != myHero)
                {
                    E.CastOnUnit(LastHitE);
                }
            }

            if (sender.Spellbook.Owner.IsMe)
            {
                if (args.Slot == SpellSlot.Q)
                {
                    if (Tumble.TumbleOrderPos != Vector3.Zero)
                    {
                        if (Tumble.TumbleOrderPos.IsDangerousPosition())
                        {
                            Tumble.TumbleOrderPos = Vector3.Zero;
                            args.Process          = false;
                        }
                        else
                        {
                            Tumble.TumbleOrderPos = Vector3.Zero;
                        }
                    }
                }
            }
        }