Plugin: MQ2Size

Fry

Fry Guy
Joined
Jan 31, 2005
Messages
11,860
Reaction score
587
Points
113
Location
Australia
Website
www.mmobugs.com
Current MQ2Size Plugin - Used To Change Size Of PC's And NPC's On Your Screen

Commands:
/size <number>

Code:
#include "../MQ2Plugin.h" 



PreSetup("MQ2Size"); 



VOID Size(PSPAWNINFO pChar, PCHAR szLine);
/**************/
/* Begin Size */
/**************/

/* Class function to change target size - Unknown Author */
class SizeClass { public: void SizeFunc(float);}; 
FUNCTION_AT_ADDRESS(void SizeClass::SizeFunc(float), SizeFuncOffset); 

/* Change size - Unknown */
VOID Size(PSPAWNINFO pChar, PCHAR szLine) 
{ 
	if ((strlen(szLine) != 0) && (ppTarget && pTarget))
	{
		PSPAWNINFO Target = (PSPAWNINFO)pTarget; 
		((SizeClass*)Target)->SizeFunc((float)atof(szLine)); 
	}
}

PLUGIN_API VOID InitializePlugin(VOID) 
{ 
	AddCommand("/size",Size);	
}

PLUGIN_API VOID ShutdownPlugin(VOID) 
{
	RemoveCommand("/size");
} 

// End Size
 
your target will shrink... if u want to shrink yourself.. just target yourself and type the command
 
hmm like /size 1 - 10 ??? ;)
 
1-98. If you go above 98, you will have to delete all of the .INI files from your EQ folder, then redo all of your settings...it seriously fuxxors things.

Personally, I'd recommend just hardcoding it into the source so that you can't go past 98.
 
Updated version with max size check. (Also removes the extra function and prototype class. - Thanks to Soulmonger for the tip many moons ago) :)

Code:
#include "../MQ2Plugin.h" 

PreSetup("MQ2Size"); 


VOID Size(PSPAWNINFO pChar, PCHAR szLine) 
{ 
	if ((strlen(szLine) != 0) && (ppTarget && pTarget))
	{
		PSPAWNINFO Target = (PSPAWNINFO)pTarget; 
		if ((float)atof(szLine) > 98)
			WriteChatf("You cannot make a size over 98..");
		else
			(((EQPlayer*)Target)->ChangeHeight((float)atof(szLine)));
	}
}

PLUGIN_API VOID InitializePlugin(VOID) 
{ 
	AddCommand("/size",Size);	
}

PLUGIN_API VOID ShutdownPlugin(VOID) 
{
	RemoveCommand("/size");
}
 
boooo

that stinks i thought it was fun, and funny to target self /size 300 and walk through Karnors like it was plane terrain lol
 
1-98. If you go above 98, you will have to delete all of the .INI files from your EQ folder, then redo all of your settings...it seriously fuxxors things.

Personally, I'd recommend just hardcoding it into the source so that you can't go past 98.

doesn't work for me, tried /size 1, /size 2, /size 98, everything crashes game.
 
this plugin used to work for me, not it gets me kicked from server. not good. :eek: