Exemple #1
0
        public static float GetTargetHealth(PlayerInfo playerInfo)
        {
            if (playerInfo.Champ.IsVisible)
            {
                return(playerInfo.Champ.Health);
            }

            float predictedhealth = playerInfo.Champ.Health + playerInfo.Champ.HPRegenRate * ((Environment.TickCount - playerInfo.LastSeen + playerInfo.GetRecallCountdown()) / 1000f);

            return(predictedhealth > playerInfo.Champ.MaxHealth ? playerInfo.Champ.MaxHealth : predictedhealth);
        }
Exemple #2
0
        public static float GetTargetHealth(PlayerInfo playerInfo)
        {
            if (playerInfo.Champ.IsVisible)
            {
                return(playerInfo.Champ.Health);
            }
            float num = playerInfo.Champ.Health + playerInfo.Champ.HPRegenRate * ((float)(Environment.TickCount - playerInfo.LastSeen + playerInfo.GetRecallCountdown()) / 1000f);

            if (num <= playerInfo.Champ.MaxHealth)
            {
                return(num);
            }
            return(playerInfo.Champ.MaxHealth);
        }
Exemple #3
0
        private static void HandleRecallShot(PlayerInfo playerInfo)
        {
            bool flag = false;

            foreach (Obj_AI_Hero current in
                     from x in _ownTeam
                     where x.IsValid && (x.IsMe || Helper.GetSafeMenuItem <bool>(_menu.Item(x.ChampionName))) && !x.IsDead && !x.IsStunned && (x.Spellbook.CanUseSpell(SpellSlot.R) == SpellState.Ready || (x.Spellbook.GetSpell(SpellSlot.R).Level > 0 && x.Spellbook.CanUseSpell(SpellSlot.R) == SpellState.Surpressed && x.Mana >= GetUltManaCost(x)))
                     select x)
            {
                if (!(current.ChampionName != "Ezreal") || !(current.ChampionName != "Karthus") || !Helper.IsCollidingWithChamps(current, _enemySpawnPos, UltInfo[current.ChampionName].Width))
                {
                    float num = Helper.GetSpellTravelTime(current, UltInfo[current.ChampionName].Speed, UltInfo[current.ChampionName].Delay, _enemySpawnPos) - (float)(_menu.Item("extraDelay").GetValue <Slider>().Value + 65);
                    if (num - (float)playerInfo.GetRecallCountdown() <= 60f)
                    {
                        playerInfo.IncomingDamage[current.NetworkId] = (float)Helper.GetUltDamage(current, playerInfo.Champ) * UltInfo[current.ChampionName].DamageMultiplicator;
                        if ((float)playerInfo.GetRecallCountdown() <= num && current.IsMe)
                        {
                            flag = true;
                        }
                    }
                }
            }
            float num2         = playerInfo.IncomingDamage.Values.Sum();
            float targetHealth = Helper.GetTargetHealth(playerInfo);

            if (!flag || _menu.Item("panicKey").GetValue <KeyBind>().Active)
            {
                if (_menu.Item("debugMode").GetValue <bool>())
                {
                    Game.PrintChat("!SHOOT/PANICKEY {0} (Health: {1} TOTAL-UltDamage: {2})", new object[]
                    {
                        playerInfo.Champ.ChampionName,
                        targetHealth,
                        num2
                    });
                }
                return;
            }
            playerInfo.IncomingDamage.Clear();
            int tickCount = Environment.TickCount;

            if (tickCount - playerInfo.LastSeen > 20000 && !_menu.Item("regardlessKey").GetValue <KeyBind>().Active)
            {
                if (num2 < playerInfo.Champ.MaxHealth)
                {
                    if (_menu.Item("debugMode").GetValue <bool>())
                    {
                        Game.PrintChat("DONT SHOOT, TOO LONG NO VISION {0} (Health: {1} TOTAL-UltDamage: {2})", new object[]
                        {
                            playerInfo.Champ.ChampionName,
                            targetHealth,
                            num2
                        });
                    }
                    return;
                }
            }
            else
            {
                if (num2 < targetHealth)
                {
                    if (_menu.Item("debugMode").GetValue <bool>())
                    {
                        Game.PrintChat("DONT SHOOT {0} (Health: {1} TOTAL-UltDamage: {2})", new object[]
                        {
                            playerInfo.Champ.ChampionName,
                            targetHealth,
                            num2
                        });
                    }
                    return;
                }
            }
            if (_menu.Item("debugMode").GetValue <bool>())
            {
                Game.PrintChat("SHOOT {0} (Health: {1} TOTAL-UltDamage: {2})", new object[]
                {
                    playerInfo.Champ.ChampionName,
                    targetHealth,
                    num2
                });
            }
            _ult.Cast(_enemySpawnPos, true);
            _ultCasted = tickCount;
        }
