• You've discovered RedGuides, an EverQuest multi-boxing and scripting community 🧙‍♀️⚙️. We want you to play several EQ characters at once, come join us and say hello! 👋

  • A TLP without truebox has thawed (Very Vanilla ready)
    Frostreaver

Updated and Working mq2docrack with .ini included

Joined
Feb 24, 2005
RedCents
2,154¢
^^ Docrack source ^^

Docrack.cpp
Rich (BB code):
/****************************************************************************** 
 MQ2DoCrack.cpp 
  
 Fist version by jaflemming 
 Maintenance by Kint 
 CDoCrackWnd class implementation by Koa 
 Code clean up and DefaultSetting by bootyjuice 

TO DO: (for developers) 
  *********** 
  Add more information in errors (crack app that caused it, iteration of normal/crack) 
  put in window class 
  *********** 


 This plugin facilitates applying memory patches to the eqgame.exe process.  
 It reads from MQ2DoCrack.ini to determine what hacks are available.  For example: 

 [AddFriends] 
 Description="Add Over 100 Friends" 
 Version="2004.05.12" 
 DefaultSetting= 
 address0=45CA07 
 normal0="75 04" 
 crack0="90 90" 


 Values for DefaultSetting are "on", "off", and "" (blank).  "on" will load 
 the crack upon entering the game.  "off" will force the memory to the normal 
 state upon entering the game. "" will toggle the crack's state. 

 Usage: 

 /docrack list 
   Lists all available cracks and their current status. 

 /docrack <crack name> [on|off] [silent] 
   Apply or remove <crack name>.  [silent] does it without printing out 
   anything (used during startup). 
  
 /showmem <address> <bytes to show> shows X amount of bytes of memory at specified address 

 /dooffset <address> <memory> Writes supplied memory to specified address 

******************************************************************************/ 
#pragma warning(disable:4786) 
#include "../MQ2Plugin.h" 
#include <list> 
#include <vector> 
#define CRACKSTATUS_ON 1 
#define CRACKSTATUS_OFF 0 
#define CRACKSTATUS_ERROR 3 


#include "ByteHandler.h" 
#include "MQ2DoCrack.h" 





PreSetup("MQ2DoCrack"); 

PLUGIN_API VOID InitializePlugin(VOID) 
{ 
   DebugSpewAlways("Initializing MQ2DoCrack"); 
   AddCommand("/docrack",DoCrackHandler); 
   AddCommand("/dooffset",DoOffsetHandler); 
   AddCommand("/showmem",ShowMemHandler); 
    
   DoCrackClass.InitializeCracks(); 

} 

PLUGIN_API VOID ShutdownPlugin(VOID) 
{ 
   DebugSpewAlways("Shutting down MQ2DoCrack"); 
   RemoveCommand("/docrack"); 
   RemoveCommand("/dooffset"); 
   RemoveCommand("/showmem"); 
} 

// Called once directly after initialization, and then every time the gamestate changes 
PLUGIN_API VOID SetGameState(DWORD GameState) 
{ 
   // Initialize the cracks if we haven't already. 
   if (GameState!=GAMESTATE_INGAME && GameState!=3) //prep InitializeCracks to fire on zone 
      bInitialized = false; 
   if ( !bInitialized ) DoCrackClass.InitializeCracks(); 
} 

void DoCrackHandler(PSPAWNINFO pChar, PCHAR szLine) 
{ 
   DoCrackClass.DoCrack(szLine); 
   return; 
} 


void ShowMemHandler(PSPAWNINFO pChar, PCHAR szLine) 
{ 
   DoCrackClass.ShowMemory(szLine); 
   return; 
} 


void DoOffsetHandler(PSPAWNINFO pChar, PCHAR szLine) 
{ 
   DoCrackClass.DoOffset(szLine); 
   return; 
}

ByteHandler.h
Rich (BB code):
struct Bytes { 
   vector<BYTE> Normal; 
   vector<BYTE> Crack; 
   DWORD EQADDR; 
}; 

list<Bytes> ByteList; 


class CByteHandler 
{ 
   CHAR szErrorBuffer[MAX_STRING]; 
   CHAR szUnSpacedNormal[MAX_STRING]; 
   CHAR szUnSpacedCrack[MAX_STRING]; 
   CHAR szSpacedNormal[MAX_STRING]; 
   CHAR szSpacedCrack[MAX_STRING]; 
   PCHAR space(PCHAR szSrc, PCHAR szDest); 
   PCHAR unSpace(PCHAR szSrc, PCHAR szDest); 
   void ByteError(PCHAR szFormat, ...); 
   void szStringToVBYTE(PCHAR szString, bool normal); 
   bool bWriteErrors; 
public: 

   Bytes ByteStruct; 
   int NormalByte, CrackByte; 
   bool ProceedWithCrack(bool WriteErrors); 
   bool bProceedWithCrack; 
   CByteHandler(PCHAR szNormal, PCHAR szCrack); 
   CByteHandler(const CByteHandler &ob); 
   ~CByteHandler(); 
}; 



void CByteHandler::ByteError(PCHAR szFormat,...) 
{ 
   bProceedWithCrack = false; 
    va_list vaList; 
    va_start( vaList, szFormat ); 
    vsprintf(szErrorBuffer,szFormat, vaList); 
   if (bWriteErrors) 
      WriteChatColor(szErrorBuffer,CONCOLOR_RED); 
   //FatalError 
   DebugSpewAlways("MQ2DoCrack::ByteError(%s)",szErrorBuffer); 
    

} 

bool CByteHandler::ProceedWithCrack(bool WriteErrors) 
{ 
   bWriteErrors = WriteErrors; 
   if ((strlen(szUnSpacedCrack)%2)) 
      ByteError("Crack Error: Crack information %s is not of an evenly divisable length",szSpacedCrack); 

   if ((strlen(szUnSpacedNormal)%2)) 
      ByteError("Crack Error: Normal information %s is not of an evenly divisable length",szSpacedNormal); 

   if (!strcmp(szUnSpacedNormal,szUnSpacedCrack)) 
      ByteError("Crack Error: Crack and Normal information (%s) are the same",szUnSpacedCrack); 

    
   for (int x=0;x<strlen(szUnSpacedNormal);x++) 
   { 
      if (!isxdigit(szUnSpacedNormal[x])) 
         ByteError("Crack Error: Normal contains non hexadecimal numbers characters in it (%c)",szUnSpacedNormal[x]); 
   } 

   for (x=0;x<strlen(szUnSpacedCrack);x++) 
   { 
      if (!isxdigit(szUnSpacedCrack[x])) 
         ByteError("Crack Error: Crack contains non hexadecimal numbers characters in it (%c)",szUnSpacedCrack[x]); 
   } 

   if (NormalByte != CrackByte) 
      ByteError("Crack Error: Normal/Crack size mismatch: %d/%d bytes",NormalByte,CrackByte); 
   if (!bProceedWithCrack) 
   { 
         ByteError("Normal %s Crack %s",szSpacedNormal,szSpacedCrack); 
         return 0; 
   } 
   else 
      return 1; 
} 

