소스 검색

镜妖地图循环坐标和Atl+S召唤兽技能选择。

Jeff 4 년 전
부모
커밋
9900c7e135
1개의 변경된 파일34개의 추가작업 그리고 15개의 파일을 삭제
  1. 34 15
      GameAssist/GameAssist/GameAssistDlg.cpp

+ 34 - 15
GameAssist/GameAssist/GameAssistDlg.cpp

@@ -309,23 +309,19 @@ void BattleJY(HWND hWnd, BOOL bHasSummoner)
 					CRect rc;
 					// 召唤兽技能;
 					DebugLog(_T("BattleJY:召唤兽技能选择"));
-					if (GAssist::GetImgMatchtemplate(hWnd, GAssist::g_strAppdir + _T("img\\活动\\镜妖\\召唤兽技能选择.bmp"), rc))
+
+					GAssist::SendKey(hWnd, VK_S, FALSE, TRUE);
+					SRAND(200, 350);
+					// 选择重击;
+					SRAND(100, 300);
+					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(100, 300);
-						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));
 					}
+
+					SRAND(200, 500);
+					GAssist::MouseMove(hWnd, CPoint(290 - 3, 140 - 15));
+					GAssist::MouseClick(hWnd, CPoint(290 - 3, 140 - 20));
 				}
 
 				bFirstAttack = FALSE;
@@ -388,7 +384,7 @@ void BattleJY(HWND hWnd, BOOL bHasSummoner)
 	{
 		// 找到镜妖;
 		CRect rc;
-		POINT spt[4] = { { 260, 360 }, { 300,390}, { 390, 350}, { 280,300 } };
+		POINT spt[4] = { { 250, 335 }, { 310,360}, { 385, 315}, { 280,295 } };
 		for (int i = 0; !GAssist::GetImgMatchtemplate(hWnd, GAssist::g_strAppdir + _T("img\\活动\\镜妖\\镜妖3.bmp"), rc); i++)
 		{
 			// 打开世界地图;
@@ -928,6 +924,7 @@ void CGameAssistDlg::OnBnClickedButton2()
 // 		vdx.CaptureImage(pData, len);
 // 		vdx.Deinit();
 // 	}
+#if 1
 	DWORD dwPid = GAssist::GetProcessId();
 	HWND hProWnd = GAssist::GetProMainHwnd(dwPid);
 	// 截图;
@@ -935,7 +932,29 @@ void CGameAssistDlg::OnBnClickedButton2()
 	//strImg = CTime::GetCurrentTime().Format("%Y-%m-%d %H:%M:%S %W-%A");
 	strImg = CTime::GetCurrentTime().Format("%H%M%S-Game.bmp");
 	GAssist::SaveHwndToBmpFile(hProWnd, strImg.GetString());
+#else
+	CRect rc;
+	HWND hProWnd = GAssist::GetProcessMainWnd();
+	POINT spt[4] = { { 250, 335 }, { 310,360}, { 385, 315}, { 280,295 } };
+	static int i = 2;
+	if ( i < 4 )
+	{
+		// 打开世界地图;
+		GAssist::SendKey(hProWnd, VK_TAB); SRAND(200, 300);
+		// 选择坐标点;
+		GAssist::MouseClick(hProWnd, spt[i % 4]);
+		// 退出世界地图;
+		GAssist::SendKey(hProWnd, VK_TAB); SRAND(500, 900);
+
+		DebugLog(_T("%d = [x,y] = (%d, %d)"), i, spt[i].x, spt[i].y);
 
+		i++;
+	}
+	else
+	{
+		i = 0;
+	}
+#endif
 // 	GAssist::MouseMove(hProWnd, CPoint(290 - 5, 140 - 20));
 // 
 // 	Sleep(5000);