/face not working on European servers

Need help running MacroQuest 1? Too bad! Use MQ2.

Moderator: MacroQuest Developers

Rodriguez
decaying skeleton
decaying skeleton
Posts: 4
Joined: Thu Sep 18, 2003 11:50 am

/face not working on European servers

Post by Rodriguez » Thu Sep 18, 2003 11:57 am

Hello,

I edited EQlibs_hook.cpp's strings to match my language, then compiled and ran MacroQuest fine on Sebilis (french) server.

The basic /who npc and /target commands work fine too, however the /face command doesn't work at all.
It doesn't pop up the "Change your character's face" window tough, so I guess it's only half broken.

Also, I can't get to run any macros, I keep getting the dreaded "The current macro has ended." message everytime.

Am I doing something wrong ? :roll:

Current ini file is the latest from IRC-latest.zip (fresh download).

Thanks for your help!

Jaerin
Developer
Developer
Posts: 133
Joined: Mon Mar 10, 2003 7:37 pm
Contact:

Post by Jaerin » Thu Sep 18, 2003 8:15 pm

LOL...the /face command turns you to face your current target.

Jaerin

Valerian
a grimling bloodguard
a grimling bloodguard
Posts: 709
Joined: Sun Jul 28, 2002 3:29 am

Post by Valerian » Thu Sep 18, 2003 8:52 pm

if you want to change your facial features, try /facepick (the actual full command name)

I know, it sounds more like you're picking your nose, but hey... SOE did it, not me!

fryfrog
a hill giant
a hill giant
Posts: 271
Joined: Fri Jun 20, 2003 5:37 am

Post by fryfrog » Fri Sep 19, 2003 12:35 am

I think he was just pointing out that since it didn't pop up the change your face window, that eq was not getting the /face command and trying to interpret it as /facepick. I think it was more to point out that the /face (to face tward a target) doesn't do anything and that its not because eq is interpreting the command (rather than mq).

Rodriguez
decaying skeleton
decaying skeleton
Posts: 4
Joined: Thu Sep 18, 2003 11:50 am

Post by Rodriguez » Fri Sep 19, 2003 9:25 am

Thanks Fryfrog, that is what I meant to say.

Sorry for the confusion folks, I should not have talked about the /facepick stuff ;)

MQ loads fine and /who npc and /target works fine, but /face doesn't turn me to my current target. It does nothing at all.

I play on Sebilis (french) server.

Mckorr
Developer
Developer
Posts: 2326
Joined: Fri Oct 18, 2002 1:16 pm
Location: Texas

Post by Mckorr » Fri Sep 19, 2003 2:39 pm

Well, there's your problem: French server.

On French servers /face immediately faces you towards Paris, so invaders know which way to go. It compliments the other French MQ command, /surrender.
MQ2: Think of it as Evolution in action.

Valerian
a grimling bloodguard
a grimling bloodguard
Posts: 709
Joined: Sun Jul 28, 2002 3:29 am

Post by Valerian » Fri Sep 19, 2003 6:50 pm

ROFL!! :lol: :lol: :lol: :lol: :twisted: :twisted: :lol: :lol: :lol: :lol:

Rodriguez
decaying skeleton
decaying skeleton
Posts: 4
Joined: Thu Sep 18, 2003 11:50 am

Post by Rodriguez » Fri Sep 19, 2003 8:40 pm

Nice one ;)

User avatar
dont_know_at_all
Developer
Developer
Posts: 5450
Joined: Sun Dec 01, 2002 4:15 am
Location: Florida, USA
Contact:

Post by dont_know_at_all » Fri Sep 19, 2003 10:09 pm

Je ne pense pas qui est drôle.

Est-il qu'un membre de votre famille est mort pendant une invasion?

Rodriguez
decaying skeleton
decaying skeleton
Posts: 4
Joined: Thu Sep 18, 2003 11:50 am

Post by Rodriguez » Sat Sep 20, 2003 10:59 am

Actually that kind of joke doesn't make me laugh.


Any idea with the /face issue, though?
Last edited by Rodriguez on Sun Sep 21, 2003 12:39 pm, edited 1 time in total.

Rand
a lesser mummy
a lesser mummy
Posts: 44
Joined: Sun Jun 08, 2003 8:37 am

Post by Rand » Sun Sep 21, 2003 10:22 am

Easy Rodrigez

No need to go berserk.


