|
@@ -10,6 +10,12 @@ if (!::IsWindow(m_hGameWnd)) return;\
|
|
|
::SetForegroundWindow(m_hGameWnd);\
|
|
|
SRAND(80,120);
|
|
|
|
|
|
+#define SETGAMEFOREGROUND2 AutoThreadSection ats(&m_ts);\
|
|
|
+if (!::IsWindow(m_hGameWnd)) return;\
|
|
|
+::ShowWindow(m_hGameWnd, SW_SHOWNORMAL);\
|
|
|
+::SetForegroundWindow(m_hGameWnd);\
|
|
|
+SRAND(30,50);
|
|
|
+
|
|
|
std::map<std::string, POINT> g_mapZYNPC;
|
|
|
std::map<std::string, PNPC> g_mapZYNPC2;
|
|
|
std::map<std::string, METAGRAPH> g_mapMetaGraph;
|
|
@@ -154,6 +160,12 @@ SRAND(80,120);
|
|
|
SRAND(80, 150);
|
|
|
}
|
|
|
|
|
|
+ void CAction::SendKeyFast(DWORD key, BOOL bCtrl, BOOL bAtl, BOOL bShift)
|
|
|
+ {
|
|
|
+ SETGAMEFOREGROUND2;
|
|
|
+ GameAssist::SendKeyFast(key, bCtrl, bAtl, bShift);
|
|
|
+ }
|
|
|
+
|
|
|
void CAction::InitNPCInfo()
|
|
|
{
|
|
|
static bool bInit = false;
|
|
@@ -1317,19 +1329,17 @@ SRAND(80,120);
|
|
|
{
|
|
|
if (pAction->IsWattingAttack(-1))
|
|
|
{
|
|
|
- SRAND(50, 150);
|
|
|
- pAction->SendKey(VK_A, FALSE, TRUE);
|
|
|
+ pAction->SendKeyFast(VK_A, FALSE, TRUE);
|
|
|
}
|
|
|
- Sleep(50);
|
|
|
}
|
|
|
|
|
|
- if (pAction->IsSPBelowSafeValue(TRUE, TRUE, 10))
|
|
|
+ if (pAction->IsSPBelowSafeValue(TRUE, TRUE, 50))
|
|
|
{
|
|
|
// ÓÒ¼ü;
|
|
|
pAction->MouseMove({ (GameAssist::g_rcRoleIdleSP.right + GameAssist::g_rcRoleIdleSP.left) / 2, (GameAssist::g_rcRoleIdleSP.bottom + GameAssist::g_rcRoleIdleSP.top) / 2 });
|
|
|
pAction->MouseRClick({ (GameAssist::g_rcRoleIdleSP.right + GameAssist::g_rcRoleIdleSP.left) / 2, (GameAssist::g_rcRoleIdleSP.bottom + GameAssist::g_rcRoleIdleSP.top) / 2 });
|
|
|
}
|
|
|
- } while (WaitForSingleObject(pAction->m_hBattleJYEvent, 100) == WAIT_TIMEOUT);
|
|
|
+ } while (WaitForSingleObject(pAction->m_hBattleJYEvent, 50) == WAIT_TIMEOUT);
|
|
|
|
|
|
return 0;
|
|
|
}
|