Results 1 to 3 of 3
  1. #1
    Jallen's Avatar Junior Member

    Join Date
    Jun 2012
    Posts
    207
    Thanked
    42
    Thanks
    33
    I made an APM tool to monitor actions per minute while gaming. Counts how many times the user presses W,A,S,D,1,2,3 + mouse clicks (configurable on the ui). Right now the number is accessible via two ways, pressing a hotkey (which sends a macro in game "My APM is ##/minute" ) and on the app itself.

    I have a d3d overlay which puts this number in the top right corner of the screen (under fps) but your anti-hack does not approve of this

    I just wanna be able to see my APM (maybe other people do to?) and was wondering if you could allow this to be injected, or even add it into the game yourself as an option in ETC. I have the source if you wanna take a look.

    <3

    D3D Base: (functions and menuclass on request)
    Code:
    #include "QmoMenuClass.h"
    
    oReset pReset;
    oEndScene pEndScene;
    
    QmoMenu dMenu;
    
    LPDIRECT3DDEVICE9 g_pDevice = 0;
    //Offset Adjust Font Menu
    int xFontOffSet = 15;
    int hackopt1;
    int MenuHeight = 10;
    
    int show=1;
    
    int b = 0;
    //==================================================================
    //Menu
    int apm = 1;
    //==================================================================
    
    void QmoMenu::CreateItem(int index, char * title, int *apm, int apmmaxval,int hacktype)
    {
    
            PrintText(title, xFontOffSet, index*15,apm.HCOLOR,pFont); 
    }
    
    void QmoMenu::BuildMenu(char * menuname, int x, int y, int h, int w, DWORD TITLECOL, DWORD BACKCOLOR, DWORD BORDERCOLOR, LPDIRECT3DDEVICE9 pDevice)
    {
            if(GetAsyncKeyState(VK_INSERT)&1)show=(!show); //Show menu on INSERT keypress
            if(!show) {
                    DrawBox(0,0, w, 20, BACKCOLOR, BORDERCOLOR, pDevice);
                    PrintText("Qmoainx D3D MENU", 5, 2, TITLECOL, pFont);
                    return;
            }
    
           // DrawBox(x,y, w, h, BACKCOLOR, BORDERCOLOR, pDevice); // Adjust the Base Menu
            PrintText(menuname, x+10, y+2, TITLECOL, pFont);
            CreateItem(1,"APM: ", &apm);
    
            RenderMenu();
    }
    
    
    void QmoMenu::RenderMenu() //Hotkey menu
    {
            if(selector < 1)
                    selector = 1;
    
            if(selector > apmcount)
                    selector = 1;
    
            apmcount = 0;
    }
    
    void TestThread() //Raising texk if ON / OFF
    
    {                PrintText("APM: ##", 30, 200, GREEN, dMenu.pFont);
    
    } //Customize it
    
    void ReFont(LPDIRECT3DDEVICE9 pDevice) //For replacement fonts
    {
        if (g_pDevice != pDevice)
        {
            g_pDevice = pDevice;
            try
            {
                if (dMenu.pFont != 0)
                    dMenu.pFont->Release();
            } catch (...) {}
            dMenu.pFont = 0;
            D3DXCreateFontA(pDevice, 14, 0, FW_BOLD, 0, 0, DEFAULT_CHARSET, OUT_TT_ONLY_PRECIS, PROOF_QUALITY, DEFAULT_PITCH | FF_DONTCARE, "Arial", &dMenu.pFont ); 
        }
    }
    
    HRESULT WINAPI Reset(IDirect3DDevice9* pDevice, D3DPRESENT_PARAMETERS* pPresentationParameters )
    {
            dMenu.pFont->OnLostDevice();
    
            HRESULT hRet = pReset(pDevice, pPresentationParameters);
    
            dMenu.pFont->OnResetDevice();
    
            return hRet;
    }
    
    // Menu TITLE
    HRESULT WINAPI EndScene(LPDIRECT3DDEVICE9 pDevice)
    {
            ReFont(pDevice);
            dMenu.BuildMenu("APM:",0,0,190,200,RED,BLACK,GREEN,pDevice);
            TestThread();
            return pEndScene(pDevice);
    }
    
    int D3Dinit(void)//NEED HELP FROM LINEAR ON THIS ONE :):)
    {
            DWORD           hD3D, adr, *vtbl;
            hD3D=0;
            do {
                    hD3D = (DWORD)GetModuleHandle("d3d9.dll");
                    Sleep(10);
            } while(!hD3D); 
            adr = FindPattern(hD3D, 0x128000, (PBYTE)"\xC7\x06\x00\x00\x00\x00\x89\x86\x00\x00\x00\x00\x89\x86", "xx????xx????xx");
            if (adr) {
                    memcpy(&vtbl,(void *)(adr+2),4);
                    pReset    = (oReset)    DetourFunction((PBYTE)vtbl[16]   , (PBYTE)Reset   ,5);
                    pEndScene = (oEndScene) DetourFunction((PBYTE)vtbl[42], (PBYTE)EndScene,5);
            }
            return 0;
    }
    
    BOOL WINAPI DllMain ( HMODULE hDll, DWORD dwReason, LPVOID lpReserved )//edit if you want to work for the game
    {
            DisableThreadLibraryCalls(hDll);
    
            if ( dwReason == DLL_PROCESS_ATTACH ) {
    
                    CreateThread(NULL, NULL, (LPTHREAD_START_ROUTINE)D3Dinit, NULL, NULL, NULL);
            }
            if( dwReason == DLL_PROCESS_DETACH)     {
                    dMenu.pFont->Release();
            }
            return TRUE;
    }
    Last edited by Jallen; 06-25-2014 at 02:35 AM.

  2. #2
    Banned

    Join Date
    Aug 2012
    Posts
    1,699
    Thanked
    443
    Thanks
    500
    no ahah

  3. #3
    Banned

    Join Date
    Mar 2012
    Country
    Posts
    1,175
    Thanked
    70
    Thanks
    714
    No.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)