Пример #1
0
        private static float GetComboDamage(Obj_AI_Hero enemy)
        {
            double damage = 0d;

            if (Q.IsReady())
            {
                damage += Player.GetSpellDamage(enemy, SpellSlot.Q) + Player.GetSpellDamage(enemy, SpellSlot.Q, 1);
            }
            if (W.IsReady())
            {
                damage += Player.GetSpellDamage(enemy, SpellSlot.W);
            }
            if (E.IsReady())
            {
                damage += Player.GetSpellDamage(enemy, SpellSlot.E);
            }
            if (R.IsReady() || (ObjectManager.Player.Spellbook.GetSpell(SpellSlot.R).State == SpellState.Surpressed && R.Level > 0))
            {
                damage += Player.GetSpellDamage(enemy, SpellSlot.R) * 8;
            }
            if (IgniteSlot.IsReady())
            {
                damage += IgniteHandler.GetIgniteDamage(enemy);
            }
            return((float)damage);
        }
Пример #2
0
        private static void KillSteal()
        {
            foreach (var enemy in ObjectManager.Get <Obj_AI_Hero>().Where(p => p.IsEnemy && !p.IsDead && p.IsValidTarget(E.Range + Q.Range) && !p.IsInvulnerable))
            {
                if (enemy.Health + enemy.HPRegenRate < Q.GetDamage(enemy) && Q.IsReady() && Config.Item("TK/ks/q").GetValue <bool>())
                {
                    if (enemy.IsValidTarget(Q.Range))
                    {
                        if (Config.Item("TK/misc/humanizer").GetValue <bool>())
                        {
                            Utility.DelayAction.Add(Config.Item("TK/misc/q/humanizer").GetValue <Slider>().Value, () => Q.Cast(enemy));
                        }
                        else
                        {
                            Q.Cast(enemy);
                        }
                    }
                }

                else if ((Q.GetDamage(enemy)) > enemy.Health + enemy.HPRegenRate && Config.Item("TK/ks/q").GetValue <bool>() && !enemy.IsValidTarget(Q.Range) && enemy.IsValidTarget(Q.Range + Player.Distance(GetFarthestMinion(Player.Position, enemy.Position).Position)) && Q.IsReady() && E.IsReady())
                {
                    if (Config.Item("TK/ks/e/mode").GetValue <StringList>().SelectedIndex == 0)
                    {
                        if (Config.Item("TK/ks/e").GetValue <bool>())
                        {
                            if (Config.Item("TK/misc/humanizer").GetValue <bool>())
                            {
                                Utility.DelayAction.Add(Config.Item("TK/misc/e/humanizer").GetValue <Slider>().Value, () => E.Cast(GetClosestMinion(Player.Position, enemy.Position)));
                            }
                            else
                            {
                                E.Cast(GetClosestMinion(Player.Position, enemy.Position));
                            }     //E.Cast(qtarget);
                        }
                    }
                    else if (Config.Item("TK/ks/e/mode").GetValue <StringList>().SelectedIndex == 1)
                    {
                        if (Config.Item("TK/ks/e").GetValue <bool>() && GetClosestMinion(Player.Position, enemy.Position).CountEnemiesInRange(1000f) <= Config.Item("TK/misc/e/mode/#").GetValue <Slider>().Value)
                        {
                            if (Config.Item("TK/misc/humanizer").GetValue <bool>())
                            {
                                Utility.DelayAction.Add(Config.Item("TK/misc/e/humanizer").GetValue <Slider>().Value, () => E.Cast(GetClosestMinion(Player.Position, enemy.Position)));
                            }
                            else
                            {
                                E.Cast(GetClosestMinion(Player.Position, enemy.Position));
                            }
                        }
                    }
                }

                else if (enemy.Health + enemy.HPRegenRate < W.GetDamage(enemy) && W.IsReady() && Config.Item("TK/ks/w").GetValue <bool>())
                {
                    if (enemy.IsValidTarget(W.Range))
                    {
                        if (Config.Item("TK/misc/humanizer").GetValue <bool>())
                        {
                            Utility.DelayAction.Add(Config.Item("TK/misc/w/humanizer").GetValue <Slider>().Value, () => W.Cast());
                        }
                        else
                        {
                            W.Cast();
                        }
                    }
                }

                else if ((W.GetDamage(enemy)) > enemy.Health + enemy.HPRegenRate && !enemy.IsValidTarget(W.Range) && enemy.IsValidTarget(W.Range + Player.Distance(GetFarthestMinion(Player.Position, enemy.Position).Position)) && W.IsReady() && E.IsReady() && Config.Item("TK/ks/w").GetValue <bool>())
                {
                    if (Config.Item("TK/ks/e/mode").GetValue <StringList>().SelectedIndex == 0)
                    {
                        if (Config.Item("TK/ks/e").GetValue <bool>())
                        {
                            if (Config.Item("TK/misc/humanizer").GetValue <bool>())
                            {
                                Utility.DelayAction.Add(Config.Item("TK/misc/e/humanizer").GetValue <Slider>().Value, () => E.Cast(GetClosestMinion(Player.Position, enemy.Position)));
                            }
                            else
                            {
                                E.Cast(GetClosestMinion(Player.Position, enemy.Position));
                            }  //E.Cast(qtarget);
                        }
                    }
                    else if (Config.Item("TK/ks/e/mode").GetValue <StringList>().SelectedIndex == 1)
                    {
                        if (Config.Item("TK/ks/e").GetValue <bool>() && GetClosestMinion(Player.Position, enemy.Position).CountEnemiesInRange(1000f) <= Config.Item("TK/misc/e/mode/#").GetValue <Slider>().Value)
                        {
                            if (Config.Item("TK/misc/humanizer").GetValue <bool>())
                            {
                                Utility.DelayAction.Add(Config.Item("TK/misc/e/humanizer").GetValue <Slider>().Value, () => E.Cast(GetClosestMinion(Player.Position, enemy.Position)));
                            }
                            else
                            {
                                E.Cast(GetClosestMinion(Player.Position, enemy.Position));
                            }
                        }
                    }
                }

                else if (Config.Item("TK/ks/r/mode").GetValue <StringList>().SelectedIndex == 1 && enemy.Health + enemy.HPRegenRate < (R.GetDamage(enemy) / 2) && R.IsReady() && Config.Item("TK/ks/r").GetValue <bool>())
                {
                    if (enemy.IsValidTarget(R.Range - 50))
                    {
                        if (Config.Item("TK/misc/humanizer").GetValue <bool>())
                        {
                            Utility.DelayAction.Add(Config.Item("TK/misc/r/humanizer").GetValue <Slider>().Value, () => R.Cast());
                        }
                        else
                        {
                            R.Cast();
                        }
                    }
                }

                else if (Config.Item("TK/ks/r/mode").GetValue <StringList>().SelectedIndex == 0 && enemy.Health + enemy.HPRegenRate < (R.GetDamage(enemy)) && R.IsReady() && Config.Item("TK/ks/r").GetValue <bool>())
                {
                    if (enemy.IsValidTarget(R.Range - 50))
                    {
                        if (Config.Item("TK/misc/humanizer").GetValue <bool>())
                        {
                            Utility.DelayAction.Add(Config.Item("TK/misc/r/humanizer").GetValue <Slider>().Value, () => R.Cast());
                        }
                        else
                        {
                            R.Cast();
                        }
                    }
                }


                else if (Config.Item("TK/ks/r/mode").GetValue <StringList>().SelectedIndex == 1 && (R.GetDamage(enemy) / 2) > enemy.Health + enemy.HPRegenRate && !enemy.IsValidTarget(R.Range - 50) && enemy.IsValidTarget((R.Range - 50) + Player.Distance(GetFarthestMinion(Player.Position, enemy.Position).Position)) && R.IsReady() && E.IsReady() && Config.Item("TK/ks/r").GetValue <bool>())
                {
                    if (Config.Item("TK/ks/e/mode").GetValue <StringList>().SelectedIndex == 0)
                    {
                        if (Config.Item("TK/ks/e").GetValue <bool>())
                        {
                            if (Config.Item("TK/misc/humanizer").GetValue <bool>())
                            {
                                Utility.DelayAction.Add(Config.Item("TK/misc/e/humanizer").GetValue <Slider>().Value, () => E.Cast(GetClosestMinion(Player.Position, enemy.Position)));
                            }
                            else
                            {
                                E.Cast(GetClosestMinion(Player.Position, enemy.Position));
                            }  //E.Cast(qtarget);
                        }
                    }
                    else if (Config.Item("TK/ks/e/mode").GetValue <StringList>().SelectedIndex == 1)
                    {
                        if (Config.Item("TK/ks/e").GetValue <bool>() && GetClosestMinion(Player.Position, enemy.Position).CountEnemiesInRange(1000f) <= Config.Item("TK/misc/e/mode/#").GetValue <Slider>().Value)
                        {
                            if (Config.Item("TK/misc/humanizer").GetValue <bool>())
                            {
                                Utility.DelayAction.Add(Config.Item("TK/misc/e/humanizer").GetValue <Slider>().Value, () => E.Cast(GetClosestMinion(Player.Position, enemy.Position)));
                            }
                            else
                            {
                                E.Cast(GetClosestMinion(Player.Position, enemy.Position));
                            }
                        }
                    }
                }

                else if (Config.Item("TK/ks/r/mode").GetValue <StringList>().SelectedIndex == 0 && (R.GetDamage(enemy)) > enemy.Health + enemy.HPRegenRate && !enemy.IsValidTarget(R.Range - 50) && enemy.IsValidTarget((R.Range - 50) + Player.Distance(GetFarthestMinion(Player.Position, enemy.Position).Position)) && R.IsReady() && E.IsReady() && Config.Item("TK/ks/r").GetValue <bool>())
                {
                    if (Config.Item("TK/ks/e/mode").GetValue <StringList>().SelectedIndex == 0)
                    {
                        if (Config.Item("TK/ks/e").GetValue <bool>())
                        {
                            if (Config.Item("TK/misc/humanizer").GetValue <bool>())
                            {
                                Utility.DelayAction.Add(Config.Item("TK/misc/e/humanizer").GetValue <Slider>().Value, () => E.Cast(GetClosestMinion(Player.Position, enemy.Position)));
                            }
                            else
                            {
                                E.Cast(GetClosestMinion(Player.Position, enemy.Position));
                            }  //E.Cast(qtarget);
                        }
                    }
                    else if (Config.Item("TK/ks/e/mode").GetValue <StringList>().SelectedIndex == 1)
                    {
                        if (Config.Item("TK/ks/e").GetValue <bool>() && GetClosestMinion(Player.Position, enemy.Position).CountEnemiesInRange(1000f) <= Config.Item("TK/misc/e/mode/#").GetValue <Slider>().Value)
                        {
                            if (Config.Item("TK/misc/humanizer").GetValue <bool>())
                            {
                                Utility.DelayAction.Add(Config.Item("TK/misc/e/humanizer").GetValue <Slider>().Value, () => E.Cast(GetClosestMinion(Player.Position, enemy.Position)));
                            }
                            else
                            {
                                E.Cast(GetClosestMinion(Player.Position, enemy.Position));
                            }
                        }
                    }
                }

                else if (Config.Item("TK/summoners/ignite").GetValue <bool>() && enemy.Health + enemy.HPRegenRate < IgniteHandler.GetIgniteDamage(enemy))
                {
                    if (enemy.IsValidTarget(IgniteHandler.IgniteRange))
                    {
                        ObjectManager.Player.Spellbook.CastSpell(IgniteSlot, enemy);
                    }
                }

                else if (!enemy.IsValidTarget(IgniteHandler.IgniteRange) && enemy.IsValidTarget(IgniteHandler.IgniteRange + Player.Distance(GetFarthestMinion(Player.Position, enemy.Position).Position)) && IgniteHandler.GetIgniteDamage(enemy) > enemy.Health + enemy.HPRegenRate && E.IsReady() && Config.Item("TK/summoners/ignite").GetValue <bool>())
                {
                    if (Config.Item("TK/ks/e/mode").GetValue <StringList>().SelectedIndex == 0)
                    {
                        if (Config.Item("TK/ks/e").GetValue <bool>())
                        {
                            if (Config.Item("TK/misc/humanizer").GetValue <bool>())
                            {
                                Utility.DelayAction.Add(Config.Item("TK/misc/e/humanizer").GetValue <Slider>().Value, () => E.Cast(GetClosestMinion(Player.Position, enemy.Position)));
                            }
                            else
                            {
                                E.Cast(GetClosestMinion(Player.Position, enemy.Position));
                            }  //E.Cast(qtarget);
                        }
                    }
                    else if (Config.Item("TK/ks/e/mode").GetValue <StringList>().SelectedIndex == 1)
                    {
                        if (Config.Item("TK/ks/e").GetValue <bool>() && GetClosestMinion(Player.Position, enemy.Position).CountEnemiesInRange(1000f) <= Config.Item("TK/misc/e/mode/#").GetValue <Slider>().Value)
                        {
                            if (Config.Item("TK/misc/humanizer").GetValue <bool>())
                            {
                                Utility.DelayAction.Add(Config.Item("TK/misc/e/humanizer").GetValue <Slider>().Value, () => E.Cast(GetClosestMinion(Player.Position, enemy.Position)));
                            }
                            else
                            {
                                E.Cast(GetClosestMinion(Player.Position, enemy.Position));
                            }
                        }
                    }
                }
            }
        }