• 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

MQ2NormalGhost

TeachersPet

Well-known member
Joined
Jul 27, 2005
RedCents
71¢
No Super Awesome special features, but think of it like an unlimited plug ghost that you can chat with your friends and open doors while doing. Probably hail NPC's too, but I haven't tested that yet.

Rich (BB code):
VOID Ghost(PSPAWNINFO pChar, PCHAR szLine)
{
	static DWORD SpawnID;
	if((!strcmp(szLine,"on")) && (GetCharInfo()->pSpawn->SpawnID != 0))
	{
		pTarget = NULL;
		SpawnID = GetCharInfo()->pSpawn->SpawnID;
		GetCharInfo()->pSpawn->SpawnID = 0;
		WriteChatColor("You are now ghosting.",USERCOLOR_DEFAULT);
	}
	if(!strcmp(szLine,"off"))
	{
		pTarget = NULL;
		GetCharInfo()->pSpawn->SpawnID = SpawnID;
		WriteChatColor("You are no longer ghosting.",USERCOLOR_DEFAULT);
	}
}

EDIT: Fixed the gay ) I missed.
EDIT x2: Fixed the static I forgot.
 
Last edited:
Not sure if it was bad copy paste, or simple typo :P .. but missed a )

Rich (BB code):
VOID Ghost(PSPAWNINFO pChar, PCHAR szLine)
{
	DWORD SpawnID;
	if((!strcmp(szLine,"on")) && (GetCharInfo()->pSpawn->SpawnID != 0))
	{
		pTarget = NULL;
		SpawnID = GetCharInfo()->pSpawn->SpawnID;
		GetCharInfo()->pSpawn->SpawnID = 0;
		WriteChatColor("You are now ghosting.",USERCOLOR_DEFAULT);
	}
	if(!strcmp(szLine,"off"))
	{
		pTarget = NULL;
		GetCharInfo()->pSpawn->SpawnID = SpawnID;
		WriteChatColor("You are no longer ghosting.",USERCOLOR_DEFAULT);
	}
}
if(!strcmp(szLine,"off"))
instead of
if(!strcmp(szLine,"off")

:)
 
Nothing in the code that would trigger actual warps, so I would say no
 
its just the nokos that makes you able to walk through the zone without getting any agro . Nothing like killing mobs
 
Haha, now that I think of it, I bet I could make atleast some version of cronic's ghost. I just need to kill the packet that reports warping.
 
Is there a way to test like with docrack, pick certain packets, Do the action you're looking to find the crack to (in this case warping) and see if the packets contain the data pertinent to it?
 
Well if what I'm thinking would work, we already have every packet needed to do it.
 
Rich (BB code):
GetCharInfo()->pSpawn->SpawnID = 0;

That is just a spawnid change instead of just naming it "NoKoS" they named it "Ghost".

If I remember correctly, all this will do is allow you to open doors, however /consider, trade, hail, loot etc will not work when this is turned on, since there is not even 1 packet for those things in that source, nor does it even do anything with your movement.

Yes this will move you around the zone without getting agro, but thats all it will do.
 
well sense cronic wont update maybe someone here will This code was taken from somewhere I forget lolz.

// MQ2Ghost.cpp : Defines the entry point for the DLL application.
// Enables one to "ghost" through zones by remaining stationary on the server
// while moving client-side.

// MQ2Ghost by cronic, with credit to Lestor for the /ghost return idea.
//Updated by drellisdee 6/08/05

#include "../MQ2Plugin.h"
#include "MQ2Packets.h"
PreSetup("MQ2Ghost");

// if CDisplay__MoveLocalPlayerToSafeCoords is defined in eqgame-private
// then this is not neccessary
// valid for 9/14 patch

#define tehSafe 0x00444C21
#define MLPTSC 0x00444C21
//004370CA
#ifndef CDisplay__MoveLocalPlayerToSafeCoords
#pragma warning(disable:4273) // inconsistent dll linkage warning
FUNCTION_AT_ADDRESS(void CDisplay::MoveLocalPlayerToSafeCoords(void), MLPTSC);
#endif




DWORD MLPTSC2 = tehSafe;



BOOL bGhosting = FALSE;
BOOL bFilterPackets = FALSE;
FLOAT fOldX;
FLOAT fOldY;
FLOAT fOldZ;
DWORD fOldTurning;
FLOAT fOldHeading;

