randomguy_01
Well-known member
- Joined
- Jul 13, 2005
- RedCents
- 54¢
I wrote this cause I didn't want to use MQ2ChatEvents to avoid thinking hard and such.
This plugin will simply popup and echo a notification when the AA 'Gift of Mana' becomes active.
Usage:
This plugin will simply popup and echo a notification when the AA 'Gift of Mana' becomes active.
Usage:
Rich (BB code):
/showgom (disables or enables the announcing of Gift of Mana procs)
Rich (BB code):
#include "../MQ2Plugin.h"
PreSetup("MQ2ShowGoM");
bool bShowGoM = false;
VOID GoM(PSPAWNINFO pChar, PCHAR szLine)
{
if (bShowGoM) {
bShowGoM = false;
WriteChatColor("No longer announcing Gift of Mana",CONCOLOR_RED);
}
else {
bShowGoM = true;
WriteChatColor("Now Announcing Gift of Mana",CONCOLOR_GREEN);
}
}
// Called once, when the plugin is to initialize
PLUGIN_API VOID InitializePlugin(VOID)
{
AddCommand("/showgom",GoM);
}
// Called once, when the plugin is to shutdown
PLUGIN_API VOID ShutdownPlugin(VOID)
{
RemoveCommand("/showgom");
}
PLUGIN_API DWORD OnIncomingChat(PCHAR Line, DWORD Color)
{
DebugSpewAlways("MQ2ShowGoM::OnIncomingChat(%s)",Line);
if (bShowGoM) {
if (strstr(Line, " granted a gift of "))
{
CHAR szOverlay[MAX_STRING] = "GIFT OF MANA TRIGGERED";
DisplayOverlayText(szOverlay,CONCOLOR_RED,100,500,500,6000);
WriteChatf("Gift of Mana triggered");
}
}
return 0;
}


