• 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

MQ2AutoFace

I was having an issue with an afk script getting stuck and not /facing the mob correctly if it was right on top of me so I wrote a little plugin to keep facing until the target is cleared or it's turned off.

/autoface on
/autoface off

It does a simple /squelch /face nolook when on. Might be useful to someone else.

Rich (BB code):
// MQ2AutoFace.cpp
// v1.0 - 05.26.2011 by Sym

// Keep facing current target

#include "../MQ2Plugin.h"

PreSetup("MQ2AutoFace");
#define SKIP_PULSES 20

long SkipPulse = 0;
bool AutoFace = false;

void AutoFaceCommand(PSPAWNINFO pChar, PCHAR szLine);


// Called once, when the plugin is to initialize
PLUGIN_API VOID InitializePlugin(VOID)
{
   DebugSpewAlways("Initializing MQ2AutoFace");
   AddCommand("/autoface",AutoFaceCommand);

}

// Called once, when the plugin is to shutdown
PLUGIN_API VOID ShutdownPlugin(VOID)
{
   DebugSpewAlways("Shutting down MQ2AutoFace");
   RemoveCommand("/autoface");
}



// This is called every time MQ pulses
PLUGIN_API VOID OnPulse(VOID)
{
   if (!AutoFace) return;
   if (SkipPulse == SKIP_PULSES) {
      SkipPulse = 0;
      PSPAWNINFO psTarget = (PSPAWNINFO)pTarget;
      if (pTarget) {
            DoCommand(GetCharInfo()->pSpawn,"/squelch /face nolook");
      } else {
            WriteChatColor("MQ2AutoFace::OFF - No Target");
            AutoFace=false;
      }
   }
   SkipPulse++;    
}


void AutoFaceCommand(PSPAWNINFO pChar, PCHAR szLine)
{
   char szTemp[MAX_STRING];
   GetArg(szTemp,szLine,1);
   if(!strnicmp(szTemp,"on",2)) {
      WriteChatColor("MQ2AutoFace::ON");
      AutoFace=true;
   }
   if(!strnicmp(szTemp,"off",3)) {
      WriteChatColor("MQ2AutoFace::OFF");
      AutoFace=false;
   }
}
 
MQ2AutoFace

Users who are viewing this thread

Back
Top
Cart