• 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

MQ2race toubles.

Pugs

Member
Joined
Feb 6, 2005
RedCents
654¢
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