Page 1 of 1

OnZoned?

Posted: Tue Aug 24, 2004 8:36 pm
by Vaft

Code: Select all

PLUGIN_API VOID OnZoned(VOID) {
	WriteChatColor("YOU HAVE ZONED!",USERCOLOR_DEFAULT);
	return;
}
This this function never executes. How can this be ?

Posted: Tue Aug 24, 2004 11:55 pm
by Space-Boy
well from what i understand onzoned is kinda funky.... like it occurs before you're actually done zoning... a lot of times onzoned events dont work, especially with server and client lag taken into consideration....

imho onzoned needs to be tweaked or alternatively setup a plugin with onincoming chat "you have entered **" for events you want to occur specifically after youre done zoning.

if you can figure out a way to use on incoming chat like that please reply here as i would like to set up a plugin to automatically perform a few tasks when im done zoning... specifcally sometimes i go afk while zoning and i forget to stop the twist plugin... kind of embarassing when people are talking to you figuring youre not afk because you are singing =(

Posted: Wed Aug 25, 2004 1:42 am
by Vaft
yeah it was triggering too early for me, so i moved it to onincomingchat with "you have entered"

Posted: Wed Aug 25, 2004 2:26 am
by Cr4zyb4rd
if you can figure out a way to use on incoming chat like that please reply here as i would like to set up a plugin to automatically perform a few tasks when im done zoning... specifcally sometimes i go afk while zoning and i forget to stop the twist plugin...
You must have looked real hard, the twist plugin itself handles incoming chat like that, as do many other :P

Posted: Fri Aug 27, 2004 1:20 am
by efudd
Yes. OnZoned should be renamed to MightBeZoned.

I've got a few personal plugins that use OnZoned and they semi-work.

I've been pondering a workaround that would involve basically global flag that would be set during OnZoned, which *DOES* fire but doesn't require the client to be fully there.. and stuff in Pulse/etc that would check for flag, do what i wanted to do with DoCommand, and reset flag.

... just some thoughts...

another possibility might be zoned.cfg support added during the "bind" support stuff.... i haven't looked to see where it actually gets called to see if it's more predictable though.

-e

Posted: Fri Aug 27, 2004 3:57 am
by Space-Boy
cr4zy... what i dont know how to do is have the plugin exectute a /slash type command... any input?
example

onincominchat you have entered; /endmacro /stoptwist

any help is much appreciated =)

Posted: Fri Aug 27, 2004 4:09 am
by Cr4zyb4rd
In MQ2CommandAIP.cpp

Code: Select all

VOID HideDoCommand(PSPAWNINFO pChar, PCHAR szLine, BOOL delayed)

Posted: Fri Aug 27, 2004 4:14 am
by Space-Boy
this helps me perform a /slash command on event how?

Posted: Fri Aug 27, 2004 5:13 am
by Cr4zyb4rd
So you want me to write the plugin for you, is what you're saying?

Code: Select all

PLUGIN_API DWORD OnIncomingChat(PCHAR Line, DWORD Color) 
{ 
	if (!strcmp(Line,"This is the chat line i'd like to match.  Aha I rule.")) {
		HideDoCommand(GetCharInfo(),"/HiImASlashCommand do you love me?",FromPlugin);
	}
	return 0;
}
or something like that