Page 1 of 1

Message Monitor

Posted: Thu Sep 05, 2013 7:03 am
by wps
I tried to make a waypoint to monitor message for helping scripting.
I monitor those messages below, but the messages show in pop-up bubbles can't be tracked.
For example, The periodic announcement of charity auction.

Does anyone have a clue?

"CHAT_MSG_CHANNEL_JOIN", "CHAT_MSG_CHANNEL_LEAVE", "CHAT_MSG_CHANNEL", "CHAT_MSG_COMBAT", "CHAT_MSG_EMOTE", "CHAT_MSG_GM_TALK", "CHAT_MSG_GM", "CHAT_MSG_SAY", "CHAT_MSG_SYSTEM", "CHAT_MSG_SYSTEM_VALUE", "CHAT_MSG_SYSTEM", "CHAT_MSG_WHISPER_INFORM", "CHAT_MSG_WHISPER_OFFLINE", "CHAT_MSG_WHISPER", "CHAT_MSG_YELL", "CHAT_MSG_ZONE", "SYSTEM_MESSAGE", "WARNING_MESSAGE", "ScrollBannerMessage"

Re: Message Monitor

Posted: Thu Sep 05, 2013 8:44 pm
by lisa
Pretty much all of them look for text in your chat window, if the text is just in a "chat bubble" on screen you might find it more difficult to monitor.

Re: Message Monitor

Posted: Fri Sep 06, 2013 6:25 am
by wps
lisa wrote:Pretty much all of them look for text in your chat window, if the text is just in a "chat bubble" on screen you might find it more difficult to monitor.
I monitor all the messages I found on API pages,
but the chat bubbles are not logged.

Without that information, it's not possible to implement some festival scripts.

Re: Message Monitor

Posted: Sun Sep 15, 2013 7:10 am
by gloover
Another thing I noticed, since the last patch or may the last bot rev. the monitoring of whispers doesnt work anymore.

Neither the code I'm using in onload of my profile

Code: Select all

		function beepwhispers()
		repeat
			local time, moreToCome, name, msg = EventMonitorCheck("WhisperNotify", "4,1")
			if moreToCome ~= nil and name ~= "Hilfsbegleiter" then
				cprintf(cli.lightred, "Someone whispered!\n");
				printf("\a\a\a");
			end
		until moreToCome ~= true
		end


	EventMonitorStart("WhisperNotify", "CHAT_MSG_WHISPER");
	registerTimer("beepwhispers", secondsToTimer(5), beepwhispers);	
nor the function in your gm_monitor, lisa. It seems also not to make a log of the whisperers.

Can you (or rock) check this by the time?

thx in advance!

Re: Message Monitor

Posted: Sun Sep 15, 2013 8:17 am
by rock5
Seems to work for me, although it didn't work when I whispered someone else. It only worked when I was whispered. Maybe that's the way it's supposed to be, I don't know.

Re: Message Monitor

Posted: Sun Sep 15, 2013 9:36 am
by gloover
?? It should make a log or notify only when you was whispered - but it doesnt for me. What exactly did you done rock. Which bot rev. are u using? I've tried this with 755-763 non of them did a log using gm monitor, although was not inform using the onload script above.

Re: Message Monitor

Posted: Sun Sep 15, 2013 10:03 am
by rock5
I used your code in an lua file that I loaded with commandline.

I loaded the file

Code: Select all

include("msg.lua",true)
Whispered the character.

Then I did a yrest so the timed event could fire.

And it printed "Someone whispered!".

I used the current release of MM 1.03, rev 763 of the bot on a 6.0.2 version of the game client.

Re: Message Monitor

Posted: Mon Sep 16, 2013 8:23 am
by wps
I saw the new thread mark, and I thought there are some new findings. :cry:

Here is my code which could help to determine which event to catch.

Code: Select all


local event = {
    "CHAT_MSG_CHANNEL_JOIN", "CHAT_MSG_CHANNEL_LEAVE", "CHAT_MSG_CHANNEL", "CHAT_MSG_COMBAT", "CHAT_MSG_EMOTE", "CHAT_MSG_GM_TALK", "CHAT_MSG_GM"
	, "CHAT_MSG_SAY", "CHAT_MSG_SYSTEM", "CHAT_MSG_SYSTEM_VALUE", "CHAT_MSG_SYSTEM", "CHAT_MSG_WHISPER_INFORM", "CHAT_MSG_WHISPER_OFFLINE"
	, "CHAT_MSG_WHISPER", "CHAT_MSG_YELL", "CHAT_MSG_ZONE", "SYSTEM_MESSAGE", "WARNING_MESSAGE", "ScrollBannerMessage"
};

