Пример #1
0
 //check all of object in list, if it was legal => call run
 public void Detecting()
 {
     foreach (Detecter obj in detecterList)
     {
         Point point = new Point(obj.x, obj.y);
         if (obj is ObjectDetectByColor)
         {
             ObjectDetectByColor o = (ObjectDetectByColor)obj;
             if (!o.IsActive)
             {
                 continue;
             }
             int i;
             for (i = 0; i < o.TimeCheck; i++)
             {
                 if (!o.isCorrect(GetColorAt(point)))
                 {
                     break;
                 }
                 Thread.Sleep(100);
             }
             if (i == o.TimeCheck)
             {
                 o.IsActive      = false;
                 RunActionThread = new Thread(new ThreadStart(o.RunAction));
                 RunActionThread.Start();
             }
         }
     }
 }
Пример #2
0
        void AddAutoButtonMap(string pos, ref ObjectDetectByColor o, int deplay)
        {
            switch (pos)
            {
            case "RT":
                o.AddAction(1636, 467, deplay);
                break;

            case "LT":
                o.AddAction(1636 - 960, 467, deplay);
                break;

            case "RB":
                o.AddAction(1636, 467 + 548, deplay);
                break;

            case "LB":
                o.AddAction(1636 - 960, 467 + 548, deplay);
                break;
            }
        }
Пример #3
0
        void AddRestore(string pos, ref ObjectDetectByColor o, int deplay)
        {
            switch (pos)
            {
            case "RT":
                o.AddAction(1775, 298, deplay);
                break;

            case "LT":
                o.AddAction(1775 - 960, 298, deplay);
                break;

            case "RB":
                o.AddAction(1775, 298 + 548, deplay);
                break;

            case "LB":
                o.AddAction(1775 - 960, 298 + 548, deplay);
                break;
            }
        }
Пример #4
0
        void AddCloseMap(string pos, ref ObjectDetectByColor o, int deplay)
        {
            switch (pos)
            {
            case "RT":
                o.AddAction(1856, 60, deplay);
                break;

            case "LT":
                o.AddAction(1856 - 960, 60, deplay);
                break;

            case "RB":
                o.AddAction(1856, 60 + 548, deplay);
                break;

            case "LB":
                o.AddAction(1856 - 960, 60 + 548, deplay);
                break;
            }
        }
Пример #5
0
        void AddLeaveSanhClan(string pos, ref ObjectDetectByColor o, int deplay)
        {
            switch (pos)
            {
            case "RT":
                o.AddAction(1575, 94, deplay);
                break;

            case "LT":
                o.AddAction(1575 - 960, 94, deplay);
                break;

            case "RB":
                o.AddAction(1575, 94 + 548, deplay);
                break;

            case "LB":
                o.AddAction(1575 - 960, 94 + 548, deplay);
                break;
            }
        }
Пример #6
0
        void AddXofRestore(string pos, ref ObjectDetectByColor o, int deplay)
        {
            switch (pos)
            {
            case "RT":
                o.AddAction(1851, 214, deplay);
                break;

            case "LT":
                o.AddAction(1851 - 960, 214, deplay);
                break;

            case "RB":
                o.AddAction(1851, 214 + 548, deplay);
                break;

            case "LB":
                o.AddAction(1851 - 960, 214 + 548, deplay);
                break;
            }
        }
Пример #7
0
        void AddSanhClanInClanMenu(string pos, ref ObjectDetectByColor o, int deplay)
        {
            switch (pos)
            {
            case "RT":
                o.AddAction(1246, 422, deplay);
                break;

            case "LT":
                o.AddAction(1246 - 960, 422, deplay);
                break;

            case "RB":
                o.AddAction(1246, 422 + 548, deplay);
                break;

            case "LB":
                o.AddAction(1246 - 960, 422 + 548, deplay);
                break;
            }
        }
Пример #8
0
        void AddClanInMenu(string pos, ref ObjectDetectByColor o, int deplay)
        {
            switch (pos)
            {
            case "RT":
                o.AddAction(1366, 508, deplay);
                break;

            case "LT":
                o.AddAction(1366 - 960, 508, deplay);
                break;

            case "RB":
                o.AddAction(1366, 508 + 548, deplay);
                break;

            case "LB":
                o.AddAction(1366 - 960, 508 + 548, deplay);
                break;
            }
        }
Пример #9
0
        void AddMenuScreenPlay(string pos, ref ObjectDetectByColor o, int deplay)
        {
            switch (pos)
            {
            case "RT":
                o.AddAction(1577, 54, deplay);
                break;

            case "LT":
                o.AddAction(1577 - 960, 54, deplay);
                break;

            case "RB":
                o.AddAction(1577, 54 + 548, deplay);
                break;

            case "LB":
                o.AddAction(1577 - 960, 54 + 548, deplay);
                break;
            }
        }
Пример #10
0
        void AddSatNhanDamLay(string pos, ref ObjectDetectByColor o, int deplay)
        {
            switch (pos)
            {
            case "RT":
                o.AddAction(1311, 181, deplay);
                break;

            case "LT":
                o.AddAction(1311 - 960, 181, deplay);
                break;

            case "RB":
                o.AddAction(1311, 181 + 548, deplay);
                break;

            case "LB":
                o.AddAction(1311 - 960, 181 + 548, deplay);
                break;
            }
        }
Пример #11
0
        void AddLocationCustom(string pos, int x, int y, ref ObjectDetectByColor o, int deplay)
        {
            switch (pos)
            {
            case "RT":
                o.AddAction(x, y, deplay);
                break;

            case "LT":
                o.AddAction(x - 960, y, deplay);
                break;

            case "RB":
                o.AddAction(x, y + 548, deplay);
                break;

            case "LB":
                o.AddAction(x - 960, y + 548, deplay);
                break;
            }
        }
Пример #12
0
 void AddActionRestoreHP(ref ObjectDetectByColor o, int x, int y)
 {
     /////RESTORE HP form screen play
     //menu
     o.AddAction(1575 + x, 51 + y, 1000);
     //Duageeon
     o.AddAction(1132 + x, 505 + y, 3000);
     //dungeon thuong
     o.AddAction(1143 + x, 410 + y, 3000);
     //dungeon tinh anh
     o.AddAction(1444 + x, 326 + y, 3000);
     //vào
     o.AddAction(1759 + x, 495 + y, 4000);
     //confirm vào
     o.AddAction(1499 + x, 384 + y, 2000);
     //out
     o.AddAction(1577 + x, 100 + y, 9000);
     //confirm out
     o.AddAction(1504 + x, 367 + y, 2000);
     //out to screen play
     o.AddAction(1854 + x, 52 + y, 7000);
     ////////////////////
 }