CByteHandler::CByteHandler(PCHAR szNormal, PCHAR szCrack) 
{ 
   bWriteErrors = false;    
   bProceedWithCrack = true; 
   unSpace(szNormal,szUnSpacedNormal); 
   unSpace(szCrack,szUnSpacedCrack); 
   space(szNormal,szSpacedNormal); 
   space(szCrack,szSpacedCrack); 

   NormalByte = ((strlen(szUnSpacedNormal)/2)+(strlen(szUnSpacedNormal)%2)); 
   CrackByte = ((strlen(szUnSpacedCrack)/2)+(strlen(szUnSpacedCrack)%2)); 

   szStringToVBYTE(szUnSpacedNormal,1); 
   szStringToVBYTE(szUnSpacedCrack,0); 

   for (int iByte = 0; iByte+1 < CrackByte; iByte++) 
      if (ByteStruct.Crack[iByte] == ByteStruct.Normal[iByte]) 
         DebugSpewAlways("MQ2DoCrack::CByteHandler::CByteHandler(Crack and Normal at array location %d are the same (0x%x))",(iByte+1),ByteStruct.Normal[iByte]); 
} 

void CByteHandler::szStringToVBYTE(PCHAR szString, bool normal) 
{ 
   char szByte[MAX_STRING] = {0}; 
   DWORD dwPos = 0, dwEnd = strlen(szString); 
    
   while (dwPos < dwEnd) { 
      strcpy(szByte,&szString[dwPos]); 
      szByte[2] = '\0'; 
      if (normal) 
         ByteStruct.Normal.push_back((BYTE)strtoul(szByte, NULL, 16)); 
      else 
         ByteStruct.Crack.push_back((BYTE)strtoul(szByte, NULL, 16)); 
      dwPos = dwPos+2; 
   } 

   return; 
} 

CByteHandler::~CByteHandler() 
{ 
   ByteStruct.Normal.clear(); 
   ByteStruct.Crack.clear(); 
} 

CByteHandler::CByteHandler(const CByteHandler &ob) 
{ 
   ByteStruct.Crack = ob.ByteStruct.Crack; 
   ByteStruct.Normal = ob.ByteStruct.Normal; 
} 

PCHAR CByteHandler::space(PCHAR szSrc, PCHAR szDest) 
{ 
   char *pBuffer=(char*)malloc(MAX_STRING); 
   unSpace(szSrc,pBuffer); 
   char spaceBuffer[MAX_STRING] = {0}; 
   ZeroMemory(szDest,MAX_STRING); 
   for (int h = 0; h<=strlen(szSrc); h=h+2) 
   { 
      ZeroMemory(spaceBuffer,MAX_STRING); 
      for (int o=0;o<2;o++) 
         spaceBuffer[o] = pBuffer[h+o]; 
      if (h>=strlen(szSrc)) break; 
      strcat(spaceBuffer," "); 
      strcat(szDest,spaceBuffer); 
   } 
   free(pBuffer); 
   return szDest; 
} 


PCHAR CByteHandler::unSpace(PCHAR szSrc, PCHAR szDest) 
{ 
    
   char *pBuffer; 
   char spaceBuffer[MAX_STRING] = {0}; 
   ZeroMemory(szDest,MAX_STRING); 
   pBuffer = szSrc; 
   for (int h = 0; h<=strlen(szSrc); h++) 
   { 
      ZeroMemory(spaceBuffer,MAX_STRING); 
      if (szSrc[h] != ' ') //need to put an null term check here? 
      { 
         spaceBuffer[0]=szSrc[h]; 
         strcat(szDest,spaceBuffer); 
      } 
   } 
   return szDest; 
}

Crackwnd.h
Rich (BB code):
class CDoCrackWnd; 
void CreateDoCrackWindow(); 
void DestroyDoCrackWindow(); 
void ReadWindowINI(PCSIDLWND pWindow); 
void WriteWindowINI(PCSIDLWND pWindow); 
void DoCrackWndCommand(PSPAWNINFO pChar, PCHAR szLine); 
void GetCrackStat(PCHAR szCrackName); 

// CDoCrackWnd window class 
class CDoCrackWnd : public CCustomWnd 
{ 
public: 
   CListWnd *CrackList; 
   CButtonWnd *LoadButton; 

   CDoCrackWnd():CCustomWnd("DoCrackWnd") 
   { 
      CrackList = (CListWnd*)GetChildItem("DC_CrackList"); 
      LoadButton = (CButtonWnd*)GetChildItem("DC_LoadButton"); 
      SetWndNotification(CDoCrackWnd); 
      LoadList(); 
   } 

   ~CDoCrackWnd() 
   { 
   } 

   int WndNotification(CXWnd *pWnd, unsigned int Message, void *unknown) 
   { 
      CHAR szTemp[MAX_STRING]={0}, szBuffer[MAX_STRING]={0}; 

      if (pWnd==(CXWnd*)LoadButton) { 
         if (Message==XWM_LCLICK) { 
            //WriteChatColor("CDoCrackWnd::Button01 LCLICK", USERCOLOR_DEFAULT); 
            this->LoadList(); 
         } else { 
            //DebugSpew("Button01 message %Xh / %d",Message,Message); 
         } 
      } 
      if (pWnd==(CXWnd*)CrackList) { 
         if (Message==XWM_LCLICK) { 
         sprintf(szTemp,"/docrack %s on", GetListItem(szBuffer, (DWORD)(CrackList->GetCurSel()) ) ); 
            //DebugSpewAlways("CDoCrackWnd::CrackList LCLICK Command '%s'", szTemp); 
            DoCommand(NULL, szTemp); 
         } 
         if (Message==XWM_RCLICK) { 
         sprintf(szTemp,"/docrack %s off", GetListItem(szBuffer, (DWORD)(CrackList->GetCurSel()) ) ); 
            //DebugSpewAlways("CDoCrackWnd::CrackList LCLICK Command '%s'", szTemp); 
            DoCommand(NULL, szTemp); 
            LoadList(); 

         } 
         if (Message==XWM_LMOUSEUP) { 
            LoadList();  //refresh status colors after crack select 
         } 
      } 
      return CSidlScreenWnd::WndNotification(pWnd,Message,unknown); 
   }; 

   void LoadList() 
   { 
      char szBuffer[MAX_STRING], szSection[MAX_STRING], szCrackName[MAX_STRING]; 
      int i, prev=0, curListIndex=0; 
      DWORD crack_color; 

      CrackList->DeleteAll(); 

      //DebugSpewAlways("CDoCrackWnd::LoadList(): Get sections list"); 
      GetPrivateProfileString(NULL,NULL,NULL,szBuffer,MAX_STRING,INIFileName); 

      for (i=0; ((szBuffer != 0) || (szBuffer[i+1] != 0)); i++) { 
         //DebugSpewAlways("LoadList(): cycledsectionbuffer byte %d", i); 

         szSection[i-prev] = szBuffer; 
         if ( szBuffer==0 ) { 
               //DebugSpewAlways("LoadList(): found section %s", szSection); 
               strcpy(szCrackName, szSection); 
               crack_color = GetCrackStatusColor(szCrackName); 

               //DebugSpewAlways("LoadList(): CrackList->AddString(text='%s',crack_color=0x%X)", szCrackName, crack_color); 
               CrackList->AddString(CXStr(szCrackName), crack_color, 0, 0); 

               curListIndex++; 
               prev=i+1; 
            } 
      } 
   } 

