• 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

nokos help

six_11

New member
Joined
Jul 6, 2005
RedCents
Through a search I was able to find some nokos code. This is a piece of it I am having trouble with. THe line marked in red is not a part of _ACTORINFO.

Did this change to something else or did they remove it? Any help would be apprecieated. If needed I'll post the whole combined source.

Rich (BB code):
void SendMovementPacket(FLOAT x, FLOAT y, FLOAT z)
 {
 	// type == 39
 	typedef struct _MOVEPKT {
 		WORD SpawnID;
 		FLOAT Z;
 		FLOAT Y;
 		FLOAT SpeedY;
 		FLOAT X;
 		FLOAT SpeedZ;
 		FLOAT SpeedX;
 		DWORD Turning;
 	} MOVEPKT, *PMOVEPKT; // 0x1E
 	PSPAWNINFO Me = GetCharInfo()->pSpawn;
 	MOVEPKT 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(39, &Packet, sizeof(Packet));
 }
 
Line marked in red again. The _actorinfo it is refering to is/was part of eqdata.h . The nokos code was used from this thread. http://www.redguides.com/community/showthread.php?t=502&highlight=nokos.

I only took the nokos part of it. I did not include summon corpse part. IM sure its something easy I am overlooking. It may have changed or is something like warp where you have to add it in.


The Compile error using Visual C++ is

Compiling...
MQ2Ultrawarp.cpp
D:\MQ\AUG11\MQ2Ultrawarp\MQ2Ultrawarp.cpp(291) : error C2039: 'LastPacketHeadingTurning' : is not a member of '_ACTORINFO'
D:\MQ\AUG11\MQ2Ultrawarp\../MQ2Main/EQData.h(863) : see declaration of '_ACTORINFO'
Error executing cl.exe.

MQ2Ultrawarp.dll - 1 error(s), 0 warning(s)


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


PreSetup("MQ2ultrawarp");
#undef CDisplay__MoveLocalPlayerToSafeCoords 
#define CDisplay__MoveLocalPlayerToSafeCoords 0x0041D395 
#undef ZoneBoundID
#undef fade
#undef ExactLocation 
#undef exactloc
#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, PCHAR szLine);
VOID Fade(PSPAWNINFO pChar, PCHAR szLine);
VOID GateBind(PSPAWNINFO, PCHAR); 
VOID ZoneShift(PSPAWNINFO pChar, PCHAR szLine);
VOID SMP(FLOAT x, FLOAT y, FLOAT z);



PLUGIN_API VOID InitializePlugin(VOID) 
{ 
DebugSpewAlways("Initializing MQ2Ultrawarp"); 
AddCommand("/fade",Fade);
AddCommand("/nokos",SMP);
AddCommand("/warp",Warp); 
AddCommand("/zwarp",zWarp); 
AddCommand("/exactloc",ExactLocation);
AddCommand("/zone",ZoneShift); 
AddCommand("/gate",GateBind);





WriteChatColor("Ultrawarp with NoKos Enjoy!", CONCOLOR_GREEN);





} 

PLUGIN_API VOID ShutdownPlugin(VOID) 
{ 
DebugSpewAlways("Shutting down MQ2Ultrawarp"); 
RemoveCommand("/fade");
RemoveCommand("/warp"); 
RemoveCommand("/exactloc"); 
RemoveCommand("/zwarp"); 
RemoveCommand("/gate"); 
RemoveCommand("/zone"); 
RemoveCommand("/nokos");


WriteChatColor("Thanks for using Ultrawarp with NoKos", CONCOLOR_GREEN);
}

//Fade portion
VOID Fade(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; 

}

//Warp portion
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: /warp <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; 
} 



// Zone portion
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; 
} 

// no kos


DWORD SpawnID;

void SetID(PSPAWNINFO pChar, PCHAR szLine)
{
if(!strcmp(szLine,"on"))
{
pTarget = NULL;
SpawnID = GetCharInfo()->pSpawn->SpawnID;
  GetCharInfo()->pSpawn->SpawnID = 0;
    WriteChatColor("NoKos mode is now set to ON.",CONCOLOR_GREEN);
}
if(!strcmp(szLine,"off"))
{
pTarget = NULL;
GetCharInfo()->pSpawn->SpawnID = SpawnID;
  WriteChatColor("NoKos mode is now set to OFF.",CONCOLOR_RED);
}
else
{
WriteChatColor("Invalid Syntax. Usage:",COLOR_LIGHTGREY);
WriteChatColor("/nokos on",COLOR_LIGHTGREY);
WriteChatColor("/nokos off",COLOR_LIGHTGREY);
}
}



void SMP(float x, float y, float z)
 {
 	// type == 39
 	typedef struct _MOVEPKT {
 		WORD SpawnID;
 		FLOAT Z;
 		FLOAT Y;
 		FLOAT SpeedY;
 		FLOAT X;
 		FLOAT SpeedZ;
 		FLOAT SpeedX;
 		DWORD Turning;
 	} MOVEPKT, *PMOVEPKT; // 0x1E
 	PSPAWNINFO Me = GetCharInfo()->pSpawn;
 	MOVEPKT 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(39, &Packet, sizeof(Packet));
 }
 
Last edited:
LastPacketHeadingTurning was last seen in the 20050504b zip

Rich (BB code):
/*0x1028*/ DWORD LastPacketHeadingTurning;

Useless information I imagine, but it's all I know
 
Sweet Have been looking for a zip with it.

Im gonna go test it now. If it works Ill post the source and a dll.
 
That offset changes after every patch
 
EDIT:

The hell with this. Im done for now. I'll see what I can get from mq2ultrawarp.asm tommorow. Probably nothing I can use :( . Well Nothing I will want to take the time for anyway.
 
The movement packet address AND structure has also changed btw...this is the old one..new one has timestamp, deltas and many a few other stuff..You don't really need all this to make a "NO-KOS" plugin , which if i understand is a plugin that would let you walk around without getting aggro?..just block the present movement packet would let u do so...akka: 0x14cb..
 
Eh, that'd be like posting something from the VIP section of the MQ2 boards, dunno if it's allowed
 
to be more precise,

if (type==0x14cb)
{
return false;
}
that's a nokos.

-Enjoy :)
 
could you post the source? I don't like using precompiled stuff and I'm actually trying to learn how to make plugins so the source would really help on both accounts.
 
Thanks. I am looking for source though. I want to add the nokos functionality back to the ultrawarp plugin. That is a large DLL for just nokos. Dose it do anything else?

Getting the code from assembley is proving more difficult than I anticpated.
 
Dunno, source is Level 2 on KenetixEQ they just posted the compiled version in Level 1 awhile ago.

This nokos also lets you inspect people while in nokos form aswell, so basically you can inspect from anywhere.
 
nokos help

Users who are viewing this thread

Back
Top
Cart