Ok it still chrashes. Probaly because it tries to execute. And can't find it.
So I tought like this:
But it still doesn't work.
Maybe is the handling of the ZGetGameInterface wrong
So I tought like this:
PHP Code:
#include
#include "ZFuncs.h"
char* ChatInput( )
{
return( char* ) ( ZGetGameInterface( ) + 0x3A8 );
}
void Clear( )
{
(* (char* ) ( ZGetGameInterface( ) + 0x3A8 ) ) = '\n';
}
void MyThread( )
{
for( ;;Sleep( 20 ) )
{
if (ZGetGameInterface!=0x0) {
if( memcmp( ChatInput( ), "/dood", 4 ) == 0 )
{
ZCharacter::SetHP(0);
ZCharacter::SetAP(0);
Clear( ); //You have to clear you're last input, or you can't input another command.
}
}
}
}
extern "C"{
__declspec( dllexport ) BOOL __stdcall DllMain( HINSTANCE hInst, DWORD dwReason, LPVOID lpv )
{
DisableThreadLibraryCalls( hInst );
if ( dwReason == DLL_PROCESS_ATTACH )
{
Beep( 500, 500 );
CreateThread( NULL, 0, ( LPTHREAD_START_ROUTINE )&MyThread, NULL, 0, NULL );
}
return true;
}
}
Maybe is the handling of the ZGetGameInterface wrong
PHP Code:
DWORD ZGetGameInterface()
{
DWORD ReturnVal;
if (ZGetGameInterfaceAddress!=0x0)
{
__asm
{
MOV EAX, ZGetGameInterfaceAddress
CALL EAX
MOV ReturnVal, EAX
}
}else{
return 0x0;
}
return ReturnVal;
}
0 comentarios:
Publicar un comentario