Plugin: MQ2HoverInfo

Fry

Fry Guy
Joined
Jan 31, 2005
Messages
11,859
Reaction score
586
Points
113
Location
Australia
Website
www.mmobugs.com
Plugin: MQ2HoverInfo - Adds classname and level to pc/npcs on your mouse cursor when you hover over target.

Author: KitchenTable

This plugin can be found bundled in our MMOBugs compile, or feel free to download it seperatley for your use here (Current version: Dec 15, 2006)

Code:
#include "../MQ2Plugin.h"


PreSetup("MQ2HoverInfo");

DWORD oldX = 0, oldY = 0;
BOOL MouseHover = 0;
DWORD Time = 0;

#define pMousePos EQADDR_MOUSE

#define DelayMs 500


PLUGIN_API VOID InitializePlugin(VOID)
{   
   DebugSpewAlways("Initializing MQ2HoverInfo");

}

PLUGIN_API VOID ShutdownPlugin(VOID)
{
   DebugSpewAlways("Shutting down MQ2HoverInfo");
   
}

PLUGIN_API VOID OnDrawHUD(VOID)
{
	if (gGameState==GAMESTATE_INGAME) {
   EQPlayer* pPlayer = pEverQuest->ClickedPlayer(pMousePos->X, pMousePos->Y);

   if (pPlayer && !*pMouseLook && MouseHover)
   {
      CHAR szTemp[MAX_STRING] = {0};
      sprintf(szTemp, "%s\n%i %s", pPlayer->Data.DisplayedName, pPlayer->Data.Level, pEverQuest->GetClassThreeLetterCode(pPlayer->Data.Class));
       
      pDisplay->WriteTextHD2(szTemp,pMousePos->X + 18,pMousePos->Y - 4,0x0);
      pDisplay->WriteTextHD2(szTemp,pMousePos->X + 17,pMousePos->Y - 5,0xa);
   }
	}
}



PLUGIN_API VOID OnPulse(VOID)
{
   if (gGameState != GAMESTATE_INGAME)
      return;

   if (oldX != pMousePos->X || oldY != pMousePos->Y)
   {
      MouseHover = FALSE;
      oldX = pMousePos->X;
      oldY = pMousePos->Y;

      Time = GetCharInfo()->pSpawn->TimeStamp;
   }

   if (GetCharInfo()->pSpawn->TimeStamp - Time > DelayMs)
   {
      MouseHover = TRUE;
   }
}
 

Attachments

  • MQ2HoverInfo.dll
    120 KB · Views: 28
Last edited:
Thinking that I'm missing something easy.
Is there a way to move the hover info over some? I have a fairly large mouse cursor (uh-huh) and it covers the level of the mob almost completely.
 
It would require a recompile of the plugin, the way it's currently coded anyway. Look at these 2 lines:

Code:
      pDisplay->WriteTextHD2(szTemp,pMousePos->X + 18,pMousePos->Y - 4,0x0);
      pDisplay->WriteTextHD2(szTemp,pMousePos->X + 17,pMousePos->Y - 5,0xa);

Change the values for X (18, 17) and Y (4, 5) to get it where you want it.

htw
 
Working on a new version of this that I'll put out soon that includes some more useful features I'm sure you'll enjoy... something like a WoW-style tooltip
 
any way to make it to where it can also show current HP? to help with soloing mobs its nice to know thier current HP just as much as the LVL and Class :) :confused:
 
not working since June24,2009 patch.

Plugin loads, but no data..have tried closing other chat boxes, etc, but no workie...ideas?
 
;Default settings for the plugin, if no ini, are:
;OffsetY=4
;OffsetX=17
;Delay=500
;Color=0x0a
;Shadow=on
;ShadowColor=0x00

[Settings]
OffsetY=6
OffsetX=22
Delay=500
Color=0x0f
Shadow=on
ShadowColor=0x00

;Use a dec or hex value for Color and/or ShadowColor
;Examples for color (see MQ2Main\EQData.h for more info)
;Default = 0x00
;Dark Gray = 0x01
;Dark Green = 0x02
;Dark Blue = 0x03
;Blue = 0x04
;Purple = 0x05
;Light Gray = 0x06
;White = 0x0a
;Red = 0x0d
;Yellow = 0x0f
;Light Blue = 0x12
;Black = 0x14
;Your 'say' color = 0x100
;Your 'tell' color = 0x101
;Your 'group' color = 0x102
;Your 'guild' color = 0x103
;Your 'ooc' color = 0x104
;Your 'spell worn off' color = 0x11C
 
are you sure you understand what this plugin does?
 
I just copied and pasted what HTW requested: info in my MQ2Hoverinfo INI...so that's what I did.
Honest question, thanks for the helpful response.
 
While it's necro rezzed, just wanted to say...one of the best plugs in the compile.
 
Hey, thanks for the feedback.

Are there any features that you think would make this plugin more useful if they were added?
 
Hey, thanks for the feedback.

Are there any features that you think would make this plugin more useful if they were added?

Maybe say if the mob is undead / living. Also, a tag for humanoid would be nice for headshotters.