Beispiel #1
0
        public static void Game_OnUpdate(EventArgs args)
        {
            if (!OnUpdate.CanUpdate())
            {
                return;
            }

            Var.Seconds = (int)Game.GameTime % 60;

            AutoUse.AutoUseMain();

            if (MenuVar.VisiblebyEnemy)
            {
                foreach (var hero in AllyHeroes.Heroes)
                {
                    Methods.ShowMeMore.ShowVisible(hero);
                }
            }
            else
            {
                Methods.ShowMeMore.ClearEffectsVisible();
            }

            if (MenuVar.DodgeEnable)
            {
                Dodge.Check();
            }

            CourierAbuse.CourierMain();

            foreach (var hero in EnemyHeroes.Heroes)
            {
                ShowMeMore.DrawShowMeMoreSpells(hero);
            }

            if (MenuVar.ShowRunesChat /*&& (int) Game.GameTime / 60 % 2 == 0*/)
            {
                if (ObjectManager.Runes.TopRune != null && Utils.SleepCheck("TopRunes"))
                {
                    ObjectManager.Runes.ChatTop();
                    Utils.Sleep(30000, "TopRunes");
                }

                if (ObjectManager.Runes.BotRune != null && Utils.SleepCheck("BotRunes"))
                {
                    ObjectManager.Runes.ChatBot();
                    Utils.Sleep(30000, "BotRunes");
                }
            }

            if (MenuVar.StackKey && Var.StackableSummons.Count > 0)
            {
                Jungle.GetClosestCamp(Var.StackableSummons);
                Jungle.Stack();
            }

            if (MenuVar.LastHitEnable)
            {
                if (MenuVar.Test)
                {
                    Lasthit.Attack_Calc();
                }

                if ((Game.IsKeyDown(MenuVar.LastHitKey) || MenuVar.SummonsAutoLasthit) &&
                    MenuVar.SummonsEnable)
                {
                    Lasthit.SummonLastHit();
                }
                else if ((Game.IsKeyDown(MenuVar.FarmKey) || MenuVar.SummonsAutoFarm) &&
                         MenuVar.SummonsEnable)
                {
                    Lasthit.SummonFarm();
                }
                else
                {
                    if (!Var.SummonsAutoAttackTypeDef)
                    {
                        Common.AutoattackSummons(-1);
                        Var.SummonsDisableAaKeyPressed = false;
                        Var.SummonsAutoAttackTypeDef   = true;
                    }
                    Var.CreeptargetS = null;
                }

                if (Game.IsKeyDown(MenuVar.LastHitKey))
                {
                    Lasthit.LastHit();
                }
                else if (Game.IsKeyDown(MenuVar.FarmKey))
                {
                    Lasthit.Farm();
                }
                else if (Game.IsKeyDown(MenuVar.CombatKey))
                {
                    Lasthit.Combat();
                }
                else if (Game.IsKeyDown(MenuVar.KiteKey))
                {
                    Lasthit.Kite();
                }
                else
                {
                    if (!Var.AutoAttackTypeDef)
                    {
                        Var.Me.Hold();
                        Common.Autoattack(MenuVar.AutoAttackMode);
                        Var.DisableAaKeyPressed = false;
                        Var.AutoAttackTypeDef   = true;
                    }
                    Var.CreeptargetH = null;
                }
            }
        }