void SendMovementPacket(float x, float y, float z)
{
PSPAWNINFO Me = GetCharInfo()->pSpawn;
MovePacket Packet;

Packet.SpawnID = (WORD)Me->SpawnID;
Packet.X = x;
Packet.Y = y;
Packet.Z = z;
Packet.SpeedX = 0;
Packet.SpeedY = 0;
Packet.SpeedZ = 0;
Packet.Turning = Me->pActorInfo->LastPacketHeadingTurning;

SendEQMessage(29775, &Packet, sizeof(Packet));
}

// disables packet blocking, sends a movement packet to ghosted position,
// sends given packet, then sends another movement packet back
void QuickJumpPacket(DWORD Type, PVOID Packet, DWORD Size)
{
bFilterPackets = false;

PSPAWNINFO Me = GetCharInfo()->pSpawn;

SendMovementPacket(Me->X, Me->Y, Me->Z);
SendEQMessage(Type, Packet, Size);
SendMovementPacket(fOldX, fOldY, fOldZ);

bFilterPackets = true;
}

// moves you to fOldX, fOldY, fOldZ
void Return()
{
FLOAT* fSafeX = &((PZONEINFO)pZoneInfo)->SafeXLoc;
FLOAT* fSafeY = &((PZONEINFO)pZoneInfo)->SafeYLoc;
FLOAT* fSafeZ = &((PZONEINFO)pZoneInfo)->SafeZLoc;

FLOAT fOldSafeX = *fSafeX;
FLOAT fOldSafeY = *fSafeY;
FLOAT fOldSafeZ = *fSafeZ;
*fSafeX = fOldX;
*fSafeY = fOldY;
*fSafeZ = fOldZ;

//pDisplay->MoveLocalPlayerToSafeCoords(); //Old code no longer works
//Zone->Unknown0x1ec[0] = (float)atof(szDestWarpY);; // New code works fine
// Zone->Unknown0x1ec[1] = (float)atof(szDestWarpX);;
// Zone->Unknown0x1ec[2] = (float)atof(szDestWarpZ);;
__asm call dword ptr [MLPTSC2];
// Zone->Unknown0x1ec[0] = PrevY;
// Zone->Unknown0x1ec[1] = PrevX;
// Zone->Unknown0x1ec[2] = PrevZ;




*fSafeX = fOldSafeX;
*fSafeY = fOldSafeY;
*fSafeZ = fOldSafeZ;
GetCharInfo()->pSpawn->Heading = fOldHeading;
}

void ShowHelp()
{
WriteChatColor("/ghost on (enables ghosting)", COLOR_LIGHTGREY);
WriteChatColor("/ghost off (disables ghosting)", COLOR_LIGHTGREY);
WriteChatColor("/ghost return (disables ghosting and returns to original location)", COLOR_LIGHTGREY);
}

VOID GhostCmd(PSPAWNINFO pChar, PCHAR szLine)
{
CHAR szArg[MAX_STRING] = {0};
GetArg(szArg, szLine, 1);

if (szArg[0] == 0) ShowHelp();
else if (!strcmp(szArg, "on")) {
if (!bGhosting) {
bGhosting = true;
bFilterPackets = true;
fOldX = pChar->X;
fOldY = pChar->Y;
fOldZ = pChar->Z;
fOldTurning = pChar->pActorInfo->LastPacketHeadingTurning;
fOldHeading = pChar->Heading;
WriteChatColor("You are now ghosting.");
}
else WriteChatColor("Ghost mode is already on.", COLOR_PURPLE);
}
else if (!strcmp(szArg, "off")) {
if (bGhosting) {
bGhosting = false;
bFilterPackets = false;
WriteChatColor("You are no longer ghosting.", COLOR_PURPLE);
SendMovementPacket(pChar->X, pChar->Y, pChar->Z);
}
else WriteChatColor("Ghost mode is already off.", COLOR_PURPLE);
}
else if (!strcmp(szArg, "return")) {
if (bGhosting) {
Return();
bGhosting = false;
bFilterPackets = false;
WriteChatColor("You are no longer ghosting.", COLOR_PURPLE);
}
else WriteChatColor("Ghost mode is already off.", COLOR_PURPLE);
}
}

