using RichCreator.Utility.CV;
using RichCreator.Utility.Structs;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Emgu.CV;
using Emgu.CV.Structure;
using System.Threading;
using RichCreator.Utility.Captures;
using ZTImage.Configuration;
using RichCreator.Utility.Utilitys;
namespace RichCreator.Utility.CV
{
///
/// 技能识别
///
public class SkillCVHelper
{
///
/// 技能窗标题文字
///
private static ColorArray skillTitleTextWhite = ColorArray.FromHsvFloatString(0.002f,0.002f,0.002f, "633,93,0,0,0$619,93,0,0,0$620,93,255,255,255$621,93,0,0,0$624,93,0,0,0$625,93,255,255,255$626,93,0,0,0$631,93,0,0,0$632,93,255,255,255$635,93,0,0,0$636,93,255,255,255$637,93,0,0,0$638,93,0,0,0$639,93,255,255,255$640,93,0,0,0$643,93,0,0,0$644,93,255,255,255$645,93,0,0,0$646,93,0,0,0$647,93,255,255,255$648,93,0,0,0$650,93,0,0,0$651,93,255,255,255$652,93,0,0,0$652,100,0,0,0$651,100,255,255,255$648,100,255,255,255$647,100,255,255,255$646,100,0,0,0$645,100,0,0,0$644,100,255,255,255$643,100,0,0,0$642,100,255,255,255$641,100,0,0,0$640,100,0,0,0$639,100,255,255,255$638,100,0,0,0$637,100,0,0,0$636,100,255,255,255$635,100,0,0,0$634,100,255,255,255$633,100,0,0,0$632,100,0,0,0$631,100,255,255,255$630,100,0,0,0$628,100,0,0,0$627,100,255,255,255$626,100,0,0,0$624,100,0,0,0$623,100,255,255,255$622,100,0,0,0$621,100,0,0,0$620,100,255,255,255$619,100,255,255,255$618,100,255,255,255$617,100,0,0,0$618,104,0,0,0$619,104,255,255,255$620,104,255,255,255$621,104,0,0,0$622,104,255,255,255$623,104,255,255,255$624,104,0,0,0$624,103,255,255,255$625,103,0,0,0$626,103,255,255,255$627,103,0,0,0$630,103,0,0,0$631,103,255,255,255$632,103,0,0,0$633,103,0,0,0$634,103,255,255,255$635,103,0,0,0$636,103,255,255,255$644,103,255,255,255$645,103,0,0,0$645,104,0,0,0$646,104,255,255,255$648,104,255,255,255$650,104,255,255,255$652,104,255,255,255$653,104,0,0,0");
private static ColorArray skillTitleTextGray = ColorArray.FromHsvFloatString(0.002f, 0.002f, 0.002f, "633,103,0,0,0$619,93,0,0,0$620,93,170,170,170$621,93,0,0,0$624,93,0,0,0$625,93,170,170,170$626,93,0,0,0$631,93,0,0,0$632,93,170,170,170$633,93,0,0,0$635,93,0,0,0$636,93,170,170,170$637,93,0,0,0$638,93,0,0,0$639,93,170,170,170$640,93,0,0,0$643,93,0,0,0$644,93,170,170,170$645,93,0,0,0$646,93,0,0,0$647,93,170,170,170$648,93,0,0,0$650,93,0,0,0$651,93,170,170,170$652,93,0,0,0$652,100,0,0,0$651,100,170,170,170$649,100,170,170,170$647,100,170,170,170$646,100,0,0,0$645,100,0,0,0$644,100,170,170,170$643,100,0,0,0$642,100,170,170,170$641,100,0,0,0$640,100,0,0,0$639,100,170,170,170$638,100,0,0,0$637,100,0,0,0$636,100,170,170,170$635,100,0,0,0$634,100,170,170,170$633,100,0,0,0$632,100,0,0,0$631,100,170,170,170$630,100,0,0,0$628,100,0,0,0$627,100,170,170,170$618,104,0,0,0$619,104,170,170,170$620,104,170,170,170$621,104,0,0,0$622,104,170,170,170$623,104,170,170,170$624,104,0,0,0$626,104,0,0,0$627,104,170,170,170$628,104,170,170,170$630,104,0,0,0$631,104,170,170,170$632,104,0,0,0$633,104,170,170,170$634,103,170,170,170$635,103,0,0,0$636,103,170,170,170$637,103,0,0,0$638,103,0,0,0$638,104,170,170,170$640,104,170,170,170$641,104,0,0,0$643,104,0,0,0$644,104,170,170,170$645,104,0,0,0$646,104,170,170,170$648,104,170,170,170$650,104,170,170,170$652,104,170,170,170$653,104,0,0,0");
///
/// lv文字
///
private static ColorArray lvText = ColorArray.FromThresholdString(120, "251,238,0,0,0$247,238,0,0,0$248,238,0,0,0$249,238,0,0,0$250,238,0,0,0$252,238,0,0,0$253,238,0,0,0$254,238,0,0,0$255,238,0,0,0$256,238,0,0,0$257,238,0,0,0$258,238,0,0,0$259,238,0,0,0$260,238,0,0,0$261,238,0,0,0$262,238,0,0,0$263,238,0,0,0$264,238,0,0,0$265,238,0,0,0$266,238,0,0,0$247,239,0,0,0$248,239,0,0,0$249,239,0,0,0$250,239,0,0,0$251,239,0,0,0$252,239,0,0,0$253,239,0,0,0$254,239,0,0,0$255,239,0,0,0$256,239,0,0,0$257,239,0,0,0$258,239,0,0,0$259,239,0,0,0$260,239,0,0,0$261,239,0,0,0$262,239,0,0,0$263,239,0,0,0$264,239,0,0,0$265,239,0,0,0$266,239,0,0,0$247,240,0,0,0$248,240,0,0,0$249,240,0,0,0$250,240,0,0,0$252,240,255,255,255$254,240,0,0,0$255,240,0,0,0$256,240,0,0,0$257,240,0,0,0$258,240,0,0,0$259,240,0,0,0$260,240,0,0,0$261,240,0,0,0$262,240,0,0,0$263,240,0,0,0$264,240,0,0,0$265,240,0,0,0$266,240,0,0,0$247,241,0,0,0$248,241,0,0,0$249,241,0,0,0$251,241,255,255,255$254,241,0,0,0$255,241,0,0,0$256,241,0,0,0$257,241,0,0,0$258,241,0,0,0$259,241,0,0,0$260,241,0,0,0$261,241,0,0,0$262,241,0,0,0$263,241,0,0,0$264,241,0,0,0$265,241,0,0,0$266,241,0,0,0$247,242,0,0,0$248,242,0,0,0$249,242,0,0,0$251,242,255,255,255$253,242,0,0,0$254,242,0,0,0$255,242,0,0,0$256,242,0,0,0$258,242,255,255,255$260,242,0,0,0$262,242,255,255,255$265,242,0,0,0$266,242,0,0,0$247,243,0,0,0$248,243,0,0,0$250,243,255,255,255$251,243,255,255,255$253,243,0,0,0$254,243,0,0,0$255,243,0,0,0$256,243,0,0,0$258,243,255,255,255$264,243,0,0,0$265,243,0,0,0$266,243,0,0,0$247,244,0,0,0$248,244,0,0,0$250,244,255,255,255$252,244,0,0,0$253,244,0,0,0$254,244,0,0,0$255,244,0,0,0$256,244,0,0,0$258,244,255,255,255$261,244,255,255,255$263,244,0,0,0$264,244,0,0,0$265,244,0,0,0$266,244,0,0,0$247,245,0,0,0$248,245,0,0,0$250,245,255,255,255$252,245,0,0,0$253,245,0,0,0$254,245,0,0,0$255,245,0,0,0$256,245,0,0,0$258,245,255,255,255$260,245,255,255,255$262,245,0,0,0$263,245,0,0,0$264,245,0,0,0$265,245,0,0,0$266,245,0,0,0$247,246,0,0,0$249,246,255,255,255$250,246,255,255,255$251,246,255,255,255$252,246,255,255,255$253,246,255,255,255$255,246,0,0,0$256,246,0,0,0$258,246,255,255,255$259,246,255,255,255$261,246,0,0,0$262,246,0,0,0$263,246,0,0,0$265,246,255,255,255$247,247,0,0,0$248,247,0,0,0$250,247,255,255,255$251,247,255,255,255$252,247,255,255,255$254,247,0,0,0$255,247,0,0,0$256,247,0,0,0$258,247,255,255,255$260,247,0,0,0$261,247,0,0,0$262,247,0,0,0$266,247,0,0,0$247,248,0,0,0$248,248,0,0,0$249,248,0,0,0$250,248,0,0,0$251,248,0,0,0$252,248,0,0,0$253,248,0,0,0$254,248,0,0,0$255,248,0,0,0$256,248,0,0,0$257,248,0,0,0$258,248,0,0,0$259,248,0,0,0$260,248,0,0,0$261,248,0,0,0$262,248,0,0,0$263,248,0,0,0$264,248,0,0,0$265,248,0,0,0$266,248,0,0,0$247,249,0,0,0$248,249,0,0,0$249,249,0,0,0$250,249,0,0,0$251,249,0,0,0$252,249,0,0,0$253,249,0,0,0$254,249,0,0,0$255,249,0,0,0$256,249,0,0,0$257,249,0,0,0$258,249,0,0,0$259,249,0,0,0$260,249,0,0,0$261,249,0,0,0$262,249,0,0,0$263,249,0,0,0$264,249,0,0,0$265,249,0,0,0$266,249,0,0,0$247,250,0,0,0$248,250,0,0,0$249,250,0,0,0$250,250,0,0,0$251,250,0,0,0$252,250,0,0,0$253,250,0,0,0$254,250,0,0,0$255,250,0,0,0$256,250,0,0,0$257,250,0,0,0$258,250,0,0,0$259,250,0,0,0$260,250,0,0,0$261,250,0,0,0$262,250,0,0,0$263,250,0,0,0$264,250,0,0,0$265,250,0,0,0$266,250,0,0,0");
///
/// 向上滚动键
///
private static ColorArray upKey = ColorArray.FromHsvFloatString(0.002f, 0.002f, 0.002f, "818,275,221,197,147$811,266,221,197,147$812,266,221,197,147$815,266,221,197,147$817,266,221,197,147$818,267,221,197,147$818,269,221,197,147$818,271,221,197,147$818,273,221,197,147$818,276,221,197,147$817,277,221,197,147$815,277,221,197,147$813,277,221,197,147$811,277,221,197,147$810,276,221,197,147$810,274,221,197,147$810,272,221,197,147$810,271,221,197,147$810,270,221,197,147$810,269,221,197,147$810,268,221,197,147$810,267,221,197,147$814,270,221,197,147$814,271,221,197,147$813,271,221,197,147$815,271,221,197,147$815,272,221,197,147$814,272,221,197,147$813,272,221,197,147$812,273,221,197,147$813,273,221,197,147$814,273,221,197,147$815,273,221,197,147$816,273,221,197,147");
private static ColorArray upGrayKey = ColorArray.FromHsvFloatString(0.002f, 0.002f, 0.002f, "832,262,136,134,134$829,272,136,134,134$829,271,136,134,134$829,270,136,134,134$829,269,136,134,134$829,268,136,134,134$829,267,136,134,134$829,266,136,134,134$829,265,136,134,134$829,264,136,134,134$829,263,136,134,134$830,262,136,134,134$834,262,136,134,134$836,262,136,134,134$837,263,136,134,134$837,265,136,134,134$837,267,136,134,134$837,269,136,134,134$837,271,136,134,134$837,272,136,134,134$836,273,136,134,134$834,273,136,134,134$832,273,136,134,134$830,273,136,134,134$831,269,136,134,134$832,269,136,134,134$835,269,136,134,134$834,269,136,134,134$834,268,136,134,134$832,268,136,134,134$832,267,136,134,134$833,267,136,134,134$833,266,136,134,134$834,267,136,134,134");
///
/// 向下滚动键
///
private static ColorArray downKey = ColorArray.FromHsvFloatString(0.002f, 0.002f, 0.002f, "816,599,221,197,147$811,588,221,197,147$812,588,221,197,147$814,588,221,197,147$815,588,221,197,147$817,588,221,197,147$818,589,221,197,147$818,590,221,197,147$818,592,221,197,147$818,593,221,197,147$818,595,221,197,147$818,596,221,197,147$818,598,221,197,147$817,599,221,197,147$814,599,221,197,147$813,599,221,197,147$811,599,221,197,147$810,598,221,197,147$810,597,221,197,147$810,595,221,197,147$810,594,221,197,147$810,592,221,197,147$810,591,221,197,147$810,589,221,197,147$812,592,221,197,147$813,592,221,197,147$814,592,221,197,147$815,592,221,197,147$816,592,221,197,147$814,595,221,197,147$815,594,221,197,147$814,594,221,197,147$813,594,221,197,147");
private static ColorArray downGrayKey = ColorArray.FromHsvFloatString(0.002f, 0.002f, 0.002f, "836,599,136,134,134$830,599,136,134,134$832,599,136,134,134$834,599,136,134,134$837,600,136,134,134$837,601,136,134,134$837,603,136,134,134$837,604,136,134,134$837,608,136,134,134$837,609,136,134,134$836,610,136,134,134$835,610,136,134,134$833,610,136,134,134$831,610,136,134,134$830,610,136,134,134$829,609,136,134,134$829,607,136,134,134$829,605,136,134,134$829,603,136,134,134$829,601,136,134,134$829,600,136,134,134$831,603,136,134,134$832,603,136,134,134$834,603,136,134,134$835,603,136,134,134$834,604,136,134,134$833,604,136,134,134$832,604,136,134,134$832,605,136,134,134$833,605,136,134,134$834,605,136,134,134$833,606,136,134,134");
///
/// 查找技能窗口
///
///
///
///
///
///
///
public static bool FindSkillWindow(out ZTRectangle titleRect, out ZTRectangle lvRect, out ZTRectangle upKeyRect, out ZTRectangle downKeyRect, out bool isGray,ZTRectangle gameRect)
{
isGray = false;
titleRect = lvRect = upKeyRect = downKeyRect = ZTRectangle.Empty;
Image image = ScreenCapture.Instance.CaptureScreenReturnImage();
if (!CVHelper.FindColorArray(out titleRect, image, skillTitleTextWhite, gameRect))
{
if (!CVHelper.FindColorArray(out titleRect, image, skillTitleTextGray, gameRect))
{
return false;
}
}
if (!CVHelper.FindColorArrayForThreshold(out lvRect, image, lvText, gameRect))
{
return false;
}
ZTRectangle updownkeylimit = new ZTRectangle(titleRect.Start.X, titleRect.Start.Y, titleRect.Start.X + 222, gameRect.End.Y);
if (!CVHelper.FindColorArray(out upKeyRect, image, upKey, updownkeylimit))
{
if (!CVHelper.FindColorArray(out upKeyRect, image, upGrayKey, updownkeylimit))
{
return false;
}
if (!CVHelper.FindColorArray(out downKeyRect, image, downGrayKey, updownkeylimit))
{
return false;
}
isGray = true;
}
else
{
if (!CVHelper.FindColorArray(out downKeyRect, image, downKey, updownkeylimit))
{
return false;
}
}
return true;
}
public static bool FindCommonUpDownKey(out ZTRectangle upKeyRect, out ZTRectangle downKeyRect,ZTRectangle gameRect)
{
upKeyRect = downKeyRect = ZTRectangle.Empty;
Image image = ScreenCapture.Instance.CaptureScreenReturnImage();
ZTRectangle updownkeylimit = new ZTRectangle(gameRect.Start.X+535,gameRect.Start.Y+180,gameRect.Start.X+562,gameRect.Start.Y+535);
if (!CVHelper.FindColorArray(out upKeyRect, image, upKey, updownkeylimit))
{
return false;
}
if (!CVHelper.FindColorArray(out downKeyRect, image, downKey, updownkeylimit))
{
return false;
}
return true;
}
///
/// 公告文字
///
private static ColorArray notificationGrayText = ColorArray.FromHsvFloatString(0.002f, 0.002f, 0.002f, "645,296,170,170,170$630,291,0,0,0$631,291,170,170,170$632,291,0,0,0$634,291,0,0,0$635,291,170,170,170$636,291,0,0,0$641,291,0,0,0$644,291,0,0,0$645,291,170,170,170$646,291,0,0,0$651,296,0,0,0$650,296,170,170,170$640,296,170,170,170$639,296,0,0,0$638,296,0,0,0$637,296,170,170,170$636,296,0,0,0$634,296,0,0,0$633,296,170,170,170$632,296,0,0,0$630,296,0,0,0$629,296,170,170,170$628,296,0,0,0$628,301,0,0,0$629,301,170,170,170$633,301,170,170,170$637,301,170,170,170$638,301,0,0,0$640,301,0,0,0$641,301,170,170,170$646,301,170,170,170$648,301,170,170,170$649,301,170,170,170$650,301,0,0,0$645,301,170,170,170$645,300,0,0,0$645,299,0,0,0$645,298,170,170,170$645,297,0,0,0$645,296,170,170,170$645,293,170,170,170$645,291,170,170,170$645,290,0,0,0$633,294,0,0,0$633,295,170,170,170$633,296,170,170,170$633,297,0,0,0$633,300,0,0,0$633,302,0,0,0$633,301,170,170,170");
private static ColorArray notificationWhiteText = ColorArray.FromHsvFloatString(0.002f, 0.002f, 0.002f, "645,296,255,255,255$630,291,0,0,0$631,291,255,255,255$632,291,0,0,0$634,291,0,0,0$635,291,255,255,255$636,291,0,0,0$641,291,0,0,0$644,291,0,0,0$645,291,255,255,255$646,291,0,0,0$651,296,0,0,0$650,296,255,255,255$640,296,255,255,255$639,296,0,0,0$638,296,0,0,0$637,296,255,255,255$636,296,0,0,0$634,296,0,0,0$633,296,255,255,255$632,296,0,0,0$630,296,0,0,0$629,296,255,255,255$628,296,0,0,0$628,301,0,0,0$629,301,255,255,255$634,301,255,255,255$637,301,255,255,255$638,301,0,0,0$640,301,0,0,0$641,301,255,255,255$647,301,255,255,255$649,301,255,255,255$650,301,0,0,0$645,302,0,0,0$645,301,255,255,255$645,300,0,0,0$645,299,0,0,0$645,298,255,255,255$645,297,0,0,0$645,296,255,255,255$645,293,255,255,255$645,291,255,255,255$645,290,0,0,0$633,294,0,0,0$633,295,255,255,255$633,296,255,255,255$633,300,0,0,0$633,301,255,255,255$633,302,0,0,0");
///
/// 是否存在公告文本
///
///
///
public static bool ExistsNotificationText(out ZTRectangle notificationRect,ZTRectangle gameRect)
{
Image image = ScreenCapture.Instance.CaptureScreenReturnImage();
if (!CVHelper.FindColorArray(out notificationRect, image, notificationGrayText, gameRect))
{
if (!CVHelper.FindColorArray(out notificationRect, image, notificationWhiteText, gameRect))
{
return false;
}
}
return true;
}
///
/// 加技能时向右的红色按钮
///
private static ColorArray rightRedButton = ColorArray.FromHsvFloatString(0.002f, 0.02f, 0.02f, "573,247,255,42,42$570,244,255,50,50$570,245,255,41,41$571,245,255,42,42$570,246,255,41,41$571,246,255,33,33$572,246,255,42,42$570,247,255,41,41$571,247,255,33,33$572,247,255,33,33$573,248,255,41,41$572,248,255,33,33$571,248,255,33,33$570,248,255,41,41$570,249,255,41,41$571,249,255,33,33$572,249,255,42,42$571,250,255,42,42$570,250,255,41,41$570,251,255,50,50$576,251,255,50,50$576,250,255,41,41$577,250,255,42,42$576,249,255,41,41$577,249,255,33,33$578,249,255,42,42$577,248,255,33,33$578,248,255,33,33$579,248,255,41,41$579,247,255,42,42$578,247,255,33,33$577,247,255,33,33$576,247,255,41,41$576,246,255,41,41$577,246,255,33,33$578,246,255,42,42$577,245,255,42,42$576,245,255,41,41$576,244,255,50,50");
///
/// 加技能时向右的灰色按钮
///
private static ColorArray grayRedButton = ColorArray.FromHsvFloatString(0.002f, 0.002f, 0.002f, "571,250,148,148,148$570,244,152,152,152$570,245,148,148,148$570,246,148,148,148$570,247,148,148,148$570,248,148,148,148$570,249,148,148,148$570,250,148,148,148$570,251,152,152,152$572,249,148,148,148$573,248,148,148,148$573,247,148,148,148$572,246,148,148,148$571,245,148,148,148$576,244,152,152,152$576,245,148,148,148$576,246,148,148,148$576,247,148,148,148$576,248,148,148,148$576,249,148,148,148$576,250,148,148,148$576,251,152,152,152$577,250,148,148,148$578,249,148,148,148$579,248,148,148,148$579,247,148,148,148$578,246,148,148,148$577,245,148,148,148");
///
/// 是否已经选中技能
///
///
/// 技能是否已经满级
///
///
public static bool IsSelectSkill(out ZTRectangle rightButtonRect,out bool skillIsFullLevel, ZTRectangle limitRect)
{
Image image = ScreenCapture.Instance.CaptureScreenReturnImage();
if (CVHelper.FindColorArray(out rightButtonRect, image, rightRedButton, limitRect))
{
//已选中,未满级
skillIsFullLevel = false;
return true;
}
if (CVHelper.FindColorArray(out rightButtonRect, image, grayRedButton, limitRect))
{
//已选中,已满级
skillIsFullLevel = true;
return true;
}
skillIsFullLevel = false;
return false;
}
///
/// 技能是否已经满级
///
///
///
public static bool SkillIsFullLevel(ZTRectangle limitRect)
{
Image image = ScreenCapture.Instance.CaptureScreenReturnImage();
ZTRectangle rect = ZTRectangle.Empty;
if (CVHelper.FindColorArray(out rect, image, grayRedButton, limitRect))
{
//已满级
return true;
}
return false;
}
///
/// 技能等级数字
///
private static ColorArray[] numbers = new ColorArray[] {
ColorArray.FromHsvFloatString(0.002f, 0.002f, 0.002f, "254,400,140,140,140$254,396,140,140,140$254,397,140,140,140$253,397,140,140,140$254,398,140,140,140$254,399,140,140,140$254,401,140,140,140$254,402,140,140,140$254,403,140,140,140$253,403,140,140,140$255,403,140,140,140"),//1
ColorArray.FromHsvFloatString(0.002f, 0.002f, 0.002f, "254,533,140,140,140$251,532,140,140,140$251,531,140,140,140$252,530,140,140,140$253,530,140,140,140$254,530,140,140,140$255,531,140,140,140$255,532,140,140,140$253,534,140,140,140$252,535,140,140,140$251,536,140,140,140$251,537,140,140,140$252,537,140,140,140$253,537,140,140,140$254,537,140,140,140$255,537,140,140,140"),//2
ColorArray.FromHsvFloatString(0.002f, 0.002f, 0.002f, "255,532,140,140,140$251,531,140,140,140$252,530,140,140,140$253,530,140,140,140$254,530,140,140,140$255,531,140,140,140$254,533,140,140,140$253,533,140,140,140$255,534,140,140,140$255,535,140,140,140$255,536,140,140,140$254,537,140,140,140$253,537,140,140,140$252,537,140,140,140$251,536,140,140,140"),//3
ColorArray.FromHsvFloatString(0.002f, 0.002f, 0.002f, "252,332,140,140,140$255,334,140,140,140$254,334,140,140,140$253,334,140,140,140$252,334,140,140,140$251,334,140,140,140$251,333,140,140,140$253,331,140,140,140$253,330,140,140,140$254,329,140,140,140$254,330,140,140,140$254,331,140,140,140$254,332,140,140,140$254,333,140,140,140$254,335,140,140,140$254,336,140,140,140$255,336,140,140,140$253,336,140,140,140"),//4
ColorArray.FromHsvFloatString(0.002f, 0.002f, 0.002f, "251,467,140,140,140$255,463,140,140,140$254,463,140,140,140$253,463,140,140,140$252,463,140,140,140$251,463,140,140,140$251,464,140,140,140$251,465,140,140,140$251,466,140,140,140$252,466,140,140,140$253,466,140,140,140$254,466,140,140,140$255,467,140,140,140$255,468,140,140,140$255,469,140,140,140$254,470,140,140,140$253,470,140,140,140$252,470,140,140,140$251,469,140,140,140"),//5
ColorArray.FromHsvFloatString(0.002f, 0.002f, 0.002f, "252,537,140,140,140$255,531,140,140,140$254,530,140,140,140$253,530,140,140,140$252,531,140,140,140$251,532,140,140,140$251,533,140,140,140$251,534,140,140,140$251,535,140,140,140$251,536,140,140,140$253,537,140,140,140$254,537,140,140,140$255,536,140,140,140$255,535,140,140,140$255,534,140,140,140$254,533,140,140,140$253,533,140,140,140$252,534,140,140,140"),//6
ColorArray.FromHsvFloatString(0.002f, 0.002f, 0.002f, "254,465,140,140,140$252,463,140,140,140$253,463,140,140,140$254,463,140,140,140$255,463,140,140,140$255,464,140,140,140$254,466,140,140,140$253,467,140,140,140$253,468,140,140,140$253,469,140,140,140$253,470,140,140,140"),//7
ColorArray.FromHsvFloatString(0.002f, 0.002f, 0.002f, "255,534,140,140,140$252,530,140,140,140$253,530,140,140,140$254,530,140,140,140$255,531,140,140,140$255,532,140,140,140$254,533,140,140,140$253,533,140,140,140$252,533,140,140,140$255,535,140,140,140$255,536,140,140,140$254,537,140,140,140$253,537,140,140,140$252,537,140,140,140$251,536,140,140,140$251,535,140,140,140$251,534,140,140,140$251,532,140,140,140$251,531,140,140,140"),//8
};
///
/// 是否有数字文本
///
///
///
public static bool HasNumberText(ZTRectangle limitRect)
{
Image image = ScreenCapture.Instance.CaptureScreenReturnImage();
ZTRectangle rect = ZTRectangle.Empty;
for (int i = 0; i < numbers.Length; i++)
{
if (CVHelper.FindColorArray(out rect, image, numbers[i], limitRect))
{
return true;
}
}
return false;
}
///
/// 技能节
///
private static ColorArray[] numberSections = new ColorArray[] {
ColorArray.FromHsvFloatString(0.002f,0.002f,0.002f,"100,578,140,140,140$109,309,140,140,140$109,310,140,140,140$108,310,140,140,140$109,311,140,140,140$109,312,140,140,140$109,313,140,140,140$109,314,140,140,140$109,315,140,140,140$109,316,140,140,140$110,316,140,140,140$108,316,140,140,140$100,579,140,140,140$101,577,140,140,140$102,577,140,140,140$103,577,140,140,140$104,578,140,140,140$104,579,140,140,140$103,580,140,140,140$102,581,140,140,140$101,582,140,140,140$100,583,140,140,140$100,584,140,140,140$101,584,140,140,140$102,584,140,140,140$103,584,140,140,140$104,584,140,140,140$107,584,140,140,140$109,584,140,140,140$110,583,140,140,140$110,578,140,140,140$109,577,140,140,140$107,577,140,140,140$106,578,140,140,140$106,583,140,140,140"),
ColorArray.FromHsvFloatString(0.002f,0.002f,0.002f,"251,269,140,140,140$251,264,140,140,140$251,263,140,140,140$252,262,140,140,140$253,262,140,140,140$254,262,140,140,140$255,263,140,140,140$255,264,140,140,140$254,265,140,140,140$253,266,140,140,140$252,267,140,140,140$251,268,140,140,140$252,269,140,140,140$253,269,140,140,140$254,269,140,140,140$255,269,140,140,140$258,269,140,140,140$260,269,140,140,140$261,268,140,140,140$261,263,140,140,140$260,262,140,140,140$258,262,140,140,140$257,263,140,140,140$257,268,140,140,140$254,530,140,140,140$254,531,140,140,140$253,531,140,140,140$253,532,140,140,140$254,532,140,140,140$254,533,140,140,140$252,533,140,140,140$251,534,140,140,140$254,534,140,140,140$255,535,140,140,140$254,535,140,140,140$253,535,140,140,140$252,535,140,140,140$251,535,140,140,140$254,536,140,140,140$254,537,140,140,140$255,537,140,140,140$253,537,140,140,140"),
ColorArray.FromHsvFloatString(0.002f,0.002f,0.002f,"261,334,140,140,140$251,329,140,140,140$252,329,140,140,140$253,329,140,140,140$254,329,140,140,140$255,329,140,140,140$258,329,140,140,140$259,329,140,140,140$260,329,140,140,140$261,330,140,140,140$261,331,140,140,140$261,335,140,140,140$260,336,140,140,140$258,336,140,140,140$257,335,140,140,140$257,334,140,140,140$257,330,140,140,140$251,330,140,140,140$251,332,140,140,140$252,332,140,140,140$253,332,140,140,140$254,332,140,140,140$251,333,140,140,140$255,333,140,140,140$255,334,140,140,140$255,335,140,140,140$254,336,140,140,140$253,336,140,140,140$252,336,140,140,140$251,335,140,140,140$252,530,140,140,140$253,530,140,140,140$254,530,140,140,140$255,531,140,140,140$255,532,140,140,140$254,533,140,140,140$253,533,140,140,140$252,533,140,140,140$251,534,140,140,140$251,535,140,140,140$251,536,140,140,140$252,537,140,140,140$253,537,140,140,140$254,537,140,140,140$255,536,140,140,140$255,535,140,140,140$255,534,140,140,140")
};
///
/// 查找技能节
///
///
///
///
///
public static bool IsNumberSections(out Int32 numberSection,out ZTRectangle sectionRect, ZTRectangle limitRect)
{
numberSection = 0;
sectionRect = ZTRectangle.Empty;
Image image = ScreenCapture.Instance.CaptureScreenReturnImage();
for (int i = 0; i < numberSections.Length; i++)
{
if (CVHelper.FindColorArray(out sectionRect, image, numberSections[i], limitRect))
{
numberSection = i;
return true;
}
}
return false;
}
///
/// 技能栏后面的“已学”文字
/// 白色
/// 灰色
///
private static ColorArray[] studayedText = new ColorArray[] {
ColorArray.FromHsvFloatString(0.002f,0.002f,0.002f,"710,457,0,0,0$692,457,0,0,0$693,457,255,255,255$696,457,255,255,255$698,457,255,255,255$700,457,255,255,255$701,457,255,255,255$702,457,0,0,0$705,457,0,0,0$706,457,255,255,255$707,457,0,0,0$708,457,0,0,0$709,457,255,255,255$711,457,0,0,0$712,457,255,255,255$713,457,0,0,0$713,460,0,0,0$712,460,255,255,255$709,460,255,255,255$706,460,255,255,255$705,460,0,0,0$702,460,0,0,0$701,460,255,255,255$700,460,0,0,0$694,460,0,0,0$693,460,255,255,255$692,460,0,0,0$692,462,0,0,0$693,462,255,255,255$697,462,255,255,255$701,462,255,255,255$702,462,0,0,0$709,462,0,0,0$710,462,255,255,255$711,462,0,0,0$710,465,0,0,0$709,465,255,255,255$708,465,0,0,0$703,465,0,0,0$702,465,255,255,255$701,465,0,0,0$694,465,0,0,0$693,465,255,255,255$692,465,0,0,0"),//白色
ColorArray.FromHsvFloatString(0.002f,0.002f,0.002f,"712,457,170,170,170$692,457,0,0,0$693,457,170,170,170$696,457,170,170,170$698,457,170,170,170$701,457,170,170,170$702,457,0,0,0$705,457,0,0,0$706,457,170,170,170$707,457,0,0,0$708,457,0,0,0$709,457,170,170,170$710,457,0,0,0$711,457,0,0,0$713,457,0,0,0$715,459,0,0,0$714,459,170,170,170$713,459,0,0,0$705,459,0,0,0$704,459,170,170,170$703,459,0,0,0$702,459,0,0,0$701,459,170,170,170$700,459,0,0,0$693,467,0,0,0$694,467,170,170,170$697,467,170,170,170$699,467,170,170,170$702,467,170,170,170$703,467,0,0,0$706,467,0,0,0$707,467,170,170,170$708,467,170,170,170$709,467,170,170,170$710,467,0,0,0$708,468,0,0,0$708,467,170,170,170$708,466,0,0,0$708,464,0,0,0$708,463,170,170,170$708,461,0,0,0$708,460,170,170,170$708,459,0,0,0$708,458,170,170,170$697,456,0,0,0$697,457,170,170,170$697,458,0,0,0$697,461,0,0,0$697,462,170,170,170$697,463,0,0,0$697,466,0,0,0$697,467,170,170,170$697,468,0,0,0"),
};
///
/// 已学技能窗口是否打开
///
///
public static bool StudaySkillWindowIsOpen(out ZTRectangle innerstudyTextRect,ZTRectangle gameRect)
{
innerstudyTextRect = ZTRectangle.Empty;
Image image = ScreenCapture.Instance.CaptureScreenReturnImage();
for (int i = 0; i < studayedText.Length; i++)
{
if (CVHelper.FindColorArray(out innerstudyTextRect, image, studayedText[i], gameRect))
{
return true;
}
}
return false;
}
private static ColorArray[] skillsText = new ColorArray[] {
//0.后跳
ColorArray.FromHsvFloatString(0.002f,0.002f,0.002f,"555,357,247,214,90$555,353,247,214,90$554,353,247,214,90$553,353,247,214,90$552,354,247,214,90$551,354,247,214,90$550,354,247,214,90$548,354,247,214,90$548,357,247,214,90$549,357,247,214,90$550,357,247,214,90$552,357,247,214,90$556,357,247,214,90$556,360,247,214,90$556,361,247,214,90$556,363,247,214,90$550,363,247,214,90$550,364,247,214,90$550,360,247,214,90$548,361,247,214,90$548,359,247,214,90$558,353,247,214,90$561,353,247,214,90$561,356,247,214,90$558,356,247,214,90$560,357,247,214,90$560,362,247,214,90$561,362,247,214,90$561,359,247,214,90$564,353,247,214,90$564,356,247,214,90$564,359,247,214,90$564,362,247,214,90$563,363,247,214,90$562,364,247,214,90$567,364,247,214,90$568,364,247,214,90$568,363,247,214,90$568,362,247,214,90$568,360,247,214,90"),
//1.魔法旋风
ColorArray.FromHsvFloatString(0.002f,0.002f,0.002f,"563,51,247,214,90$569,42,247,214,90$568,42,247,214,90$565,42,247,214,90$565,41,247,214,90$561,42,247,214,90$560,42,247,214,90$560,51,247,214,90$559,52,247,214,90$561,52,247,214,90$562,52,247,214,90$565,51,247,214,90$566,52,247,214,90$567,52,247,214,90$569,52,247,214,90$569,51,247,214,90$571,51,247,214,90$572,50,247,214,90$573,49,247,214,90$574,51,247,214,90$581,52,247,214,90$581,47,247,214,90$577,47,247,214,90$573,47,247,214,90$574,44,247,214,90$577,44,247,214,90$580,44,247,214,90$577,41,247,214,90$585,41,247,214,90$586,42,247,214,90$589,41,247,214,90$589,43,247,214,90$593,43,247,214,90$593,45,247,214,90$593,46,247,214,90$583,44,247,214,90$584,51,247,214,90$583,52,247,214,90$585,52,247,214,90$586,52,247,214,90$588,52,247,214,90$590,52,247,214,90$593,52,247,214,90$595,52,247,214,90$596,51,247,214,90$597,50,247,214,90$596,42,247,214,90$603,42,247,214,90$603,50,247,214,90$604,51,247,214,90$605,52,247,214,90$605,49,247,214,90$601,50,247,214,90$600,49,247,214,90$599,47,247,214,90"),
//2.魔法冰球
ColorArray.FromHsvFloatString(0.002f,0.002f,0.002f,"598,311,247,214,90$596,301,247,214,90$596,302,247,214,90$600,302,247,214,90$591,302,247,214,90$591,311,247,214,90$590,312,247,214,90$592,312,247,214,90$593,312,247,214,90$594,311,247,214,90$596,311,247,214,90$600,311,247,214,90$600,312,247,214,90$602,311,247,214,90$603,310,247,214,90$604,309,247,214,90$606,311,247,214,90$605,311,247,214,90$606,310,247,214,90$612,311,247,214,90$612,312,247,214,90$611,310,247,214,90$610,309,247,214,90$612,307,247,214,90$608,307,247,214,90$604,307,247,214,90$603,306,247,214,90$602,305,247,214,90$603,301,247,214,90$604,302,247,214,90$605,304,247,214,90$608,304,247,214,90$608,301,247,214,90$611,304,247,214,90$612,307,247,214,90$611,307,247,214,90$616,308,247,214,90$615,309,247,214,90$614,310,247,214,90$617,309,247,214,90$617,310,247,214,90$618,308,247,214,90$618,305,247,214,90$616,305,247,214,90$620,301,247,214,90$620,312,247,214,90$619,312,247,214,90$624,311,247,214,90$623,310,247,214,90$623,309,247,214,90$622,308,247,214,90$622,306,247,214,90$623,305,247,214,90$624,304,247,214,90$626,302,247,214,90$629,302,247,214,90$628,306,247,214,90$629,306,247,214,90$626,306,247,214,90$630,310,247,214,90$628,310,247,214,90$633,312,247,214,90$632,312,247,214,90$633,304,247,214,90$633,301,247,214,90$630,304,247,214,90$636,304,247,214,90"),
//3.狂风冲刺
ColorArray.FromHsvFloatString(0.002f,0.002f,0.002f,"619,273,247,214,90$610,264,247,214,90$611,263,247,214,90$611,262,247,214,90$611,265,247,214,90$610,268,247,214,90$611,272,247,214,90$610,273,247,214,90$609,273,247,214,90$613,273,247,214,90$619,268,247,214,90$613,268,247,214,90$613,263,247,214,90$619,263,247,214,90$622,263,247,214,90$629,263,247,214,90$633,263,247,214,90$640,263,247,214,90$640,262,247,214,90$648,264,247,214,90$648,262,247,214,90$651,264,247,214,90$653,264,247,214,90$655,262,247,214,90$655,273,247,214,90$654,273,247,214,90$653,270,247,214,90$651,269,247,214,90$650,269,247,214,90$651,272,247,214,90$648,272,247,214,90$648,273,247,214,90$645,272,247,214,90$640,272,247,214,90$640,273,247,214,90$643,269,247,214,90$643,270,247,214,90$642,269,247,214,90"),
//4.朔风牵引
ColorArray.FromHsvFloatString(0.002f,0.002f,0.002f,"644,315,247,214,90$641,314,247,214,90$642,315,247,214,90$645,314,247,214,90$647,315,247,214,90$647,316,247,214,90$648,315,247,214,90$650,315,247,214,90$653,315,247,214,90$660,315,247,214,90$660,316,247,214,90$665,315,247,214,90$669,315,247,214,90$669,314,247,214,90$673,315,247,214,90$676,315,247,214,90$680,315,247,214,90$684,315,247,214,90$684,314,247,214,90$684,325,247,214,90$684,324,247,214,90$680,324,247,214,90$679,325,247,214,90$677,325,247,214,90$674,323,247,214,90$669,323,247,214,90$669,325,247,214,90$664,323,247,214,90$665,323,247,214,90$665,322,247,214,90$662,325,247,214,90$662,324,247,214,90$661,324,247,214,90$660,323,247,214,90$658,323,247,214,90$654,323,247,214,90$653,323,247,214,90$653,324,247,214,90$652,325,247,214,90$650,325,247,214,90$649,325,247,214,90$647,324,247,214,90$646,325,247,214,90$641,325,247,214,90$642,324,247,214,90"),
//5.流风决
ColorArray.FromHsvFloatString(0.002f,0.002f,0.002f,"696,302,247,214,90$683,302,247,214,90$684,303,247,214,90$686,303,247,214,90$690,303,247,214,90$690,302,247,214,90$689,301,247,214,90$693,303,247,214,90$696,303,247,214,90$703,302,247,214,90$703,303,247,214,90$709,302,247,214,90$708,301,247,214,90$711,303,247,214,90$713,303,247,214,90$713,301,247,214,90$716,303,247,214,90$716,307,247,214,90$717,307,247,214,90$713,307,247,214,90$713,308,247,214,90$714,309,247,214,90$714,310,247,214,90$715,311,247,214,90$716,312,247,214,90$717,312,247,214,90$710,312,247,214,90$711,311,247,214,90$712,310,247,214,90$712,309,247,214,90$709,310,247,214,90$708,310,247,214,90$708,311,247,214,90$705,311,247,214,90$705,309,247,214,90$705,312,247,214,90$703,310,247,214,90$701,310,247,214,90$697,310,247,214,90$691,311,247,214,90$691,308,247,214,90$693,310,247,214,90$693,312,247,214,90$689,312,247,214,90$689,308,247,214,90$687,308,247,214,90$687,310,247,214,90"),
//6.风鸣冲击
ColorArray.FromHsvFloatString(0.002f,0.002f,0.002f,"723,318,247,214,90$703,315,247,214,90$706,315,247,214,90$710,315,247,214,90$714,315,247,214,90$717,315,247,214,90$719,315,247,214,90$720,315,247,214,90$720,314,247,214,90$723,315,247,214,90$722,318,247,214,90$721,317,247,214,90$719,320,247,214,90$724,320,247,214,90$724,322,247,214,90$724,324,247,214,90$723,325,247,214,90$722,325,247,214,90$722,323,247,214,90$720,323,247,214,90$717,323,247,214,90$717,322,247,214,90$714,322,247,214,90$714,323,247,214,90$714,318,247,214,90$717,318,247,214,90$727,316,247,214,90$726,315,247,214,90$730,316,247,214,90$733,316,247,214,90$733,314,247,214,90$736,316,247,214,90$736,321,247,214,90$736,322,247,214,90$733,321,247,214,90$733,325,247,214,90$739,316,247,214,90$743,316,247,214,90$743,314,247,214,90$747,316,247,214,90$747,319,247,214,90$748,319,247,214,90$747,321,247,214,90$747,324,247,214,90$747,325,247,214,90$743,324,247,214,90$739,324,247,214,90$739,321,247,214,90"),
//7.游离之风
ColorArray.FromHsvFloatString(0.002f,0.002f,0.002f,"523,330,247,214,90$516,320,247,214,90$517,321,247,214,90$519,321,247,214,90$521,321,247,214,90$520,320,247,214,90$519,319,247,214,90$519,324,247,214,90$519,329,247,214,90$518,330,247,214,90$516,329,247,214,90$524,330,247,214,90$524,326,247,214,90$526,326,247,214,90$525,324,247,214,90$525,323,247,214,90$523,323,247,214,90$522,322,247,214,90$521,321,247,214,90$523,321,247,214,90$523,319,247,214,90$525,321,247,214,90$526,321,247,214,90$528,320,247,214,90$533,320,247,214,90$533,319,247,214,90$538,320,247,214,90$537,322,247,214,90$537,324,247,214,90$529,324,247,214,90$529,322,247,214,90$528,326,247,214,90$528,330,247,214,90$535,330,247,214,90$535,329,247,214,90$537,330,247,214,90$538,330,247,214,90$538,326,247,214,90$540,322,247,214,90$544,322,247,214,90$548,322,247,214,90$549,330,247,214,90$544,330,247,214,90$543,329,247,214,90$540,330,247,214,90$543,327,247,214,90$544,326,247,214,90$545,325,247,214,90$546,324,247,214,90$547,323,247,214,90$552,320,247,214,90$559,320,247,214,90$559,325,247,214,90$559,328,247,214,90$560,329,247,214,90$561,330,247,214,90$561,329,247,214,90$561,327,247,214,90$551,330,247,214,90$552,329,247,214,90$552,324,247,214,90"),
//8.双翼风刃
ColorArray.FromHsvFloatString(0.002f,0.002f,0.002f,"548,364,247,214,90$547,359,247,214,90$551,359,247,214,90$551,362,247,214,90$550,363,247,214,90$550,364,247,214,90$549,365,247,214,90$549,366,247,214,90$550,367,247,214,90$550,368,247,214,90$548,368,247,214,90$548,367,247,214,90$548,363,247,214,90$547,362,247,214,90$553,361,247,214,90$553,359,247,214,90$557,359,247,214,90$557,362,247,214,90$557,369,247,214,90$552,369,247,214,90$559,358,247,214,90$563,358,247,214,90$563,360,247,214,90$563,361,247,214,90$561,361,247,214,90$561,360,247,214,90$560,359,247,214,90$565,358,247,214,90$569,358,247,214,90$569,361,247,214,90$567,360,247,214,90$566,359,247,214,90$572,359,247,214,90$579,359,247,214,90$584,359,247,214,90$588,359,247,214,90$593,359,247,214,90$593,368,247,214,90$592,369,247,214,90$590,369,247,214,90$584,369,247,214,90$583,369,247,214,90$584,365,247,214,90$585,364,247,214,90$585,362,247,214,90$579,367,247,214,90$577,367,247,214,90$573,367,247,214,90$569,367,247,214,90$566,366,247,214,90$562,366,247,214,90$561,364,247,214,90$564,364,247,214,90$567,364,247,214,90$567,362,247,214,90$564,362,247,214,90$561,362,247,214,90"),
//9.风暴之眼
ColorArray.FromHsvFloatString(0.002f,0.002f,0.002f,"593,324,247,214,90$579,320,247,214,90$586,320,247,214,90$591,320,247,214,90$591,319,247,214,90$596,319,247,214,90$599,319,247,214,90$599,323,247,214,90$595,323,247,214,90$595,321,247,214,90$595,325,247,214,90$593,325,247,214,90$591,325,247,214,90$599,325,247,214,90$590,327,247,214,90$593,327,247,214,90$597,327,247,214,90$600,327,247,214,90$600,329,247,214,90$599,329,247,214,90$597,329,247,214,90$595,329,247,214,90$593,329,247,214,90$591,329,247,214,90$590,329,247,214,90$592,330,247,214,90$594,330,247,214,90$595,330,247,214,90$598,330,247,214,90$613,329,247,214,90$616,329,247,214,90$614,328,247,214,90$615,325,247,214,90$615,322,247,214,90$614,322,247,214,90$614,319,247,214,90$615,319,247,214,90$616,321,247,214,90$616,323,247,214,90$613,323,247,214,90$613,327,247,214,90$616,327,247,214,90$618,329,247,214,90$618,322,247,214,90$618,319,247,214,90$619,319,247,214,90$621,319,247,214,90$622,319,247,214,90$622,320,247,214,90"),
//10.真空旋风破
ColorArray.FromHsvFloatString(0.002f,0.002f,0.002f,"618,320,247,214,90$610,320,247,214,90$611,320,247,214,90$614,320,247,214,90$614,319,247,214,90$615,320,247,214,90$616,320,247,214,90$614,321,247,214,90$611,322,247,214,90$614,322,247,214,90$617,322,247,214,90$617,324,247,214,90$615,324,247,214,90$612,324,247,214,90$611,324,247,214,90$611,325,247,214,90$617,325,247,214,90$617,326,247,214,90$615,326,247,214,90$613,326,247,214,90$611,326,247,214,90$611,327,247,214,90$617,327,247,214,90$619,328,247,214,90$617,328,247,214,90$616,328,247,214,90$613,328,247,214,90$612,328,247,214,90$610,328,247,214,90$609,328,247,214,90$611,330,247,214,90$612,329,247,214,90$616,329,247,214,90$617,330,247,214,90$621,330,247,214,90$631,330,247,214,90$640,330,247,214,90$643,330,247,214,90$645,330,247,214,90$655,330,247,214,90$658,329,247,214,90$659,328,247,214,90$660,328,247,214,90$660,324,247,214,90$658,324,247,214,90$657,325,247,214,90$657,320,247,214,90$660,320,247,214,90$662,321,247,214,90$665,321,247,214,90$665,319,247,214,90$667,321,247,214,90$667,322,247,214,90$665,322,247,214,90$665,323,247,214,90$665,324,247,214,90$666,324,247,214,90$666,327,247,214,90$665,328,247,214,90$664,329,247,214,90$663,330,247,214,90$667,330,247,214,90$666,329,247,214,90"),
//11.风暴之拳
ColorArray.FromHsvFloatString(0.002f,0.002f,0.002f,"645,311,247,214,90$641,307,247,214,90$641,309,247,214,90$641,310,247,214,90$641,316,247,214,90$640,317,247,214,90$642,315,247,214,90$643,314,247,214,90$644,313,247,214,90$644,312,247,214,90$646,309,247,214,90$648,307,247,214,90$648,309,247,214,90$648,315,247,214,90$649,316,247,214,90$650,316,247,214,90$650,317,247,214,90$650,314,247,214,90$653,310,247,214,90$653,308,247,214,90$653,306,247,214,90$658,306,247,214,90$661,306,247,214,90$661,308,247,214,90$661,310,247,214,90$677,306,247,214,90$680,306,247,214,90$683,306,247,214,90$684,307,247,214,90$680,307,247,214,90$677,307,247,214,90$679,308,247,214,90$679,317,247,214,90$680,317,247,214,90$680,316,247,214,90$680,315,247,214,90$684,315,247,214,90$676,315,247,214,90$677,313,247,214,90$680,313,247,214,90$683,313,247,214,90"),
//12.万象风龙阵
ColorArray.FromHsvFloatString(0.002f,0.002f,0.002f,"680,303,247,214,90$671,294,247,214,90$672,294,247,214,90$674,294,247,214,90$679,294,247,214,90$681,294,247,214,90$674,295,247,214,90$674,298,247,214,90$676,298,247,214,90$678,298,247,214,90$680,298,247,214,90$680,302,247,214,90$679,304,247,214,90$677,304,247,214,90$671,304,247,214,90$672,303,247,214,90$673,302,247,214,90$673,301,247,214,90$674,300,247,214,90$674,299,247,214,90$726,293,247,214,90$726,294,247,214,90$729,295,247,214,90$727,295,247,214,90$724,295,247,214,90$725,296,247,214,90$725,297,247,214,90$724,298,247,214,90$724,299,247,214,90$725,299,247,214,90$726,299,247,214,90$727,299,247,214,90$727,297,247,214,90$728,299,247,214,90$729,299,247,214,90$727,300,247,214,90$727,301,247,214,90$727,302,247,214,90$728,302,247,214,90$729,302,247,214,90$726,302,247,214,90$725,302,247,214,90$724,302,247,214,90$727,303,247,214,90$727,304,247,214,90"),
//13.风卷残云
ColorArray.FromHsvFloatString(0.002f,0.002f,0.002f,"703,298,247,214,90$703,294,247,214,90$703,295,247,214,90$703,296,247,214,90$703,297,247,214,90$703,301,247,214,90$703,303,247,214,90$702,304,247,214,90$704,302,247,214,90$708,302,247,214,90$710,302,247,214,90$711,303,247,214,90$712,303,247,214,90$712,302,247,214,90$712,301,247,214,90$712,304,247,214,90$747,303,247,214,90$747,304,247,214,90$746,303,247,214,90$743,303,247,214,90$739,303,247,214,90$740,302,247,214,90$741,301,247,214,90$742,300,247,214,90$743,299,247,214,90$745,301,247,214,90$746,302,247,214,90$748,298,247,214,90$747,298,247,214,90$744,298,247,214,90$743,298,247,214,90$739,298,247,214,90$738,298,247,214,90$740,294,247,214,90$741,294,247,214,90$745,294,247,214,90$746,294,247,214,90$723,295,247,214,90$722,295,247,214,90$719,295,247,214,90$716,295,247,214,90$715,295,247,214,90$716,293,247,214,90$717,294,247,214,90$719,294,247,214,90$719,293,247,214,90$721,294,247,214,90$722,293,247,214,90"),
//14.游龙惊风破
ColorArray.FromHsvFloatString(0.002f,0.002f,0.002f,"519,344,247,214,90$516,338,247,214,90$517,339,247,214,90$518,339,247,214,90$519,339,247,214,90$521,339,247,214,90$520,338,247,214,90$519,337,247,214,90$519,340,247,214,90$519,342,247,214,90$519,346,247,214,90$519,347,247,214,90$518,348,247,214,90$517,346,247,214,90$516,347,247,214,90$516,342,247,214,90$517,343,247,214,90$522,344,247,214,90$526,344,247,214,90$524,344,247,214,90$524,343,247,214,90$525,342,247,214,90$525,341,247,214,90$523,341,247,214,90$522,340,247,214,90$523,339,247,214,90$523,337,247,214,90$526,339,247,214,90$574,348,247,214,90$573,347,247,214,90$572,346,247,214,90$571,347,247,214,90$570,348,247,214,90$569,346,247,214,90$569,344,247,214,90$569,342,247,214,90$571,342,247,214,90$571,343,247,214,90$571,344,247,214,90$571,345,247,214,90$573,345,247,214,90$573,344,247,214,90$573,343,247,214,90$573,342,247,214,90$572,341,247,214,90$572,340,247,214,90$572,339,247,214,90$572,338,247,214,90$572,337,247,214,90$573,339,247,214,90$574,339,247,214,90$574,340,247,214,90$569,339,247,214,90$569,341,247,214,90"),
//15.九霄风雷
ColorArray.FromHsvFloatString(0.002f,0.002f,0.002f,"550,340,247,214,90$550,337,247,214,90$550,338,247,214,90$550,339,247,214,90$550,340,247,214,90$547,340,247,214,90$553,340,247,214,90$554,340,247,214,90$554,341,247,214,90$554,343,247,214,90$554,345,247,214,90$554,347,247,214,90$555,348,247,214,90$556,348,247,214,90$557,348,247,214,90$557,346,247,214,90$550,344,247,214,90$549,345,247,214,90$549,346,247,214,90$548,347,247,214,90$547,348,247,214,90$584,348,247,214,90$585,348,247,214,90$588,348,247,214,90$588,347,247,214,90$588,346,247,214,90$588,345,247,214,90$588,344,247,214,90$589,344,247,214,90$592,344,247,214,90$592,345,247,214,90$592,346,247,214,90$591,346,247,214,90$590,346,247,214,90$592,348,247,214,90$592,347,247,214,90$591,348,247,214,90$584,348,247,214,90$584,347,247,214,90$585,348,247,214,90$559,339,247,214,90$559,340,247,214,90$561,340,247,214,90$561,339,247,214,90$567,339,247,214,90$567,340,247,214,90$568,339,247,214,90$569,340,247,214,90$569,339,247,214,90"),
//16.无限风域
ColorArray.FromHsvFloatString(0.002f,0.002f,0.002f,"624,269,247,214,90$579,260,247,214,90$580,260,247,214,90$582,260,247,214,90$583,260,247,214,90$585,260,247,214,90$586,260,247,214,90$587,260,247,214,90$583,261,247,214,90$583,262,247,214,90$583,263,247,214,90$583,264,247,214,90$585,264,247,214,90$586,264,247,214,90$588,264,247,214,90$578,264,247,214,90$579,264,247,214,90$582,265,247,214,90$582,266,247,214,90$581,267,247,214,90$580,268,247,214,90$579,269,247,214,90$578,270,247,214,90$584,269,247,214,90$584,268,247,214,90$584,267,247,214,90$585,270,247,214,90$586,270,247,214,90$588,270,247,214,90$588,269,247,214,90$588,268,247,214,90$624,270,247,214,90$623,269,247,214,90$624,268,247,214,90$622,268,247,214,90$620,268,247,214,90$621,269,247,214,90$619,269,247,214,90$618,269,247,214,90$620,270,247,214,90$622,268,247,214,90$622,267,247,214,90$623,267,247,214,90$623,266,247,214,90$622,266,247,214,90$624,265,247,214,90$624,264,247,214,90$622,264,247,214,90$622,261,247,214,90$624,261,247,214,90$624,259,247,214,90$622,259,247,214,90$618,261,247,214,90")
};
///
/// 得到技能名称
///
///
///
///
public static bool GetSkillName(out Int32 skillIndex, ZTRectangle limit)
{
skillIndex = 0;
ZTRectangle rect = ZTRectangle.Empty;
Image image = ScreenCapture.Instance.CaptureScreenReturnImage();
for (int i = 0; i < skillsText.Length; i++)
{
if (CVHelper.FindColorArray(out rect, image, skillsText[i], limit))
{
skillIndex = i;
return true;
}
}
return false;
}
/////
///// 灰色学习按钮
/////
//private static ColorArray studayGrayButton = ColorArray.FromHsvFloatString(0.002f, 0.002f, 0.002f, "");
//private static ColorArray studayCommon1Button = ColorArray.FromHsvFloatString(0.002f, 0.002f, 0.002f, "");
//private static ColorArray studayCommon2Button = ColorArray.FromHsvFloatString(0.002f, 0.002f, 0.002f, "");
//public static bool GetStudayStatus(out bool canStuday,ZTRectangle gameRect)
//{
// Image image = ScreenCapture.Instance.CaptureScreenReturnImage();
// ZTRectangle rect = ZTRectangle.Empty;
// if (CVHelper.FindColorArray(out rect, image, notiButton, gameRect))
// {
// return true;
// }
// return false;
//}
}
}