Page 1 of 1

EventMonitor problem

Posted: Fri Oct 13, 2023 9:48 pm
by nerf
I'm trying to test the EventMonitor but I can't get it to work. My intention is for the character to go to the next waypoint when receiving a message via Whisp or group. For now I've only managed to keep it from giving me errors, but it doesn't work, the bot doesn't react to the word "Entering". I would appreciate any help.

Code: Select all

	
	<!-- #  1 --><waypoint x="1870" z="1885" y="274" tag="Start">	
    	EventMonitorStart("Entrando", "CHAT_MSG_PARTY")
				repeat
					yrest(1000);
					local time, moreToCome, name, msg = EventMonitorCheck("Entrando", "4,1")
					if msg ~= nil then
						if msg == "Entrando" then
							 __WPL:setWaypointIndex(__WPL:findWaypointTag("Entrada"));
						end
					end
				until msg == true
	EventMonitorStop("Entrando")
	</waypoint>

Re: EventMonitor problem

Posted: Sat Oct 21, 2023 2:26 pm
by Administrator
I took a quick look at this and don't see anything wrong with it at the moment.
Try adding some print statements to help debug:

Code: Select all

if( msg ~= nil ) then
	print(time, mmoreToComeore, name, msg)
end	
Does it print anything out?

Do you have the ingamefunctions RoM addon installed?