PLUGIN_API BOOL OnSendPacket(DWORD Type, PVOID Packet, DWORD Size)
{
if (bGhosting && bFilterPackets)
{
// movement (0x1E)
if (Type == 29775)
{
PMovePacket movepkt = (PMovePacket)Packet;
movepkt->X = fOldX;
movepkt->Y = fOldY;
movepkt->Z = fOldZ;
movepkt->SpeedX = 0;
movepkt->SpeedY = 0;
movepkt->SpeedZ = 0;
movepkt->Turning = fOldTurning;

//return true;
return false;
}

// falling? (0x1F) / falling? (0x17)
if (Type == 15306 || Type == 1848)
{
return false;
}

// standstate adjustment (0x8)
if (Type == 9890) return false;

// jump (0x0)
if (Type == 30416) return false;

// inspect anonymously (ie, they don't get a message that you're looking) (0x8)
if (Type == 1782)
{
((PInspectPacket)Packet)->MyID = 0;
return true;
}

// doors and switches (0x10)
if (Type == 26971)
{
QuickJumpPacket(Type, Packet, Size);
return false;
}
// PickPocket (0x12)
if (Type == 15144)
{
QuickJumpPacket(Type, Packet, Size);
return true;
}

// Sense Traps (0x0)
if (Type == 13714)
{
QuickJumpPacket(Type, Packet, Size);
return true;
}

// Disarm Traps (0x0)
if (Type == 3060)
{
QuickJumpPacket(Type, Packet, Size);
return true;
}

// Begging (0x12)
if (Type == 992)
{
QuickJumpPacket(Type, Packet, Size);
return true;
}

// pick up item (0x8)
if (Type == 5962)
{
QuickJumpPacket(Type, Packet, Size);
return false;
}

// drop item (0x0)
if (Type == 29874)
{
QuickJumpPacket(Type, Packet, Size);
return false;
}

// some abilities and all spells (0x14)
if (Type == 29867)
{
//if (GetCharInfo()->pSpawn->pActorInfo->CastingSpellID == -1)
//{
QuickJumpPacket(Type, Packet, Size);
return false;
//}

//return true;
}

// taunt (0x4)
if (Type == 13489)
{
QuickJumpPacket(Type, Packet, Size);
return false;
}

// bash, kick, and other combat abilities (0xc)
if (Type == 425)
{
QuickJumpPacket(Type, Packet, Size);
return false;
}

// open trade with pc (0x8), pc opens trade with you (0x8)
if (Type == 22227 || Type == 2550)
{
QuickJumpPacket(Type, Packet, Size);
return false;
}

// ShiftItems (0x0c) / ShiftMoney 0x14
if (Type == 16435 || Type == 30388)
{
QuickJumpPacket(Type, Packet, Size);
return false;
}

// corpsedrag (0x98), corpsedrop (0x1f)
// using corpsedrag will port the corpse to your location on
// the server, NOT where you are ghosting
if (Type == 11382 || Type == 22160)
{
QuickJumpPacket(Type, Packet, Size);
return false;
}

// loot corpse (0x4), loot item (0x4) / EndLoot (0x10) is 6492
if (Type == 27334 || Type == 2530)
{
QuickJumpPacket(Type, Packet, Size);
return false;
}

// enter merchant window (0x10), purchase (0x18), sell (0x10)
if (Type == 16108 || Type == 27987 || Type == 6298)
{
QuickJumpPacket(Type, Packet, Size);
return false;
}

}

return true;
}

PLUGIN_API VOID InitializePlugin(VOID)
{
AddCommand("/ghost", GhostCmd);
////
}

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


/////////////////////////////////////////////////////////////////////////////////////

//Way outdated needs update
// MQ2Packets.h
// all known packet types used by send_message


// type == 39
typedef struct _MovePacket {
WORD SpawnID;
FLOAT Z;
FLOAT Y;
FLOAT SpeedY;
FLOAT X;
FLOAT SpeedZ;
FLOAT SpeedX;
DWORD Turning;
} MovePacket, *PMovePacket; // 0x1E

// type == 249
typedef struct _PickupPacket {
DWORD DropID;
DWORD SpawnID;
} PickupPacket, *PPickupPacket; // 0x08

// type == 295
typedef struct _ClickSwitchPacket {
DWORD SwitchID;
DWORD unk0x4; // always 0
DWORD unk0x8; // always -1
DWORD SpawnID;
} ClickSwitchPacket, *PClickSwitchPacket; // 0x10

// type == 584
typedef struct _InspectPacket {
DWORD YourID;
DWORD MyID;
} InspectPacket, *PInspectPacket; // 0x08

