|
@@ -56,6 +56,33 @@ CRect FindNPC(HWND hWnd, LPCSTR lpszNPC)
|
|
return rc;
|
|
return rc;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+
|
|
|
|
+BOOL ClickSetup(HWND hWnd, LPCSTR lpszTemplateImage)
|
|
|
|
+{
|
|
|
|
+ CRect rc;
|
|
|
|
+ TCHAR szTemplateImage[MAX_PATH] = { 0 };
|
|
|
|
+ // 先截图;
|
|
|
|
+ DebugLog(_T("ClickSetup=%s"), lpszTemplateImage);
|
|
|
|
+ GAssist::SaveHwndToBmpFile(hWnd, GAssist::g_strAppdir + _T("Game.bmp")); SRAND(200, 500);
|
|
|
|
+ _stprintf_s(szTemplateImage, _T("%s%s"), GAssist::g_strAppdir.c_str(), lpszTemplateImage);
|
|
|
|
+ if (GAssist::GetImgMatchtemplate(GAssist::g_strAppdir + _T("Game.bmp"), szTemplateImage, rc)) {
|
|
|
|
+ // 找到匹配的模块;
|
|
|
|
+ GAssist::MouseMove(hWnd, CPoint(rc.left + rand() % 10, rc.top + rand() % 10));
|
|
|
|
+ DebugLog(_T("移动鼠标"));
|
|
|
|
+ GAssist::MouseClick(hWnd, CPoint((rc.right + rc.left) / 2 + rand() % 3, (rc.top + rc.bottom) / 2 + rand() % 3), TRUE);
|
|
|
|
+ SRAND(300, 600); // 进入孤独洞要时间切换地图;
|
|
|
|
+ // 单击目标后,要往移走鼠标,防止下面匹配的时候被鼠标挡住;
|
|
|
|
+ GAssist::MouseMove(hWnd, CPoint(rc.right + RAND(5, 12), rc.bottom + RAND(5, 10)));
|
|
|
|
+ SRAND(200, 500); // 进入孤独洞要时间切换地图;
|
|
|
|
+ DebugLog(_T("找到目标并单击成功:%s"), lpszTemplateImage);
|
|
|
|
+ return TRUE;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ DebugLog(_T("没有找到目标:%s"), lpszTemplateImage);
|
|
|
|
+ return FALSE;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+
|
|
BOOL IsOnMap(HWND hWnd, LPCSTR lpszTemplateImage)
|
|
BOOL IsOnMap(HWND hWnd, LPCSTR lpszTemplateImage)
|
|
{
|
|
{
|
|
CRect rc;
|
|
CRect rc;
|
|
@@ -76,15 +103,226 @@ BOOL IsOnMap(HWND hWnd, LPCSTR lpszTemplateImage)
|
|
return FALSE;
|
|
return FALSE;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+BOOL IsBattle(HWND hWnd)
|
|
|
|
+{
|
|
|
|
+ CRect rc;
|
|
|
|
+ BOOL bBattle = FALSE;
|
|
|
|
+ SRAND(100, 200);
|
|
|
|
+ if (GAssist::IsMatchIcon(hWnd, GAssist::g_strAppdir + _T("img\\活动\\镜妖\\非战斗中.bmp"), { 630, 25, 805, 45 }, rc)) {
|
|
|
|
+ DebugLog(_T("Battle:非战斗中"));
|
|
|
|
+ return FALSE;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ DebugLog(_T("Battle:战斗中"));
|
|
|
|
+ return TRUE;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+BOOL IsWattingAttack(HWND hWnd)
|
|
|
|
+{
|
|
|
|
+ // 先截图
|
|
|
|
+ BOOL bIsAttack = FALSE;
|
|
|
|
+ GAssist::SaveHwndToBmpFile(hWnd, GAssist::g_strAppdir + _T("IsWattingAttack.bmp"));
|
|
|
|
+ cv::Mat srcImg, tempImg, matchImg;
|
|
|
|
+ if (!GAssist::OpenImage(GAssist::g_strAppdir + _T("IsWattingAttack.bmp"), srcImg)) {
|
|
|
|
+ if (srcImg.data) srcImg.release();
|
|
|
|
+ if (tempImg.data) tempImg.release();
|
|
|
|
+ return bIsAttack;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ // 指定区域进行二值化;
|
|
|
|
+ cv::Mat imgThreshold;
|
|
|
|
+ cv::Mat imgROI = srcImg(cv::Rect(300, 50, 100, 70));
|
|
|
|
+ cv::imwrite("IsWattingAttack-match.bmp", imgROI);
|
|
|
|
+ if (GAssist::SetImgThreshold(imgROI, imgThreshold, 80, 255))
|
|
|
|
+ {
|
|
|
|
+ if (imgThreshold.data) {
|
|
|
|
+ // 轮廓;
|
|
|
|
+ std::vector<std::vector<cv::Point>> contours;
|
|
|
|
+ // 轮廓关系;
|
|
|
|
+ std::vector<cv::Vec4i> hierarchy;
|
|
|
|
+ // 查找轮廓;
|
|
|
|
+ contours.clear();
|
|
|
|
+ hierarchy.clear();
|
|
|
|
+
|
|
|
|
+ // 所有轮廓,内外轮廓分等级;
|
|
|
|
+ //findContours(imgROI, m_contours, m_hierarchy, cv::RETR_CCOMP, cv::CHAIN_APPROX_SIMPLE);
|
|
|
|
+ // 所有轮廓,内外轮廓不分等级,独立;
|
|
|
|
+ //findContours(m_ImgThreshold, m_contours, m_hierarchy, cv::RETR_LIST, cv::CHAIN_APPROX_SIMPLE);
|
|
|
|
+ // RETR_EXTERNAL=只检索最外面的轮廓;
|
|
|
|
+ findContours(imgThreshold, contours, hierarchy, cv::RETR_EXTERNAL, cv::CHAIN_APPROX_SIMPLE);
|
|
|
|
+
|
|
|
|
+#if 0
|
|
|
|
+ // 找出白色区域的面积或周长;
|
|
|
|
+ std::vector<std::vector<cv::Point>>::iterator it = contours.begin();
|
|
|
|
+ for (; it != contours.end(); it++)
|
|
|
|
+ {
|
|
|
|
+ // arcLength(*it, true) 面积;
|
|
|
|
+ // contourArea(*it);
|
|
|
|
+ }
|
|
|
|
+#else
|
|
|
|
+ // 只要白色区域个数>=2
|
|
|
|
+ if (contours.size() >= 2)
|
|
|
|
+ bIsAttack = TRUE;
|
|
|
|
+#endif
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if (imgROI.data) imgROI.release();
|
|
|
|
+ if (srcImg.data) srcImg.release();
|
|
|
|
+ if (tempImg.data) tempImg.release();
|
|
|
|
+
|
|
|
|
+ return bIsAttack;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+void BattleOnece(HWND hWnd)
|
|
|
|
+{
|
|
|
|
+ if ( IsBattle(hWnd) )
|
|
|
|
+ {
|
|
|
|
+ SRAND(300, 500);
|
|
|
|
+ // 是否我方攻击;
|
|
|
|
+ if (IsWattingAttack(hWnd))
|
|
|
|
+ {
|
|
|
|
+ // 人物固定F1
|
|
|
|
+ // 根据角色选择技能;
|
|
|
|
+ GAssist::SendKey(hWnd, VK_F1);
|
|
|
|
+ SRAND(200, 300);
|
|
|
|
+ // 打镜妖喽罗;
|
|
|
|
+ GAssist::MouseClick(hWnd, CPoint(290 - 3, 140 - 20));
|
|
|
|
+ //GAssist::MouseMove(hWnd, CPoint(220 - 5, 180 - 10));// 打主镜妖;
|
|
|
|
+ SRAND(100, 200);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ else
|
|
|
|
+ {
|
|
|
|
+ // 非战斗中,是否在贫民房中;
|
|
|
|
+ if (!IsOnMap(hWnd, _T("img\\地图\\贫民房.bmp")))
|
|
|
|
+ {
|
|
|
|
+ // 找小米;
|
|
|
|
+ CRect rc = FindNPC(hWnd, "臭美的小米");
|
|
|
|
+
|
|
|
|
+ // 选择进入;
|
|
|
|
+ BOOL bMatch = FALSE;
|
|
|
|
+ int trySize = 20;
|
|
|
|
+ // 我要挑战他们;
|
|
|
|
+ while (!(bMatch = ClickSetup(hWnd, _T("img\\活动\\镜妖\\1-我帮您抓.bmp")))) {
|
|
|
|
+ SRAND(800, 1200);
|
|
|
|
+ if (!trySize--) break;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if (bMatch) {
|
|
|
|
+ GAssist::MouseMove(hWnd, CPoint(rc.left, rc.top));
|
|
|
|
+ // 单击:我要挑战他们;
|
|
|
|
+ GAssist::MouseClick(hWnd, CPoint((rc.right + rc.left) / 2, (rc.top + rc.bottom) / 2), TRUE);
|
|
|
|
+ SRAND(1000, 1500);// 等出图;
|
|
|
|
+
|
|
|
|
+ // 移动一下;
|
|
|
|
+ GAssist::MouseMove(hWnd, CPoint(rc.left, rc.top));
|
|
|
|
+ ::SetCursorPos(rc.left + rand() % 6, rc.top + rand() % 8);
|
|
|
|
+
|
|
|
|
+ // 是否第一次进入地图;
|
|
|
|
+ if (ClickSetup(hWnd, _T("img\\活动\\镜妖\\2-我这就去.bmp")))
|
|
|
|
+ {
|
|
|
|
+ SRAND(600, 1200);
|
|
|
|
+ if (ClickSetup(hWnd, _T("img\\活动\\镜妖\\3-战意镜妖.bmp")))
|
|
|
|
+ {
|
|
|
|
+ SRAND(600, 1800);
|
|
|
|
+ if ((bMatch = ClickSetup(hWnd, _T("img\\活动\\镜妖\\4-我就选择它.bmp"))))
|
|
|
|
+ {
|
|
|
|
+ SRAND(800, 1800);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ else
|
|
|
|
+ {
|
|
|
|
+ // 找到镜妖;
|
|
|
|
+ CRect rc;
|
|
|
|
+ POINT spt[4] = { { 260, 360 }, { 300,390}, { 390, 350}, { 280,300 } };
|
|
|
|
+ for (int i = 0; !GAssist::GetImgMatchtemplate(hWnd, GAssist::g_strAppdir + _T("img\\活动\\镜妖\\镜妖3.bmp"), rc); i++)
|
|
|
|
+ {
|
|
|
|
+ // 打开世界地图;
|
|
|
|
+ GAssist::SendKey(hWnd, VK_TAB); SRAND(200, 300);
|
|
|
|
+ // 选择坐标点;
|
|
|
|
+ GAssist::MouseClick(hWnd, spt[i % 4]);
|
|
|
|
+ // 退出世界地图;
|
|
|
|
+ GAssist::SendKey(hWnd, VK_TAB); SRAND(500, 900);
|
|
|
|
+
|
|
|
|
+ if (i > 10) {
|
|
|
|
+ DebugLog(_T("未找到镜妖+10"));
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ // 找到镜妖;
|
|
|
|
+ GAssist::MouseMove(hWnd, CPoint(rc.left + rand() % 10, rc.top + rand() % 10));
|
|
|
|
+ DebugLog(_T("移动鼠标"));
|
|
|
|
+ GAssist::MouseClick(hWnd, CPoint((rc.right + rc.left) / 2 + rand() % 3, (rc.top + rc.bottom) / 2 + rand() % 3), TRUE);
|
|
|
|
+ SRAND(300, 600);
|
|
|
|
+ // 单击目标后,要往移走鼠标,防止下面匹配的时候被鼠标挡住;
|
|
|
|
+ GAssist::MouseMove(hWnd, CPoint(rc.right + RAND(5, 12), rc.bottom + RAND(5, 10)));
|
|
|
|
+ SRAND(200, 500);
|
|
|
|
+ DebugLog(_T("找到目标并单击成功:%s"));
|
|
|
|
+
|
|
|
|
+ // 我来抓你;
|
|
|
|
+ if (GAssist::GetImgMatchtemplate(hWnd, GAssist::g_strAppdir + _T("img\\活动\\镜妖\\我来抓您的.bmp"), rc)) {
|
|
|
|
+ // 找到匹配的模块;
|
|
|
|
+ GAssist::MouseMove(hWnd, CPoint(rc.left + rand() % 10, rc.top + rand() % 10));
|
|
|
|
+ DebugLog(_T("我来抓你:移动鼠标"));
|
|
|
|
+ GAssist::MouseClick(hWnd, CPoint((rc.right + rc.left) / 2 + rand() % 3, (rc.top + rc.bottom) / 2 + rand() % 3), TRUE);
|
|
|
|
+ SRAND(800, 1500);
|
|
|
|
+ DebugLog(_T("我来抓你:找到目标并单击成功:%s"));
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
// 与镜妖战斗;
|
|
// 与镜妖战斗;
|
|
-void BattleJY(HWND hWnd)
|
|
|
|
|
|
+void BattleJY(HWND hWnd, BOOL bSummoner)
|
|
{
|
|
{
|
|
if (!IsOnMap(hWnd, _T("img\\地图\\贫民房.bmp"))) {
|
|
if (!IsOnMap(hWnd, _T("img\\地图\\贫民房.bmp"))) {
|
|
|
|
+ // 找小米;
|
|
|
|
+ CRect rc = FindNPC(hWnd, "臭美的小米");
|
|
|
|
+
|
|
|
|
+ // 选择进入;
|
|
|
|
+ BOOL bMatch = FALSE;
|
|
|
|
+ int trySize = 20;
|
|
|
|
+ // 我要挑战他们;
|
|
|
|
+ while (!(bMatch = ClickSetup(hWnd, _T("img\\活动\\镜妖\\1-我帮您抓.bmp")))) {
|
|
|
|
+ SRAND(800, 1200);
|
|
|
|
+ if (!trySize--) break;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if (bMatch) {
|
|
|
|
+ GAssist::MouseMove(hWnd, CPoint(rc.left, rc.top));
|
|
|
|
+ // 单击:我要挑战他们;
|
|
|
|
+ GAssist::MouseClick(hWnd, CPoint((rc.right + rc.left) / 2, (rc.top + rc.bottom) / 2), TRUE);
|
|
|
|
+ SRAND(1000, 1500);// 等出图;
|
|
|
|
+
|
|
|
|
+ // 移动一下;
|
|
|
|
+ GAssist::MouseMove(hWnd, CPoint(rc.left, rc.top));
|
|
|
|
+ ::SetCursorPos(rc.left + rand() % 6, rc.top + rand() % 8);
|
|
|
|
+
|
|
|
|
+ // 是否第一次进入地图;
|
|
|
|
+ if (ClickSetup(hWnd, _T("img\\活动\\镜妖\\2-我这就去.bmp")))
|
|
|
|
+ {
|
|
|
|
+ SRAND(600, 1200);
|
|
|
|
+ if (ClickSetup(hWnd, _T("img\\活动\\镜妖\\3-战意镜妖.bmp")))
|
|
|
|
+ {
|
|
|
|
+ SRAND(600, 1800);
|
|
|
|
+ if ((bMatch = ClickSetup(hWnd, _T("img\\活动\\镜妖\\4-我就选择它.bmp"))))
|
|
|
|
+ {
|
|
|
|
+ SRAND(800, 1800);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
|
|
|
|
CRect rc;
|
|
CRect rc;
|
|
- POINT spt[4] = { { 175, 280 }, { 225,305 }, { 300, 266 }, { 225,305 } };
|
|
|
|
|
|
+ //POINT spt[4] = { { 175, 280 }, { 225,305 }, { 300, 266 }, { 225,305 } };
|
|
|
|
+ POINT spt[4] = { { 260, 360 }, { 300,390}, { 390, 350}, { 280,300 } };
|
|
for( int i =0; !GAssist::GetImgMatchtemplate(hWnd, GAssist::g_strAppdir + _T("img\\活动\\镜妖\\镜妖3.bmp"), rc); i++ )
|
|
for( int i =0; !GAssist::GetImgMatchtemplate(hWnd, GAssist::g_strAppdir + _T("img\\活动\\镜妖\\镜妖3.bmp"), rc); i++ )
|
|
{
|
|
{
|
|
// 打开世界地图;
|
|
// 打开世界地图;
|
|
@@ -120,12 +358,14 @@ void BattleJY(HWND hWnd)
|
|
DebugLog(_T("我来抓你:找到目标并单击成功:%s"));
|
|
DebugLog(_T("我来抓你:找到目标并单击成功:%s"));
|
|
|
|
|
|
BOOL bBattle = FALSE;
|
|
BOOL bBattle = FALSE;
|
|
- while (GAssist::GetImgMatchtemplate(hWnd, GAssist::g_strAppdir + _T("img\\活动\\镜妖\\战斗中.bmp"), rc))
|
|
|
|
|
|
+ //while (GAssist::GetImgMatchtemplate(hWnd, GAssist::g_strAppdir + _T("img\\活动\\镜妖\\战斗中.bmp"), rc))
|
|
|
|
+ while (IsBattle(hWnd) )
|
|
{
|
|
{
|
|
DebugLog(_T("BattleJY:战斗中"));
|
|
DebugLog(_T("BattleJY:战斗中"));
|
|
- while (GAssist::GetImgMatchtemplate(hWnd, GAssist::g_strAppdir + _T("img\\活动\\镜妖\\技能选择.bmp"), rc))
|
|
|
|
|
|
+ //while (GAssist::GetImgMatchtemplate(hWnd, GAssist::g_strAppdir + _T("img\\活动\\镜妖\\技能选择.bmp"), rc))
|
|
|
|
+ while ( IsWattingAttack(hWnd) )
|
|
{
|
|
{
|
|
- DebugLog(_T("BattleJY:技能选择"));
|
|
|
|
|
|
+ DebugLog(_T("BattleJY:我方攻击……"));
|
|
if (!bBattle)
|
|
if (!bBattle)
|
|
{
|
|
{
|
|
// 根据角色选择技能;
|
|
// 根据角色选择技能;
|
|
@@ -136,25 +376,31 @@ void BattleJY(HWND hWnd)
|
|
//GAssist::MouseMove(hWnd, CPoint(220 - 5, 180 - 10));// 打主镜妖;
|
|
//GAssist::MouseMove(hWnd, CPoint(220 - 5, 180 - 10));// 打主镜妖;
|
|
SRAND(100,200);
|
|
SRAND(100,200);
|
|
|
|
|
|
- // 召唤兽技能;
|
|
|
|
- if (GAssist::GetImgMatchtemplate(hWnd, GAssist::g_strAppdir + _T("img\\活动\\镜妖\\召唤兽技能选择.bmp"), rc))
|
|
|
|
- {
|
|
|
|
- SRAND(200, 500);
|
|
|
|
- GAssist::MouseClick(hWnd, CPoint((rc.right + rc.left) / 2 + rand() % 3, (rc.top + rc.bottom) / 2 + rand() % 3), TRUE);
|
|
|
|
- DebugLog(_T("BattleJY:召唤兽技能选择"));
|
|
|
|
-
|
|
|
|
- // 选择重击;
|
|
|
|
- SRAND(300, 800);
|
|
|
|
- if (GAssist::GetImgMatchtemplate(hWnd, GAssist::g_strAppdir + _T("img\\活动\\镜妖\\重击.bmp"), rc))
|
|
|
|
|
|
+ if (bSummoner) {
|
|
|
|
+ // 召唤兽技能;
|
|
|
|
+ if (GAssist::GetImgMatchtemplate(hWnd, GAssist::g_strAppdir + _T("img\\活动\\镜妖\\召唤兽技能选择.bmp"), rc))
|
|
{
|
|
{
|
|
|
|
+ SRAND(200, 500);
|
|
GAssist::MouseClick(hWnd, CPoint((rc.right + rc.left) / 2 + rand() % 3, (rc.top + rc.bottom) / 2 + rand() % 3), TRUE);
|
|
GAssist::MouseClick(hWnd, CPoint((rc.right + rc.left) / 2 + rand() % 3, (rc.top + rc.bottom) / 2 + rand() % 3), TRUE);
|
|
- }
|
|
|
|
|
|
+ DebugLog(_T("BattleJY:召唤兽技能选择"));
|
|
|
|
|
|
- SRAND(200, 500);
|
|
|
|
- GAssist::MouseMove(hWnd, CPoint(290 - 3, 140 - 15));
|
|
|
|
- GAssist::MouseClick(hWnd, CPoint(290 - 3, 140 - 20));
|
|
|
|
- }
|
|
|
|
|
|
+ // 选择重击;
|
|
|
|
+ SRAND(300, 800);
|
|
|
|
+ if (GAssist::GetImgMatchtemplate(hWnd, GAssist::g_strAppdir + _T("img\\活动\\镜妖\\重击.bmp"), rc))
|
|
|
|
+ {
|
|
|
|
+ GAssist::MouseClick(hWnd, CPoint((rc.right + rc.left) / 2 + rand() % 3, (rc.top + rc.bottom) / 2 + rand() % 3), TRUE);
|
|
|
|
+ }
|
|
|
|
|
|
|
|
+ SRAND(200, 500);
|
|
|
|
+ GAssist::MouseMove(hWnd, CPoint(290 - 3, 140 - 15));
|
|
|
|
+ GAssist::MouseClick(hWnd, CPoint(290 - 3, 140 - 20));
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ else
|
|
|
|
+ {
|
|
|
|
+ GAssist::SendKey(hWnd, VK_A, FALSE, TRUE);
|
|
|
|
+ SRAND(60, 100);
|
|
|
|
+ }
|
|
bBattle = TRUE;
|
|
bBattle = TRUE;
|
|
}
|
|
}
|
|
else
|
|
else
|
|
@@ -172,31 +418,6 @@ void BattleJY(HWND hWnd)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
-BOOL ClickSetup(HWND hWnd, LPCSTR lpszTemplateImage)
|
|
|
|
-{
|
|
|
|
- CRect rc;
|
|
|
|
- TCHAR szTemplateImage[MAX_PATH] = { 0 };
|
|
|
|
- // 先截图;
|
|
|
|
- DebugLog(_T("ClickSetup=%s"), lpszTemplateImage);
|
|
|
|
- GAssist::SaveHwndToBmpFile(hWnd, GAssist::g_strAppdir + _T("Game.bmp")); SRAND(200, 500);
|
|
|
|
- _stprintf_s(szTemplateImage, _T("%s%s"), GAssist::g_strAppdir.c_str(), lpszTemplateImage);
|
|
|
|
- if (GAssist::GetImgMatchtemplate(GAssist::g_strAppdir + _T("Game.bmp"), szTemplateImage, rc)) {
|
|
|
|
- // 找到匹配的模块;
|
|
|
|
- GAssist::MouseMove(hWnd, CPoint(rc.left + rand() % 10, rc.top + rand() % 10));
|
|
|
|
- DebugLog(_T("移动鼠标"));
|
|
|
|
- GAssist::MouseClick(hWnd, CPoint((rc.right + rc.left) / 2 + rand() % 3, (rc.top + rc.bottom) / 2 + rand() % 3), TRUE);
|
|
|
|
- SRAND(300, 600); // 进入孤独洞要时间切换地图;
|
|
|
|
- // 单击目标后,要往移走鼠标,防止下面匹配的时候被鼠标挡住;
|
|
|
|
- GAssist::MouseMove(hWnd, CPoint(rc.right + RAND(5, 12), rc.bottom + RAND(5, 10)));
|
|
|
|
- SRAND(200, 500); // 进入孤独洞要时间切换地图;
|
|
|
|
- DebugLog(_T("找到目标并单击成功:%s"), lpszTemplateImage);
|
|
|
|
- return TRUE;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- DebugLog(_T("没有找到目标:%s"), lpszTemplateImage);
|
|
|
|
- return FALSE;
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
|
|
|
|
// 用于应用程序“关于”菜单项的 CAboutDlg 对话框
|
|
// 用于应用程序“关于”菜单项的 CAboutDlg 对话框
|
|
|
|
|
|
@@ -243,6 +464,7 @@ CGameAssistDlg::CGameAssistDlg(CWnd* pParent /*=NULL*/)
|
|
void CGameAssistDlg::DoDataExchange(CDataExchange* pDX)
|
|
void CGameAssistDlg::DoDataExchange(CDataExchange* pDX)
|
|
{
|
|
{
|
|
CDialog::DoDataExchange(pDX);
|
|
CDialog::DoDataExchange(pDX);
|
|
|
|
+ DDX_Control(pDX, IDC_CHECK1, m_cbSummoner);
|
|
}
|
|
}
|
|
|
|
|
|
BEGIN_MESSAGE_MAP(CGameAssistDlg, CDialog)
|
|
BEGIN_MESSAGE_MAP(CGameAssistDlg, CDialog)
|
|
@@ -635,7 +857,7 @@ battle:
|
|
// 找镜妖;
|
|
// 找镜妖;
|
|
for (int i = 0; i < 100; i++)
|
|
for (int i = 0; i < 100; i++)
|
|
{
|
|
{
|
|
- BattleJY(hProWnd);
|
|
|
|
|
|
+ BattleJY(hProWnd, m_cbSummoner.GetCheck());
|
|
}
|
|
}
|
|
}
|
|
}
|
|
#else
|
|
#else
|