• 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

MQ2race toubles.

Pugs

Member
Ok i have been working on this for a day or 2 now and think i got it but just have the wrong offset so if anyone could help me out with that it owuld be great. :o :o i don't know how to turely find them just used the one in the EQData.h file.

Rich (BB code):
#include "../MQ2Plugin.h"

PreSetup("MQ2Race");
class EQPLayer {
public:
void SetRace(int);
};
FUNCTION_AT_ADDRESS(void  EQPlayer::SetRace(int),0x0e14);
VOID RaceHack(PSPAWNINFO pChar, PCHAR szLine)
{
	char raceArg[MAX_STRING]={0};
	GetArg(raceArg,szLine,1);
	if (raceArg[0] !=0)
	if (ppTarget && pTarget)
	{
		PSPAWNINFO Target = (PSPAWNINFO)pTarget;
	{
		((EQPlayer*)Target)->SetRace((int)atof(raceArg));
	}
	}
}
PLUGIN_API VOID InitializePlugin(VOID)
{
	AddCommand("/race",RaceHack);
}
PLUGIN_API VOID ShutdownPlugin(VOID)
{
	RemoveCommand("/race");
 
/blink /blink

Assuming, from what you told me in IRC, this is clientside:

Rich (BB code):
#Include "../MQ2Plugin.h"

VOID RaceHack(PSPAWNINFO pChar, PCHAR szLine)
{
     char raceArg[MAX_STRING];
     GetArg(raceArg, szLine,1);
     if (!raceArg) {
          WriteChatColor("You must supply a race number!",CONCOLOR_GREEN);
     } else {
          PSPAWNINFO Target = (PSPAWNINFO)pTarget;
          pTarget->Race = ((int)atof(raceArg));
}

PLUGIN_API VOID InitializePlugin(VOID)
{
     AddCommand("/race",RaceHack);
}
PLUGIN_API VOID ShutdownPlugin(VOID)
{
     RemoveCommand("/race");
}

Written in the text box, untested and haven't tried compiling it.
 
MQ2Race.cpp(11) : error C2039: 'race' : is not a member of 'EQClasses::EQPlayer'

Not the first time i got that error that is why i tryed to do the fuction define at the top of mine.
 
MQ2race toubles.

Users who are viewing this thread

Back
Top
Cart