/face works fine for me with my current build. I ll dl the last zip and see what we need to change.

Edit : well, /face does some really strange things ...
I ll look into it.

Rand
a lesser mummy
a lesser mummy
Posts: 44
Joined: Sun Jun 08, 2003 8:37 am

Post by Rand » Tue Sep 30, 2003 2:19 pm

I forgot to reply but I fixed it.

Somehow on our server the detour is called for keyboard only when you use you keyboard. So pulse() was called only when you pressed a key and we have our strange behaviour.

I really don t understand why it does not work the same way than the us version since it the same code ( only compile time change ) ...

My fix is a fast ugly fix. Kbd event don t work (any idea ? ) but mouse and macro does.


Code: Select all

HRESULT (__stdcall *DInputDataTrampoline)(IDirectInputDevice8A* This, DWORD cbObjectData, LPDIDEVICEOBJECTDATA rgdod, LPDWORD pdwInOut, DWORD dwFlags); 
HRESULT __stdcall DInputDataDetour(IDirectInputDevice8A* This, DWORD cbObjectData, LPDIDEVICEOBJECTDATA rgdod, LPDWORD pdwInOut, DWORD dwFlags) 
{ 
	gbInDInput = TRUE; 
	HRESULT hResult = 0; 
	PKEYPRESS pNext = NULL; 
	DWORD didAdd = 0; 
	BOOL bLoop; 
	BOOL bRemoveItem = FALSE; 
	DWORD dwInOutSave = *pdwInOut; 
	static DWORD dwTimeStamp = 0; 
	static DWORD dwSequence   = 0; 
	static DWORD LastGetTick = 0; 


	if (!gbUnload) 
	{ 
		if (!gKeyStack)
		{
			//DebugSpewAlways("DInputDataDetour::GetTickCount");
			DWORD Tick = GetTickCount(); 
			if (Tick<LastGetTick) LastGetTick=Tick; 
			while (Tick>LastGetTick+100) { 
				LastGetTick+=100; 
				if (gDelay>0) gDelay--; 
				if (gDelayZoning>0)   gDelayZoning--; 
				DropTimers(); 
			} 
			bRunNextCommand   = TRUE; 
			DWORD CurTurbo=0; 
			while ((!gKeyStack)   && (bRunNextCommand)) { 
				//DebugSpewAlways("DInputDataDetour::Pulse"); 
				bRunNextCommand   = FALSE; 
				Pulse(); 
				if (!gTurbo) bRunNextCommand = FALSE; 
				if (++CurTurbo>gMaxTurbo) bRunNextCommand =   FALSE; 
			} 
		} 
		if   (EQADDR_DIKEYBOARD && (This   == *EQADDR_DIKEYBOARD)) 
		{
			DebugSpewAlways("DInputDataDetour::Keyboard pdwInOut = %lu", *pdwInOut);
			
			if (*pdwInOut >   0) 
			{ 
				
				if (gKeyStack) 
				{ 
					DebugSpewAlways("DInputDataDetour::KeyStack");    

					pNext =   gKeyStack->pNext; 
					//DebugSpew("Faking   '%s' as   %s...",gDiKeyID[gKeyStack->KeyId].szName,(gKeyStack->Pressed)?"down":"up"); 
					rgdod[didAdd].dwOfs   = gDiKeyID[gKeyStack->KeyId].Id; 
					rgdod[didAdd].dwData = (gKeyStack->Pressed)?0x80:0; 
					rgdod[didAdd].dwSequence = dwSequence; 
					rgdod[didAdd].dwTimeStamp =   dwTimeStamp; 
					rgdod[didAdd].uAppData = 0; 
					(*pdwInOut)--; 
					free(gKeyStack); 
					gKeyStack =   pNext; 
					didAdd++; 

					(*pdwInOut)   = didAdd; 
					gbInDInput = FALSE; 
					return (HRESULT)DI_OK; 
				} 
				

			} 
		}else if (EQADDR_DIMOUSE && (This == *EQADDR_DIMOUSE)) 
		{ 

			if (*pdwInOut >   0) 
			{ 
				if (gKeyStack) 
				{ 
					DebugSpewAlways("DInputDataDetour::KeyStack");    

					pNext =   gKeyStack->pNext; 
					//DebugSpew("Faking   '%s' as   %s...",gDiKeyID[gKeyStack->KeyId].szName,(gKeyStack->Pressed)?"down":"up"); 
					rgdod[didAdd].dwOfs   = gDiKeyID[gKeyStack->KeyId].Id; 
					rgdod[didAdd].dwData = (gKeyStack->Pressed)?0x80:0; 
					rgdod[didAdd].dwSequence = dwSequence; 
					rgdod[didAdd].dwTimeStamp =   dwTimeStamp; 
					rgdod[didAdd].uAppData = 0; 
					(*pdwInOut)--; 
					free(gKeyStack); 
					gKeyStack =   pNext; 
					didAdd++; 

					(*pdwInOut)   = didAdd; 
					gbInDInput = FALSE; 
					return (HRESULT)DI_OK; 
				}
			}


			//DebugSpewAlways("DInputDataDetour::Mouse pdwInOut = %lu", *pdwInOut);
			// If we are waiting for a click-event to be confirmed by EQ, don't 
			// pull any data, just return DI_OK and set the pdwInOut value to 0 
			if (IsMouseWaitingForButton()) 
			{ 
				hResult   = DI_OK; 
				*pdwInOut =   0; 
				gbInDInput   = FALSE; 
				return hResult;    
			} 

			if (EQADDR_MOUSE && gMouseData) { 
				*pdwInOut = 0; 
				//            PMOUSEINFO MouseInfo = EQADDR_MOUSE; 
				bLoop = TRUE; 
				while ((bLoop == TRUE) && (gMouseData)) { 
					bRemoveItem = TRUE; 
					if (*pdwInOut < dwInOutSave) { 
						rgdod[*pdwInOut].dwSequence = dwSequence; 
						rgdod[*pdwInOut].dwTimeStamp = dwTimeStamp; 
						rgdod[0].uAppData = 0; 
						switch (gMouseData->mdType) { 
					 case MD_Button0Click: 
						 DebugSpew("Trying to click left button."); 
						 rgdod[*pdwInOut].dwData = 0x80; 
						 rgdod[*pdwInOut].dwOfs = DIMOFS_BUTTON0; 
						 gMouseData->mdType = MD_Button0; 
						 gMouseData->dwData = 0x00; 
						 bRemoveItem = FALSE; 
						 bLoop = FALSE; 
						 (*pdwInOut)++; 
						 break; 
					 case MD_Button1Click: 
						 DebugSpew("Trying to click right button."); 
						 rgdod[*pdwInOut].dwData = 0x80; 
						 rgdod[*pdwInOut].dwOfs = DIMOFS_BUTTON1; 
						 gMouseData->mdType = MD_Button1; 
						 gMouseData->dwData = 0x00; 
						 bRemoveItem = FALSE; 
						 bLoop = FALSE; 
						 (*pdwInOut)++; 
						 break; 
					 case MD_Button0: 
						 rgdod[*pdwInOut].dwData = gMouseData->dwData; 
						 rgdod[*pdwInOut].dwOfs = DIMOFS_BUTTON0; 
						 (*pdwInOut)++; 
						 break; 
					 case MD_Button1: 
						 rgdod[*pdwInOut].dwData = gMouseData->dwData; 
						 rgdod[*pdwInOut].dwOfs = DIMOFS_BUTTON1; 
						 (*pdwInOut)++; 
						 break; 
					 case MD_Unknown: 
						 break; 
						} 
						if (bRemoveItem==TRUE) { 
							PMOUSESPOOF pTemp = gMouseData; 
							gMouseData = gMouseData->pNext; 
							free(pTemp); 
						} 
					} else { 
						bLoop = FALSE; 
					} 
				} 
				gbInDInput = FALSE; 
				return (HRESULT)DI_OK; 
			} 
		} 
	}
	//DebugSpewAlways("DInputDataDetour::None pdwInOut = %lu", *pdwInOut);
	// If we didn't add any keyboard data, and we aren't waiting for a click, 
	// and we didn't add any mouse data 
	hResult = DInputDataTrampoline(This, cbObjectData, rgdod, pdwInOut, dwFlags); 
	if (gbUnload) { 
		gbInDInput = FALSE; 
		return hResult; 
	} 
	if (EQADDR_DIKEYBOARD && (This == *EQADDR_DIKEYBOARD) && EQADDR_NOTINCHATMODE && *EQADDR_NOTINCHATMODE && pHotkey) TestHotkeys(&(rgdod[didAdd]),*pdwInOut);
	gbInDInput = FALSE; 
	return hResult; 
}