PDA

View Full Version : Chat_msg_monster_yell


Maani
05-07-2006, 12:45 AM
Hi there

After reading the CHAT_MSG_MONSTER_YELL event specifics on wowwiki it seems like it's not the same as CHAT_MSG_YELL whereby arg2 is the name of the person that yelled. Wowwiki says:

CHAT_MSG_MONSTER_YELL
arg1: Text of message. (http://www.wowwiki.com/Events_C_(Cancel,_Character,_Chat,_Cinematic,_Clear,_Close,_Confirm,_Corpse,_Craft,_Current,_Cursor, _CVar)#CHAT_MSG_MONSTER_YELL)

I'm trying to get the name of the monster that yelled, such as:

"Ragnaros yells: BY FIRE BE PURGED!"

I'm trying to have something react when the name of the monster is, continuing the example, "Ragnaros". You can do it with CHAT_MSG_YELL for players and "arg2" will be the players name but there doesn't seem to be an "arg2" for CHAT_MSG_MONSTER_YELL according to wowwiki.

I did have a search and I found something that kinda was on the line of helping me from this screenshot (http://img74.imageshack.us/img74/5916/bug9dr.jpg), but they said in the thread which mod it could be that does that but I could spend weeks trying to read .lua files and trying to find it.

Does anyone know how I could extract the monsters name? Thanks in advance for any help.

Cleeq
07-07-2006, 08:00 AM
Well, the way that CT_Raid Assist works is to look for specific text when the event of CHAT_MSG_MONSTER_YELL happens.

For Ragnaros for example:

CT_RABOSS_RAGNAROS_START = "^NOW FOR YOU,";
CT_RABOSS_RAGNAROS_KNOCKBACK = "^TASTE";
CT_RABOSS_RAGNAROS_SONS = "^COME FORTH,";

The exact usage of CTRA for the event handling for Ragnaros is as follows:

if ( event == "RagUp" or ( (event == "CHAT_MSG_MONSTER_YELL") and (string.find(arg1, CT_RABOSS_RAGNAROS_START)) ) ) then
CT_RABoss_Announce(CT_RABOSS_RAGNAROS_EMERGE, CT_RABoss_Mods["Ragnaros"]["announce"]);

Which basically says if the addon finds the event "CHAT_MSG_MONSTER_YELL" it does a string search in "arg1" which is the text supplied in the yell for "CT_RABOSS_RAGNAROS_START" which we've determined prior to this that is the text string of "NOW FOR YOU". When it finds that text, it signifies the warning. (Note that there are prior checks to this, to verify your current map is Molten Core.)

So unfortunately you would have to write it in LUA as an addon, not possible with the limited spectrum of a macro I don't believe.