// type == 250
typedef struct _DropPacket {
// empty packet. drops what's on your cursor
} DropPacket, *PDropPacket; // 0x00

// type == 303
typedef struct _EngageLootPacket {
WORD MyID;
WORD CorpseID;
DWORD Unknown0x04; // 0
} EngageLootPacket, *PEngageLootPacket; // 0x08

// type == 190
typedef struct _CastPacket {
DWORD SlotID;
DWORD SpellID;
BYTE Unknown0x04[12];
} CastPacket, *PCastPacket; // 0x14

// type == 337
typedef struct _ShiftItemPacket {
DWORD SourceSlot; // cursor == 30
DWORD DestSlot;
DWORD Unk0x08;
} ShiftItemPacket, *PShiftItemPacket; // 0x0C
 
heres anouther one ehehe

// MQ2Ghost.cpp : Defines the entry point for the DLL application.
// Enables one to "ghost" through zones by remaining stationary on the server
// while moving client-side.

// MQ2Ghost by cronic, with credit to Lestor for the /ghost return idea.


#include "../MQ2Plugin.h"
#include "MQ2Packets.h"
PreSetup("MQ2Ghost");

// if CDisplay__MoveLocalPlayerToSafeCoords is defined in eqgame-private
// then this is not neccessary
// valid for 9/14 patch

#define tehSafe 0x00440942
#define MLPTSC 0x00440942
//004370CA
#ifndef CDisplay__MoveLocalPlayerToSafeCoords
#pragma warning(disable:4273) // inconsistent dll linkage warning
FUNCTION_AT_ADDRESS(void CDisplay::MoveLocalPlayerToSafeCoords(void), MLPTSC);
#endif


*/

DWORD MLPTSC2 = tehSafe;



BOOL bGhosting = FALSE;
BOOL bFilterPackets = FALSE;
FLOAT fOldX;
FLOAT fOldY;
FLOAT fOldZ;
DWORD fOldTurning;
FLOAT fOldHeading;

void SendMovementPacket(float x, float y, float z)
{
PSPAWNINFO Me = GetCharInfo()->pSpawn;
MovePacket Packet;

Packet.SpawnID = (WORD)Me->SpawnID;
Packet.X = x;
Packet.Y = y;
Packet.Z = z;
Packet.SpeedX = 0;
Packet.SpeedY = 0;
Packet.SpeedZ = 0;
Packet.Turning = Me->pActorInfo->LastPacketHeadingTurning;

SendEQMessage(29775, &Packet, sizeof(Packet));
}

// disables packet blocking, sends a movement packet to ghosted position,
// sends given packet, then sends another movement packet back
void QuickJumpPacket(DWORD Type, PVOID Packet, DWORD Size)
{
bFilterPackets = false;

PSPAWNINFO Me = GetCharInfo()->pSpawn;

SendMovementPacket(Me->X, Me->Y, Me->Z);
SendEQMessage(Type, Packet, Size);
SendMovementPacket(fOldX, fOldY, fOldZ);

bFilterPackets = true;
}

// moves you to fOldX, fOldY, fOldZ
void Return()
{
FLOAT* fSafeX = &((PZONEINFO)pZoneInfo)->Unknown0x1ec[1];
FLOAT* fSafeY = &((PZONEINFO)pZoneInfo)->Unknown0x1ec[0];
FLOAT* fSafeZ = &((PZONEINFO)pZoneInfo)->Unknown0x1ec[2];

FLOAT fOldSafeX = *fSafeX;
FLOAT fOldSafeY = *fSafeY;
FLOAT fOldSafeZ = *fSafeZ;
*fSafeX = fOldX;
*fSafeY = fOldY;
*fSafeZ = fOldZ;

//pDisplay->MoveLocalPlayerToSafeCoords(); //Old code no longer works
//Zone->Unknown0x1ec[0] = (float)atof(szDestWarpY);; // New code works fine
// Zone->Unknown0x1ec[1] = (float)atof(szDestWarpX);;
// Zone->Unknown0x1ec[2] = (float)atof(szDestWarpZ);;
__asm call dword ptr [MLPTSC2];
// Zone->Unknown0x1ec[0] = PrevY;
// Zone->Unknown0x1ec[1] = PrevX;
// Zone->Unknown0x1ec[2] = PrevZ;




*fSafeX = fOldSafeX;
*fSafeY = fOldSafeY;
*fSafeZ = fOldSafeZ;
GetCharInfo()->pSpawn->Heading = fOldHeading;
}