   PCHAR GetListItem(PCHAR szFoundName, DWORD dwIndex) 
   { 
      char szBuffer[MAX_STRING], szSection[MAX_STRING]; 
      sprintf(szFoundName, "GetListItem_ERROR"); 
      int i, prev=0; 
      DWORD curListIndex=0; 

      //DebugSpewAlways("CDoCrackWnd::GetListItem(%d): Get sections list", dwIndex); 
      GetPrivateProfileString(NULL,NULL,NULL,szBuffer,MAX_STRING,INIFileName); 

      for (i=0; ((szBuffer != 0) || (szBuffer[i+1] != 0)); i++) { 
         //DebugSpewAlways("GetListItem(): cycledsectionbuffer byte %d", i); 

         szSection[i-prev] = szBuffer; 
         if ( szBuffer==0 ) { 
               if ( curListIndex == dwIndex ) { 
                  strcpy(szFoundName, szSection); 
                  break; 
               } 
               curListIndex++; 
               prev=i+1; 
            } 
      } 
      //DebugSpewAlways("GetListItem():Return %s", szFoundName); 
      return szFoundName; 
   } 
   DWORD GetCrackStatusColor(PCHAR szCrackName) 
   { 
      CHAR szAddr[MAX_STRING] = {0}; 
      CHAR szIniKey[MAX_STRING] = {0}; 
      CHAR szCrack[MAX_STRING] = {0}; 
      CHAR szNormal[MAX_STRING] = {0}; 
      CHAR szBuffer[MAX_STRING] = {0}; 
      CHAR szTextBuffer[MAX_STRING] = {0}; 
      DWORD dwAddr; 
      int iChange = 0, iByte, iCrackSize; 
      BYTE byCrack[20]; 
      BYTE byNormal[20]; 
      DWORD crack_color; 

      while(1) 
      { 
         sprintf(szAddr,"Address%d",iChange); 
         GetPrivateProfileString(szCrackName,szAddr,"NULL",szBuffer,MAX_STRING,INIFileName); 

         if (!strcmp(szBuffer,"NULL")) 
         { 
            if ( iChange==0 ) 
            { 
               sprintf(szTextBuffer,"GetCrackStatusColor(): no match for '%s'", szCrackName ); 
               crack_color = ConColorToARGB(CONCOLOR_RED);  //data error 
            } 
            break; 
         } 

         //converts string address to hex 
         dwAddr = strtoul(szBuffer,NULL,16); 

         sprintf(szIniKey,"Crack%d",iChange); 
         GetPrivateProfileString(szCrackName,szIniKey,"NULL",szCrack,MAX_STRING,INIFileName); 
         if (!strcmp(szCrack,"NULL")) 
         { 
            DebugSpewAlways("[%s] Crack error, no associated crack value set with address: 0x%x", szCrackName, dwAddr); 
            crack_color = ConColorToARGB(CONCOLOR_RED);  //data error 
            break; 
         } 
         sprintf(szIniKey,"Normal%d",iChange); 
         GetPrivateProfileString(szCrackName,szIniKey,"NULL",szNormal,MAX_STRING,INIFileName); 
         if (!strcmp(szNormal,"NULL")) 
         { 
            DebugSpewAlways(szTextBuffer,"[%s] Crack error, no associated normal value set with address: 0x%x", szCrackName, dwAddr); 
            crack_color = ConColorToARGB(CONCOLOR_RED);  //data error 
            break; 
         } 

         // convert crack string into actual bytes 
         char *pTempPos, *pCurPos = szCrack; 
         char *pEndCrack = szCrack + strlen(szCrack); 
         iByte = 0; 
         while (pCurPos < pEndCrack) 
         { 
            byCrack[iByte] = (unsigned char)strtol(pCurPos, &pTempPos, 16); 
            iByte++; 
            if (iByte > 20 ) 
            { 
               DebugSpewAlways(szTextBuffer, "[%s] Crack Error: Crack too big.", szCrackName); 
               crack_color = ConColorToARGB(CONCOLOR_RED);  //data error 
            } 
            pCurPos = pTempPos+1; 
         } 
         iCrackSize = iByte; 

         // convert normal string into actual bytes 
         pCurPos = szNormal; 
         pEndCrack = szNormal + strlen(szNormal); 
         iByte = 0; 
         while (pCurPos < pEndCrack) 
         { 
            byNormal[iByte] = (unsigned char)strtol(pCurPos, &pTempPos, 16); 
            iByte++; 
            pCurPos = pTempPos+1; 
         } 

         if (iByte != iCrackSize) 
         { 
            DebugSpewAlways("[%s] Crack error, crack mismatch crack size: %u  normal size: %u", szCrackName, iCrackSize, iByte); 
            crack_color = ConColorToARGB(CONCOLOR_RED);  //data error 
         } 

         // look for the first byte that is different in the crack from the normal 
         // should be the 1st byte for gods sake :) 
         for (iByte = 0; iByte < iCrackSize; iByte++) 
         { 
            if (byCrack[iByte] != byNormal[iByte]) 
            break; 
         } 
         if (iByte == iCrackSize) 
         { 
            DebugSpewAlways("[%s] Crack Error: no difference between the crack and normal bytes.", szCrackName); 
            crack_color = ConColorToARGB(CONCOLOR_RED);  //data error 
         } 

         if (*(((LPBYTE)dwAddr)+iByte) == byCrack[iByte]) 
         { 
            crack_color = ConColorToARGB(CONCOLOR_GREEN);  //on 
         } 
         else if (*(((LPBYTE)dwAddr)+iByte) == byNormal[iByte]) 
         { 
            crack_color = ConColorToARGB(CONCOLOR_BLUE);  //off 
         } 
         else 
         { 
            //problem 
            DebugSpewAlways("[%s] Crack warning! No match at addr: 0x%X  [%X/%X]", szCrackName, dwAddr, byNormal[iByte], byCrack[iByte]); 
            crack_color = ConColorToARGB(CONCOLOR_YELLOW);  //mismatch/warning 
         } 
         iChange++; 
      } 

      return crack_color; 
   } 
}; 
CDoCrackWnd *MyWnd = 0; 


// API are here just to show you where the stuff goes to tie it all together 


PLUGIN_API VOID OnZoned(VOID) 
{ 
   //if you use map enabling in this callback... do it before you call LoadList! 
   if ( gGameState==GAMESTATE_INGAME && MyWnd ) { 
      MyWnd->LoadList();    //can't load UI element lists if SetGameState hasn't loaded them yet 
   } 
} 

// *************************************** 
// DoCrackWnd UI stuff 
// *************************************** 

PLUGIN_API VOID OnCleanUI(VOID) 
{ 
   DebugSpewAlways("MQ2DoCrack::OnCleanUI()"); 
   DestroyDoCrackWindow(); 
} 

PLUGIN_API VOID OnReloadUI(VOID) 
{ 
   DebugSpewAlways("MQ2DoCrack::OnReloadUI()"); 
   CreateDoCrackWindow(); 
} 


