This is a very simple plugin that i coded up in like 5 mins but its very useful to me so i hope its useful to others.
Edited this to include the changes that TP made a few posts down.
Enjoy!!
--Zippzipp
(like my stuff vote for me here: http://www.redguides.com/community/showthread.php?t=15311)
Edited this to include the changes that TP made a few posts down.
Rich (BB code):
/////////////////////////////////////////////////
// MQ2InstanceKill.cpp by Zippzipp
// (and a few fixes by TeachersPet!)
// created on: 18 Jan 2007
//
// This Plugin empties your expedition
// You do not dzquit or taskquit unless you put
// "all" after your command.
//
/////////////////////////////////////////////////
#include "../MQ2Plugin.h"
PreSetup("MQ2InstanceKill");
VOID taskKill(PSPAWNINFO pChar, PCHAR szLine){
TASKMEMBER *member;
CHAR echo[MAX_STRING];
int i = 0;
member = pTaskMember;
while(member) {
if(strcmpi(GetCharInfo()->Name,member->Name)) {
sprintf(echo,"/taskremove %s",member->Name);
DoCommand(pChar,echo);
}
member = member->pNext;
}
if(!strcmpi(szLine,"all"))
DoCommand(pChar,"/taskquit");
}
VOID dzKill(PSPAWNINFO pChar, PCHAR szLine) {
DZMEMBER *member;
CHAR echo[MAX_STRING];
int i = 0;
member = pDynamicZone->pMemberList;
while(member) {
if(strcmpi(GetCharInfo()->Name,member->Name)) {
sprintf(echo,"/dzremove %s",member->Name);
DoCommand(pChar,echo);
}
member = member->pNext;
}
if(!strcmpi(szLine,"all"))
DoCommand(pChar,"/dzquit");
}
PLUGIN_API VOID InitializePlugin(VOID) {
AddCommand("/dzkill",dzKill);
AddCommand("/taskkill",taskKill);
}
PLUGIN_API VOID ShutdownPlugin(VOID) {
RemoveCommand("/dzkill");
RemoveCommand("/taskkill");
}
Enjoy!!
--Zippzipp
(like my stuff vote for me here: http://www.redguides.com/community/showthread.php?t=15311)
Last edited:


