[help] How to check if in game character stats and logging character stats?

01/24/2017 11:19 ronscript#1
I found out that when using CE (Cheat Engine) I could hack the stats. I already found the solution to stop hack stats. Now I have check the character logging is different to in game character stats. Can someone help me in source how do I compare it and logs (hack detected) and also kick the player or auto ban etc. Thanks

Respect post, newbie here
01/24/2017 11:30 flyffdev#2
Source/Worldserver/User.cpp

Search for:


Code:
CMover::Process();
Add Below


Code:

#ifdef __STAT_HACKFIX_RH
    if( IsValidObj( this ) )
    {
        if( !IsAuthHigher( AUTH_GAMEMASTER ) )
        {
            if( ( ( m_nSta-15 ) + ( m_nInt -15 ) + ( m_nDex -15 ) + ( m_nStr - 15 ) ) > 550 )
            {
                //g_dpDBClient.SendBan( m_playAccount.lpszAccount, 9999 );
                FILEOUT( "Hack.txt", "UserID = %07d, UserName = %s [STA:%d, INT:%d, DEX:%d, STR:%d] stats  stat points, login returned", m_idPlayer, GetName(), m_nSta, m_nInt, m_nDex, m_nStr );
                g_UserMng.RemoveUser( m_dwSerial );
            }
        }
    }


//Stats-Check recoded!
    if( IsValidObj( this ) )
    {
        if( !IsAuthHigher( AUTH_GAMEMASTER ) )
        {
            if( this->GetSta() > 2000 || this->GetInt() > 2000 || this->GetDex() > 2000 || this->GetStr() > 2000 )
            {    
                //g_dpDBClient.SendBan( m_playAccount.lpszAccount, 9999 );
                FILEOUT( "Hacktemp.txt", "UserID = %07d, UserName = %s [STA:%d, INT:%d, DEX:%d, STR:%d] stats  stat points, login returned", m_idPlayer, GetName(), m_nSta + GetParam( DST_STA, 0 ), m_nInt + GetParam( DST_INT, 0 ), m_nDex + GetParam( DST_DEX, 0 ), m_nStr + GetParam( DST_STR, 0 ));
                g_UserMng.RemoveUser( m_dwSerial );
            }
        }
    }


#endif
Worldserver/Versioncommon.h


Code:
#define __STAT_HACKFIX_RH
01/24/2017 12:09 ronscript#3
WTF! I guess this site has better members than r a g e z on e!
Thanks for the help! Credited

Quote:
Originally Posted by flyffdev View Post
Source/Worldserver/User.cpp

Search for:


Code:
CMover::Process();
Add Below


Code:

#ifdef __STAT_HACKFIX_RH
    if( IsValidObj( this ) )
    {
        if( !IsAuthHigher( AUTH_GAMEMASTER ) )
        {
            if( ( ( m_nSta-15 ) + ( m_nInt -15 ) + ( m_nDex -15 ) + ( m_nStr - 15 ) ) > 550 )
            {
                //g_dpDBClient.SendBan( m_playAccount.lpszAccount, 9999 );
                FILEOUT( "Hack.txt", "UserID = %07d, UserName = %s [STA:%d, INT:%d, DEX:%d, STR:%d] stats  stat points, login returned", m_idPlayer, GetName(), m_nSta, m_nInt, m_nDex, m_nStr );
                g_UserMng.RemoveUser( m_dwSerial );
            }
        }
    }


//Stats-Check recoded!
    if( IsValidObj( this ) )
    {
        if( !IsAuthHigher( AUTH_GAMEMASTER ) )
        {
            if( this->GetSta() > 2000 || this->GetInt() > 2000 || this->GetDex() > 2000 || this->GetStr() > 2000 )
            {    
                //g_dpDBClient.SendBan( m_playAccount.lpszAccount, 9999 );
                FILEOUT( "Hacktemp.txt", "UserID = %07d, UserName = %s [STA:%d, INT:%d, DEX:%d, STR:%d] stats  stat points, login returned", m_idPlayer, GetName(), m_nSta + GetParam( DST_STA, 0 ), m_nInt + GetParam( DST_INT, 0 ), m_nDex + GetParam( DST_DEX, 0 ), m_nStr + GetParam( DST_STR, 0 ));
                g_UserMng.RemoveUser( m_dwSerial );
            }
        }
    }


#endif
Worldserver/Versioncommon.h


Code:
#define __STAT_HACKFIX_RH