Post Reply Home » Forums » Starcraft 2 » Starcraft 2 Bots Hacks | SC2 Bots Hacks

SC2 Print Text in Chat : Starcraft 2 Bots Hacks | SC2 Bots Hacks

Posted: July 17th, 2010
User avatar
Total Posts:2313 Joined:2004
Well, time to contribute some. This is probably one of basics, if you havn't figured out how to print text into the chat, well. Here is the code to do so:

Code:
typedef void (__thiscall* CGameUi_PrintString_t) ( CGameUi* lpcGameUi, int nMode, LPSTR* lpszString );
static const CGameUi_PrintString_t CGameUi_PrintString = (CGameUi_PrintString_t) 0x009B3F20;
// Pattern: 55 8B EC 8B 45 08 83 C0 FF 83 F8 08 77 6F

class CGameUi
{
public:
static CGameUi* GetInstance( void )
{
return *(CGameUi**) 0x1584FB8;
// Pattern for CGameUi: 8B 15 ?? ?? ?? ?? 8B 82 D4 01 00 00 84 C0 78 2E A9 00 01 00 00 75 27
// Offset: +0x02
}

void PrintString( int nMode, LPSTR lpszString )
{
LPSTR lpszStrings[2] = { lpszString, lpszString + strlen( lpszString ) };
CGameUi_PrintString( this, nMode, lpszStrings );
}
};


Sample usage:

Code:

void
CMaphack::GameFinishedLoading( void )
{
CGameUi::GetInstance( )->PrintString( 6, "Hello World!" );
return ( );
}

_________________
I DO NOT TAKE CREDIT FOR MY INFO.

I am a member of a exploit guild and post it here because i like this site and want to help it.

Image
Posted: July 27th, 2010
dragonaged
Yep working :)
Posted: July 28th, 2010
User avatar
Total Posts:2313 Joined:2004
K thanks for the reply

_________________
I DO NOT TAKE CREDIT FOR MY INFO.

I am a member of a exploit guild and post it here because i like this site and want to help it.

Image
Want Advertisements After The Last Post Removed? Create A Free Account!
blue large dotWho is online
Users browsing this forum: No registered users and 3 guests
Post Reply