Example #1
0
        static void KillSteal()
        {
            if (Human())
            {
                if (Option_Item("KillSteal Human Q") && Q.IsReady())
                {
                    var Qtarget = TargetSelector.GetTarget(Q.Range, TargetSelector.DamageType.Magical, true);
                    if (Qtarget != null && Qtarget.Health <= Q.GetDamage(Qtarget))
                    {
                        Q.CastOnUnit(Qtarget, true);
                    }
                }

                if (Option_Item("KillSteal Human W") && W.IsReady())
                {
                    var Wtarget    = TargetSelector.GetTarget(W.Range, TargetSelector.DamageType.Magical, true);
                    var prediction = W.GetPrediction(Wtarget);
                    if (Wtarget != null && Wtarget.Health <= W.GetDamage(Wtarget) && prediction.CollisionObjects.Count == 0)
                    {
                        W.Cast(Wtarget.ServerPosition, true);
                    }
                }
            }
            if (Spider())
            {
                if (Option_Item("KillSteal Spider Q") && Q2.IsReady())
                {
                    var Q2target = TargetSelector.GetTarget(Q2.Range, TargetSelector.DamageType.Magical, true);
                    if (Q2target != null && Q2target.Health <= Q2.GetDamage(Q2target))
                    {
                        Q2.CastOnUnit(Q2target, true);
                    }
                }
            }
        }
Example #2
0
 private static void AfterAttack(Obj_AI_Base unit, Obj_AI_Base target)
 {
     if (unit.IsMe && ActiveMode == Orbwalking.OrbwalkingMode.Combo && Q2.IsReady() && IsCougar &&
         Config.Item("combo_Q2").GetValue <bool>())
     {
         Q2.CastOnUnit(Player, PacketCasting);
     }
 }
Example #3
0
        private static void GameOnOnUpdate(EventArgs args)
        {
            if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo))
            {
                //Game.PrintChat(Q.Cooldown.ToString());
                if (Target.LSIsValidTarget(Q.Range) && CommonHelper.SpellRStatus == CommonHelper.SpellRName.R2xQ && Target.Health < ComboDamage2xQ(Target))
                {
                    Q2.CastOnUnit(Target);
                }

                if (Target.LSIsValidTarget(W.Range) && CommonHelper.SpellRStatus == CommonHelper.SpellRName.R2xW && Target.Health < ComboDamage2xW(Target))
                {
                    W2.Cast(Target);
                }

                ExecuteFarCombo();

                if (MenuLocal["Combo.Ignite"].Cast <ComboBox>().CurrentValue == 1)
                {
                    if (IgniteSlot != SpellSlot.Unknown &&
                        ObjectManager.Player.Spellbook.CanUseSpell(IgniteSlot) == SpellState.Ready)
                    {
                        if (Target.LSIsValidTarget(650) && !Target.HasImmortalBuff() &&
                            ObjectManager.Player.GetSummonerSpellDamage(Target, LeagueSharp.Common.Damage.SummonerSpell.Ignite) + 150 >=
                            Target.Health && (!Q.IsReady() || W.StillJumped()))
                        {
                            ObjectManager.Player.Spellbook.CastSpell(IgniteSlot, Target);
                        }
                    }
                }

                switch (ComboMode)
                {
                case ComboMode.Mode2xQ:
                {
                    ActiveComboMode = ActiveComboMode.Mode2xQ;
                    ExecuteMode2xQ();
                    break;
                }

                case ComboMode.Mode2xW:
                {
                    ActiveComboMode = ActiveComboMode.Mode2xW;
                    ExecuteMode2xW();
                    break;
                }

                case ComboMode.ModeAuto:
                {
                    ActiveComboMode = ActiveComboMode.ModeAuto;
                    ExecuteModeAuto();
                    break;
                }
                }
                ExecuteSpells();
                ExecuteCompleteCombo();
            }
        }
Example #4
0
        private static void GameOnOnUpdate(EventArgs args)
        {
            if (Modes.ModeConfig.Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Combo)
            {
                //Game.PrintChat(Q.Cooldown.ToString());
                if (Target.IsValidTarget(Q.Range) && CommonHelper.SpellRStatus == CommonHelper.SpellRName.R2xQ && Target.Health < ComboDamage2xQ(Target))
                {
                    Q2.CastOnUnit(Target);
                }

                if (Target.IsValidTarget(W.Range) && CommonHelper.SpellRStatus == CommonHelper.SpellRName.R2xW && Target.Health < ComboDamage2xW(Target))
                {
                    W2.Cast(Target);
                }

                ExecuteFarCombo();

                if (MenuLocal.Item("Combo.Ignite").GetValue <StringList>().SelectedIndex == 1)
                {
                    if (IgniteSlot != SpellSlot.Unknown &&
                        ObjectManager.Player.Spellbook.CanUseSpell(IgniteSlot) == SpellState.Ready)
                    {
                        if (Target.IsValidTarget(650) && !Target.HaveImmortalBuff() &&
                            ObjectManager.Player.GetSummonerSpellDamage(Target, Damage.SummonerSpell.Ignite) + 150 >=
                            Target.Health && (!Q.IsReady() || W.StillJumped()))
                        {
                            ObjectManager.Player.Spellbook.CastSpell(IgniteSlot, Target);
                        }
                    }
                }

                switch (ComboMode)
                {
                case ComboMode.Mode2xQ:
                {
                    ActiveComboMode = ActiveComboMode.Mode2xQ;
                    ExecuteMode2xQ();
                    break;
                }

                case ComboMode.Mode2xW:
                {
                    ActiveComboMode = ActiveComboMode.Mode2xW;
                    ExecuteMode2xW();
                    break;
                }

                case ComboMode.ModeAuto:
                {
                    ActiveComboMode = ActiveComboMode.ModeAuto;
                    ExecuteModeAuto();
                    break;
                }
                }
                ExecuteSpells();
            }
        }
