• 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

MQ2SetGrav

unknown405

Active member
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