CHAR szSettingINISection[MAX_STRING] = {0}; 
void ReadWindowINI(PCSIDLWND pWindow) 
{ 
   //DebugSpewAlways("MQ2DoCrack::ReadWindowINI()"); 
   CHAR Buffer[MAX_STRING] = {0}; 
   sprintf(szSettingINISection,"Settings",((PCHARINFO)pCharData)->Server,((PCHARINFO)pCharData)->Name); 
   pWindow->Location.top      = GetPrivateProfileInt(szSettingINISection,"Top",      401,INIFileName); 
   pWindow->Location.bottom   = GetPrivateProfileInt(szSettingINISection,"Bottom",   723,INIFileName); 
   pWindow->Location.left      = GetPrivateProfileInt(szSettingINISection,"Left",      290,INIFileName); 
   pWindow->Location.right    = GetPrivateProfileInt(szSettingINISection,"Right",      437,INIFileName); 
   pWindow->Locked             = GetPrivateProfileInt(szSettingINISection,"Locked",         0,INIFileName); 
   pWindow->Fades             = GetPrivateProfileInt(szSettingINISection,"Fades",         1,INIFileName); 
   pWindow->TimeMouseOver       = GetPrivateProfileInt(szSettingINISection,"Delay",         2000,INIFileName); 
   pWindow->FadeDuration       = GetPrivateProfileInt(szSettingINISection,"Duration",      500,INIFileName); 
   pWindow->Alpha            = GetPrivateProfileInt(szSettingINISection,"Alpha",         255,INIFileName); 
   pWindow->FadeToAlpha      = GetPrivateProfileInt(szSettingINISection,"FadeToAlpha",   255,INIFileName); 
   pWindow->BGType            = GetPrivateProfileInt(szSettingINISection,"BGType",         1,INIFileName); 
   pWindow->BGColor.R         = GetPrivateProfileInt(szSettingINISection,"BGTint.red",      255,INIFileName); 
   pWindow->BGColor.G         = GetPrivateProfileInt(szSettingINISection,"BGTint.green",   255,INIFileName); 
   pWindow->BGColor.B         = GetPrivateProfileInt(szSettingINISection,"BGTint.blue",   255,INIFileName); 

   GetPrivateProfileString(szSettingINISection,"WindowTitle","MQ2DoCrack",Buffer,MAX_STRING,INIFileName); 
   SetCXStr(&pWindow->WindowText,Buffer); 
} 

void WriteWindowINI(PCSIDLWND pWindow) 
{ 
   //DebugSpewAlways("MQ2DoCrack::WriteWindowINI()"); 
   CHAR szTemp[MAX_STRING] = {0}; 
   if (pWindow->Minimized) 
   { 
      WritePrivateProfileString(szSettingINISection,"Top",      itoa(pWindow->OldLocation.top,      szTemp,10),INIFileName); 
      WritePrivateProfileString(szSettingINISection,"Bottom",   itoa(pWindow->OldLocation.bottom,   szTemp,10),INIFileName); 
      WritePrivateProfileString(szSettingINISection,"Left",   itoa(pWindow->OldLocation.left,      szTemp,10),INIFileName); 
      WritePrivateProfileString(szSettingINISection,"Right",   itoa(pWindow->OldLocation.right,   szTemp,10),INIFileName); 
   } 
   else 
   { 
      WritePrivateProfileString(szSettingINISection,"Top",      itoa(pWindow->Location.top,         szTemp,10),INIFileName); 
      WritePrivateProfileString(szSettingINISection,"Bottom",   itoa(pWindow->Location.bottom,      szTemp,10),INIFileName); 
      WritePrivateProfileString(szSettingINISection,"Left",   itoa(pWindow->Location.left,      szTemp,10),INIFileName); 
      WritePrivateProfileString(szSettingINISection,"Right",   itoa(pWindow->Location.right,      szTemp,10),INIFileName); 
   } 
   WritePrivateProfileString(szSettingINISection,"Locked",      itoa(pWindow->Locked,         szTemp,10),INIFileName); 

   GetCXStr(pWindow->WindowText,szTemp); 
   WritePrivateProfileString(szSettingINISection,"WindowTitle",                              szTemp,INIFileName); 

   WritePrivateProfileString(szSettingINISection,"Fades",      itoa(pWindow->Fades,            szTemp,10),INIFileName); 
   WritePrivateProfileString(szSettingINISection,"Delay",      itoa(pWindow->MouseOver,         szTemp,10),INIFileName); 
   WritePrivateProfileString(szSettingINISection,"Duration",   itoa(pWindow->FadeDuration,         szTemp,10),INIFileName); 
   WritePrivateProfileString(szSettingINISection,"Alpha",      itoa(pWindow->Alpha,            szTemp,10),INIFileName); 
   WritePrivateProfileString(szSettingINISection,"FadeToAlpha",   itoa(pWindow->FadeToAlpha,         szTemp,10),INIFileName); 
   WritePrivateProfileString(szSettingINISection,"BGType",      itoa(pWindow->BGType,            szTemp,10),INIFileName); 
   WritePrivateProfileString(szSettingINISection,"BGTint.red",   itoa(pWindow->BGColor.R,         szTemp,10),INIFileName); 
   WritePrivateProfileString(szSettingINISection,"BGTint.green",   itoa(pWindow->BGColor.G,      szTemp,10),INIFileName); 
   WritePrivateProfileString(szSettingINISection,"BGTint.blue",   itoa(pWindow->BGColor.B,         szTemp,10),INIFileName); 
} 

void CreateDoCrackWindow() 
{ 
   //DebugSpewAlways("MQ2DoCrack::CreateDoCrackWindow()"); 
   if (MyWnd)  return; 

   if (pSidlMgr->FindScreenPieceTemplate("DoCrackWnd")) { 
      MyWnd = new CDoCrackWnd(); 
      ReadWindowINI((PCSIDLWND)MyWnd); 
      WriteWindowINI((PCSIDLWND)MyWnd); 
   } 
} 

void DestroyDoCrackWindow() 
{ 
   //DebugSpewAlways("MQ2DoCrack::DestroyDoCrackWindow()"); 
   if (MyWnd) 
   { 
      WriteWindowINI((PCSIDLWND)MyWnd); 
      delete MyWnd; 
      MyWnd=0; 
   } 
} 

// *************************************************************************** 
// Function:      DoCrackWndCommand 
// Description:   How we hide/show our docrack window 
// *************************************************************************** 
VOID DoCrackWndCommand(PSPAWNINFO pChar, PCHAR szLine) 
{ 
   if (!MyWnd) { 
      WriteChatColor("/docrackwnd: window init problem",USERCOLOR_DEFAULT); 
      return; 
   } 
    
   if (szLine[0]==0) { 
      WriteChatColor("/docrackwnd: show|hide|load",USERCOLOR_DEFAULT); 
      ((CXWnd*)MyWnd)->Show(1,1); 
      return; 
   } 

   if ( strstr(szLine, "off") || strstr(szLine, "hide") ) { 
      ((CXWnd*)MyWnd)->Show(0,0); 
   } else if ( strstr(szLine, "load") ) { 
      WriteChatColor("/docrackwnd: Reload Cracklist Display",USERCOLOR_DEFAULT); 
      MyWnd->LoadList(); 
      ((CXWnd*)MyWnd)->Show(1,1); 
   } else { 
      ((CXWnd*)MyWnd)->Show(1,1); 
   } 
}


Docrack.h
Rich (BB code):
BOOL bInitialized = false; 
void DoCrackHandler(PSPAWNINFO pChar, PCHAR szLine); 
void ShowMemHandler(PSPAWNINFO pChar, PCHAR szLine); 
void DoOffsetHandler(PSPAWNINFO pChar, PCHAR szLine); 

class CDoCrack 
{ 
   typedef char dateString[MAX_STRING]; 


