• Hail, we're RedGuides. We want you to play six (yes, 6!) EverQuest characters at once. We have scripts and a friendly community to help, please join our playstyle and say hello! 👋
  • We've added LLM sections to our Terms & Rules and Resource Rules, for everyone's sanity & in-game safety.
    Read more
    a. Do not replace your voice with an LLM. This goes for your posts and your scripts. Drafting and editing with a tool is fine, but don't take you out of what you share.
    b. Do not replace your EQ character's voice with an LLM. We don't want scripts that speak over /ooc, /shout or other public channels. This has been an unwritten rule that's kept casino scripts off the site for decades, but we're now compelled to make it clear: keep automated communication private.

    Why Does RG Review Scripts?
    Nearly every LLM-written Lua script we see is making your character do impossible things, and rarely in a way that's beneficial to you. We've seen heavy server hammering, /target over impossible distances when /nav spawn would passively accomplish the same thing, a spawn search that fires 20+ times per second, and other pointless actions that are likely annoying GMs.

    You are welcome to use LLMs as a tool to structure, draft, and edit your work, but please read critically before hitting /lua run

Release MQ2Reward [Deleted]

Status
Not open for further replies.

EQManiac

Member
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.
 
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.
 
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