Exemple #4
0
		private static void HandleRecallShot(PlayerInfo playerInfo)
		{
			bool flag = false;
			foreach (Obj_AI_Hero current in 
				from x in _ownTeam
				where x.IsValid && (x.IsMe || Helper.GetSafeMenuItem<bool>(_menu.Item(x.ChampionName))) && !x.IsDead && !x.IsStunned && (x.Spellbook.CanUseSpell(SpellSlot.R) == SpellState.Ready || (x.Spellbook.GetSpell(SpellSlot.R).Level > 0 && x.Spellbook.CanUseSpell(SpellSlot.R) == SpellState.Surpressed && x.Mana >= GetUltManaCost(x)))
				select x)
			{
				if (!(current.ChampionName != "Ezreal") || !(current.ChampionName != "Karthus") || !Helper.IsCollidingWithChamps(current, _enemySpawnPos, UltInfo[current.ChampionName].Width))
				{
					float num = Helper.GetSpellTravelTime(current, UltInfo[current.ChampionName].Speed, UltInfo[current.ChampionName].Delay, _enemySpawnPos) - (float)(_menu.Item("extraDelay").GetValue<Slider>().Value + 65);
					if (num - (float)playerInfo.GetRecallCountdown() <= 60f)
					{
						playerInfo.IncomingDamage[current.NetworkId] = (float)Helper.GetUltDamage(current, playerInfo.Champ) * UltInfo[current.ChampionName].DamageMultiplicator;
						if ((float)playerInfo.GetRecallCountdown() <= num && current.IsMe)
						{
							flag = true;
						}
					}
				}
			}
			float num2 = playerInfo.IncomingDamage.Values.Sum();
			float targetHealth = Helper.GetTargetHealth(playerInfo);
			if (!flag || _menu.Item("panicKey").GetValue<KeyBind>().Active)
			{
				if (_menu.Item("debugMode").GetValue<bool>())
				{
					Game.PrintChat("!SHOOT/PANICKEY {0} (Health: {1} TOTAL-UltDamage: {2})", new object[]
					{
						playerInfo.Champ.ChampionName,
						targetHealth,
						num2
					});
				}
				return;
			}
			playerInfo.IncomingDamage.Clear();
			int tickCount = Environment.TickCount;
			if (tickCount - playerInfo.LastSeen > 20000 && !_menu.Item("regardlessKey").GetValue<KeyBind>().Active)
			{
				if (num2 < playerInfo.Champ.MaxHealth)
				{
					if (_menu.Item("debugMode").GetValue<bool>())
					{
						Game.PrintChat("DONT SHOOT, TOO LONG NO VISION {0} (Health: {1} TOTAL-UltDamage: {2})", new object[]
						{
							playerInfo.Champ.ChampionName,
							targetHealth,
							num2
						});
					}
					return;
				}
			}
			else
			{
				if (num2 < targetHealth)
				{
					if (_menu.Item("debugMode").GetValue<bool>())
					{
						Game.PrintChat("DONT SHOOT {0} (Health: {1} TOTAL-UltDamage: {2})", new object[]
						{
							playerInfo.Champ.ChampionName,
							targetHealth,
							num2
						});
					}
					return;
				}
			}
			if (_menu.Item("debugMode").GetValue<bool>())
			{
				Game.PrintChat("SHOOT {0} (Health: {1} TOTAL-UltDamage: {2})", new object[]
				{
					playerInfo.Champ.ChampionName,
					targetHealth,
					num2
				});
			}
			_ult.Cast(_enemySpawnPos, true);
			_ultCasted = tickCount;
		}
