Exemplo n.º 1
0
        /// <summary>
        /// Called whenever the game is being runned.
        /// </summary>
        /// <param name="args"></param>
        private static void Game_OnTick(System.EventArgs args)
        {
            if (Config.MiscMenu["pet"].Cast <CheckBox>().CurrentValue)
            {
                Pet.MovePet();
            }
            if (Config.KillStealMenu["toggle"].Cast <CheckBox>().CurrentValue)
            {
                if (!LastWEndPosition.IsZero &&
                    Player.Instance.Spellbook.GetSpell(SpellSlot.W).Name.ToLower() == "leblancslide")
                {
                    LastWEndPosition = Vector3.Zero;
                }
                if (!LastWUltimateEndPosition.IsZero &&
                    Player.Instance.Spellbook.GetSpell(SpellSlot.R).Name.ToLower() == "leblancslidem")
                {
                    LastWUltimatePosition = Vector3.Zero;
                }
                if (Modes.KillSteal.ResetW && Player.Instance.ServerPosition.IsInRange(LastWEndPosition, 100))
                {
                    Modes.KillSteal.ResetW = Extension.LogicReturn();

                    if (Modes.KillSteal.ResetW == false)
                    {
                        LastWEndPosition = Vector3.Zero;
                    }

                    #region Old Code

                    /*if (!E.IsReady())
                     * {
                     *  var eEnemies =
                     *      EntityManager.Heroes.Enemies.Where(t => t.IsValidTarget(E.Range) && Extension.IsBeingE(t))
                     *          .ToArray();
                     *
                     *  if (eEnemies.Any())
                     *  {
                     *      var shouldUse = eEnemies.Any(t => LastWPosition.Distance(t) <= E.Range);
                     *
                     *      if (!shouldUse) return;
                     *
                     *      if (WReturn.IsReady() &&
                     *          Player.Instance.Spellbook.GetSpell(SpellSlot.W).Name.ToLower() == "leblancslidereturn")
                     *      {
                     *          WReturn.Cast();
                     *          LastWEndPosition = Vector3.Zero;
                     *          Modes.KillSteal.ResetW = false;
                     *          return;
                     *      }
                     *  }
                     *  else
                     *  {
                     *      if (WReturn.IsReady() &&
                     *          Player.Instance.Spellbook.GetSpell(SpellSlot.W).Name.ToLower() == "leblancslidereturn")
                     *      {
                     *          WReturn.Cast();
                     *          LastWEndPosition = Vector3.Zero;
                     *          Modes.KillSteal.ResetW = false;
                     *          return;
                     *      }
                     *  }
                     * }
                     *
                     * if (WReturn.IsReady() &&
                     *  Player.Instance.Spellbook.GetSpell(SpellSlot.W).Name.ToLower() == "leblancslidereturn")
                     * {
                     *  WReturn.Cast();
                     *  LastWEndPosition = Vector3.Zero;
                     *  Modes.KillSteal.ResetW = false;
                     *  return;
                     * }*/

                    #endregion
                }
                if (Modes.KillSteal.ResetW && Player.Instance.ServerPosition.IsInRange(LastWUltimateEndPosition, 100))
                {
                    Modes.KillSteal.ResetW = Extension.LogicReturn(true);

                    if (Modes.KillSteal.ResetW == false)
                    {
                        LastWEndPosition = Vector3.Zero;
                    }

                    #region Old Code

                    /*if (!E.IsReady())
                     * {
                     *  var eEnemies =
                     *      EntityManager.Heroes.Enemies.Where(t => t.IsValidTarget(E.Range) && Extension.IsBeingE(t))
                     *          .ToArray();
                     *
                     *  if (eEnemies.Any())
                     *  {
                     *      var shouldUse = eEnemies.Any(t => LastWUltimatePosition.Distance(t) <= E.Range);
                     *
                     *      if (!shouldUse) return;
                     *
                     *      if (RReturn.IsReady() &&
                     *          Player.Instance.Spellbook.GetSpell(SpellSlot.R).Name.ToLower() == "leblancslidereturnm")
                     *      {
                     *          RReturn.Cast();
                     *          LastWEndPosition = Vector3.Zero;
                     *          Modes.KillSteal.ResetW = false;
                     *          return;
                     *      }
                     *  }
                     *  else
                     *  {
                     *      if (RReturn.IsReady() &&
                     *          Player.Instance.Spellbook.GetSpell(SpellSlot.R).Name.ToLower() == "leblancslidereturnm")
                     *      {
                     *          RReturn.Cast();
                     *          LastWUltimateEndPosition = Vector3.Zero;
                     *          Modes.KillSteal.ResetW = false;
                     *          return;
                     *      }
                     *  }
                     * }
                     *
                     *
                     * if (RReturn.IsReady() &&
                     *  Player.Instance.Spellbook.GetSpell(SpellSlot.R).Name.ToLower() == "leblancslidereturnm")
                     * {
                     *  RReturn.Cast();
                     *  LastWUltimateEndPosition = Vector3.Zero;
                     *  Modes.KillSteal.ResetW = false;
                     *  return;
                     * }*/

                    #endregion
                }

                Modes.KillSteal.Execute();
            }
            if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo))
            {
                Modes.Combo.Execute();
            }
            if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Harass))
            {
                Modes.Harass.Execute();
            }
            if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.LaneClear))
            {
                Modes.LaneClear.Execute();
            }
            if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.JungleClear))
            {
                Modes.JungleClear.Execute();
            }
        }