private void ReportResources(ResourceType resourceType)
        {
            int num = -1;
            switch (resourceType)
            {
                case ResourceType.GOLD:
                    num = this.GoldCount;
                    break;

                case ResourceType.RUBY:
                    num = this.RubyCount;
                    break;

                case ResourceType.HONOR:
                    num = this.HonorCount;
                    break;

                case ResourceType.TOPAZ:
                    num = this.TopazCount;
                    break;
            }
            Dictionary<string, object> message = new Dictionary<string, object>
            {
                {
                    "resourceType",
                    resourceType
                },
                {
                    "value",
                    num
                }
            };
            ProgressArgs userState = new ProgressArgs(ProgressType.RESOURCE, message);
            this.Worker.ReportProgress(0, userState);
        }
        private void ReportCount(Objective objective)
        {
            int num = 0;
            switch (objective)
            {
                case Objective.ADVENTURE:
                    num = this.AdventureCount;
                    break;

                case Objective.GOLD_CHAMBER:
                    num = this.GoldChamberCount;
                    break;

                case Objective.RAID:
                    num = this.RaidCount;
                    break;
            }
            Dictionary<string, object> message = new Dictionary<string, object>
            {
                {
                    "objective",
                    objective
                },
                {
                    "count",
                    num
                }
            };
            ProgressArgs userState = new ProgressArgs(ProgressType.COUNT, message);
            this.Worker.ReportProgress(0, userState);
        }
        private void ReportKeys(Objective objective)
        {
            int num = 0;
            TimeSpan timeSpan = TimeSpan.MaxValue;
            switch (objective)
            {
                case Objective.ADVENTURE:
                    num = this.AdventureKeys;
                    timeSpan = this.AdventureKeyTime;
                    break;

                case Objective.GOLD_CHAMBER:
                    num = this.TowerKeys;
                    timeSpan = this.TowerKeyTime;
                    break;

                case Objective.ARENA:
                    num = this.ArenaKeys;
                    timeSpan = this.ArenaKeyTime;
                    break;
            }
            Dictionary<string, object> dictionary = new Dictionary<string, object>
            {
                {
                    "objective",
                    objective
                },
                {
                    "keys",
                    num
                }
            };
            if (timeSpan != TimeSpan.MaxValue)
            {
                dictionary.Add("time", timeSpan);
            }
            ProgressArgs userState = new ProgressArgs(ProgressType.KEY, dictionary);
            this.Worker.ReportProgress(0, userState);
        }
 private void ReportArenaCount()
 {
     Dictionary<string, object> message = new Dictionary<string, object>
     {
         {
             "objective",
             Objective.ARENA
         },
         {
             "winCount",
             this.ArenaWinCount
         },
         {
             "loseCount",
             this.ArenaLoseCount
         }
     };
     ProgressArgs userState = new ProgressArgs(ProgressType.COUNT, message);
     this.Worker.ReportProgress(0, userState);
 }
        private void MousePos()
        {
            if (this.AIProfiles.TMP_LogPixel || this.AIProfiles.TMP_Paused)
            {
                Point mousePos = this.BlueStacks.GetMousePos();
                mousePos.X = mousePos.X - BlueStacks.OFFSET_X;
                mousePos.Y = mousePos.Y - BlueStacks.OFFSET_Y;

                if (this.AIProfiles.TMP_LogPixel)
                {
                    if (this.AIProfiles.TMP_Paused)
                        this.CaptureFrame();
                    int colour = this.BlueStacks.GetPixel(mousePos);
                    if (colour != -1)
                    {
                        string message = "X = " + (mousePos.X + ", Y = " + mousePos.Y + ", Color = " + colour);
                        this.Log(message);
                    }
                    this.AIProfiles.TMP_LogPixel = false;
                }
                if (this.AIProfiles.TMP_Paused)
                {
                    ProgressArgs cursorUpdate = new ProgressArgs(ProgressType.CURSORPOS, mousePos);
                    this.Worker.ReportProgress(0, cursorUpdate);
                    Sleep(1000);
                }
            }
        }
 private void Alert(string message)
 {
     ProgressArgs userState = new ProgressArgs(ProgressType.Alert, message);
     this.Worker.ReportProgress(0, userState);
 }
 private void LogError(string message)
 {
     ProgressArgs userState = new ProgressArgs(ProgressType.ERROR, message);
     this.Worker.ReportProgress(0, userState);
 }
 private void Log(string message, Color color)
 {
     ProgressArgs userState = new ProgressArgs(ProgressType.EVENT, message, color);
     this.Worker.ReportProgress(0, userState);
 }