I am having a problem the the MQ2Zone source that is posted, and wanted to know if anyone else is having the same problem, and how it is fixed. What is happening is that when I type (For example "/zone overthere" from Plane of Knowledge, I am being sent to my bind point rather than being transported to The Overthere.
It has been suggested to me that I should just use a pre-compiled .dll file that was posted, and I have nothing against anyone here, but I would rather only use .dll files that I compiled myself. Besides the fact, it is more fun to know how it works.
Any help that anyone can offer to help me figure out why I am having this problem, please post to help me figure it out? If I had to guess, I would say that there is still something that needs to be edited to make it work correctly, but I don't know what that would be... Thanks!
First, I goto your eqdata.h and replace the following line:
with
Here is the plugin source code I used for the MQ2Zone.cpp:
It has been suggested to me that I should just use a pre-compiled .dll file that was posted, and I have nothing against anyone here, but I would rather only use .dll files that I compiled myself. Besides the fact, it is more fun to know how it works.
Any help that anyone can offer to help me figure out why I am having this problem, please post to help me figure it out? If I had to guess, I would say that there is still something that needs to be edited to make it work correctly, but I don't know what that would be... Thanks!
First, I goto your eqdata.h and replace the following line:
Rich (BB code):
/* 0x12e0 */ BYTE Unknown0x12e0[0x14ec-0x12e0];
with
Rich (BB code):
/* 0x */ BYTE Unknown0xfd8[0x1f8];
/* 0x14d8 */ DWORD ZoneBoundId;
/* 0x14dc */ BYTE field_0x14dc[0x10];
Here is the plugin source code I used for the MQ2Zone.cpp:
Rich (BB code):
#include "../MQ2Plugin.h"
PreSetup("MQ2Zone");
#undef GateBind
#undef ZoneShift
#undef ZoneToGoTo
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;
}
PLUGIN_API VOID InitializePlugin(VOID)
{
AddCommand("/zone",ZoneShift);
AddCommand("/gate",GateBind);
}
PLUGIN_API VOID ShutdownPlugin(VOID)
{
DebugSpewAlways("Shutting down MQ2Zone");
RemoveCommand("/gate");
RemoveCommand("/zone");
}