Example #5
0
        static void ExecuteComboMode()
        {
            if (Target.IsValidTarget(Q.Range) && CommonHelper.SpellRStatus == CommonHelper.SpellRName.R2xQ && Target.Health < ComboDamage2xQ(Target))
            {
                Q2.CastOnUnit(Target);
            }

            if (Target.IsValidTarget(W.Range) && CommonHelper.SpellRStatus == CommonHelper.SpellRName.R2xW && Target.Health < ComboDamage2xW(Target))
            {
                PlayerSpells.CastW2(Target.Position);
            }

            //ExecuteFarCombo();

            if (MenuLocal.Item("Combo.Ignite").GetValue <StringList>().SelectedIndex == 1)
            {
                if (IgniteSlot != SpellSlot.Unknown &&
                    ObjectManager.Player.Spellbook.CanUseSpell(IgniteSlot) == SpellState.Ready)
                {
                    if (Target.IsValidTarget(650) &&
                        ObjectManager.Player.GetSummonerSpellDamage(Target, Damage.SummonerSpell.Ignite) + 150 >=
                        Target.Health && (!Q.IsReady() || W.StillJumped()))
                    {
                        ObjectManager.Player.Spellbook.CastSpell(IgniteSlot, Target);
                    }
                }
            }

            switch (ComboMode)
            {
            case ComboMode.Mode2xQ:
            {
                ActiveComboMode = ActiveComboMode.Mode2xQ;
                ExecuteMode2xQ();
                break;
            }

            case ComboMode.Mode2xW:
            {
                ActiveComboMode = ActiveComboMode.Mode2xW;
                ExecuteMode2xW();
                break;
            }

            case ComboMode.ModeAuto:
            {
                ActiveComboMode = ActiveComboMode.ModeAuto;
                ExecuteModeAuto();
                break;
            }
            }

            ExecuteSpells();
            ExecuteCompleteCombo();
        }
Example #6
0
 static void CastSpiderQ()
 {
     if (Spider() && Q2.IsReady())
     {
         var Target = TargetSelector.GetTarget(Q2.Range, TargetSelector.DamageType.Magical, true);
         if (Target != null)
         {
             Q2.CastOnUnit(Target, true);
         }
     }
 }
Example #7
0
        private static void ExecuteModeAuto()
        {
            if (!R.IsReady())
            {
                return;
            }

            var find = HeroManager.Enemies.Find(e => e.NetworkId != Target.NetworkId && e.LSDistance(Target) <= W.Width);

            if (find == null)
            {
                return;
            }
            if (find != null && CanCastCombo(ComboMode.Mode2xW))
            {
                var wComboHits = GetWHits(Target, HeroManager.Enemies.Where(e => e.LSIsValidTarget(W.Range + W.Width)).Cast <Obj_AI_Base>().ToList());

                if (wComboHits >= 2)
                {
                    ExecuteMode2xW();
                }
                return;
            }

            if (find == null && CanCastCombo(ComboMode.Mode2xQ))
            {
                ExecuteMode2xQ();
            }

            if (Q.IsReady() && !W.IsReady())
            {
                ExecuteMode2xQ();
                return;
            }

            if (!Q.IsReady() && W.IsReady())
            {
                ExecuteMode2xW();
                return;
            }

            if (Target.LSIsValidTarget(Q.Range) && CommonHelper.SpellRStatus == CommonHelper.SpellRName.R2xQ)
            {
                Q2.CastOnUnit(Target);
                return;
            }

            if (Target.LSIsValidTarget(W.Range) && CommonHelper.SpellRStatus == CommonHelper.SpellRName.R2xW)
            {
                W2.Cast(Target);
                return;
            }
        }
