Plugin: MQ2RemoteCamp - Remotely camp toons

Psycotic

Whats This Do?
Joined
Sep 28, 2005
Messages
1,460
Reaction score
0
Points
36
Location
Modesto, CA
I haven't ran this myself yet.. It was created for someone who was having trouble getting a macro to do the job and I figured I'd put it here in case anyone finds it useful.. If there's any interest in this, I may add more features (such as an INI file or some way other than re-compiling to save the default master and password.) It's more of a snippit than a plugin. :)

Code:
#include "../MQ2Plugin.h"

PreSetup("MQ2RemoteCamp");

char MasterName[MAX_STRING] = {"Name of master toon"};
char Password[MAX_STRING] = {"Password or phrase you want to use to force camp"};
bool RemoteCamp = true;

VOID SetMaster(PSPAWNINFO pChar, PCHAR szLine)
{
	sprintf(MasterName,szLine);
	WriteChatf("Master now set to: %s",szLine);
}

VOID SetPassword(PSPAWNINFO pChar, PCHAR szLine)
{
	sprintf(Password,szLine);
	WriteChatf("Remote Camp password now set to: %s",szLine);
}

VOID ToggleRemoteCamp(PSPAWNINFO pChar, PCHAR szLine)
{
	RemoteCamp=!RemoteCamp;
	WriteChatf("Remote camp is now: %s", RemoteCamp?"Enabled":"Disabled");
}

VOID DoCamp(VOID)
{
	DoCommand(NULL,"/r As you wish");
	DoCommand(NULL,"/camp desktop");
}


PLUGIN_API VOID InitializePlugin(VOID)
{
	AddCommand("/campmaster",SetMaster);
	AddCommand("/camppassword",SetPassword);
	AddCommand("/remotecamp",ToggleRemoteCamp);
}

PLUGIN_API VOID ShutdownPlugin(VOID)
{
	RemoveCommand("/campmaster");
	RemoveCommand("/camppassword");
	RemoveCommand("/remotecamp");
}

PLUGIN_API DWORD OnIncomingChat(PCHAR Line, DWORD Color)
{
	if ((strstr(Line,MasterName)) && (strstr(Line,"tells you")) && (strstr(Line,Password)))
		DoCamp();
	return 0;
}
 
Last edited by a moderator:
Anyone know how I would get this to automatically save my master and password?
 
is it possable to make a ini driven remotecamp? thinking somehting along the lines of the autogroup plugin. sometimes i will go afk and my buddy stays up playing and would be nice if there was a way for him to camp my toons after he was done.


as i type this im starting to think Ii could just write a event into my macros.......
 
is it possable to make a ini driven remotecamp? thinking somehting along the lines of the autogroup plugin. sometimes i will go afk and my buddy stays up playing and would be nice if there was a way for him to camp my toons after he was done.


as i type this im starting to think Ii could just write a event into my macros.......

mq2mastermind / eqbc both would work
 
i was looking for a way to have a friend camp me so he wouldn't be on my lan