   CHAR szAddr[MAX_STRING]; 
   CHAR szIniKey[MAX_STRING]; 
   CHAR szCrack[MAX_STRING]; 
   CHAR szNormal[MAX_STRING]; 
   CHAR szBuffer[MAX_STRING]; 
   CHAR szTextBuffer[MAX_STRING]; 
   CHAR szAddresses[MAX_STRING]; 
   CHAR szCrackName[MAX_STRING]; 
   CHAR szDescription[MAX_STRING]; 
   CHAR szVersion[MAX_STRING]; 

   DWORD dwAddr; 

   DWORD GetCrackStatus(PCHAR szCrackName); //true if cracked, false if normal or error 
   BOOL DateCheck(PCHAR szApp); 
   VOID Offset(DWORD Address, vector<BYTE> NewData, BOOL Reverse=1); 
   //void LoadOffsets(PCHAR szCrackName); 
   //void WriteOffsets(void); 
public: 
   VOID InitializeCracks(VOID); 
   VOID DoOffset        (PCHAR szLine); 
   VOID DoCrack        (PCHAR szLine); 
   VOID ShowMemory        (PCHAR szLine); 
} DoCrackClass; 


VOID CDoCrack::DoCrack(PCHAR szLine) 
{      
   int iChange = 0, i = 0;//, end; 

   // Parse out the crack name from the command line. 
   GetArg(szCrackName,szLine,1); 

   // If no crack was specified then print the usage string. 
   if( szLine[0]==0 
      || (!strstr(szLine,"list") && !strstr(szLine,"status") 
      && !strstr(szLine,"on") && !strstr(szLine,"off"))) 
   { 
            SyntaxError("Syntax: /docrack <crackname> [on|off|status]"); 
         SyntaxError("Syntax: /docrack list"); 
      return; 
   } 

   // If they want a list of cracks then print it out. 
   // Otherwise preform the requested task. 
   if (!strcmp(szCrackName,"list")) {        
      // Load up the list of cracks available in it .ini file. 
      GetPrivateProfileString(NULL,NULL,NULL,szBuffer,MAX_STRING,INIFileName); 
      CHAR* szCracks = 0; 

      // Print out the crack names one by one. 
      WriteChatColor("Available cracks:",USERCOLOR_DEFAULT); 

      szCracks = szBuffer; 
      for (i=0; i==0 || (szBuffer[i-1]!=0 || szBuffer!=0) ; i++) { 

         if ( szBuffer==0 ) { 
          CHAR szTemp[MAX_STRING] = {0}; 
          sprintf(szTemp, "\t\t%s", szCracks); 
          if( int status = (GetCrackStatus(szCracks) == CRACKSTATUS_ON )){ 
             strcat(szTemp, " on"); 
             WriteChatColor(szTemp, CONCOLOR_GREEN); 
          } else if (status == CRACKSTATUS_OFF){ 
             strcat(szTemp, " off"); 
             WriteChatColor(szTemp, CONCOLOR_BLUE); 
          } else if (status == CRACKSTATUS_ERROR){ 
             strcat(szTemp, " error"); 
             WriteChatColor(szTemp, CONCOLOR_BLUE); 
          } 

            // Set the name pointer to the next position after the null character. 
            szCracks = &szBuffer[i+1]; 
         } 
      } 

      return; 
   } 

   GetPrivateProfileString(szCrackName,NULL,"NULL",szBuffer,MAX_STRING,INIFileName); 
   if (!strcmp(szBuffer,"NULL")) 
   { 
      sprintf(szTextBuffer,"No Ini key found for %s, aborting",szCrackName); 
      WriteChatColor(szTextBuffer,CONCOLOR_RED); 
      return; 
   } 
        
   // Make sure the entry in the .ini file is recent. 
  /* if (!DateCheck(szCrackName)){ 
      WriteChatColor("Date discrepency found, not changing memory"); 
      return; 
   }*/ 
   // Loop through the crack and perform the required action. 
   while(1){ 
       
      sprintf(szAddr,"Address%d",iChange); 
      GetPrivateProfileString(szCrackName,szAddr,"NULL",szBuffer,MAX_STRING,INIFileName); 
       
      if (!strcmp(szBuffer,"NULL")) break; 

      //converts string address to hex 
      dwAddr = strtoul(szBuffer,NULL,16); 

      sprintf(szIniKey,"Crack%d",iChange); 
      GetPrivateProfileString(szCrackName,szIniKey,"NULL",szCrack,MAX_STRING,INIFileName); 
      if (!strcmp(szCrack,"NULL")) { 
         sprintf(szTextBuffer,"Crack error, no associated crack value set with address: 0x%x", dwAddr); 
         WriteChatColor(szTextBuffer ,USERCOLOR_DEFAULT); 
         break; 
      } 
      sprintf(szIniKey,"Normal%d",iChange); 
      GetPrivateProfileString(szCrackName,szIniKey,"NULL",szNormal,MAX_STRING,INIFileName); 
      if (!strcmp(szNormal,"NULL")) { 
         sprintf(szTextBuffer,"Crack error, no associated normal value set with address: 0x%x", dwAddr); 
         WriteChatColor(szTextBuffer ,USERCOLOR_DEFAULT); 
         break; 
      } 
      CByteHandler CBHDoCrack(szNormal,szCrack); 
      if (!CBHDoCrack.ProceedWithCrack(true)) 
      { 
         ByteList.clear(); 
         return; 
      } 

      CBHDoCrack.ByteStruct.EQADDR = dwAddr; 
      ByteList.push_back(CBHDoCrack.ByteStruct); 
      iChange++; 
   } 
    

//feed offsets to write function              
      list<Bytes>::iterator p = ByteList.begin(); 
      // Modify the memory depending on what we need to do. 
       
      if( strstr(szLine,"off") ){ 
         while (p!=ByteList.end()) 
         { 
             
            Offset(p->EQADDR, p->Normal, FALSE); 
            RemoveDetour(p->EQADDR); 
            p++; 
         } 
      } else if( strstr(szLine,"on") ){ 
         // Set the memory to the cracked state. 
         while (p!=ByteList.end()) 
         { 
            AddDetour(p->EQADDR); 
            Offset(p->EQADDR, p->Crack, FALSE); 
            p++; 
         } 
      } 
      ByteList.clear(); 
//end write start information print    

   // Print out what we've done. 
   if( !strstr(szLine, "silent") ) { 
      int GCS = GetCrackStatus(szCrackName); 
      if (GCS==CRACKSTATUS_ON) 
      { 
         GetPrivateProfileString(szCrackName,"Description","NULL",szDescription,MAX_STRING,INIFileName); 
         sprintf(szTextBuffer,"%s: on", szCrackName); 
         WriteChatColor(szTextBuffer, CONCOLOR_GREEN); 
         if (strcmp(szDescription,"NULL")) 
         { 
            sprintf(szTextBuffer,"[%s] %s",szCrackName,szDescription); 
            WriteChatColor(szTextBuffer); 
         } 
      } 
      else if (GCS==CRACKSTATUS_OFF) 
      { 
         sprintf(szTextBuffer,"%s: off", szCrackName); 
         WriteChatColor(szTextBuffer,CONCOLOR_BLUE); 
      } 
      else if (GCS==CRACKSTATUS_ERROR) 
      { 
         sprintf(szTextBuffer,"%s: error!", szCrackName); 
         WriteChatColor(szTextBuffer,CONCOLOR_RED); 
      }        
   } 
   return; 
} 



