• You've discovered RedGuides, an EverQuest multi-boxing and scripting community 🧙‍♀️⚙️. We want you to play several EQ characters at once, come join us and say hello! 👋

  • A TLP without truebox has thawed (Very Vanilla ready)
    Frostreaver

Release MQ2Reward [Deleted]

Status
Not open for further replies.

EQManiac

Member
Joined
Jan 29, 2006
RedCents
31¢
For those who have ben trying to use the /notify with the rewards window you will have noticed what a PITA it is.

The problem with the window is the fact that the number of tabs are dynamic. The tab template in the XML is actually nothing mmore then a class definition and is left blank in the client to be used as a template. Copies of this window are spawned off and added to the tab window as needed. Once created they remain in memory until the UI is reloaded.

To get around this oddness I have thrown together this plugin so we have basic functionality. I wanted to add an ini based list to identify the task and the preffered reward, but there is not currently a way to identify the task/reward combo to enable this (missing an offset to read the tab text).

This plugin adds the command
/reward <optionNumber>

If no option number is specified it will default to option one.

The plugin is still in the rough stages and hasn't been refined yet so don't expect much :)

Rich (BB code):
// MQ2Reward.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.

// Original by: MstrGareth

#include "../MQ2Plugin.h"
PreSetup("MQ2Reward");

VOID AutoReward(PSPAWNINFO pChar, PCHAR szLine)
{
	CXWnd *WorkingWnd;
    int OptionNumber;

   CHAR *z[2]; 
   int y; 
   z[0] = szLine; 
   for (y = 1; *szLine != '\0'; ) { 
      if (*szLine == ' ') { 
         *szLine = '\0'; 
         z[y++] = ++szLine; 
         break; 
      } else { 
         szLine++; 
      } 
   } 

	if (!strcmp(strupr(z[0]),"HELP"))
	{
		WriteChatColor("Usage: /reward <optionNumber>",111111);
		return;
	}
	OptionNumber=(int)atoi(z[0]);
	if (OptionNumber==0) OptionNumber=1;

	//           Parent                               TabWind             PageTemplate1
	WorkingWnd = FindMQ2Window("RewardSelectionWnd")->GetFirstChildWnd()->GetFirstChildWnd();
	WorkingWnd=WorkingWnd->GetNextSib();  // assume first page is always empty template
	while(WorkingWnd)
	{
		if(CXWnd *ChildWnd=WorkingWnd->GetChildItem("RewardSelectionChooseButton")) {


			CListWnd *pList=(CListWnd*)((CSidlScreenWnd*)(WorkingWnd))->GetChildItem("RewardSelectionOptionList");
			if (!pList)
			{
				//if (pList->IsLineEnabled(OptionNumber))
				//{
				    pList->SetCurSel(OptionNumber);
				//} else {
				//	WriteChatColor("/Reward, Invalid option number specified!",111111);
				//	return;
				//}
			}

			DebugTry(CXRect rect=ChildWnd->GetScreenRect());
			DebugTry(CXPoint pt=rect.CenterPoint());
			DebugTry(ChildWnd->HandleLButtonDown(&pt,0));
			DebugTry(ChildWnd->HandleLButtonUp(&pt,0));
		}
		WorkingWnd=WorkingWnd->GetNextSib();
	}
}

PLUGIN_API VOID InitializePlugin(VOID)
{
	AddCommand("/reward",AutoReward);
}
PLUGIN_API VOID ShutdownPlugin(VOID)
{
	RemoveCommand("/reward");
}
 
Any chance you can compile this real fast Maniac? I removed my Studio 6 a long time ago. If not I will reinstall.
 
DLL posted...

Maniac, if you don't want it up, just say the word and it's gone.

Great work, btw. Been trying to do this and not been able to. F'ing SOE windows....*grumble grumble Generel sucks grumble grumble*
 
Thanks thez and thanks Maniac.

I was just dusting off and installing VS6 again lol.

And was opening all my how-to's on compiling.

Thanks for source and dll, gonna keep VS on the system tho, for occasions just like this.
 
Np with the DLL.

This is the only window I know of that has this problem (dynamic tab generation).
 
I have a macro that badly needed this, and now that it's up, I finally have a reason to spruce it up some and fix the bugs.
 
Got a task where I can easily get a reward that has two options?

I need something to test with :)
 
Excellent work in progress!

The /reward # command always selects item number one on the list, even though # is higher than 1.

For simplicity, is it possible to create another version of the plugin that always selects option 2 ?

Regards

Z
 
MQ2Reward - Is a plugin that allows you to select a task reward.

Commands:
/reward <number> Selects a task reward.

Example:
/reward 1 -This command would choose the reward # 1
 
Last edited:
Release MQ2Reward [Deleted]
Status
Not open for further replies.

Users who are viewing this thread

Back
Top
Cart