Exemple #5
0
        private static void HandleRecallShot(PlayerInfo playerInfo)
        {
            bool shoot = false;

            foreach (Obj_AI_Hero champ in _ownTeam.Where(x =>
                            x.IsValid && (x.IsMe || Helper.GetSafeMenuItem<bool>(_menu.Item(x.ChampionName))) &&
                            !x.IsDead && !x.IsStunned &&
                            (x.Spellbook.CanUseSpell(SpellSlot.R) == SpellState.Ready ||
                            (x.Spellbook.GetSpell(SpellSlot.R).Level > 0 &&
                            x.Spellbook.CanUseSpell(SpellSlot.R) == SpellState.Surpressed &&
                            x.Mana >= GetUltManaCost(x))))) //use when fixed: champ.Spellbook.GetSpell(SpellSlot.R) = Ready or champ.Spellbook.GetSpell(SpellSlot.R).ManaCost)
            {
                if (champ.ChampionName != "Ezreal" && champ.ChampionName != "Karthus" && Helper.IsCollidingWithChamps(champ, _enemySpawnPos, UltInfo[champ.ChampionName].Width))
                    continue;

                //increase timeneeded if it should arrive earlier, decrease if later
                float timeneeded = Helper.GetSpellTravelTime(champ, UltInfo[champ.ChampionName].Speed, UltInfo[champ.ChampionName].Delay, _enemySpawnPos) - (_menu.Item("extraDelay").GetValue<Slider>().Value + 65);

                if (timeneeded - playerInfo.GetRecallCountdown() > 60)
                    continue;

                playerInfo.IncomingDamage[champ.NetworkId] = (float)Helper.GetUltDamage(champ, playerInfo.Champ) * UltInfo[champ.ChampionName].DamageMultiplicator;

                if (playerInfo.GetRecallCountdown() <= timeneeded)
                    if (champ.IsMe)
                        shoot = true;
            }

            float totalUltDamage = playerInfo.IncomingDamage.Values.Sum();

            float targetHealth = Helper.GetTargetHealth(playerInfo);

            if (!shoot || _menu.Item("panicKey").GetValue<KeyBind>().Active)
            {
                if (_menu.Item("debugMode").GetValue<bool>())
                    Game.PrintChat("!SHOOT/PANICKEY {0} (Health: {1} TOTAL-UltDamage: {2})", playerInfo.Champ.ChampionName, targetHealth, totalUltDamage);

                return;
            }

            playerInfo.IncomingDamage.Clear(); //wrong placement?

            int time = Environment.TickCount;

            if (time - playerInfo.LastSeen > 20000 && !_menu.Item("regardlessKey").GetValue<KeyBind>().Active)
            {
                if (totalUltDamage < playerInfo.Champ.MaxHealth)
                {
                    if (_menu.Item("debugMode").GetValue<bool>())
                        Game.PrintChat("DONT SHOOT, TOO LONG NO VISION {0} (Health: {1} TOTAL-UltDamage: {2})", playerInfo.Champ.ChampionName, targetHealth, totalUltDamage);

                    return;
                }
            }
            else if (totalUltDamage < targetHealth)
            {
                if (_menu.Item("debugMode").GetValue<bool>())
                    Game.PrintChat("DONT SHOOT {0} (Health: {1} TOTAL-UltDamage: {2})", playerInfo.Champ.ChampionName, targetHealth, totalUltDamage);

                return;
            }

            if (_menu.Item("debugMode").GetValue<bool>())
                Game.PrintChat("SHOOT {0} (Health: {1} TOTAL-UltDamage: {2})", playerInfo.Champ.ChampionName, targetHealth, totalUltDamage);

            _ult.Cast(_enemySpawnPos, true);
            _ultCasted = time;
        }
