1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71
|
#include "Source\ClientCore.cpp"
BYTE heal[9] = {0x27, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
bool cSet = FALSE;
bool pCopied = FALSE;
bool iCopied = FALSE;
bool gmStart = FALSE;
bool gmOn = FALSE;
BOOL PRIVATE OnGameCommandSet(char** argv, int argc);
BOOL PRIVATE OnGameCommandStop(char** argv, int argc);
MODULECOMMANDSTRUCT ModuleCommands[]={
{"help",OnGameCommandHelp,"Displays help text"},
{"set",OnGameCommandSet,"Sets module for exploit."},
{"stop",OnGameCommandStop,"Stops module."},
{NULL}};
VOID EXPORT OnGameJoin(THISGAMESTRUCT* thisgame){
cSet = TRUE;
pCopied = FALSE;
iCopied = FALSE;
gmOn = FALSE;
return;}
BOOL EXPORT OnClientStart(){
return TRUE;}
DWORD EXPORT OnGamePacketBeforeReceived(BYTE* aPacket, DWORD aLen){
if ((aPacket[0] == 0x95) && (gmOn == TRUE)) {
server->GameSendPacketToServer(heal,9);
return 0;}
return aLen;}
DWORD EXPORT OnGamePacketBeforeSent(BYTE* aPacket, DWORD aLen){
if ((aPacket[0] == 0x24) && (cSet == TRUE)) {
memcpy(heal+5,aPacket+1,4);
server->GamePrintInfo("PID ready.");
pCopied = TRUE;}
if ((aPacket[0] == 0x19) && (cSet == TRUE)) {
memcpy(heal+1,aPacket+1,4);
server->GamePrintInfo("IID ready.");
iCopied = TRUE;}
if ((cSet == TRUE) && (iCopied == TRUE) && (pCopied == TRUE)){
cSet = FALSE;
gmOn = TRUE;
server->GamePrintInfo("Have fun!");}
return aLen;}
BOOL PRIVATE OnGameCommandStop(char** argv, int argc){
server->GamePrintInfo("Disabled.");
cSet = FALSE;
pCopied = FALSE;
iCopied = FALSE;
gmOn = FALSE;
return TRUE;}
|