void ShowHelp()
{
WriteChatColor("/ghost on (enables ghosting)", COLOR_LIGHTGREY);
WriteChatColor("/ghost off (disables ghosting)", COLOR_LIGHTGREY);
WriteChatColor("/ghost return (disables ghosting and returns to original location)", COLOR_LIGHTGREY);
}

VOID GhostCmd(PSPAWNINFO pChar, PCHAR szLine)
{
CHAR szArg[MAX_STRING] = {0};
GetArg(szArg, szLine, 1);

if (szArg[0] == 0) ShowHelp();
else if (!strcmp(szArg, "on")) {
if (!bGhosting) {
bGhosting = true;
bFilterPackets = true;
fOldX = pChar->X;
fOldY = pChar->Y;
fOldZ = pChar->Z;
fOldTurning = pChar->pActorInfo->LastPacketHeadingTurning;
fOldHeading = pChar->Heading;
WriteChatColor("You are now ghosting.");
}
else WriteChatColor("Ghost mode is already on.", COLOR_PURPLE);
}
else if (!strcmp(szArg, "off")) {
if (bGhosting) {
bGhosting = false;
bFilterPackets = false;
WriteChatColor("You are no longer ghosting.", COLOR_PURPLE);
SendMovementPacket(pChar->X, pChar->Y, pChar->Z);
}
else WriteChatColor("Ghost mode is already off.", COLOR_PURPLE);
}
else if (!strcmp(szArg, "return")) {
if (bGhosting) {
Return();
bGhosting = false;
bFilterPackets = false;
WriteChatColor("You are no longer ghosting.", COLOR_PURPLE);
}
else WriteChatColor("Ghost mode is already off.", COLOR_PURPLE);
}
}

PLUGIN_API BOOL OnSendPacket(DWORD Type, PVOID Packet, DWORD Size)
{
if (bGhosting && bFilterPackets)
{
// movement (0x1E)
if (Type == 29775)
{
PMovePacket movepkt = (PMovePacket)Packet;
movepkt->X = fOldX;
movepkt->Y = fOldY;
movepkt->Z = fOldZ;
movepkt->SpeedX = 0;
movepkt->SpeedY = 0;
movepkt->SpeedZ = 0;
movepkt->Turning = fOldTurning;

//return true;
return false;
}

// falling? (0x1F) / falling? (0x17)
if (Type == 15306 || Type == 1848)
{
return false;
}

// standstate adjustment (0x8)
if (Type == 9890) return false;

// jump (0x0)
if (Type == 30416) return false;

// inspect anonymously (ie, they don't get a message that you're looking) (0x8)
if (Type == 1782)
{
((PInspectPacket)Packet)->MyID = 0;
return true;
}

// doors and switches (0x10)
if (Type == 26971)
{
QuickJumpPacket(Type, Packet, Size);
return false;
}
// PickPocket (0x12)
if (Type == 15144)
{
QuickJumpPacket(Type, Packet, Size);
return true;
}

// Sense Traps (0x0)
if (Type == 13714)
{
QuickJumpPacket(Type, Packet, Size);
return true;
}

// Disarm Traps (0x0)
if (Type == 3060)
{
QuickJumpPacket(Type, Packet, Size);
return true;
}

// Begging (0x12)
if (Type == 992)
{
QuickJumpPacket(Type, Packet, Size);
return true;
}

// pick up item (0x8)
if (Type == 5962)
{
QuickJumpPacket(Type, Packet, Size);
return false;
}

// drop item (0x0)
if (Type == 29874)
{
QuickJumpPacket(Type, Packet, Size);
return false;
}

// some abilities and all spells (0x14)
if (Type == 29867)
{
//if (GetCharInfo()->pSpawn->pActorInfo->CastingSpellID == -1)
//{
QuickJumpPacket(Type, Packet, Size);
return false;
//}

//return true;
}

// taunt (0x4)
if (Type == 13489)
{
QuickJumpPacket(Type, Packet, Size);
return false;
}

// bash, kick, and other combat abilities (0xc)
if (Type == 425)
{
QuickJumpPacket(Type, Packet, Size);
return false;
}

// open trade with pc (0x8), pc opens trade with you (0x8)
if (Type == 22227 || Type == 2550)
{
QuickJumpPacket(Type, Packet, Size);
return false;
}

// ShiftItems (0x0c) / ShiftMoney 0x14
if (Type == 16435 || Type == 30388)
{
QuickJumpPacket(Type, Packet, Size);
return false;
}

// corpsedrag (0x98), corpsedrop (0x1f)
// using corpsedrag will port the corpse to your location on
// the server, NOT where you are ghosting
if (Type == 11382 || Type == 22160)
{
QuickJumpPacket(Type, Packet, Size);
return false;
}

// loot corpse (0x4), loot item (0x4) / EndLoot (0x10) is 6492
if (Type == 27334 || Type == 2530)
{
QuickJumpPacket(Type, Packet, Size);
return false;
}

// enter merchant window (0x10), purchase (0x18), sell (0x10)
if (Type == 16108 || Type == 27987 || Type == 6298)
{
QuickJumpPacket(Type, Packet, Size);
return false;
}

}

return true;
}

