Page 1 of 1

UseItemCmd referenced by ISXEQ source but not defined

Posted: Wed May 13, 2015 8:13 pm
by rlane187
MQ2Utilities.cpp, when compiling ISXEQ uses this function.

Code: Select all

DWORD __stdcall RefreshMountKeyRingThread(PVOID pData)
{
	pkrdata kr = (pkrdata)pData;
	if(kr) {
		CXWnd *krwnd = kr->phWnd;
		bool bExact = kr->bExact;
		bool bUseCmd = kr->bUseCmd;
		CHAR szItemName[256] = {0};
		strcpy_s(szItemName,kr->ItemName);
		LocalFree(kr);
		if(krwnd) {
			bool bToggled = 0;
			if(!krwnd->dShow) {
				bToggled = true;
				DWORD ShowWindow = (DWORD)krwnd->pvfTable->ShowWindow;
				__asm {
					push ecx;
					mov ecx, [krwnd];
					call dword ptr [ShowWindow];
					pop ecx;
				}
				((CSidlScreenWnd*)krwnd)->StoreIniVis();
			}
			if(CTabWnd *pTab = (CTabWnd*)((CSidlScreenWnd*)(krwnd))->GetChildItem("IW_Subwindows")) {
				pTab->SetPage(6,true, true);//tab 6 is the mount key ring tab...
				gMouseEventTime = GetFastTime();
			}
			if(CListWnd *clist = (CListWnd*)krwnd->GetChildItem("IW_Mounts_MountList")) {
				ULONGLONG now = MQGetTickCount64();
				while(!((CSidlScreenWnd*)clist)->Items) {
					Sleep(10);
					if(now+5000 < MQGetTickCount64()) {
						WriteChatColor("Timed out waiting for mount keyring refresh",CONCOLOR_YELLOW);
						break;
					}				
				}
				if(bToggled) {
					((CXWnd*)krwnd)->Show(0,1);
					((CSidlScreenWnd*)krwnd)->StoreIniVis();
				}
				if(bUseCmd && ((CSidlScreenWnd*)clist)->Items) {
				        UseItemCmd(GetCharInfo()->pSpawn,szItemName);
				}
			}
		}
	}
	return 0;
}
The offending line is:

Code: Select all

UseItemCmd(GetCharInfo()->pSpawn,szItemName);
UseItemCmd is not defined in ISXEQ. I do not know why. You would think /useitem would be accessible in ISXEQ but alas, none of the / commands are defined in MQ2Commands. The entire file is greyed out in intellisense. Why?

Re: UseItemCmd referenced by ISXEQ source but not defined

Posted: Tue May 19, 2015 6:01 pm
by EqMule
don't know if it works now but latest zip should at least build without errors

Re: UseItemCmd referenced by ISXEQ source but not defined

Posted: Wed May 20, 2015 3:33 pm
by iluvseq
/useitem isn't needed in ISXEQ.

Instead, use /cast item "name of item"

Does the same thing.

High Rated Interior Design Blog

Posted: Thu Aug 10, 2023 11:03 pm
by FrankJScott
Why don't you Google it! before you post

High Rated Interior Design Blog

Posted: Fri Aug 11, 2023 1:21 am
by FrankJScott
Why don't you Google it! before you post