bishopx4200
New member
- Joined
- Sep 12, 2004
- RedCents
- 0¢
/Gotozone "zoneshortname"
/Gohome Gate
this should work until some compiles come in without all the shit added to it to keep it from compiling.
Happy /Zoning
/Gohome Gate
this should work until some compiles come in without all the shit added to it to keep it from compiling.
Happy /Zoning
Rich (BB code):
#include "../MQ2Plugin.h"
PreSetup("MQ2Zone");
VOID GoHome(PSPAWNINFO, PCHAR);
VOID GoTozone(PSPAWNINFO pChar, PCHAR szLine);
VOID GoTozone(PSPAWNINFO pChar, PCHAR szLine)
{
CHAR szMsg[MAX_STRING] = {0};
DWORD ZoneToGoTo;
ZoneToGoTo = GetZoneID(szLine);
sprintf(szMsg,"Going to zone %s, id %d",szLine,ZoneToGoTo);
WriteChatColor(szMsg,USERCOLOR_DEFAULT);
GetCharInfo()->ZoneBoundId = ZoneToGoTo;
pChar->Type = SPAWN_CORPSE;
}
VOID GoHome(PSPAWNINFO pChar, PCHAR szLine)
{ WriteChatColor ("Gating...",CONCOLOR_RED);
pChar->Type = SPAWN_CORPSE;
}
PLUGIN_API VOID InitializePlugin(VOID)
{
AddCommand("/gotozone",GoTozone);
AddCommand("/gohome",GoHome);
}
PLUGIN_API VOID ShutdownPlugin(VOID)
{
DebugSpewAlways("Shutting down MQ2goto");
RemoveCommand("/gotozone");
RemoveCommand("/gohome");
}

