• 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

MQ2RWarp

Riddlerr

New member
Joined
May 21, 2005
RedCents
30¢
Here is the newest release of this plugin. it includes waypoint addon's.
http://www.redguides.com/community/showthread.php?t=2590

This is basiclly Siddin's Warp/Zone macro in 1. Plus with the added command of /fade
Changed the command /warp to /rwarp to avoid problem's with the dev's code. just makes Easyer. i also just use that the dev's changed in MQ2Main.h to post the offset for this (Avoids the compile warning)
Find
#define CDisplay__MoveLocalPlayerToSafeCoords 0
and update it too..
#define CDisplay__MoveLocalPlayerToSafeCoords 0x444C21

MQ2RWarp.cpp
Rich (BB code):
#include "../MQ2Plugin.h" 

PreSetup("MQ2RWarp"); 
#undef ExactLocation
#undef zWarp
#undef DoWarp
#undef Warp
#undef SafeYLoc
#undef SafeXLoc
#undef SafeZLoc
#undef GateBind
#undef ZoneShift
#undef ZoneToGoTo
VOID DoWarp(float y, float x, float z); 
VOID Warp(PSPAWNINFO pChar, PCHAR szLine); 
VOID zWarp(PSPAWNINFO pChar, PCHAR szLine); 
VOID ExactLocation(PSPAWNINFO pChar); 

VOID ExactLocation(PSPAWNINFO pChar, PCHAR szLine) 
{  CHAR LocMsg[MAX_STRING] = {0}; 
   sprintf(LocMsg, "Your location is %3.6f, %3.6f, %3.6f", pChar->Y, pChar->X, pChar->Z); 
   WriteChatColor(LocMsg); 
   return; 
} 

VOID zWarp(PSPAWNINFO pChar, PCHAR szLine) 
{   CHAR Z[MAX_STRING] = {0}; 
        GetArg(Z,szLine,1); 
        float MyY = pChar->Y; 
        float MyX = pChar->X; 


        if (Z[0]==0) { 
      WriteChatColor("Usage: /zwarp <dist>", CONCOLOR_RED); 
      return; 
        } 

        float NewZ = pChar->Z; 
        NewZ = NewZ + (FLOAT)atof(Z); 
        DoWarp(MyY, MyX, NewZ); 
        return; 
} 

VOID Warp(PSPAWNINFO pChar, PCHAR szLine) 
{ 
   static float LastY; 
   static float LastX; 
   static float LastZ; 
   bRunNextCommand = TRUE; 
   PSPAWNINFO psTarget = NULL; 
   PZONEINFO Zone = (PZONEINFO)pZoneInfo; 
    CHAR command[MAX_STRING]; GetArg(command,szLine,1); 
   CHAR Y[MAX_STRING]; GetArg(Y,szLine,2); 
   CHAR X[MAX_STRING]; GetArg(X,szLine,3); 
   CHAR Z[MAX_STRING]; GetArg(Z,szLine,4); 
   if ( 
      stricmp(command, "succor") != 0 && 
      stricmp(command, "loc") != 0 && 
      stricmp(command, "last") != 0 && 
      stricmp(command, "target") != 0 && 
      stricmp(command, "dir") != 0 
   ) { 
      WriteChatColor("Usage: /rwarp <succor|last|loc <y x z>|dir <dist>| target>", CONCOLOR_RED); 
      return; 
      } else { 
      if (!stricmp(command,"target"))  { 
         if (ppTarget && pTarget) { 
         psTarget = (PSPAWNINFO)pTarget; 
         } 
         if (!psTarget) { 
            WriteChatColor("You must have a target for /warp target.", CONCOLOR_RED); 
            return; 
         } 
         float TargetZ = float (psTarget->Z); 
         float TargetY = float (psTarget->Y); 
         float TargetX = float (psTarget->X); 
                        LastY = TargetY; 
         LastX = TargetX; 
         LastZ = TargetZ; 
         DoWarp(TargetY, TargetX, TargetZ); 
      } else if (!stricmp(command,"succor"))  { 
         static float north = 0; 
         ((PSPAWNINFO)pCharSpawn)->Heading = north; 
         DWORD MLPTSC = CDisplay__MoveLocalPlayerToSafeCoords; 
         __asm call dword ptr [MLPTSC]; 
         return; 
      } else if (!stricmp(command,"loc")) { 
      if ((Y[0] == 0) || (X[0] == 0) || (Z[0] == 0)) 
      { 
         WriteChatColor("You must provide <y> <x> <z> if going to a location.", CONCOLOR_RED); 
         return; 
      } 
         LastY = (float)atof(Y); 
         LastX = (float)atof(X); 
         LastZ = (float)atof(Z); 
      DoWarp((float)atof(Y), (float)atof(X), (float)atof(Z)); 
      return; 
      } else if (!stricmp(command,"last")) { 
      if ((LastY==0) || (LastX==0) || (LastZ==0)) 
      { 
         WriteChatColor("You must have warped before to use this command!.", CONCOLOR_RED); 
         return; 
      } 
      DoWarp(LastY, LastX, LastZ); 
      return; 
      } else if (!stricmp(command,"dir")) { 
      if (Y[0]==0) { 
         WriteChatColor("You MUST provide <dist> if going in your current direction.", CONCOLOR_RED); 
         return; 
      } 
      FLOAT angle = (FLOAT)((pChar->Heading)*0.0123); 
      FLOAT dissafegoto = (FLOAT)atof(Y); 
      DoWarp(pChar->Y + (FLOAT)(dissafegoto * cos(angle)), pChar->X + (FLOAT)(dissafegoto * sin(angle)), pChar->Z); 
      return; 
                } 
   } 
} 