Example #8
0
        //private void LaneClear()
        //{
        //    try
        //    {


        //    }
        //    catch (Exception ex)   //Everything put in OnAction
        //    {
        //        Console.WriteLine(ex);
        //    }
        //}

        private void Combo()
        {
            var enemy = Variables.TargetSelector.GetTarget(1200, DamageType.Physical);


            var ComboQ  = Menu["Combo"]["UseQCombo"].GetValue <MenuBool>();
            var ComboQ2 = Menu["Combo"]["UseQ2Combo"].GetValue <MenuBool>();
            var ComboW  = Menu["Combo"]["ComboW"].GetValue <MenuBool>();
            var ComboE  = Menu["Combo"]["UseECombo"].GetValue <MenuBool>();


            if (ComboE && E.IsReady() && enemy.IsValidTarget(E.Range))
            {
                var pred = E.GetPrediction(enemy);
                if (pred.Hitchance >= HitChance.High)
                {
                    E.Cast(pred.UnitPosition);
                }
            }


            if (ComboQ && Q.IsReady() && enemy.IsValidTarget(Q.Range))
            {
                var pred = Q.GetPrediction(enemy);
                if (pred.Hitchance >= HitChance.High && pred.CollisionObjects.Count == 0)
                {
                    Q.Cast(pred.UnitPosition);
                }
            }



            if (ComboQ2 && Q2.IsReady() && enemy.IsValidTarget(Q2.Range) && HasUrgotEBuff(enemy))
            {
                if (ComboW && W.IsReady())
                {
                    W.Cast();
                }
                Q2.CastOnUnit(enemy);
            }
        }
Example #9
0
 private static void doFarm()
 {
     foreach (
         var Minion in
         ObjectManager.Get <Obj_AI_Minion>()
         .Where(
             minion =>
             minion.Team != Player.Team && !minion.IsDead &&
             Vector2.Distance(minion.ServerPosition.To2D(), Player.ServerPosition.To2D()) < 600f)
         .OrderBy(minion => Vector2.Distance(minion.Position.To2D(), Player.Position.To2D())))
     {
         if (IsCougar)
         {
             if (Q2.IsReady() && Config.Item("farm_Q2").GetValue <bool>())
             {
                 Q2.CastOnUnit(Player, PacketCasting);
             }
             else if (W2.IsReady() && Config.Item("farm_W2").GetValue <bool>() && Player.Distance(Minion) > 200f)
             {
                 W2.Cast(Minion.Position, PacketCasting);
             }
             else if (E2.IsReady() && Config.Item("farm_E2").GetValue <bool>())
             {
                 E2.Cast(Minion.Position, PacketCasting);
             }
         }
         else if (R.IsReady() && Config.Item("farm_R").GetValue <bool>())
         {
             R.CastOnUnit(Player, PacketCasting);
         }
         else if (E1.IsReady() && Config.Item("farm_E1").GetValue <bool>())
         {
             E1.CastOnUnit(Player, PacketCasting);
         }
         return;
     }
 }
Example #10
0
        private void JungleClear()
        {
            if (!ManaManager.HasMana("JungleClear"))
            {
                return;
            }

            var mobs = MinionManager.GetMinions(Player.Position, 800, MinionTypes.All, MinionTeam.Neutral,
                                                MinionOrderTypes.MaxHealth);

            if (mobs.Any())
            {
                var mob = mobs.FirstOrDefault();

                if (!IsMelee)
                {
                    if (Menu.Item("UseEJungle", true).GetValue <bool>() && E.IsReady() &&
                        Menu.Item("UseQJungle", true).GetValue <bool>() && Q.IsReady())
                    {
                        var gateVector = Player.ServerPosition +
                                         Vector3.Normalize(Game.CursorPos - Player.ServerPosition) * 50;

                        if (mob != null && mob.IsValidTarget(QExtend.Range))
                        {
                            E.Cast(gateVector);
                            QExtend.Cast(mob.Position);
                        }
                    }

                    if (Menu.Item("UseQJungle", true).GetValue <bool>() && Q.IsReady())
                    {
                        var qFarm = MinionManager.GetBestLineFarmLocation(mobs.Select(x => x.Position.To2D()).ToList(),
                                                                          Q.Width, Q.Range);

                        if (qFarm.MinionsHit >= 1)
                        {
                            Q.Cast(qFarm.Position);
                        }
                    }

                    if (Menu.Item("UseWJungle", true).GetValue <bool>() && W.IsReady())
                    {
                        if (mob.Distance(Player) <= 550)
                        {
                            W.Cast();
                        }
                    }

                    if (Menu.Item("UseRJungle", true).GetValue <bool>() && R.IsReady())
                    {
                        if (Qcd != 0 && Wcd != 0 && Ecd != 0)
                        {
                            R.Cast();
                        }
                    }
                }
                else
                {
                    if (Menu.Item("UseWJungleHam", true).GetValue <bool>() && W2.IsReady() && mob.IsValidTarget(300))
                    {
                        W2.Cast();
                    }

                    if (Menu.Item("UseQJungleHam", true).GetValue <bool>() && Q2.IsReady() && mob.IsValidTarget(Q2.Range))
                    {
                        Q2.CastOnUnit(mob);
                    }

                    if (Menu.Item("UseEJungleHam", true).GetValue <bool>() && E2.IsReady() && mob.IsValidTarget(E2.Range))
                    {
                        E2.CastOnUnit(mob);
                    }

                    if (Menu.Item("UseRJungle", true).GetValue <bool>() && R.IsReady())
                    {
                        if (Q1Cd != 0 && W1Cd != 0 && E1Cd != 0)
                        {
                            R.Cast();
                        }
                    }
                }
            }
        }