Пример #1
0
        public static void ExecuteComboLogic()
        {
            var spells = Variables.CurrentChampion.GetSpells();

            if (spells[SpellSlot.Q].IsEnabledAndReady())
            {
                var TargetHero = TargetSelector.GetTarget(spells[SpellSlot.Q].Range * 0.75f, TargetSelector.DamageType.Physical);
                if (TargetHero.IsValidTarget(spells[SpellSlot.Q].Range * 0.75f))
                {
                    var dashEndPos        = ObjectManager.Player.GetDashInfo().EndPos;
                    var QNormalPrediction = spells[SpellSlot.Q].GetPrediction(TargetHero);
                    if (dashEndPos != Vector2.Zero)
                    {
                        spells[SpellSlot.Q].UpdateSourcePosition(dashEndPos.To3D());
                        QNormalPrediction = spells[SpellSlot.Q].GetPrediction(TargetHero);
                        spells[SpellSlot.Q].UpdateSourcePosition(ObjectManager.Player.ServerPosition);
                    }

                    if (QNormalPrediction.Hitchance >= HitChance.High)
                    {
                        if (!ObjectManager.Player.IsDashing() && (!ObjectManager.Player.Spellbook.IsAutoAttacking || ObjectManager.Player.IsWindingUp) && (Environment.TickCount - LastCastTick > 500))
                        {
                            spells[SpellSlot.Q].Cast(QNormalPrediction.CastPosition);
                            LastCastTick = Environment.TickCount;
                        }
                    }
                    else if (!TargetHero.IsValidTarget(spells[SpellSlot.E].Range) &&
                             TargetHero.IsValidTarget(spells[SpellSlot.E].Range + 285f) &&
                             KalistaE.CanBeRendKilled(TargetHero))
                    {
                        if (!ObjectManager.Player.IsDashing() && (!ObjectManager.Player.Spellbook.IsAutoAttacking || ObjectManager.Player.IsWindingUp) && (Environment.TickCount - LastCastTick > 500))
                        {
                            spells[SpellSlot.Q].Cast(QNormalPrediction.CastPosition);
                            LastCastTick = Environment.TickCount;
                        }
                    }
                }
            }
        }
Пример #2
0
 internal static void OnNonKillableMinion(AttackableUnit minion)
 {
     try
     {
         if (Variables.spells[SpellSlot.E].IsReady() &&
             MenuExtensions.GetItemValue <bool>("iseriesr.kalista.misc.lhassit"))
         {
             if (Variables.spells[SpellSlot.E].CanCast((Obj_AI_Base)minion) &&
                 KalistaE.CanBeRendKilled((Obj_AI_Base)minion))
             {
                 if (Environment.TickCount - Variables.spells[SpellSlot.E].LastCastAttemptT >= 500)
                 {
                     Variables.spells[SpellSlot.E].Cast();
                     Variables.spells[SpellSlot.E].LastCastAttemptT = Environment.TickCount;
                 }
             }
         }
     }
     catch (Exception e)
     {
         //LogHelper.AddToLog(new LogItem("Kalista_OnNonKillableMinion", e, LogSeverity.Error));
     }
 }