• 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

EMU Mq2Clipper

HardOne

Member
Joined
Jan 15, 2006
RedCents
61¢
Slightly edited by me version of MQ2Clipper.


Rich (BB code):
// MQ2Clipper.cpp : Defines the entry point for the DLL application. 
// 

// PLUGIN_API is only to be used for callbacks.  All existing callbacks at this time 
// are shown below. Remove the ones your plugin does not use.  Always use Initialize 
// and Shutdown for setup and cleanup, do NOT do it in DllMain. 



#include "../MQ2Plugin.h" 


PreSetup("MQ2Clipper"); 

VOID ClipReset(PSPAWNINFO pChar, PCHAR szLine); 
VOID ClipUp(PSPAWNINFO pChar, PCHAR szLine); 
VOID ClipDown(PSPAWNINFO pChar, PCHAR szLine); 
VOID BgClip(PSPAWNINFO pChar, PCHAR szLine); 
VOID FgClip(PSPAWNINFO pChar, PCHAR szLine); 

DWORD ClipLevel=402;
DWORD BgClipLevel=1; 
DWORD PMinClip=0;
DWORD PMaxClip=50000;

HMODULE EQWhMod=0; 
typedef HWND   (__stdcall *fEQW_GetDisplayWindow)(VOID); 
fEQW_GetDisplayWindow EQW_GetDisplayWindow=0; 

// Called once, when the plugin is to initialize 
PLUGIN_API VOID InitializePlugin(VOID) 
{ 
   DebugSpewAlways("Initializing MQ2Test"); 
   if (EQWhMod=GetModuleHandle("eqw.dll")) 
   { 
      EQW_GetDisplayWindow=(fEQW_GetDisplayWindow)GetProcAddress(EQWhMod,"EQW_GetDisplayWindow"); 
   } 


   // Add commands, MQ2Data items, hooks, etc. 
   // AddCommand("/mycommand",MyCommand); 
   AddCommand("/clipup",ClipUp,0,1); 
   AddCommand("/clipdown",ClipDown,0,1); 
   AddCommand("/clipreset",ClipReset,0,1);
   // AddXMLFile("MQUI_MyXMLFile.xml"); 
   // bmMyBenchmark=AddMQ2Benchmark("My Benchmark Name"); 
} 

// Called once, when the plugin is to shutdown 
PLUGIN_API VOID ShutdownPlugin(VOID) 
{ 
   DebugSpewAlways("Shutting down MQ2Test"); 

   // Remove commands, MQ2Data items, hooks, etc. 
   // RemoveMQ2Benchmark(bmMyBenchmark); 
   // RemoveCommand("/mycommand"); 
   RemoveCommand("/clipup"); 
   RemoveCommand("/clipdown"); 
   RemoveCommand("/clipreset"); 
   // RemoveXMLFile("MQUI_MyXMLFile.xml"); 
} 



// This is called every time MQ pulses 
PLUGIN_API VOID OnPulse(VOID) 
{ 


   HWND EQhWnd=*(HWND*)EQADDR_HWND; 
   if (EQW_GetDisplayWindow) 
      EQhWnd=EQW_GetDisplayWindow(); 

   if (GetForegroundWindow()==EQhWnd) { 
      ((PZONEINFO)pZoneInfo)->MinClip = ClipLevel; 
      ((PZONEINFO)pZoneInfo)->MaxClip = ClipLevel; 
   } else { 
      ((PZONEINFO)pZoneInfo)->MinClip = BgClipLevel; 
      ((PZONEINFO)pZoneInfo)->MaxClip = BgClipLevel; 
   } 
} 

VOID ClipUp(PSPAWNINFO pChar, PCHAR szLine) 
{ 
if (ClipLevel>PMinClip) 
   ClipLevel = ClipLevel + 100; 
} 

VOID ClipDown(PSPAWNINFO pChar, PCHAR szLine) 
{ 
if (ClipLevel<PMaxClip) 
   ClipLevel = ClipLevel - 100; 
}

VOID ClipReset(PSPAWNINFO pChar, PCHAR szLine) 
{
   ClipLevel = 402; 
}
 
Last edited:
EMU Mq2Clipper

Users who are viewing this thread

Back
Top
Cart