VOID CDoCrack::Offset(DWORD Address, vector<BYTE> VData, BOOL Reverse) 
{ 
   ZeroMemory(szTextBuffer,MAX_STRING); 
   DWORD i, j, Length = VData.size(); 
   BYTE *NewData = new BYTE [Length]; 
   for (DWORD a = 0;a<Length;a++) 
      NewData[a] = VData[a]; 
    
   DWORD oldperm=0, tmp; 
   if (Reverse && Length>1) 
   { 
      BYTE *szReverse = new BYTE [Length]; 
      for (i = 0, j=Length-1; i < Length; i++,j--) 
      { 
         szReverse=NewData[j]; 
      } 
      memcpy(NewData,szReverse,Length); 
      delete szReverse; 
   } 
   for (DWORD x=0;x<Length;x++) 
   { 
      sprintf(szBuffer,"%x ",NewData[x]); 
      strcat(szTextBuffer,szBuffer); 
   } 
   DebugSpewAlways("MQ2DoCrack::Offset(0x%x,%s)",Address,szTextBuffer); 
    
   FlushInstructionCache(GetCurrentProcess(),(LPCVOID)Address, Length); 
   VirtualProtectEx(GetCurrentProcess(), (LPVOID)Address, Length,PAGE_EXECUTE_READWRITE, &oldperm); 
   WriteProcessMemory( 
      GetCurrentProcess(), 
      (LPVOID)Address, 
      (LPVOID)NewData, 
      Length, 
      NULL); 
   VirtualProtectEx(GetCurrentProcess(), (LPVOID)Address, Length, oldperm, &tmp); 
    
   delete [] NewData; 
} 


VOID CDoCrack::DoOffset(PCHAR szLine) 
{ 
   if (!szLine[0]) 
   { 
      SyntaxError("Syntax: /dooffset <address> <1 byte of memory|...>"); 
      return; 
   } 
   vector<BYTE> crack; 

   GetArg(szBuffer,szLine,1); 
   DWORD dwAddr = strtoul(szBuffer,NULL,16); 
   if (!dwAddr) 
      return; 

   char *pLine; 
   pLine = &szLine[strlen(szBuffer)]; 
   char *p2, *ptr = pLine; 
   char *end = pLine + strlen(pLine); 

   sprintf(szBuffer,"Command was %X %s",dwAddr,pLine); 
   WriteChatColor(szBuffer,USERCOLOR_DEFAULT); 
    
   AddDetour(dwAddr); 

   while (ptr<end) { 
      crack.push_back((unsigned char)strtol(ptr, &p2, 16)); 
      ptr = p2+1; 
   } 
    
   Offset(dwAddr,crack,FALSE); 
   /*for (int j=0;j<crack.size();j++) 
   { 
      sprintf(szBuffer,"dwAddr: %x with an existing value of %x, cracking with value: %x",(dwAddr+j),*(((LPBYTE)dwAddr)+j),crack[j]); 
      WriteChatColor(szBuffer,USERCOLOR_DEFAULT); 
      Offset((dwAddr+j),crack,1,FALSE); 
   } */ 
} 



BOOL CDoCrack::DateCheck(PCHAR szApp) 
{ 
   dateString szClient[3]; 
   dateString szCrack[3]; 
    
   CHAR szCrackDate[MAX_STRING] = {0}; 

   int d=0; 
   PCHAR szMonth[] = { 
      "Jan",   //0 
      "Feb",   //1 
      "Mar",   //2 
      "Apr",   //3 
      "May",   //4 
      "Jun",   //5 
      "Jul",   //6 
      "Aug",   //7 
      "Sep",   //8 
      "Oct",   //9 
      "Nov",   //10 
      "Dec"    //11 
   }; 


   GetPrivateProfileString(szApp,"Version","NULL",szCrackDate,MAX_STRING,INIFileName); 
   if (!strcmp(szCrackDate,"NULL")) 
   { 
      DebugSpewAlways("MQ2DoCrack::DateCheck(No version key found, going ahead with crack)"); 
      return 1; 
   } 


   //allocate client date information 
   for (int i=0;i<=2;i++) 
   { 
      GetArg(szBuffer,__ExpectedVersionDate,(i+1)); 
      strcpy(szClient,szBuffer); 
   } 

   //turn client month in to numeric form 
   for (i=1;i<=12;i++) 
   { 
      if (!strcmp(szClient[0],szMonth)) 
         d=i++; 
   } 
   if (d==0) return 0; 

   //allocate crack date information 
   for ( i=0;i<=2;i++) 
   { 
      GetArg(szBuffer,szCrackDate,(i+1),1,0,0,'.'); 
      strcpy(szCrack,szBuffer); 
   } 
    
   //compare dates 
   if (atoi(szClient[2])<=atoi(szCrack[0])) 
      if (d<=atoi(szCrack[1])) 
         if (atoi(szClient[1])<=atoi(szCrack[2])) 
            return 1; 
         else return 0; 
      else return 0; 
   else return 0; 
    
} 


VOID CDoCrack::ShowMemory(PCHAR szLine) 
{ 
   if (!szLine[0]) 
   { 
      SyntaxError("Syntax: /showmem <address> <bytes of memory to show>"); 
      return; 
   } 
   int i = 0; 
   GetArg(szAddr,szLine,1); 
   DWORD dwAddr = strtoul(szAddr,NULL,16); 
   if (!dwAddr) 
      return; 
   GetArg(szBuffer,szLine,2); 
    
   if (!(i = atoi(szBuffer))) 
      i=1; 
   for (int j = 0;i>j;j++) 
   { 
      sprintf(szBuffer,"%x ",*(((LPBYTE)dwAddr)+j)); 
      strcat(szTextBuffer,szBuffer); 
   } 
   sprintf(szBuffer,"Memory at %x:",dwAddr); 
   WriteChatColor(szBuffer); 
   WriteChatColor(szTextBuffer); 
   return; 
    

} 

DWORD CDoCrack::GetCrackStatus(PCHAR szCrackName) { 

   int iChange = 0; 
   bool bError = false; 

   while(1) 
   { 
      sprintf(szAddr,"Address%d",iChange); 
      GetPrivateProfileString(szCrackName,szAddr,"NULL",szBuffer,MAX_STRING,INIFileName); 

      if (!strcmp(szBuffer,"NULL")) { 
         if ( iChange==0 ) 
            DebugSpewAlways("MQ2Docrack::GetCrackStatus(No Address key found for %s)",szCrackName); 
         // Return error. 
         return CRACKSTATUS_ERROR; 
      } 
       
      //converts string address to hex 
      dwAddr = strtoul(szBuffer,NULL,16); 
       
      sprintf(szIniKey,"Crack%d",iChange); 
      GetPrivateProfileString(szCrackName,szIniKey,"NULL",szCrack,MAX_STRING,INIFileName); 
      if (!strcmp(szCrack,"NULL")) { 
         DebugSpewAlways("MQ2Docrack::GetCrackStatus([%s] Crack error, no associated crack value set with address: 0x%x)", szCrackName, dwAddr);     
         // Return null. 
         return CRACKSTATUS_ERROR; 
      } 
      sprintf(szIniKey,"Normal%d",iChange); 
      GetPrivateProfileString(szCrackName,szIniKey,"NULL",szNormal,MAX_STRING,INIFileName); 
      if (!strcmp(szNormal,"NULL")) { 
         DebugSpewAlways(szTextBuffer,"MQ2Docrack::GetCrackStatus([%s] Crack error, no associated normal value set with address: 0x%x)", szCrackName, dwAddr); 
         // Return null. 
         return CRACKSTATUS_ERROR; 
      } 
       
      CByteHandler GCS(szNormal, szCrack); 
      if (GCS.ProceedWithCrack(false)) 
         bError = false; 

      for (int iByte = 0;iByte<GCS.NormalByte;iByte++) 
      { 
         if (bError) 
            return CRACKSTATUS_ERROR; 
         else if (*(((LPBYTE)dwAddr)+iByte) == GCS.ByteStruct.Crack[iByte]) 
            return CRACKSTATUS_ON; 
         else if (*(((LPBYTE)dwAddr)+iByte) == GCS.ByteStruct.Normal[iByte]) 
            return CRACKSTATUS_OFF; 
         else 
         {   //problem 
            DebugSpewAlways("MQ2Docrack::GetCrackStatus([%s] Crack warning! No match at addr: 0x%X  [%X/%X])", szCrackName, dwAddr, GCS.ByteStruct.Normal[iByte], GCS.ByteStruct.Crack[iByte]); 
            return CRACKSTATUS_ERROR; 
         } 
      } 
      iChange++; 
   } 
   return 0; 
} 