Exemple #6
0
        private static void HandleRecallShot(PlayerInfo playerInfo)
        {
            bool shoot = false;

            foreach (Obj_AI_Hero champ in _ownTeam.Where(x =>
                                                         x.IsValid && (x.IsMe || Helper.GetSafeMenuItem <bool>(_menu.Item(x.ChampionName))) &&
                                                         !x.IsDead && !x.IsStunned &&
                                                         (x.Spellbook.CanUseSpell(SpellSlot.R) == SpellState.Ready ||
                                                          (x.Spellbook.GetSpell(SpellSlot.R).Level > 0 &&
                                                           x.Spellbook.CanUseSpell(SpellSlot.R) == SpellState.Surpressed &&
                                                           x.Mana >= GetUltManaCost(x))))) //use when fixed: champ.Spellbook.GetSpell(SpellSlot.R) = Ready or champ.Spellbook.GetSpell(SpellSlot.R).ManaCost)
            {
                if (champ.ChampionName != "Ezreal" && champ.ChampionName != "Karthus" && Helper.IsCollidingWithChamps(champ, _enemySpawnPos, UltInfo[champ.ChampionName].Width))
                {
                    continue;
                }

                //increase timeneeded if it should arrive earlier, decrease if later
                float timeneeded = Helper.GetSpellTravelTime(champ, UltInfo[champ.ChampionName].Speed, UltInfo[champ.ChampionName].Delay, _enemySpawnPos) - (_menu.Item("extraDelay").GetValue <Slider>().Value + 65);

                if (timeneeded - playerInfo.GetRecallCountdown() > 60)
                {
                    continue;
                }

                playerInfo.IncomingDamage[champ.NetworkId] = (float)Helper.GetUltDamage(champ, playerInfo.Champ) * UltInfo[champ.ChampionName].DamageMultiplicator;

                if (playerInfo.GetRecallCountdown() <= timeneeded)
                {
                    if (champ.IsMe)
                    {
                        shoot = true;
                    }
                }
            }

            float totalUltDamage = playerInfo.IncomingDamage.Values.Sum();

            float targetHealth = Helper.GetTargetHealth(playerInfo);

            if (!shoot || _menu.Item("panicKey").GetValue <KeyBind>().Active)
            {
                if (_menu.Item("debugMode").GetValue <bool>())
                {
                    Game.PrintChat("!SHOOT/PANICKEY {0} (Health: {1} TOTAL-UltDamage: {2})", playerInfo.Champ.ChampionName, targetHealth, totalUltDamage);
                }

                return;
            }

            playerInfo.IncomingDamage.Clear(); //wrong placement?

            int time = Environment.TickCount;

            if (time - playerInfo.LastSeen > 20000 && !_menu.Item("regardlessKey").GetValue <KeyBind>().Active)
            {
                if (totalUltDamage < playerInfo.Champ.MaxHealth)
                {
                    if (_menu.Item("debugMode").GetValue <bool>())
                    {
                        Game.PrintChat("DONT SHOOT, TOO LONG NO VISION {0} (Health: {1} TOTAL-UltDamage: {2})", playerInfo.Champ.ChampionName, targetHealth, totalUltDamage);
                    }

                    return;
                }
            }
            else if (totalUltDamage < targetHealth)
            {
                if (_menu.Item("debugMode").GetValue <bool>())
                {
                    Game.PrintChat("DONT SHOOT {0} (Health: {1} TOTAL-UltDamage: {2})", playerInfo.Champ.ChampionName, targetHealth, totalUltDamage);
                }

                return;
            }

            if (_menu.Item("debugMode").GetValue <bool>())
            {
                Game.PrintChat("SHOOT {0} (Health: {1} TOTAL-UltDamage: {2})", playerInfo.Champ.ChampionName, targetHealth, totalUltDamage);
            }

            _ult.Cast(_enemySpawnPos, true);
            _ultCasted = time;
        }