PLUGIN_API VOID InitializePlugin(VOID)
{
AddCommand("/ghost", GhostCmd);
////
}

PLUGIN_API VOID ShutdownPlugin(VOID)
{
RemoveCommand("/ghost");
}
 
hmm nm server here pasted same thing twice I am tired now so going to bed took awhile to dig out 2nd one so not looking again the one should be good enough for someone to fix if they really want ghost working.
 
Tone said:
I can't believe you just posted that shit now every noob can access ghost. If they have some one sit down and go over the code with them. Inc nerfstick the source went public wee ^^ wuwu.

You can't do anything with that source tone, its so outdated, even updating all the packets won't help it.

The only thing you can do with that source, is just move around with 0 agro if you just updated the packets, probally /consider and inspect would work, but thats about it.
 
The first post for nokos is fine, but the 2nd stuff doesn't account for all the fun stuff that makes you LD if you do even get it working, so no big deal I guess :P
 
So can this be used to travel through a zone to get to the next zonline without aggro?

A nice alternative to warping perhaps? That would make me very happy if that is how it works!

Also, is there a way to toggle it on and off without plugging it in and unplugging it?

THanks
 
1) Yes, it lets you run through a zone without aggro

2) It could be, but you still need to know where you're going, where as with warp all you need to know is the loc.

3) /nokos <on l off>
 
Is this only a snippit or the entire plugin? I can't help but look at it and think something is missing. For example, nowhere in the code does it say anything about a /nokos plugin, though it does show off and on routines. Am I misunderstanding what I am seeing?

Rich (BB code):
VOID Ghost(PSPAWNINFO pChar, PCHAR szLine)
{
	DWORD SpawnID;
	if((!strcmp(szLine,"on")) && (GetCharInfo()->pSpawn->SpawnID != 0))
	{
		pTarget = NULL;
		SpawnID = GetCharInfo()->pSpawn->SpawnID;
		GetCharInfo()->pSpawn->SpawnID = 0;
		WriteChatColor("You are now ghosting.",USERCOLOR_DEFAULT);
	}
	if(!strcmp(szLine,"off"))
	{
		pTarget = NULL;
		GetCharInfo()->pSpawn->SpawnID = SpawnID;
		WriteChatColor("You are no longer ghosting.",USERCOLOR_DEFAULT);
	}
}

Thanks again.
 
Attribute that to a command like /ghost and type /ghost on or /ghost off. It just sets your SpawnID to 0 so the server doesn't know where you're going.
 
TeachersPet said:
Attribute that to a command like /ghost and type /ghost on or /ghost off.

So basically, the server thinks you are standing still, and then when you turn it off you warp... So server side, would look no different than using the /warp command? This just let's you pick the location without having to know the /loc? I was hoping this one might be less detectable than warp by the server logs, just in case they do exist.

As far as attributing something to a command, I will try to figure it out, but tho this point, I don't know how to do that. :p
 
Here's the whole plugin, plus I added /ghost return (returns you to the point you were at when you started ghosting). Requires the same changes to get warp to work.

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

PreSetup("MQ2NoKos"); 
#undef SafeYLoc
#undef SafeXLoc
#undef SafeZLoc

VOID GhostCommand(PSPAWNINFO pChar, PCHAR szLine);
VOID GhostReturn(float y, float x, float z);

float GhostReturnY;
float GhostReturnX;
float GhostReturnZ;
bool IsGhosting;

