Hi, i founded some worked "hacks" for TF2 scripting for do things that can be done via operating directly addresses.
For example, that code allowing to get damage for ghosts:
PHP Code:
Handle hGameData = LoadGameConfigFile( "opGameData" );
if ( hGameData == INVALID_HANDLE )
{
SetFailState( "Couldn't find plugin gamedata!" );
}
Address g_aOnTakeDamage = view_as<Address>(0);
g_aOnTakeDamage = GameConfGetAddress( hGameData, "CTFPlayer::OnTakeDamage" );
if ( g_aOnTakeDamage != view_as<Address>(0) )
{
int OS = LoadFromAddress( g_aOnTakeDamage + view_as<Address>(1), NumberType_Int8 );
switch ( OS )
{
// Allow ghost players to take damage
case 0x89: // Linux
{
// 84 0C test -> xor
StoreToAddress( g_aOnTakeDamage + view_as<Address>(0x269), 0x33, NumberType_Int8 );
}
case 0x8B: // Windows
{
// 84 0C test -> xor
StoreToAddress( g_aOnTakeDamage + view_as<Address>(0x177), 0x33, NumberType_Int8 );
}
default:
{
SetFailState( "CTFPlayer::OnTakeDamage OS lookup failed. (0x%.2x)", OS );
}
}
}
else
{
SetFailState( "CTFPlayer::OnTakeDamage address failed." );
}
opGameData.txt
PHP Code:
"Games"
{
"tf"
{
"Addresses"
{
"CTFPlayer::OnTakeDamage"
{
"windows"
{
"signature" "CTFPlayer::OnTakeDamage"
}
"linux"
{
"signature" "CTFPlayer::OnTakeDamage"
}
}
}}}
But from last update, Valve changed address for that function in Linux(in Windows works) and that "hack" stopped works as it supposed.
Please tell me, where i can see those addresses(server.dll ?), which programms i can use (Ghidra or IDA ?) or there is an instructions that already written.