예제 #1
0
        public static void FlashCombo()
        {
            var UseFlashCombo        = Config.Item("FlashComboKey").GetValue <KeyBind>().Active;
            var FlashComboMinEnemies = Config.Item("FlashComboMinEnemies").GetValue <Slider>().Value;
            var FlashAntiSuicide     = Config.Item("FlashAntiSuicide").GetValue <bool>();
            var packetCast           = Config.Item("PacketCast").GetValue <bool>();

            if (!UseFlashCombo)
            {
                return;
            }

            int qtPassiveStacks = GetPassiveStacks();

            if (((qtPassiveStacks == 3 && E.IsReady()) || qtPassiveStacks == 4) && summonerSpellManager.IsReadyFlash() && R.IsReady())
            {
                var allEnemies = DevHelper.GetEnemyList()
                                 .Where(x => Player.Distance(x) > R.Range && Player.Distance(x) < R.Range + 500);

                var enemies = DevHelper.GetEnemyList()
                              .Where(x => Player.Distance(x) > R.Range && Player.Distance(x) < R.Range + 400 && GetBurstComboDamage(x) * 0.9 > x.Health)
                              .OrderBy(x => x.Health);

                bool isSuicide = FlashAntiSuicide ? allEnemies.Count() - enemies.Count() > 2 : false;

                if (enemies.Count() > 0 && !isSuicide)
                {
                    var enemy = enemies.First();
                    if (DevHelper.CountEnemyInPositionRange(enemy.ServerPosition, 250) >= FlashComboMinEnemies)
                    {
                        var predict = R.GetPrediction(enemy, true).CastPosition;

                        if (qtPassiveStacks == 3)
                        {
                            if (packetCast)
                            {
                                Packet.C2S.Cast.Encoded(new Packet.C2S.Cast.Struct(Player.NetworkId, SpellSlot.E)).Send();
                            }
                            else
                            {
                                E.Cast();
                            }
                        }

                        summonerSpellManager.CastFlash(predict);

                        if (itemManager.IsReadyDFG())
                        {
                            itemManager.CastDFG(enemy);
                        }

                        if (R.IsReady())
                        {
                            R.Cast(predict, packetCast);
                        }

                        if (W.IsReady())
                        {
                            W.Cast(predict, packetCast);
                        }

                        if (E.IsReady())
                        {
                            E.Cast();
                        }
                    }
                }
            }
        }
예제 #2
0
        public static void FlashCombo()
        {
            var UseFlashCombo        = Config.Item("FlashComboKey").GetValue <KeyBind>().Active;
            var FlashComboMinEnemies = Config.Item("FlashComboMinEnemies").GetValue <Slider>().Value;
            var FlashAntiSuicide     = Config.Item("FlashAntiSuicide").GetValue <bool>();
            var packetCast           = Config.Item("PacketCast").GetValue <bool>();

            //var eTarget = TargetSelector.GetTarget(Q.Range, TargetSelector.DamageType.Magical);
            //Orbwalking.Orbwalk(eTarget, Game.CursorPos);

            if (!UseFlashCombo)
            {
                return;
            }

            // messageManager.AddMessage(0, "FlashComboKey ON", System.Drawing.Color.Yellow);

            int qtPassiveStacks = GetPassiveStacks();

            if (((qtPassiveStacks == 3 && E.IsReady()) || qtPassiveStacks == 4) && summonerSpellManager.IsReadyFlash() && R.IsReady())
            {
                var allEnemies = DevHelper.GetEnemyList()
                                 .Where(x => Player.Distance(x) > R.Range && Player.Distance(x) < R.Range + 500);

                var enemies = DevHelper.GetEnemyList()
                              .Where(x => Player.Distance(x) > R.Range && Player.Distance(x) < R.Range + 400 && GetBurstComboDamage(x) * 0.9 > x.Health)
                              .OrderBy(x => x.Health);

                bool isSuicide = FlashAntiSuicide ? allEnemies.Count() - enemies.Count() > 2 : false;

                if (enemies.Any() && !isSuicide)
                {
                    var enemy = enemies.First();
                    if (DevHelper.CountEnemyInPositionRange(enemy.ServerPosition, 250) >= FlashComboMinEnemies)
                    {
                        var predict = R.GetPrediction(enemy, true).CastPosition;

                        if (qtPassiveStacks == 3)
                        {
                            E.Cast(packetCast);
                        }

                        summonerSpellManager.CastFlash(predict);


                        if (itemManager.IsItemReady(ItemName.DeathfireGrasp))
                        {
                            itemManager.UseItem(ItemName.DeathfireGrasp, enemy);
                        }

                        if (R.IsReady())
                        {
                            R.Cast(predict, packetCast);
                        }

                        if (W.IsReady())
                        {
                            W.Cast(predict, packetCast);
                        }

                        if (E.IsReady())
                        {
                            E.Cast();
                        }
                    }
                }
            }
        }