Exemplo n.º 1
0
        private static void Loading_OnLoadingComplete(EventArgs args)
        {
            try
            {
                if (Game.MapId != GameMapId.HowlingAbyss)
                {
                    Logger.Send(Game.MapId + " IS NOT Supported By AramBuddy !", Logger.LogLevel.Warn);
                    Chat.Print(Game.MapId + " IS NOT Supported By AramBuddy !");
                    return;
                }

                textsize = Drawing.Width <= 400 || Drawing.Height <= 400 ? 10F : 40F;
                text     = new Text("YOUR ORBWALKER IS DISABLED", new Font("Euphemia", textsize, FontStyle.Bold))
                {
                    Color = System.Drawing.Color.White, Position = new Vector2(Drawing.Width * 0.3f, Drawing.Height * 0.2f)
                };

                Chat.OnClientSideMessage += delegate(ChatClientSideMessageEventArgs eventArgs)
                {
                    if (eventArgs.Message.ToLower().Contains("portaio") && !CrashAIODetected)
                    {
                        var warnmsg = "AramBuddy Does not Work With CrashAIO\nDisable CrashAIO In order to use AramBuddy !";
                        Chat.Print(warnmsg);
                        Logger.Send(warnmsg, Logger.LogLevel.Warn);
                        Notifications.Show(new SimpleNotification("AramBuddy", warnmsg), 20000);
                        Drawing.OnEndScene += delegate
                        {
                            text.TextValue = warnmsg;
                            text.Position  = new Vector2(Drawing.Width * 0.3f, Drawing.Height * 0.2f);
                            text.Draw();
                        };
                        CrashAIODetected = true;
                    }
                };

                // Creates The Menu
                CreateMenu();

                // Checks for updates
                CheckVersion.Init();

                // Inits KappaEvade
                KappaEvade.Init();

                // Initialize the AutoShop.
                AutoShop.Setup.Init();

                Timer                    = Game.Time;
                TimeToStart              = new Random().Next(10000, 30000) + Game.Ping;
                Game.OnTick             += Game_OnTick;
                Events.OnGameEnd        += Events_OnGameEnd;
                Player.OnPostIssueOrder += Player_OnPostIssueOrder;

                Logger.Send("Starting After: " + (TimeToStart / 1000).ToString("F1") + " Second/s", Logger.LogLevel.Event);
            }
            catch (Exception ex)
            {
                Logger.Send("Program Error At Loading_OnLoadingComplete", ex, Logger.LogLevel.Error);
            }
        }
Exemplo n.º 2
0
        private static void Loading_OnLoadingComplete(EventArgs args)
        {
            try
            {
                if (Game.MapId != GameMapId.HowlingAbyss)
                {
                    Logger.Send(Game.MapId + " IS NOT Supported By AramBuddy !", Logger.LogLevel.Warn);
                    Chat.Print(Game.MapId + " IS NOT Supported By AramBuddy !");
                    return;
                }

                // Checks for updates
                CheckVersion.Init();

                // Inits KappaEvade
                KappaEvade.KappaEvade.Init();

                // Initialize the AutoShop.
                AutoShop.Setup.Init();

                if (!File.Exists(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\EloBuddy\\AramBuddy\\temp\\temp123.dat"))
                {
                    File.Create(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\EloBuddy\\AramBuddy\\temp\\temp123.dat");
                }

                /*
                 * Chat.OnInput += delegate (ChatInputEventArgs msg)
                 * {
                 *  if (msg.Input.Equals("Load Custom", StringComparison.CurrentCultureIgnoreCase) && !CustomChamp)
                 *  {
                 *      var Instance = (Base)Activator.CreateInstance(null, "AramBuddy.Plugins.Champions." + Player.Instance.Hero + "." + Player.Instance.Hero).Unwrap();
                 *      if (Instance != null)
                 *      {
                 *          CustomChamp = true;
                 *          msg.Process = false;
                 *          Logger.Send("Loaded Custom Champion " + Player.Instance.Hero, Logger.LogLevel.Info);
                 *      }
                 *  }
                 * };*/

                Timer                    = Game.Time;
                Game.OnTick             += Game_OnTick;
                Events.OnGameEnd        += Events_OnGameEnd;
                Player.OnPostIssueOrder += Player_OnPostIssueOrder;
            }
            catch (Exception ex)
            {
                Logger.Send("Program Error At Loading_OnLoadingComplete", ex, Logger.LogLevel.Error);
            }
        }