VOID DoWarp(float y, float x, float z) 
{ 

        PZONEINFO Zone = (PZONEINFO)pZoneInfo; 
   float SafeY = Zone->SafeYLoc; 
   float SafeX = Zone->SafeXLoc; 
   float SafeZ = Zone->SafeZLoc; 

   Zone->SafeYLoc = y; 
   Zone->SafeXLoc = x; 
   Zone->SafeZLoc = z; 

   CHAR szMsg[MAX_STRING] = {0}; 
   sprintf(szMsg, "Warping to: %3.2f, %3.2f, %3.2f.", Zone->SafeYLoc, Zone->SafeXLoc, Zone->SafeZLoc); 
   WriteChatColor(szMsg, COLOR_PURPLE); 

   DWORD MLPTSC = CDisplay__MoveLocalPlayerToSafeCoords; 
   __asm call dword ptr [MLPTSC]; 

   Zone->SafeYLoc = SafeY; 
   Zone->SafeXLoc = SafeX; 
   Zone->SafeZLoc = SafeZ; 
} 
VOID GateBind(PSPAWNINFO, PCHAR); 
VOID ZoneShift(PSPAWNINFO pChar, PCHAR szLine); 

VOID ZoneShift(PSPAWNINFO pChar, PCHAR szLine) 
{ 
   CHAR szMsg[MAX_STRING] = {0};      
   DWORD ZoneToGoTo; 
   ZoneToGoTo = GetZoneID(szLine);
   if (ZoneToGoTo == -1) {
	   WriteChatColor("Wrong Zone.ShortName, aborting!!",CONCOLOR_RED);
	   return;
   }

   sprintf(szMsg,"Going to zone %s, id %d",szLine,ZoneToGoTo); 
   WriteChatColor(szMsg,USERCOLOR_DEFAULT); 
   GetCharInfo()->ZoneBoundId = ZoneToGoTo; 
   pChar->Type = SPAWN_CORPSE; 
} 

VOID GateBind(PSPAWNINFO pChar, PCHAR szLine) 
{       WriteChatColor ("Gating...",CONCOLOR_RED); 
       pChar->Type = SPAWN_CORPSE; 
} 

VOID doFade(PSPAWNINFO pChar, PCHAR szLine) {
	
	PCHARINFO pCharInfo = GetCharInfo();
	PZONEINFO Zone = (PZONEINFO)pZoneInfo; 
	int nZoneID = 0;
	nZoneID = GetZoneID(Zone->ShortName);
	
	pCharInfo->ZoneBoundId = nZoneID;
    pChar->pCharInfo->ZoneBoundY = 0;
	pChar->pCharInfo->ZoneBoundX = 0;
	pChar->pCharInfo->ZoneBoundZ = 0; 
    WriteChatColor("Fading Memories.", 
COLOR_PURPLE);
	
	
    pChar->Type = SPAWN_CORPSE;

}
PLUGIN_API VOID InitializePlugin(VOID) 
{ 
   AddCommand("/rwarp",Warp); 
   AddCommand("/zwarp",zWarp); 
   AddCommand("/exactloc",ExactLocation);
   AddCommand("/zone",ZoneShift); 
   AddCommand("/gate",GateBind); 
   AddCommand("/fade",doFade);
} 


PLUGIN_API VOID ShutdownPlugin(VOID) 
{ 
   DebugSpewAlways("Shutting down MQ2RWarp"); 
   RemoveCommand("/rwarp"); 
   RemoveCommand("/exactloc"); 
   RemoveCommand("/zwarp");
   RemoveCommand("/gate"); 
   RemoveCommand("/zone");
   RemoveCommand("/fade");
}
 
Last edited:
Rich (BB code):
#undef ExactLocation
#undef zWarp
#undef DoWarp
#undef Warp
#undef SafeYLoc
#undef SafeXLoc
#undef SafeZLoc
#undef GateBind
#undef ZoneShift
#undef ZoneToGoTo

Looks like someone caught on.. =P

cronic
 
Does /fade work for anyone?

Just tried it and it ld'd me, and on my own attempt to fix it it simply zoned me but kept me in the same place. Is that what it's meant to do? I thought it was actually an instant fade like FM.
 
It's basically a /zone to the zone you're already in, essentially wiping you from the hate list. Yes when you /fade you will zone
 
when you crashed, where you in an instanced zone? /fade will not work in instanced zones. instanced zones are treated completly differant. same goes for/zone/// you cannot do /zone to zone into anguish, pg trials, god raids. etc.. so use with caution.. also if you /fade and you zone back in and there are still mobs around, of course there still gonna agro. i normally run away ( where no static mob is) and pray no roamer is there when i zone back in.
 
anyone willing to help me add waypoint functions into this? ive been messing around with it for the last 2 hours. and its just driving me insane.. pm me if you can. :)
 
I was probably in an instanced zone, don't remember. I was just confused by the feature, cause I play a bard, and was like 'ooh, manaless fade'. That'd be too good to be true I guess heh.
 
MQ2RWarp

Users who are viewing this thread

Back
Top
Cart