#include #include #include "MooseKernel.h" DWORD dwPID; HWND hWndMS; bool bEndLoop = false; bool bVac = false; void ItemVac(void); void Freeze(void); int nXY[2] = {0, 0}; int nXY2[2]; int nMapXY[4]; int main(int, char **) { printf("Moose's Item Vac - OMS v0.27\n"); printf("-----------------------------------\n"); system("PAUSE"); printf("Finding MapleStory Process ID.."); hWndMS = FindWindow("MapleStoryClass", "MapleStory"); GetWindowThreadProcessId(hWndMS, &dwPID); printf("%04X\n", dwPID); if (dwPID == NULL) { printf("Failed to find the Process ID for MapleStory.exe\n\n"); return 1; } printf("Initializing Moose's Kernel...."); if (!Kernel_Init()) { printf("NO\n"); printf("Failed to open the kernel driver\n\n"); return 1; } printf("OK\n\n"); printf("Whenever you press Z, the area around you selected will be looted.\n"); printf("The F9 button is used to select your position.\n"); printf("Please press F11 to quit this application.\n\n"); bEndLoop = false; CreateThread(NULL, NULL, (LPTHREAD_START_ROUTINE)Freeze, NULL, NULL, NULL); // CreateThread(NULL, NULL, (LPTHREAD_START_ROUTINE)ItemVac, NULL, NULL, NULL); DWORD dwPointer; while (1) { if ((GetAsyncKeyState(VK_F11) & 0x8001) == 0x8001) break; if (IsWindow(hWndMS) == FALSE) break; if ((GetAsyncKeyState(VK_F9) & 0x8001) == 0x8001) { Kernel_ReadMemory(dwPID, (void *)0x7432EC, &dwPointer, 4); dwPointer += 0x0390; Kernel_ReadMemory(dwPID, (void *)dwPointer, nXY, 8); Kernel_ReadMemory(dwPID, (void *)dwPointer, nXY2, 8); MessageBeep(0); } if (GetKeyState('Z') & 0x8000) { bVac = true; } else { bVac = false; } Sleep(1); } bEndLoop = true; printf("2006 Moose\n"); system("PAUSE"); return 0; } void Freeze(void) { DWORD dwPointer; int nadjx = 0; bool fd = true; while (bEndLoop == false) { if (bVac == true) { nXY2[0] = nXY[0] + nadjx; Kernel_ReadMemory(dwPID, (void *)0x7432EC, &dwPointer, 4); dwPointer += 0x0390; Kernel_WriteMemory(dwPID, (void *)dwPointer, nXY2, 8); if (fd) { nadjx++; if (nadjx == 20) fd = false; } else { nadjx--; if (nadjx == -20) fd = true; } } Sleep(1); } } void ItemVac(void) { DWORD dwPointer; int nXSize; while (bEndLoop == false) { if (bVac == true) { //nXY2[1] = nXY[1];// - 400; //nXY2[0] = nMapXY[0]; //nXSize = nMapXY[2] - nMapXY[0]; //for (int YCnt = 0; ((YCnt < 800) && (bVac == true)); YCnt += 40, nXY2[1] += 40) //{ //nXY2[0] = nMapXY[0]; // for (int XCnt = 0; ((XCnt < nXSize) && (bVac == true)); XCnt += 10, nXY2[0] += 10) // { //printf("Do\n"); //Kernel_WriteMemory(dwPID, (void *)dwPointer, nXY2, 8); // Sleep(2); // } //} } Sleep(1); } printf("End of Thread\n"); }