|
@@ -12,7 +12,8 @@
|
|
|
#define new DEBUG_NEW
|
|
|
#endif
|
|
|
|
|
|
-#define RAND(a,b) (rand()*(b-a)+a)
|
|
|
+#define RAND(a,b) (rand()%(b-a)+a)
|
|
|
+#define SRAND(a,b) (Sleep(rand()%(b-a)+a))
|
|
|
|
|
|
VOID DebugLog(CHAR* pszStr, ...)
|
|
|
{
|
|
@@ -28,31 +29,147 @@ VOID DebugLog(CHAR* pszStr, ...)
|
|
|
}
|
|
|
|
|
|
|
|
|
-BOOL FindNPC(HWND hWnd, LPCSTR lpszNPC)
|
|
|
+CRect FindNPC(HWND hWnd, LPCSTR lpszNPC)
|
|
|
{
|
|
|
CRect rc;
|
|
|
//// 打开世界地图;
|
|
|
- GAssist::SendKey(hWnd, VK_TAB); Sleep(500 + rand() % 200);
|
|
|
+ GAssist::SendKey(hWnd, VK_TAB); SRAND(500, 600);
|
|
|
if (!GAssist::GetImgMatchtemplate(hWnd, GAssist::g_strAppdir + _T("img\\寻路窗口.bmp"), rc))
|
|
|
- return FALSE;
|
|
|
+ return rc;
|
|
|
|
|
|
//// 单击寻路窗口;
|
|
|
- GAssist::MouseClick(hWnd, CPoint((rc.right + rc.left) / 2 + rand() % 2, (rc.top + rc.bottom) / 2 + rand() % 2)); Sleep(500 + rand() % 200);
|
|
|
+ GAssist::MouseClick(hWnd, CPoint((rc.right + rc.left) / 2 + rand() % 2, (rc.top + rc.bottom) / 2 + rand() % 2)); SRAND(500, 800);
|
|
|
//// 设置剪切板:职业大挑战;
|
|
|
- GAssist::SetClipboardString(lpszNPC); Sleep(200 + rand() % 200);
|
|
|
+ GAssist::SetClipboardString(lpszNPC); SRAND(200, 500);
|
|
|
//// Ctrl+V
|
|
|
- GAssist::SendKey(hWnd, 0x56, TRUE); Sleep(300 + rand() % 200);
|
|
|
+ GAssist::SendKey(hWnd, 0x56, TRUE); SRAND(300, 500);
|
|
|
// 先移动到目标后,才能实现单击;
|
|
|
- GAssist::MouseMove(hWnd, CPoint((rc.right + rc.left) / 2 + 5 + rand() % 2, (rc.top + rc.bottom) / 2 + 60 + rand() % 2)); Sleep(200 + rand() % 100);
|
|
|
+ GAssist::MouseMove(hWnd, CPoint((rc.right + rc.left) / 2 + 5 + rand() % 2, (rc.top + rc.bottom) / 2 + 60 + rand() % 2)); SRAND(200, 300);
|
|
|
//// 寻路窗口往下50就是目标;
|
|
|
- GAssist::MouseDbClick(hWnd, CPoint((rc.right + rc.left) / 2 + 5 + rand() % 2, (rc.top + rc.bottom) / 2 + 60 + rand() % 2)); Sleep(200 + rand() % 100);
|
|
|
+ GAssist::MouseDbClick(hWnd, CPoint((rc.right + rc.left) / 2 + 5 + rand() % 2, (rc.top + rc.bottom) / 2 + 60 + rand() % 2)); SRAND(200, 300);
|
|
|
//// 退出世界地址;
|
|
|
- GAssist::SendKey(hWnd, VK_TAB); Sleep(200 + rand() % 50);
|
|
|
+ GAssist::SendKey(hWnd, VK_TAB); SRAND(200, 300);
|
|
|
|
|
|
// 问题:返回TRUE并不表示到寻路到NPC;
|
|
|
// 是否成功寻路到NPC要对NPC人物进向模板匹配或与NPC对话框模板匹配
|
|
|
|
|
|
- return TRUE;
|
|
|
+ return rc;
|
|
|
+}
|
|
|
+
|
|
|
+BOOL IsOnMap(HWND hWnd, LPCSTR lpszTemplateImage)
|
|
|
+{
|
|
|
+ CRect rc;
|
|
|
+ TCHAR szTemplateImage[MAX_PATH] = { 0 };
|
|
|
+ ::ShowWindow(hWnd, SW_SHOWNORMAL);
|
|
|
+ ::SetForegroundWindow(hWnd);
|
|
|
+ // 先截图;
|
|
|
+ DebugLog(_T("IsOnMap=%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)) {
|
|
|
+ // 找到匹配的模块;
|
|
|
+ DebugLog(_T("在目标地图上:%s"), lpszTemplateImage);
|
|
|
+ return TRUE;
|
|
|
+ }
|
|
|
+
|
|
|
+ DebugLog(_T("不在目标地图上:%s"), lpszTemplateImage);
|
|
|
+ return FALSE;
|
|
|
+}
|
|
|
+
|
|
|
+// 与镜妖战斗;
|
|
|
+void BattleJY(HWND hWnd)
|
|
|
+{
|
|
|
+ if (!IsOnMap(hWnd, _T("img\\地图\\贫民房.bmp"))) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ CRect rc;
|
|
|
+ POINT spt[4] = { { 175, 280 }, { 225,305 }, { 300, 266 }, { 225,305 } };
|
|
|
+ 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"));
|
|
|
+
|
|
|
+ BOOL bBattle = FALSE;
|
|
|
+ while (GAssist::GetImgMatchtemplate(hWnd, GAssist::g_strAppdir + _T("img\\活动\\镜妖\\战斗中.bmp"), rc))
|
|
|
+ {
|
|
|
+ DebugLog(_T("BattleJY:战斗中"));
|
|
|
+ while (GAssist::GetImgMatchtemplate(hWnd, GAssist::g_strAppdir + _T("img\\活动\\镜妖\\技能选择.bmp"), rc))
|
|
|
+ {
|
|
|
+ DebugLog(_T("BattleJY:技能选择"));
|
|
|
+ if (!bBattle)
|
|
|
+ {
|
|
|
+ // 根据角色选择技能;
|
|
|
+ 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);
|
|
|
+
|
|
|
+ // 召唤兽技能;
|
|
|
+ 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))
|
|
|
+ {
|
|
|
+ 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));
|
|
|
+ }
|
|
|
+
|
|
|
+ bBattle = TRUE;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ GAssist::SendKey(hWnd, VK_A, FALSE, TRUE);
|
|
|
+ SRAND(50, 100);
|
|
|
+ GAssist::SendKey(hWnd, VK_A, FALSE, TRUE);
|
|
|
+ SRAND(60, 100);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ // 战斗中等待;
|
|
|
+ SRAND(800, 1200);
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
BOOL ClickSetup(HWND hWnd, LPCSTR lpszTemplateImage)
|
|
@@ -60,23 +177,27 @@ BOOL ClickSetup(HWND hWnd, LPCSTR lpszTemplateImage)
|
|
|
CRect rc;
|
|
|
TCHAR szTemplateImage[MAX_PATH] = { 0 };
|
|
|
// 先截图;
|
|
|
- GAssist::SaveHwndToBmpFile(hWnd, GAssist::g_strAppdir + _T("Game.bmp"));
|
|
|
- _stprintf_s(szTemplateImage, _T("%s%s"),GAssist::g_strAppdir.c_str(), lpszTemplateImage);
|
|
|
+ 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);
|
|
|
- Sleep(200 + rand() % 50);// 进入孤独洞要时间切换地图;
|
|
|
+ SRAND(300, 600); // 进入孤独洞要时间切换地图;
|
|
|
// 单击目标后,要往移走鼠标,防止下面匹配的时候被鼠标挡住;
|
|
|
- GAssist::MouseMove(hWnd, CPoint(rc.left + 20 + rand() % 10, rc.top + 30 + rand() % 10));
|
|
|
- Sleep(300 + rand() % 300);// 进入孤独洞要时间切换地图;
|
|
|
- DebugLog(_T("找到目标并单击成功"));
|
|
|
+ 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 对话框
|
|
|
|
|
|
class CAboutDlg : public CDialog
|
|
@@ -435,11 +556,89 @@ void CGameAssistDlg::OnBnClickedButton2()
|
|
|
HWND hProWnd = GAssist::GetProMainHwnd(dwPid);
|
|
|
// 截图;
|
|
|
GAssist::SaveHwndToBmpFile(hProWnd, "Game.bmp");
|
|
|
+
|
|
|
+// GAssist::MouseMove(hProWnd, CPoint(290 - 5, 140 - 20));
|
|
|
+//
|
|
|
+// Sleep(5000);
|
|
|
+// GAssist::MouseMove(hProWnd, CPoint(220 - 5, 180 - 10));
|
|
|
}
|
|
|
|
|
|
|
|
|
void CGameAssistDlg::OnBnClickedButton3() // 镜妖;
|
|
|
{
|
|
|
+
|
|
|
+#if 1
|
|
|
+ /*
|
|
|
+ -- 是否在星秀村
|
|
|
+ -- 是否在贫民房
|
|
|
+ |-- 否:我帮您抓
|
|
|
+ |-- -- 是否进入过贫民房
|
|
|
+ | |-- 否:我这就去
|
|
|
+ | | |-- 选择:幸运镜妖
|
|
|
+ | | |-- 我就选择它
|
|
|
+ | |-- 是:直接进入贫民房
|
|
|
+ |-- 是:找到镜妖NPC
|
|
|
+ | |-- 我来抓您的
|
|
|
+ | |
|
|
|
+ | |
|
|
|
+ |
|
|
|
+ |
|
|
|
+ */
|
|
|
+ CRect rc;
|
|
|
+ HWND hProWnd = GAssist::GetProcessMainWnd();
|
|
|
+ if (IsOnMap(hProWnd, _T("img\\地图\\贫民房.bmp")))
|
|
|
+ goto battle;
|
|
|
+
|
|
|
+ rc = FindNPC(hProWnd, "臭美的小米");
|
|
|
+
|
|
|
+ // 选择进入;
|
|
|
+ BOOL bMatch = FALSE;
|
|
|
+ int trySize = 20;
|
|
|
+ // 我要挑战他们;
|
|
|
+ while ( !(bMatch = ClickSetup(hProWnd, _T("img\\活动\\镜妖\\1-我帮您抓.bmp"))) ) {
|
|
|
+ SRAND(800, 1200);
|
|
|
+ if (!trySize--) break;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (bMatch) {
|
|
|
+ GAssist::MouseMove(hProWnd, CPoint(rc.left, rc.top));
|
|
|
+ // 单击:我要挑战他们;
|
|
|
+ GAssist::MouseClick(hProWnd, CPoint((rc.right + rc.left) / 2, (rc.top + rc.bottom) / 2), TRUE);
|
|
|
+ SRAND(1000, 1500);// 等出图;
|
|
|
+
|
|
|
+ // 移动一下;
|
|
|
+ GAssist::MouseMove(hProWnd, CPoint(rc.left, rc.top));
|
|
|
+ ::SetCursorPos(rc.left + rand() % 6, rc.top + rand() % 8);
|
|
|
+
|
|
|
+ // 是否第一次进入地图;
|
|
|
+ if ( ClickSetup(hProWnd, _T("img\\活动\\镜妖\\2-我这就去.bmp")))
|
|
|
+ {
|
|
|
+ SRAND(600,1200);
|
|
|
+ if ( ClickSetup(hProWnd, _T("img\\活动\\镜妖\\3-战意镜妖.bmp")))
|
|
|
+ {
|
|
|
+ SRAND(600, 1800);
|
|
|
+ if ((bMatch = ClickSetup(hProWnd, _T("img\\活动\\镜妖\\4-我就选择它.bmp"))))
|
|
|
+ {
|
|
|
+ SRAND(800, 1800);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+battle:
|
|
|
+ if (IsOnMap(hProWnd, _T("img\\地图\\贫民房.bmp"))) {
|
|
|
+ GAssist::MouseMove(hProWnd, CPoint(rc.left + rand() % 10, rc.top + rand() % 10));
|
|
|
+ GAssist::MouseClick(hProWnd, CPoint((rc.right + rc.left) / 2 + rand() % 3, (rc.top + rc.bottom) / 2 + rand() % 3), TRUE);
|
|
|
+ SRAND(1500, 2000);// 进入孤独洞要时间切换地图;
|
|
|
+ DebugLog(_T("进入贫民房"));
|
|
|
+
|
|
|
+ // 找镜妖;
|
|
|
+ for (int i = 0; i < 100; i++)
|
|
|
+ {
|
|
|
+ BattleJY(hProWnd);
|
|
|
+ }
|
|
|
+ }
|
|
|
+#else
|
|
|
// 获取进程句柄;
|
|
|
DWORD dwPid = GAssist::GetProcessId();
|
|
|
HWND hProWnd = GAssist::GetProMainHwnd(dwPid);
|
|
@@ -558,6 +757,7 @@ void CGameAssistDlg::OnBnClickedButton3() //
|
|
|
|
|
|
}
|
|
|
}
|
|
|
+#endif
|
|
|
|
|
|
}
|
|
|
|
|
@@ -614,6 +814,7 @@ void CGameAssistDlg::OnBnClickedButton6() // 职业
|
|
|
CRect rc;
|
|
|
DebugLog(_T("进入孤独洞========="));
|
|
|
HWND hProWnd = GAssist::GetProcessMainWnd();
|
|
|
+#if 0
|
|
|
//// 打开世界地图;
|
|
|
GAssist::SendKey(hProWnd, VK_TAB); Sleep(500 + rand() % 200);
|
|
|
if (!GAssist::GetImgMatchtemplate(hProWnd, GAssist::g_strAppdir + _T("img\\寻路窗口.bmp"), rc))
|
|
@@ -631,16 +832,19 @@ void CGameAssistDlg::OnBnClickedButton6() // 职业
|
|
|
GAssist::MouseDbClick(hProWnd, CPoint((rc.right + rc.left) / 2 + 5 + rand() % 2, (rc.top + rc.bottom) / 2 + 60 + rand() % 2)); Sleep(200 + rand() % 100);
|
|
|
//// 退出世界地址;
|
|
|
GAssist::SendKey(hProWnd, VK_TAB); Sleep(200 + rand() % 50);
|
|
|
+#else
|
|
|
+ rc = FindNPC(hProWnd, "职业训导大师");
|
|
|
+#endif
|
|
|
|
|
|
// 选择进入;
|
|
|
BOOL bMatch = FALSE;
|
|
|
int trySize = 20;
|
|
|
// 我要挑战他们;
|
|
|
while (!(bMatch = GAssist::GetImgMatchtemplate(GAssist::g_strAppdir + _T("Game.bmp"), GAssist::g_strAppdir + _T("img\\zyxdds-wytztm.bmp"), rc))) {
|
|
|
- Sleep(3000 + rand() % 500);
|
|
|
+ Sleep(RAND(2000, 3000));
|
|
|
// 截图;
|
|
|
GAssist::SaveHwndToBmpFile(hProWnd, GAssist::g_strAppdir + _T("Game.bmp"));
|
|
|
- GAssist::MouseMove(hProWnd, CPoint(rc.left + rand()%10, rc.top+rand()%10));
|
|
|
+ GAssist::MouseMove(hProWnd, CPoint(rc.left + rand() % 10, rc.top + rand() % 10));
|
|
|
if (!trySize--) break;
|
|
|
}
|
|
|
|
|
@@ -648,11 +852,11 @@ void CGameAssistDlg::OnBnClickedButton6() // 职业
|
|
|
GAssist::MouseMove(hProWnd, CPoint(rc.left, rc.top));
|
|
|
// 单击:我要挑战他们;
|
|
|
GAssist::MouseClick(hProWnd, CPoint((rc.right + rc.left) / 2, (rc.top + rc.bottom) / 2), TRUE);
|
|
|
- Sleep(2000 + rand()%500 );// 等出图;
|
|
|
+ Sleep(RAND(2000, 2500));// 等出图;
|
|
|
|
|
|
// 移动一下;
|
|
|
GAssist::MouseMove(hProWnd, CPoint(rc.left, rc.top));
|
|
|
- ::SetCursorPos(rc.left + rand()%6, rc.top + rand()%8);
|
|
|
+ ::SetCursorPos(rc.left + rand() % 6, rc.top + rand() % 8);
|
|
|
|
|
|
trySize = 5;
|
|
|
bMatch = FALSE;
|
|
@@ -660,14 +864,14 @@ void CGameAssistDlg::OnBnClickedButton6() // 职业
|
|
|
GAssist::SaveHwndToBmpFile(hProWnd, GAssist::g_strAppdir + _T("Game.bmp"));
|
|
|
while (!(bMatch = GAssist::GetImgMatchtemplate(GAssist::g_strAppdir + _T("Game.bmp"), GAssist::g_strAppdir + _T("img\\zyxdds-zbhl.bmp"), rc))) {
|
|
|
GAssist::MouseMove(hProWnd, CPoint(rc.left + rand() % 20, rc.top + rand() % 20));
|
|
|
- Sleep(200 + rand()%200);//等进入地图;
|
|
|
+ Sleep(RAND(200,500));//等进入地图;
|
|
|
if (!trySize--) break;
|
|
|
}
|
|
|
|
|
|
- if ( bMatch ) {
|
|
|
+ if (bMatch) {
|
|
|
GAssist::MouseMove(hProWnd, CPoint(rc.left + rand() % 10, rc.top + rand() % 10));
|
|
|
GAssist::MouseClick(hProWnd, CPoint((rc.right + rc.left) / 2 + rand() % 3, (rc.top + rc.bottom) / 2 + rand() % 3), TRUE);
|
|
|
- Sleep(1500 + rand()%300);// 进入孤独洞要时间切换地图;
|
|
|
+ Sleep(RAND(1500,2000));// 进入孤独洞要时间切换地图;
|
|
|
DebugLog(_T("进入孤独洞1"));
|
|
|
// 判断是否在孤独洞;
|
|
|
GAssist::SaveHwndToBmpFile(hProWnd, GAssist::g_strAppdir + _T("Game.bmp"));
|
|
@@ -680,32 +884,70 @@ void CGameAssistDlg::OnBnClickedButton6() // 职业
|
|
|
{
|
|
|
if (_tcscmp(szName[i], _T("医师独侠")) == 0)
|
|
|
{
|
|
|
- Sleep(RAND(5500,6300)); // 等你走到她面前(步行、初骑、中骑、高骑,坐骑加速等级有关);
|
|
|
+ Sleep(RAND(5500, 6300)); // 等你走到她面前(步行、初骑、中骑、高骑,坐骑加速等级有关);
|
|
|
if (ClickSetup(hProWnd, "img\\jn-jk\\gdd\\xyy.bmp"))
|
|
|
{
|
|
|
// 选择技能:缚神诀;
|
|
|
if (ClickSetup(hProWnd, "img\\jn-jk\\gdd\\fsj.bmp"))
|
|
|
{
|
|
|
- if (!ClickSetup(hProWnd, "\\img\\jn-jk\\gdd\\qd.bmp") || !ClickSetup(hProWnd, "\\img\\jn-jk\\gdd\\1次确定后退出再进来的对话.bmp"))
|
|
|
+ if (!ClickSetup(hProWnd, "\\img\\jn-jk\\gdd\\qd.bmp"))
|
|
|
break;
|
|
|
- Sleep(RAND(250,300));
|
|
|
+ Sleep(RAND(500, 600));
|
|
|
if (!ClickSetup(hProWnd, "\\img\\jn-jk\\gdd\\qd.bmp"))
|
|
|
break;
|
|
|
- Sleep(RAND(100,300));
|
|
|
+ Sleep(RAND(600, 1300));
|
|
|
// 打6下;
|
|
|
for (size_t i = 0; i < 5; i++)
|
|
|
{
|
|
|
// 缚神诀的快捷键是:F6
|
|
|
GAssist::SendKey(hProWnd, VK_F6);
|
|
|
- Sleep(RAND(1600,2500));
|
|
|
+ Sleep(RAND(2000, 3500));
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ else
|
|
|
+ {
|
|
|
+ if (!ClickSetup(hProWnd, "\\img\\jn-jk\\gdd\\qd.bmp"))
|
|
|
+ {
|
|
|
+ Sleep(RAND(600, 1300));
|
|
|
+ if (!ClickSetup(hProWnd, "\\img\\gdd\\废话少说.bmp"))
|
|
|
+ {
|
|
|
+ // 打6下;
|
|
|
+ for (size_t i = 0; i < 5; i++)
|
|
|
+ {
|
|
|
+ // 缚神诀的快捷键是:F6
|
|
|
+ GAssist::SendKey(hProWnd, VK_F6);
|
|
|
+ Sleep(RAND(2000, 3500));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else if (!ClickSetup(hProWnd, "\\img\\gdd\\废话少说.bmp"))
|
|
|
+ {
|
|
|
+ Sleep(RAND(600, 1300));
|
|
|
+ // 打6下;
|
|
|
+ for (size_t i = 0; i < 5; i++)
|
|
|
+ {
|
|
|
+ // 缚神诀的快捷键是:F6
|
|
|
+ GAssist::SendKey(hProWnd, VK_F6);
|
|
|
+ Sleep(RAND(2000, 3500));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else if (GAssist::GetImgMatchtemplate(GAssist::g_strAppdir + _T("Game.bmp"), GAssist::g_strAppdir + _T("img\\gdd\\离开这里.bmp"), rc))
|
|
|
+ {// 右键;
|
|
|
+ GAssist::MouseRClick(hProWnd, CPoint((rc.right + rc.left) / 2, (rc.top + rc.bottom) / 2), TRUE);
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
break;
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
+ // 我要挑战 || 我要离开;
|
|
|
+
|
|
|
+ if ( _tcscmp(szName[i], _T("魂武独侠")) == 0 )
|
|
|
+ {
|
|
|
+ }
|
|
|
|
|
|
}
|
|
|
}
|