連連看外掛,可以實現無限時間和無限提示

#include <stdio.h>
#include <windows.h>

void msgtestOK();
void msgtestNO();

int main()
{
	HWND hgame=FindWindow(0,"單機連連看 2.0 官方網址  www.lianliank.com");
	if(!hgame)
	{
		msgtestNO();
	}
	DWORD procid;
	DWORD dwProcessId=GetWindowThreadProcessId(hgame,&procid);
	HANDLE hopengameproce=OpenProcess(PROCESS_ALL_ACCESS,FALSE,procid);
	
	int iTishi;
	ReadProcessMemory(hopengameproce,(LPCVOID)0x0012FE84,(LPCVOID *)&iTishi,4,NULL);
	printf("提示次數:%d\n",iTishi);
	
	int iTime ;
	ReadProcessMemory(hopengameproce,(LPCVOID)0x0012F49C,(LPCVOID *)&iTime,4,NULL);
	printf("時間剩餘:%d\n",iTime);
	
	
	int itemp = 200 ;
	while (1)
	{
		WriteProcessMemory(hopengameproce,(LPVOID)0x0012FE84,(void *)&itemp,4,NULL);
		printf("提示無限開啓!\n");
		WriteProcessMemory(hopengameproce,(LPVOID)0x0012F49C,(void *)&itemp,4,NULL);
		printf("時間無限開啓!\n");
		Sleep(3000);
		system("cls"); 
	}
	
	
	return 0;
}

void msgtestNO()
{
MessageBox(NULL,"失敗","msgtestOK",0);
}

void msgtestOK()
{
MessageBox(NULL,"成功","msgtestOK",0);
}


自己寫了一個連連看外掛程序,瞭解而已,入門很好的。
發佈了137 篇原創文章 · 獲贊 13 · 訪問量 49萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章