void CDoCrack::InitializeCracks(void) 
{ 

   if (gGameState==GAMESTATE_INGAME) { 

      bInitialized = true; 

      char szDefaultSetting[MAX_STRING]; 
      char* szSection=0; 
      int i, prev=0, curListIndex=0; 

      // Load the list of cracks from the .ini file. 
      GetPrivateProfileString(NULL,NULL,NULL,szBuffer,MAX_STRING,INIFileName); 

      // Cycle through each of the cracks and set the default value. 
      sprintf(szIniKey,"DefaultSetting"); 
      szSection = szBuffer; 
      for (i=0; i==0 || (szBuffer[i-1]!=0 || szBuffer!=0) ; i++) { 
        
         // If we've reached the end of the section name then process it. 
         if ( szBuffer==0 ) { 

            // Look up the default setting for this entry. 
            GetPrivateProfileString(szSection,szIniKey,"NULL",szDefaultSetting,MAX_STRING,INIFileName);            

            if( strstr(szDefaultSetting, "on") ){ 
               sprintf(szTextBuffer, "%s on silent", szSection); 
               DoCrack(szTextBuffer); 
            } 

            if( strstr(szDefaultSetting, "off") ){ 
               sprintf(szTextBuffer, "%s off silent", szSection); 
               DoCrack(szTextBuffer); 
            } 

            szSection = &szBuffer[i+1]; 
         } 
      } 
   } 

   return; 
} 


 
Last edited:
Docrack.ini
[NoEncumber]
Description="Allows for no encumberance"
Version="2005.07.13"
address0=49ED38
normal0="7A 5D"
crack0="90 90"

[JWOEndurance]
Description="Jump with 0 endurance"
Version="2005.07.13"
address0=4d0272
normal0="7F"
crack0="EB"

[NoDelayJump]
Description="No delay while chain jumping"
Version="2005.07.13"
address0=4d0239
normal0="76 78"
crack0="90 90"

[NoMountModels]
Description="Summon Mount With Luclin Models Disabled"
Version="2005.07.13"
address0=48ab5c
normal0="75"
crack0="eb"


[StealStunned]
Description="Steal while stunned"
Version="2005.07.13"
address0=4a3221
normal0="75 12"
crack0="EB 12"

[Talk2Self]
Description="Talk to yourself"
Version="2005.07.13"
address0=4cee50
normal0="75"
crack0="EB"

[SpellBookStop]
Description="Opening spellbook forces you to stop moving"
Version="2005.07.13"
address0=53ed10
normal0="75 31"
crack0="EB 31"

[Drunk]
Description="Consume unlimited alcohol"
Version="2005.07.13"
address0=4f7229
normal0="7C"
crack0="EB"


[Food]
Description="Consume unlimited Food"
Version="2005.07.13"
address0=4F6F12
normal0="7C"
crack0="EB"

[Drink]
Description="Consume unlimited Drink"
Version="2005.07.13"
address0=4F7097
normal0="7C"
crack0="EB"


[shared]
Description="putting no drop in shared bank slot"
Version="2005.07.13"
address0=4F6D67
normal0="74 16"
crack0="90 90"

[MountSkills]
Description="Use skills while mounted"
Version="2005.07.13"
address0=4A246C
normal0="74"
crack0="EB"


[UseHotKeys]
Description="Use hotkeys while casting"
Version="2005.06.29"
address0=4F402C
normal0="74"
crack0="EB"

[BankatNPC]
Description="Bank at any NPC or PC."
Version="2005.07.13"
address0=4D5FCA
normal0="75 41"
crack0="90 90"

[NoStun]
Description="Move around while stunned"
Version="2005.07.13"
address0=49E151
normal0="53 56 8B"
crack0="C2 0C 00"


[Showspells]
Description="Show spells as text - Spell Awareness"
Version="2005.07.13"
address0=4C8E70
normal0="74 17"
crack0="90 90"

[EnviroFall]
Description="No Fall + No Enviro (by Psychotik)"
Version="2005.07.13"
address0=4A0655
normal0="55 8D AC"
crack0="C2 18 00"

[EB]
Description="Enduring Breath"
Version="2005.07.13"
address0=4B510B
normal0="49"
crack0="90"

[NoWeather]
Description="Druids are once again useless!"
Version="2005.07.13"
address0=52FDCF
normal0="74"
crack0="EB"

[NoBlind]
Description="What you think it does?"
Version="2005.07.13"
address0=4AF850
normal0="01"
crack0="00"


[NoAccel]
Description="No acceleration/deceleration on a mount"
Version="2005.07.13"
address0=481271
normal0="74"
crack0="EB"

[SeeInvis]
Description="See Invisible"
Version="2005.07.13"
DefaultSetting=on
address0=486462
normal0="E8 22 83 01 00"
crack0="B0 01 90 90 90"

[UltraVision]
Description="Ultra vision"
Version="2005.07.13"
DefaultSetting=on
address0=44E4E7
normal0="74 07"
crack0="90 90"

[noanonwho]
Description="No Anon in who"
Version="2005.07.13"
address0=4CA64A
normal0="74"
crack0="EB"

[NoShadowStep]
Description="No effects from shadowstep spells"
Version="2005.07.13"
address0=4AC787
normal0="C7 02"
crack0="CB 0E"

[EzFollow]
Description="Follow someone without being in their group"
Version="2005.07.13"
address0=47A636
normal0="0F 84 5A 01 00 00"
crack0="90 90 90 90 90 90"

[FishEyes]
Description="Underwater viewing"
Version="2005.07.13"
address0=4C3905
normal0="75"
crack0="EB"

[NoSilence]
Description="No silence"
Version="2005.07.13"
address0=6053BC
normal0="74 19"
crack0="90 90"

[Shield]
Description="/shield"
Version="2005.07.13"
address0=473609
normal0="0F 85 E1 00 00 00"
crack0="90 90 90 90 90 90"

