Help with disable resetting module on game join menu

User Tag List

Results 1 to 1 of 1
  1. #1
    MetkataTipcheto's Avatar Member
    Reputation
    1
    Join Date
    Sep 2014
    Posts
    31
    Thanks G/R
    0/0
    Trade Feedback
    1 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Help with disable resetting module on game join

    I have this old module ( Diablo II 1.10 ) source code ( C++ ) which works fine with the latest beta of D2Hackit a.k.a version 2_0920. The problem is that every time you get into the game if requires you to:

    1) Type .godmode set
    2) Pick item from inventory (to get the ID)
    3) Pick Full Rejuv potion from belt (to get the ID)
    4) Click on some NPC (to get the ID)
    5) type .godmode start (to actually start the module)

    Now this is kinda not necessary, cause the private server I play on doesn't change the ID's or anything. So what I want to do is simply type .godmode start and boom, godmode started. No other extra commands should be needed ( just like the very first god mode module, which I can not use, cause the server developers changed the Full Rejuv packet in order to try patching the module )

    Here's the code for the module:

    Code:
    #include "Source\ClientCore.cpp"
    
    
    BYTE heal[9] = {0x27, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
    BYTE buyheal[5] = {0x39, 0x00, 0x00, 0x00, 0x00};
    
    bool cSet = FALSE;
    bool pCopied = FALSE;
    bool iCopied = FALSE;
    bool gmStart = FALSE;
    bool npcCopied = FALSE;
    bool gmOn = FALSE;
    
    
    BOOL PRIVATE OnGameCommandSet(char** argv, int argc);
    BOOL PRIVATE OnGameCommandStart(char** argv, int argc);
    BOOL PRIVATE OnGameCommandStop(char** argv, int argc);
    BOOL PRIVATE OnGameCommandHeal(char** argv, int argc);
    BOOL PRIVATE OnGameCommandBuy(char** argv, int argc);
    
    
    CLIENTINFO (0,1,"ÿc2SomeGuyÿc0","FromSomePlace","ÿc8Godmodeÿc0","[email protected]")
    
    
    MODULECOMMANDSTRUCT ModuleCommands[]={
    {"help",OnGameCommandHelp,"Displays help textÿc0"},
    {"set",OnGameCommandSet,"Sets module for exploit.ÿc0"},
    {"start",OnGameCommandStart,"Starts module.ÿc0"},
    {"stop",OnGameCommandStop,"Starts module.ÿc0"},
    {"heal",OnGameCommandHeal,"Starts module.ÿc0"},
    {"buy",OnGameCommandBuy,"Buys health from any NPC.ÿc0"},
    {NULL}};
    
    
    VOID EXPORT OnGameJoin(THISGAMESTRUCT* thisgame){
    cSet = FALSE;
    pCopied = FALSE;
    iCopied = FALSE;
    npcCopied = FALSE;
    gmOn = FALSE;
    server->GamePrintInfo("ÿc2Godmode: Godmode reset, please use the set command again.ÿc0");
    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("ÿc2Godmode: Potion ID copied.ÿc0");
       pCopied = TRUE;}
    
    if ((aPacket[0] == 0x19) && (cSet == TRUE)) {
       memcpy(heal+1,aPacket+1,4);
       server->GamePrintInfo("ÿc2Godmode: Item ID copied.ÿc0");
       iCopied = TRUE;}
    
    if ((aPacket[0] == 0x13) && (aPacket[1] == 0x01) && (cSet == TRUE)) {
       memcpy(buyheal+1,aPacket+5,4);
       server->GamePrintInfo("ÿc2Godmode: NPC ID copied. You may now use 'ÿc5.godmode buyÿc2' to buy health from the NPC.ÿc0");
       npcCopied = TRUE;}
    
    if ((cSet == TRUE) && (iCopied == TRUE) && (pCopied == TRUE) && (npcCopied == TRUE)){
        cSet = FALSE;
        server->GamePrintInfo("ÿc2Godmode: All IDs copied.ÿc0");}
    
    return aLen;}
    
    
    BOOL PRIVATE OnGameCommandSet(char** argv, int argc){
    server->GamePrintInfo("ÿc2Godmode: Pick up any item from your ÿc1inventoryÿc2 and a ÿc;Full Rejuvinationÿc2 potion from your ÿc1beltÿc2.ÿc0");
    server->GamePrintInfo("ÿc2Godmode: Also click the ÿc1NPCÿc2 you want to use for 'ÿc4.godmode buyÿc2'.ÿc0");
    cSet = TRUE;
    return TRUE;}
    
    BOOL PRIVATE OnGameCommandStart(char** argv, int argc){
    if ((iCopied == TRUE) && (pCopied == TRUE)){
      server->GamePrintInfo("ÿc2Godmode: Godmode activated!ÿc0");
      gmOn = TRUE;}
    else{
      server->GamePrintInfo("ÿc2Godmode: Please type 'ÿc5.godmode setÿc2' and pick up the full rejuv from your belt and item from your inventory first.ÿc0");}
    return TRUE;}
    
    BOOL PRIVATE OnGameCommandStop(char** argv, int argc){
    server->GamePrintInfo("ÿc2Godmode: All flags disabled.ÿc0");
    gmOn = FALSE;
    return TRUE;}
    
    BOOL PRIVATE OnGameCommandHeal(char** argv, int argc){
    if ((iCopied == TRUE) && (pCopied == TRUE)){
      server->GameSendPacketToServer(heal,9);
      server->GamePrintInfo("ÿc2Godmode: Healed.ÿc0");}
    else{
      server->GamePrintInfo("ÿc2Godmode: Please type 'ÿc5.godmode setÿc2' and pick up the full rejuv from your belt and item from your inventory first.ÿc0");}
    return TRUE;}
    
    BOOL PRIVATE OnGameCommandBuy(char** argv, int argc){
    if (npcCopied == TRUE){
    server->GamePrintInfo("ÿc2Godmode: Health purchased.ÿc0");
    server->GameSendPacketToServer(buyheal,5);}
    return TRUE;}
    I have attached the whole project in case you want to compile the source for testing ( you will need Visual C++ 6.0 to compile ).

    And here's what I already tried:
    1) Changing

    Code:
    VOID EXPORT OnGameJoin(THISGAMESTRUCT* thisgame){
    cSet = FALSE;
    pCopied = FALSE;
    iCopied = FALSE;
    npcCopied = FALSE;
    gmOn = FALSE;
    server->GamePrintInfo("ÿc2Godmode: Godmode reset, please use the set command again.ÿc0");
    return;}
    To:

    Code:
    VOID EXPORT OnGameJoin(THISGAMESTRUCT* thisgame){
    cSet = TRUE; //Also tried changing this to FALSE and leave others to TRUE
    pCopied = TRUE;
    iCopied = TRUE;
    npcCopied = TRUE;
    gmOn = TRUE;
    server->GamePrintInfo("ÿc2Godmode: Godmode reset, please use the set command again.ÿc0");
    return;}
    The result was:

    1) Game lags a lot
    2) Cannot run (only walk)
    3) Only have 1HP and 1MP
    4) Cannot teleport or attack anything

    I also tried to change the stop command a little bit so I can first get the ID's and the re-join the game, by changing this:

    Code:
    BOOL PRIVATE OnGameCommandStop(char** argv, int argc){
    server->GamePrintInfo("ÿc2Godmode: All flags disabled.ÿc0");
    gmOn = FALSE;
    return TRUE;}
    To this:

    Code:
    BOOL PRIVATE OnGameCommandStop(char** argv, int argc){
    server->GamePrintInfo("ÿc2Godmode: All flags disabled.ÿc0");
    cSet = FALSE;
    pCopied = FALSE;
    iCopied = FALSE;
    npcCopied = FALSE;
    gmOn = FALSE;
    return TRUE;}
    Result was the same as the previous one, lelllll ... Someone help me out there, please! Thank you!
    Attached Files Attached Files

    Help with disable resetting module on game join

Similar Threads

  1. Replies: 0
    Last Post: 11-16-2009, 07:49 AM
  2. LF Help With Game-Cards!
    By keksius in forum WoW Scams Help
    Replies: 11
    Last Post: 08-28-2008, 07:05 PM
  3. Replies: 2
    Last Post: 06-19-2008, 03:16 PM
  4. Help needed with losing items in the game
    By kitkatz in forum World of Warcraft Emulator Servers
    Replies: 5
    Last Post: 12-09-2007, 09:57 PM
  5. Help with joining private servers please.
    By ryder18 in forum World of Warcraft General
    Replies: 1
    Last Post: 04-05-2007, 04:36 PM
All times are GMT -5. The time now is 09:57 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search