If this is the wrong place plz move that.
My problem is i know a bit of C (i study it now 1 semester) and C++ is not that much different but there a lot of things i do not understand especially with d2hackit.
Is it only posible to interact with recieved and send packets with this 2 functions?
Quote:
DWORD EXPORT OnGamePacketBeforeSent(BYTE* aPacket, DWORD aLen)
{
return aLen;
}
DWORD EXPORT OnGamePacketBeforeReceived(BYTE* aPacket, DWORD aLen)
{
return aLen;
}
|
Am i forced to use many global variables and check with flags between my functions? For example:
Quote:
/*****ing globals i want locals:*/
BOOL flag = TRUE;
BYTE = pac;
DWORD EXPORT OnGamePacketBeforeReceived(t(BYTE* aPacket, DWORD aLen)
{
if (aPacket == 0x9c && FLAG = FALSE)
{
memcpy(pac, aPacket+1, 4);
flag = TRUE;
}
return aLen;
BOOL PRIVATE OnGameCommandMyCommand(char** argv, int argc)
{
if (flag == TRUE)
{
server->GameSendPacketToServer(pac, 9);
flag = FALSE;
}
else
HOW DO I TELL THE ****ING PROGRAMM HERE THAT IT SHOULD WAIT TILL THAT PACKET IS RECIVED ????
Thats my main problem.
return true;
} |
And another problem:
Is it posible to convert BYTE to CHAR anyhow?? I want to logg some packets into a ini file myself for example:
Quote:
BYTE pac;
char buffer[100];
/*[convert here somehow]
buffer should contain than the human readable bytes like 0x19 0x9c 0xa0 ..... */
server->SetHackProfileString("mephduper","1","2",buffer );
|