[HideRun]
Description="Hide while running."
Version="2005.07.13"
address0=4A2CA5
normal0="0F 8B F2 00 00 00"
crack0="90 90 90 90 90 90"
address1=4A2CB6
normal1="0F 84 E1 00 00 00"
crack1="90 90 90 90 90 90"
address2=4A2CC6
normal2="0F 8B D1 00 00 00"
crack2="90 90 90 90 90 90"
address3=4A2CD7
normal3="0F 84 C0 00 00 00"
crack3="90 90 90 90 90 90"
address4=4A2CE7
normal4="0F 8B B2 00 00 00"
crack4="90 90 90 90 90 90"
address5=4A2CF8
normal5="0F 84 A1 00 00 00"
crack5="E9 A2 00 00 00 90"
address6=4A2DC7
normal6="0F 8C 34 FF FF FF"
crack6="E9 3B FF FF FF 90"
address7=4A5B72
normal7="75 13"
crack7="90 90"
address8=4A5B7C
normal8="74 09"
crack8="90 90"
address9=4A5B85
normal9="75 46"
crack9="EB 46"

[IndoorSpells]
description="Cast Harmony indoors."
Version="2005.07.13"
address0=4A5255
normal0="75 13"
crack0="90 90"

[Languages]
Description="Read/Speak all languages."
version="2005.07.13"
address0=45E31F
normal0="0F B6 84 01 08 01 00 00"
crack0="B8 FC 00 00 00 90 90 90"
address1=45E356
normal1="77"
crack1="EB"

[MobHP]
Description="NPC Health over their head"
Version="2005.07.13"
address0=4848ad
normal0="0F 84 83 00 00 00"
crack0="90 90 90 90 90 90"


[NoAutoTarget]
Description="Stop from auto targeting mobs that hit you."
Version="2005.07.13"
address0=4D434C
normal0="89 3D A0 91 92 00"
crack0="90 90 90 90 90 90"

[NoMeleePushBack]
Version="2005.07.13"
Description="No being pushed around by getting melee hits."
Address0=487229
Normal0="D9 5F 3C"
Crack0="90 90 90"
Address1=487244
Normal1="D9 5F 40"
Crack1="90 90 90"
Address2=48725F
Normal2="D9 5F 44"
Crack2="90 90 90"

[ShowSpells2]
Description="Show spells as text - GroupLeader."
Version="2005.07.13"
address0=4C8EC6
normal0="75"
crack0="EB"





[Settings]
Top=470
Bottom=1024
Left=751
Right=922
Locked=0
WindowTitle=MQ2DoCrack
Fades=1
Delay=0
Duration=500
Alpha=255
FadeToAlpha=255
BGType=1
BGTint.red=255
BGTint.green=255
BGTint.blue=255
 
Last edited:
Well... just didnt bother compiling on my own.... maybe i should though. Used your .dll, and was getting an eqgame.exe error, and plugin wouldn't load. It doesnt crash to desktop, just pops up a dialogue box with the error. If you'd like I can take a windows screeshot and just attach the dialog box if you need to see it.
 
This is the error:

The procedure entry point ?wndNotification@CSidScreenWnd@EQClasses@@AEHAVCXWnd@2@_IPAX@Z could not be located in dynamic link library MQ2Main.dll.

Now that I think about it I might not have loaded the .ini I just loaded the .dll
 
if you can, attatch a debugger and give us what the debugger points to as well as 2-3 lines above and below
 
I had that same error, but the source i posted fixed it.. or the .dll should work.. mine works fine etc..

Make sure you are using current mq2zip off mq2site.
 
I am still gettin this error when going to load mq2docrack :

The procedure entry point ?wndNotification@CSidScreenWnd@EQClasses@@AEHAVCXW nd@2@_IPAX@Z could not be located in dynamic link library MQ2Main.dll

Anyone know how to get it to work? thnx :confused: :confused:
 
What I did to finally get it to work is I didnt down load the dll I just copied everything off tones post and pasted it into sid's dll file on his compile. Now it works. Wouldnt work no matter what I tried saving Tones dll right to my folder.
 
If you are getting problems with the .dll that I uploaded try downloading the folder in the same post that I just added it has the .dll with ini already made... I think it might be a problem in just uploading the .dll
 
anyone got the new offset for "no 3 min" so you dont get booted from PoP zones ect. Thanks
 
[UltraVision]
Description="Ultra vision"
Version="2005.04.12"
address0=446E12
normal0="74 07"
crack0="90 90"
 
[SeeInvis]
Description="See Invisible"
Version="2005.04.12"
address0=47ED12
normal0="E8 EE 7B 01 00"
crack0="B0 01 90 90 90"

[no3min]
Description="No boot from PoP zones"
Version="2005.04.12"
address0=45F36D
normal0="75 38"
crack0="EB 38"
 
you just add the

[UltraVision]
Description="Ultra vision"
Version="2005.04.12"
address0=446E12
normal0="74 07"
crack0="90 90"

straight to the ini right? I'm still very new to mq :)
Thanks in advance!
~bue
 
don't have to edit the .dll then? i tried to dl visualstuidos but after i dl'd it, didn't even get to open it, i couldn't open the folder where it was without my comp crashing.... not sure why, had to go into safe mode to delete the file =/ oh's well, i'll just leave the compiling to the bigdawgs :)
 
No, no need to edit the .dll file. Very nice and convenient. In fact, using the gui you can even edit the .ini and press the "Load .ini" button at bottom of the DoCrack gui and load in changes on the fly.
 
awsome, that's great! I finally got it up and running today... it was awsome, I saw everything on the map!! was going to do the nostun thing while i was grouped, but didn't know how well that would go over or if someone would catch it, don't wanna press my luck just yet. I also kept getting booted when I tried to load one of the ini's... don't remember which one, i think it was see everything or something to that effect... couldn't even look at it or else I'd crash to DT.
 
It's an old warrior ability you absorb part of the damage that the person your shielding is taking.
 
playing a warrior for 6 years now i know that hehe
im wondering since we can already type /shield to shield someone, why type /docrack shield on just to do what we can do by typing /shield, does this let any class do a warrior shield?
 
hey i put the .dll in my release folder, fired up macroquest, lets me plugin all other plugins but when i try to /plugin mq2docrack it doesnt let me, could i get some help on this? is something wrong with it?
 
I'm getting an error as well when I try to load the docrack plugin. The error says:


The procedure entry point
??0CSidlScreenWnd@EQClasses@@QAE@PAVCXWnd@VCXStr@1@HPAD@Z could not be located in the dynamic link library MQ2Main.dll

Is there a change I have to make to MQ2Main.dll in order to get it to function?
 
Click on the new docrack.zip and try that .dll should work if it doesn't lemme know. Also added new source (file !.zip).
 
The ini file show offsets to be the same as 5-12 are theses the up todate ones? date today being 5-17 ?
 
Offset update. CTD Fixed.

[EnviroFall]
Description="No Fall + No Enviro (by Psychotik)"
Version="2005.05.12"
address0=49CB56
normal0="55 8D AC"
crack0="C2 18 00"
 
I have downloaded the DLL and the new INI file, and for some reason in the Game it iwill not load for me, this is what I am typing


/plugin MQ2DoCrack

if I remember correct this is the error I am getting

unable to load mq2docrack

please let me know if you know what I am doing wrong
thanks
db

BTW i had it working before patch
 
i would lov to see some sort of guide on how i would go about finding my own offsets
 
i got the same issue this morning on the my slow comp and my fast comp, however on my slow comp i also get the error of unable to find insertion acess point... or something like that was running late for work so didn't get to write it down unfortunatly
 
Updated and Working mq2docrack with .ini included

Users who are viewing this thread

Back
Top
Cart