Resolvido alguem olha se ta certo aim rootpb

Discussão em 'Point Blank - Dúvidas' iniciado por eric1601, 18 Out, 2017.

Status do Tópico:
Não esta aberto para novas mensagens.
  1. eric1601

    Aluno

    21 Jun, 2013
    125
    9
    60
    Código:
    #include <d3d9.h>
    #include <d3dx9.h>
    #include <stdio.h>
    #include <iostream>
    #include <string>
    #include <windows.h>
    
    class CDeathPlayer;
    class CLocalPlayerID;
    class CRenderData;
    class CRenderContext;
    class CGameBase;
    class CBonesContext;
    class CBone;
    class CDeathPlayer
    {
    public:
        BYTE Death[16];
    };
    
    class CLocalPlayerID
    {
    public:
        BYTE ID;
    };
    
    class CRenderData
    {
    public:
        CRenderContext* RenderData;
    };
    
    class CRenderContext
    {
    public:
    
        char unknown[0x8BF];
        D3DXMATRIX ViewMatrix;
        D3DXMATRIX ProjectMatrix;
        D3DXMATRIX WorldMatrix;
    };
    
    class CGameBase
    {
    public:
        char pad[0x158];
        CBonesContext* Bones;
    };
    
    class CBonesContext
    {
    public:
        char pad[0xE8];
        CBone* BoneData;
    };
    
    class CBone
    {
    public:
        D3DXMATRIX BoneMatrix;
    };
    
    class CGame
    {
    public:
        BYTE unknown1[0x14];
        CGameBase *GameBase[16];
    };
    
    DWORD d;
    //=======================================================================
    
    BYTE GetUserLife(int 0x57DCB5)//Saber se o Player esta vivo...
    {
        DWORD g_pGameContext   = *(DWORD*)0x53DCEE;
        CDeathPlayer *Life = (CDeathPlayer *) (g_pGameContext + 0x53DD03);
        return Life->Death[0x57DCB5];
        VirtualProtect((PVOID*)(g_pGameContext+0x53DD03), 10, PAGE_EXECUTE_READWRITE, &d);
    }
    //Fim__
    
    
    //------------------------------------------------------------------
    int GetCharaIndex(0x8E0E25)//Obter Meu Slot.
    {
        DWORD g_pGameContext   = *(DWORD*)0x53DCEE;
        CLocalPlayerID *LocID = (CLocalPlayerID *) (g_pGameContext + 0x53DD03);
        return LocID->ID;
        VirtualProtect((PVOID*)(g_pGameContext+0x53DD03), 10, PAGE_EXECUTE_READWRITE, &d);
    }
    //Fim__
    
    
    //------------------------------------------------------------------
    float CalcDistance(D3DXVECTOR3 VecA, D3DXVECTOR3 VecB)//Calcular distancia.
    {
        return sqrt( (( VecA.x - VecB.x) * ( VecA.x - VecB.x)) +
                     (( VecA.y - VecB.y) * ( VecA.y - VecB.y)) +
                     (( VecA.z - VecB.z) * ( VecA.z - VecB.z)));
    }
    //Fim__
    
    
    
    
    
    
    //-----------------------------------------------------------------
    bool GetUserBone(D3DXVECTOR3 &Out, int index, int BoneIndex)//Obter Ossos.
    {
        DWORD g_pCharaManager  = *(DWORD*)0x767E19; //ou 0x767E36
         if(g_pCharaManager)
         {
            CGameBase* GameBase = (CGameBase*) (*(DWORD*)(g_pCharaManager + 0x14 + (0x4 * index) ));
            VirtualProtect((PVOID*)(g_pCharaManager + 0x14 + (0x4 * index) ), 10, PAGE_EXECUTE_READWRITE, &d);
            if (GameBase && GameBase->Bones)
            {
                Out.x = GameBase->Bones->BoneData[BoneIndex].BoneMatrix._41;
                Out.y = GameBase->Bones->BoneData[BoneIndex].BoneMatrix._42;
                Out.z = GameBase->Bones->BoneData[BoneIndex].BoneMatrix._43;
                return true;
            }
         }
        return false;
    }
    //Fim__
    
    
    void *DetourCreate(BYTE *src, const BYTE *dst, const int len)
    {
        BYTE *jmp;
        DWORD dwback;
        DWORD jumpto, newjump;
    
        VirtualProtect(src,len,PAGE_READWRITE,&dwback);
    
        if(src[0] == 0xE9)
        {
            jmp = (BYTE*)malloc(10);
            jumpto = (*(DWORD*)(src+1))+((DWORD)src)+5;
            newjump = (jumpto-(DWORD)(jmp+5));
            jmp[0] = 0xE9;
            *(DWORD*)(jmp+1) = newjump;
            jmp += 5;
            jmp[0] = 0xE9;
            *(DWORD*)(jmp+1) = (DWORD)(src-jmp);
        }
        else
        {
            jmp = (BYTE*)malloc(5+len);
            memcpy(jmp,src,len);
            jmp += len;
            jmp[0] = 0xE9;
            *(DWORD*)(jmp+1) = (DWORD)(src+len-jmp)-5;
        }
        src[0] = 0xE9;
        *(DWORD*)(src+1) = (DWORD)(dst - src) - 5;
    
        for(int i = 5; i < len; i++)
            src = 0x90;
    
        VirtualProtect(src,len,dwback,&dwback);
        return (jmp-len);
    }
    
    
    //-------------------------------------------------------------------
    int GetPriorityTarget()//Pega a posição do player mais próximo.
    {
        int Result = -1;
        float fMaxDistance = 100.0f;
        D3DXVECTOR3 PlayerEnd, LocPlayer;
    
        for (int index = 0; index < 16; index++)
        {
            if (!GetUserLife(index) && GetCharaIndex() != index)
            {
                if (GetCharaIndex() %2 != index % 2)
                {
                    GetUserBone(LocPlayer, GetCharaIndex(), 7);
                    GetUserBone(PlayerEnd, index, 7);
                    if (CalcDistance(LocPlayer, PlayerEnd) < fMaxDistance)
                    {
    
                        fMaxDistance = CalcDistance(PlayerEnd, LocPlayer);
                        Result = index;
    
                    }
                }
            }
        }
        return Result;
    }
    //Fim__
    
    
    
    //-----------------------------------------------------------------
    //-----------------------------------------------------------------
    DWORD dwEnd = 0x608F99;
    DWORD dwReturnEnd = dwEnd + 7;
    float fX = 10.0f, fY = 10.0f, fZ = 10.0f;
    bool EndEnable;
    DWORD dwTempEcx, dwTempEbx;
    _declspec( naked ) void End( )
    {
        if ( EndEnable )
        {
            _asm
            {
                mov     [dwTempEcx], ecx;
                mov     [dwTempEbx], ebx;
    
                mov     ecx, [ebp+0x0C];
    
                mov     ebx, [fX];
                mov     [ecx], ebx;
    
                mov     ebx, [fY];
                mov     [ecx+0x04], ebx;
    
                mov     ebx, [fZ];
                mov     [ecx+0x08], ebx;
    
                mov     ecx, [dwTempEcx];
                mov     ebx, [dwTempEbx];
            }
        }
    
        _asm
        {
            mov     eax, [ebp+0x08];
            push    eax;
            mov     ecx, [ebp-0x38];
    
            jmp     dwReturnEnd;
        }
    }
    //Fim__
    
    //-------------------------------------------------------------
    //--------------------------AIMBOT-----------------------------
    //-------------------------------------------------------------
    void AimBot()
    {
            DWORD g_pPlayer        = *(DWORD*)0x53E5F5;
            if(g_pPlayer != 0x53E60A)
            {
                int Priority = GetPriorityTarget();
                if(Priority != -1)
                {
                    EndEnable = true;
                    D3DXVECTOR3 OnScreen, OnWorld;
                    D3DXVECTOR3 Out, Screen;
                    GetUserBone(Out, Priority, 7);
                     fX = Out.x;
                     fY = Out.y;
                     fZ = Out.z;
                     DetourCreate((PBYTE)dwEnd, (PBYTE)End, 7);
                     VirtualProtect((PVOID*)(dwEnd), 10, PAGE_EXECUTE_READWRITE, &d);
                     VirtualProtect((PVOID*)(dwReturnEnd), 10, PAGE_EXECUTE_READWRITE, &d);
                      VirtualProtect((PVOID*)(g_pPlayer), 10, PAGE_EXECUTE_READWRITE, &d);
    
                    }
    
                }
    
    
        else
        {
            EndEnable = false;
            DetourCreate((PBYTE)dwEnd, (PBYTE)End, 7);
        }
    }
    //Fim__
     
  2. Doof1212

    Silver Member

    29 Jun, 2012
    2,735
    7
    70
    Está desatualizada.
     
  3. [A]bs0lut

    Banido

    15 Nov, 2015
    4,166
    1,776
    206
    Dúvida resolvida.
    Fechado.
     

Compartilhe esta Página

  • Sobre nós

    A WebCheats é o maior e melhor fórum de cheats do Brasil. Temos mais de 13 anos de existência graças a todos nossos usuários que nos ajudaram nesta longa história.
  • O chopp da tarde !

    Gostou do conteudo do fórum? por que não nos ajudar? faça uma doação para o forum, toda a doação é revertida para o forum com sorteios e novos recursos

    Doe-nos