function startDetect()
    for i = 1, #event, 1 do
        EventMonitorStart("m_" .. event[i], event[i]);
        unregisterTimer("d_" .. event[i]);
    end
	registerTimer("d_CHAT_MSG_CHANNEL_JOIN", secondsToTimer(1), d_CHAT_MSG_CHANNEL_JOIN);
	registerTimer("d_CHAT_MSG_CHANNEL_LEAVE", secondsToTimer(1), d_CHAT_MSG_CHANNEL_LEAVE);
	registerTimer("d_CHAT_MSG_CHANNEL", secondsToTimer(1), d_CHAT_MSG_CHANNEL);
	registerTimer("d_CHAT_MSG_COMBAT", secondsToTimer(1), d_CHAT_MSG_COMBAT);
	registerTimer("d_CHAT_MSG_EMOTE", secondsToTimer(1), d_CHAT_MSG_EMOTE);
	registerTimer("d_CHAT_MSG_GM_TALK", secondsToTimer(1), d_CHAT_MSG_GM_TALK);
	registerTimer("d_CHAT_MSG_GM", secondsToTimer(1), d_CHAT_MSG_GM);
	registerTimer("d_CHAT_MSG_SAY", secondsToTimer(1), d_CHAT_MSG_SAY);
	registerTimer("d_CHAT_MSG_SYSTEM", secondsToTimer(1), d_CHAT_MSG_SYSTEM);
	registerTimer("d_CHAT_MSG_WHISPER_INFORM", secondsToTimer(1), d_CHAT_MSG_WHISPER_INFORM);
	registerTimer("d_CHAT_MSG_WHISPER_OFFLINE", secondsToTimer(1), d_CHAT_MSG_WHISPER_OFFLINE);
	registerTimer("d_CHAT_MSG_WHISPER", secondsToTimer(1), d_CHAT_MSG_WHISPER);
	registerTimer("d_CHAT_MSG_YELL", secondsToTimer(1), d_CHAT_MSG_YELL);
	registerTimer("d_CHAT_MSG_ZONE", secondsToTimer(1), d_CHAT_MSG_ZONE);
	registerTimer("d_SYSTEM_MESSAGE", secondsToTimer(1), d_SYSTEM_MESSAGE);
	registerTimer("d_WARNING_MESSAGE", secondsToTimer(1), d_WARNING_MESSAGE);
	registerTimer("d_ScrollBannerMessage", secondsToTimer(1), d_ScrollBannerMessage);
end

function d_CHAT_MSG_CHANNEL_JOIN()
    detect(1);
end

function d_CHAT_MSG_CHANNEL_LEAVE()
    detect(2);
end

function d_CHAT_MSG_CHANNEL()
    detect(3);
end

function d_CHAT_MSG_COMBAT()
    detect(4);
end

function d_CHAT_MSG_EMOTE()
    detect(5);
end

function d_CHAT_MSG_GM_TALK()
    detect(6);
end

function d_CHAT_MSG_GM()
    detect(7);
end

function d_CHAT_MSG_SAY()
    detect(8);
end

function d_CHAT_MSG_SYSTEM()
    detect(9);
end

function d_CHAT_MSG_SYSTEM_VALUE()
    detect(10);
end

function d_CHAT_MSG_SYSTEM()
    detect(11);
end

function d_CHAT_MSG_WHISPER_INFORM()
    detect(12);
end

function d_CHAT_MSG_WHISPER_OFFLINE()
    detect(13);
end

function d_CHAT_MSG_WHISPER()
    detect(14);
end

function d_CHAT_MSG_YELL()
    detect(15);
end

function d_CHAT_MSG_ZONE()
    detect(16);
end

function d_SYSTEM_MESSAGE()
    detect(17);
end

function d_WARNING_MESSAGE()
    detect(18);
end

function d_ScrollBannerMessage()
    detect(19);
end

function detect(index)
    repeat
        local time, moreToCome, name, msg = EventMonitorCheck("m_" .. event[index], "4,1");
        if msg ~= nil and name ~= "Newbie Pet" then -- make sure something was returned
            logInfo(__WPL.FileName, event[index] .. ", Char name, " .. name .. ", Message, " .. msg, true);
        else break
        end
        until moreToCome == false;
end