//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(); } } } }
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; } }
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; } }
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; } }
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; } }
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; } }
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; } }
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; } }
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; } }
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; } }
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; } }
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); //////////////////// }