VOID GhostCommand(PSPAWNINFO pChar, PCHAR szLine)
{
	static DWORD SpawnID;
	if((!strcmp(szLine,"on")) && (GetCharInfo()->pSpawn->SpawnID != 0))
	{
		GhostReturnY = GetCharInfo()->pSpawn->Y;
		GhostReturnX = GetCharInfo()->pSpawn->X;
		GhostReturnZ = GetCharInfo()->pSpawn->Z;
		pTarget = NULL;
		SpawnID = GetCharInfo()->pSpawn->SpawnID;
		GetCharInfo()->pSpawn->SpawnID = 0;
		WriteChatColor("You are now ghosting.",COLOR_PURPLE);
	       IsGhosting = true;
         }
	if(!strcmp(szLine,"off"))
	{
		pTarget = NULL;
		GetCharInfo()->pSpawn->SpawnID = SpawnID;
		WriteChatColor("You are no longer ghosting.",COLOR_PURPLE);
	        IsGhosting = false;
        }
    if(!strcmp(szLine,"return"))
    {
    
	pTarget = NULL;
	GetCharInfo()->pSpawn->SpawnID = SpawnID;
	GhostReturn(GhostReturnY, GhostReturnX, GhostReturnZ);
	IsGhosting = false;
        }
	
        if((!strcmp(szLine,"on")) && (IsGhosting = true))
	{
		WriteChatColor("You are already ghosting!",CONCOLOR_YELLOW);
	}
     }

VOID GhostReturn(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, "Returning back to: %3.2f, %3.2f, %3.2f.", Zone->SafeYLoc, Zone->SafeXLoc, Zone->SafeZLoc); 
   WriteChatColor(szMsg, CONCOLOR_YELLOW); 

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

   Zone->SafeYLoc = SafeY; 
   Zone->SafeXLoc = SafeX; 
   Zone->SafeZLoc = SafeZ; 
}


PLUGIN_API VOID InitializePlugin(VOID) 
{ 
 AddCommand("/ghost",GhostCommand);
}

PLUGIN_API VOID ShutdownPlugin(VOID) 
{ 
 RemoveCommand("/ghost");
}
 
Last edited:
doh, I forgot to put the static in. I was sort of programming this from memory heh.
 
from what i know and have been told(i revised the old cronic one and updated the opcodes) onsendpacket api doesnt work anymore but abyss would know better then i.

well moreso code is missing to add it back in...
 
lol look cronic updated ghost now and his speed I guess I can stop posting stupid stuff =)
 
Ok, call me a noob or whatever you want, but what is the difference between this and the ghost tanking I here everyone talking about? Like rangers soloing RS queen event and crap like that?
 
I'm still using /ghost from Cade's compile. Works fine for me :)
 
Striking similiarites to my no kos here is post in entirety

Quote:
Originally Posted by shroomheadofmarbles




Quote:
Originally Posted by soultaker




Quote:
Originally Posted by shroomheadofmarbles




I added this to my warp plugin for times its not safe to warp and you need to get by some aggro mobs this would be the plugin in standalone form

#include "../MQ2Plugin.h"
PreSetup("MQ2NoKos");
VOID NoKos (PSPAWNINFO, PCHAR);
PLUGIN_API VOID InitializePlugin(VOID)
{
DebugSpewAlways("Initializing MQ2NoKos");


AddCommand("/nokos",NoKos);
PLUGIN_API VOID ShutdownPlugin(VOID)
{
DebugSpewAlways("Shutting down MQ2NoKos");


RemoveCommand("/nokos");
VOID NoKos(PSPAWNINFO pChar, PCHAR szLine)
{
static int gSpawnID;
if (pChar->SpawnID!=0){
gSpawnID = pChar->SpawnID;
WriteChatColor("Making you non-kos",USERCOLOR_TELL);
pChar->SpawnID = 0;
} else {
pChar->SpawnID = gSpawnID;
WriteChatColor("Making you mortal",USERCOLOR_TELL);
}
}







Wow thats a nice plugin Ill have to test that one. BTW that is also one if it works that I would not post to the public that could soo get abused like the Ghost plugin did.





It works and works well i /nokos and ran all over Tower of Sol ro last night no aggro at all





Just wanted to say thanks for inculding me on your code, i was able to add it in with no problems with your Source code. Took me a few mins to remeber all
that code I did back in the College days though lol.

Also just to let you know I have kept it private and not shared ti with anyone else.
__________________

SOUL TAKER

I wonder how long this will last before it is nerfed? Shroom :(
 
MQ2NormalGhost

Users who are viewing this thread

Back
Top
Cart