What's new

Solved COD BO2 TU 18 - get just stats at the end...

Isty1974

Isty1974

Newbie
Messages
26
Reaction score
2
Points
45
Sin$
0
Hi Guys!

I am searching for the entry point to get actual stats at SYSTEM LINK and player statuses:
Are these correct with TU18?
C:
int PlayerState(int client)
{
   return(0x83541420 + (client * 0x57F8));
}
int gEntity(int client)
{
   return(0x833BE1C0 + (client * 0x31C));
}

where can I find sample codes?

Are these entry points correct too:
C:
//ls_gametype.......................................0x82297C448
//ls_mapname........................................0x82297C4B8
//ui_mapname........................................0x82294E5B8
//ui_gametype.......................................0x82294E628
//party_gametype....................................0x82296F4E8
//party_gamesize....................................0x82296F558
//party_mapname.....................................0x82296F5C8

I am working on a greater project... Thank YOU!
 
Isty1974

Isty1974

Newbie
Messages
26
Reaction score
2
Points
45
Sin$
0
Stat sender doesn't work... :frown:
Stat sender.cpp
C:
#include "stdafx.h"
#include "kernel.h"
#include "BO2 Functions.h"
#include <sstream>
#include <string>

DWORD commands()
{
    for(int client = 0; client < 18; client++)
    {
        if(isNotABot(client) && isValidClient(client))//If the client number isn't a bot and valid
        {
            if(getKills(client) != 0 || getDeaths(client) != 0)
            {
                getClientNames();
                if(gameIsEnding())
                {
                    char Data[0x100];
                    sprintf(Data, "%s: %i Points, %i Kills, %i Deaths.\n", CurrentGamertag[client],getScore(client), getKills(client), getDeaths(client));
                    FILE *txtFile = fopen("Hdd:\\BO2State.txt", "w+");
                    if(txtFile != NULL)
                    {
                        fputs(Data, txtFile);
                        fclose(txtFile);
                    }
                }
            }
        }
    }
    printf("STAT SAVED\n");
    return 0;
}

DWORD WINAPI MAINTHREAD()
{
    DWORD dwGameTitleId;

    char procID[10];
    sprintf(procID, "%d", dwGameTitleId);

    for(;;)
    {
        Sleep(10);
        dwGameTitleId == XamGetCurrentTitleId();
        if( dwGameTitleId == 0x415608C3 )
        {
            commands();
        }
        Sleep(10);
    }
}

BOOL APIENTRY DllMain( HANDLE hModule, DWORD dwReason, LPVOID lpReserved )
{    switch(dwReason)
    {
    case DLL_PROCESS_ATTACH:
        HANDLE hThread;
        DWORD dwThreadId;
        ExCreateThread( &hThread, 0, &dwThreadId, ( PVOID )XapiThreadStartup , ( LPTHREAD_START_ROUTINE )MAINTHREAD, 0, 0x2 );
        ResumeThread( hThread );
        CloseHandle( hThread );
        printf("BREAK\n");
        Sleep(45);       
        break;
    case DLL_THREAD_ATTACH:
        printf("BO2 Base Made By Xx jAmes t xX\n");//My only request is to leave this here THX
        Sleep(45);
        break;
    case DLL_THREAD_DETACH:
        printf("BREAK - detach\n");
        Sleep(45);
        break;
    case DLL_PROCESS_DETACH:
        printf("BREAK - process\n");
        Sleep(45);
        break;
    }
    return TRUE;
}

C:
int PlayerState(int client)
{
    return(0x83541420 + (client * 0x57F8));
}


int gEntity(int client)
{
    return(0x833BE1C0 + (client * 0x31C));
   
}
bool isValidClient(int client)
{
    if(*(byte *)(PlayerState(client) + 0x5534) != 00)
        return true;
    else
        return false;
}

bool isDead(int client)
{
    if(*(byte *)(gEntity(client) + 0x1A8) == 01)
        return true;
    else
        return false;
}

bool isNotABot(int client)
{
    if(*(int *)(PlayerState(client) + 0x55A0) != 0x33617263)
        return true;
    else
        return false;
}

bool isFrozen(int client)
{
    if(*(byte *)(gEntity(client) + 0x5687) == 04)
        return true;
    else
        return false;
}

int getScore(int client)
{
    return(*(int *)(PlayerState(client) + 0x55C8));
}

int getKills(int client)
{
    return(*(int *)(PlayerState(client) + 0x5620));
}

int getDeaths(int client)
{
    return(*(int *)(PlayerState(client) + 0x55E4));
}

bool gameIsEnding()
{
    int result;
    for(int i = 0; i < 18; i++)
    {
        if(isValidClient(i))
        {
            if(isFrozen(i) && isDead(i))
                result++;
        }
        else
            result++;
    }
    if(result == 18)
        return true;
    else
        return false;
}

char CurrentGamertag[18][15];

void getClientNames()
{
    DWORD ps;
        for( int clientID = 0; clientID < 18; clientID++)
        {
                ps = PlayerState(clientID);
                ps += 0x5534;
                strcpy(CurrentGamertag[clientID], (char*)ps);
                if(CurrentGamertag[clientID] == "")
                {
                    sprintf(CurrentGamertag[clientID],"No Client %i\0", clientID);
                }
        }
}
 
Need some help here, pleeeeeaaaassseeee
 
Upvote 0
Isty1974

Isty1974

Newbie
Messages
26
Reaction score
2
Points
45
Sin$
0
In this forum, there is a lot of smart programmer people. No one can help me? There should be a emphasized, summarized article about BO2 TU18 addresses...
 
Upvote 0
Top Bottom
Login
Register