• Hail, we're RedGuides. We want you to play six (yes, 6!) EverQuest characters at once. We have scripts and a friendly community to help, please join our playstyle and say hello! 👋
  • We've added LLM sections to our Terms & Rules and Resource Rules, for everyone's sanity & in-game safety.
    Read more
    a. Do not replace your voice with an LLM. This goes for your posts and your scripts. Drafting and editing with a tool is fine, but don't take you out of what you share.
    b. Do not replace your EQ character's voice with an LLM. We don't want scripts that speak over /ooc, /shout or other public channels. This has been an unwritten rule that's kept casino scripts off the site for decades, but we're now compelled to make it clear: keep automated communication private.

    Why Does RG Review Scripts?
    Nearly every LLM-written Lua script we see is making your character do impossible things, and rarely in a way that's beneficial to you. We've seen heavy server hammering, /target over impossible distances when /nav spawn would passively accomplish the same thing, a spawn search that fires 20+ times per second, and other pointless actions that are likely annoying GMs.

    You are welcome to use LLMs as a tool to structure, draft, and edit your work, but please read critically before hitting /lua run

EMU Mq2Clipper

HardOne

Member
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