• 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

MQ2SetGrav

unknown405

Active member
Joined
Nov 17, 2006
RedCents
100¢
I was shocked that the RedGuides compile doesn't have MQ2SetGrav, so here's a plugin I just made. I don't use this one specifically, so let me know if it doesn't work.

Default Gravity: 0.4

Commands:
/setgravity <gravity>
/setgrav <gravity>
/setg <gravity>
Any of the above commands without <gravity> will tell you current gravity.


Rich (BB code):
//UnKnoWn

#include "../MQ2Plugin.h"

PreSetup("MQ2SetGrav");

VOID SetGrav(PSPAWNINFO pChar, PCHAR szLine) {

	CHAR sTemp[MAX_STRING] = {0};
	CHAR Arg1[MAX_STRING];

	GetArg(Arg1,szLine,1);

	bRunNextCommand = TRUE;

	if (Arg1[0]!=0)
		{
		((PZONEINFO)pZoneInfo)->ZoneGravity = (FLOAT)(atof(Arg1));
		sprintf(sTemp, "Gravity changed to: %3.2f",((PZONEINFO)pZoneInfo)->ZoneGravity);
		WriteChatColor(sTemp, CONCOLOR_YELLOW);
		sprintf(sTemp,""); 
		}
	else
		{
		sprintf(sTemp, "Gravity is now: %3.2f",((PZONEINFO)pZoneInfo)->ZoneGravity);
		WriteChatColor(sTemp, CONCOLOR_YELLOW);
		sprintf(sTemp,""); 
		}

return;

}

PLUGIN_API VOID InitializePlugin(VOID)
{
   AddCommand("/setg",SetGrav);
   AddCommand("/setgrav",SetGrav);
   AddCommand("/setgravity",SetGrav);

   	CHAR sStartUp[MAX_STRING] = {0};
		sprintf(sStartUp, "MQ2SetGrav by: UnKnoWn");
		WriteChatColor(sStartUp, CONCOLOR_YELLOW);

}


PLUGIN_API VOID ShutdownPlugin(VOID)
{
   DebugSpewAlways("Shutting down MQ2SetGrav");
   RemoveCommand("/setg");
   RemoveCommand("/setgrav");
   RemoveCommand("/setgravity");

   	CHAR sTemp[MAX_STRING] = {0};

		((PZONEINFO)pZoneInfo)->ZoneGravity = (FLOAT)(0.4);
		sprintf(sTemp, "Gravity is being returned to default: %3.2f",((PZONEINFO)pZoneInfo)->ZoneGravity);
		WriteChatColor(sTemp, CONCOLOR_YELLOW);
		sprintf(sTemp,""); 
}

-UnKnoWn
 
Last edited:
I needed an updated version of this dll (maxing my monks safe fall)... so I had to go and compile this all over again. (I've been lazy and using jmo's compiles... lol) Anyhow for all you other lazy or not c++ adept, here is a dll to use setgrav.

Hook me up with a red cent for all my hard work compiling this dll...**snicker**
 
MQ2SetGrav

Users who are viewing this thread

Back
Top
Cart