FEAT REQ: /rtarg

A forum for feature requests/discussions and user submitted patches that improve MQ2

Moderator: MacroQuest Developers

MSMage
a lesser mummy
a lesser mummy
Posts: 37
Joined: Sun Aug 03, 2003 3:14 am

FEAT REQ: /rtarg

Post by MSMage » Fri Oct 03, 2003 11:00 pm

Was wondering if its possible to have /Rtarget function as target does under MQ.
MSMage

Plazmic
The One
The One
Posts: 800
Joined: Fri Jun 14, 2002 12:31 am
Contact:

Post by Plazmic » Fri Oct 03, 2003 11:05 pm

I don't want to tweak /Rtarget...
I know people use it for checking if someone is in buff range during raids
- Plazmic

User avatar
Kint
a hill giant
a hill giant
Posts: 208
Joined: Thu Mar 13, 2003 3:36 am

Post by Kint » Sat Oct 04, 2003 2:42 am

maybe a /rtt with extended range? or /rt with extended and rtt with buff range stuff

Plazmic
The One
The One
Posts: 800
Joined: Fri Jun 14, 2002 12:31 am
Contact:

Post by Plazmic » Sat Oct 04, 2003 3:03 am

How about:

Code: Select all

/alias /rtt /target "$lasttell"
- Plazmic

MSMage
a lesser mummy
a lesser mummy
Posts: 37
Joined: Sun Aug 03, 2003 3:14 am

Post by MSMage » Sat Oct 04, 2003 8:05 am

Just tried that, my "$lasttell" is adding a y to the the end of everything, making it unable to target anything at all that way.
MSMage

prh
orc pawn
orc pawn
Posts: 12
Joined: Sat Oct 04, 2003 3:18 pm

Post by prh » Sat Oct 04, 2003 3:23 pm

There's a bug in the code that sets the gLastTell..

It copies the name correctly onto the buffer but it does not terminate the name with a 0 after, so other names from before willl partially appear after the new one..

This can be fixed by adding..

*(gLastTell+((DWORD)(strstr(szMsg," tells you, '")-szMsg))) = 0;

after strncpy(gLastTell,szMsg,(DWORD)(strstr(szMsg," tells you, '")-szMsg));

In the method VOID Detour(PCHAR szMsg, DWORD dwColor, DWORD dwUnknown) in EQLib_Hooks.cpp

MSMage
a lesser mummy
a lesser mummy
Posts: 37
Joined: Sun Aug 03, 2003 3:14 am

Post by MSMage » Sun Oct 05, 2003 1:30 pm

Ok, think ive found the area that you mean, just wondering how this:

Code: Select all

	VOID Detour(PCHAR szMsg, DWORD dwColor, DWORD dwUnknown) 
	{ 
		DebugSpew("CChatHook::Detour(%s)",szMsg); 
		gbInChat = TRUE; 
		if ((!strncmp(szMsg,"You have entered ",17)) || (strstr(szMsg," saved."))) { 
			if (gZoning) { 
				gDelayZoning += gZoneDelay; 
				gZoning=FALSE; 
			} 
			gbInGame=TRUE; 
		} else if (!strcmp(szMsg,"Welcome to EverQuest!")) {
			gbDoAutoRun=TRUE;
		} else if (strstr(szMsg," tells you, '")) { 
			strncpy(gLastTell,szMsg,(DWORD)(strstr(szMsg," tells you, '")-szMsg));
		} 
Should look when im done.
MSMage

prh
orc pawn
orc pawn
Posts: 12
Joined: Sat Oct 04, 2003 3:18 pm

Post by prh » Sun Oct 05, 2003 4:09 pm

Yes, change it to..

Code: Select all

	VOID Detour(PCHAR szMsg, DWORD dwColor, DWORD dwUnknown) 
	{ 
		DebugSpew("CChatHook::Detour(%s)",szMsg); 
		gbInChat = TRUE; 
		if ((!strncmp(szMsg,"You have entered ",17)) || (strstr(szMsg," saved."))) { 
			if (gZoning) { 
				gDelayZoning += gZoneDelay; 
				gZoning=FALSE; 
			} 
			gbInGame=TRUE; 
		} else if (!strcmp(szMsg,"Welcome to EverQuest!")) {
			gbDoAutoRun=TRUE;
		} else if (strstr(szMsg," tells you, '")) { 
			strncpy(gLastTell,szMsg,(DWORD)(strstr(szMsg," tells you, '")-szMsg)); 
			*(gLastTell+((DWORD)(strstr(szMsg," tells you, '")-szMsg))) = 0;
		} 

Plazmic
The One
The One
Posts: 800
Joined: Fri Jun 14, 2002 12:31 am
Contact:

Post by Plazmic » Sun Oct 05, 2003 4:17 pm

Don't change it... was fixed in 1004a as:

Code: Select all

      } else if (strstr(szMsg," tells you, '")) { 
[color=red]         ZeroMemory(gLastTell,MAX_STRING]);[/color]
         strncpy(gLastTell,szMsg,(DWORD)(strstr(szMsg," tells you, '")-szMsg)); 
      } 
- Plazmic

MSMage
a lesser mummy
a lesser mummy
Posts: 37
Joined: Sun Aug 03, 2003 3:14 am

Post by MSMage » Sun Oct 05, 2003 5:05 pm

Mine looks pretty much like this:

Code: Select all

   VOID Detour(PCHAR szMsg, DWORD dwColor, DWORD dwUnknown) 
   { 
      DebugSpew("CChatHook::Detour(%s)",szMsg); 
      gbInChat = TRUE; 
      if ((!strncmp(szMsg,"You have entered ",17)) || (strstr(szMsg," saved."))) { 
         if (gZoning) { 
            gDelayZoning += gZoneDelay; 
            gZoning=FALSE; 
         } 
         gbInGame=TRUE; 
      } else if (!strcmp(szMsg,"Welcome to EverQuest!")) { 
         gbDoAutoRun=TRUE; 
      } else if (strstr(szMsg," tells you, '")) { 
         strncpy(gLastTell,szMsg,(DWORD)(strstr(szMsg," tells you, '")-szMsg)); *(gLastTell+((DWORD)(strstr(szMsg," tells you, '")-szMsg))) = 0;
      } 
Doesnt seem to be affecting it adversely that it was already fixed, but ill keep it noted for when i next recompile.
MSMage

Plazmic
The One
The One
Posts: 800
Joined: Fri Jun 14, 2002 12:31 am
Contact:

Post by Plazmic » Sun Oct 05, 2003 5:12 pm

I'll be CVSing it as ZeroMemory... :P
- Plazmic

MSMage
a lesser mummy
a lesser mummy
Posts: 37
Joined: Sun Aug 03, 2003 3:14 am

Post by MSMage » Sun Oct 12, 2003 3:03 pm

Dunno if its been mentioned before, but $lasttell returns any "tells" that a pet sends to the master, and was wondering if theres a way to filter that out the way EQ does.
MSMage

Plazmic
The One
The One
Posts: 800
Joined: Fri Jun 14, 2002 12:31 am
Contact:

Post by Plazmic » Sun Oct 12, 2003 3:44 pm

Sometimes I wish I could serverfilter pet spam...
I'll fix this to not parse, and use EQ's last tell (10/9 offset: 6AE610)
- Plazmic