EventMonitorStart problem

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Post Reply
Message
Author
Stionowl1943
Posts: 35
Joined: Thu Jun 04, 2015 11:57 am

EventMonitorStart problem

#1 Post by Stionowl1943 » Thu Jul 16, 2015 2:44 pm

Hi, i have problem with EventMonitor.
Normally i use that in that way:

Code: Select all

<?xml version="1.0" encoding="utf-8"?><waypoints type="TRAVEL">
<onLoad>

EventMonitorStart("Event", "CHAT_MSG_YELL");

function pingrom()
	ping = RoMScript("GetPing()")
	if ping == nil then
		yrest(60000)
		repeat
			yrest(5000)
			local pingserver = system("ping xxx.xxx.xxx.xxx -n 1")
		until string.find(pingserver, "Lost = 0")
		print("NET ON")
		reloginwin(CurrentLoginChar,CurrentLoginAcc)
		load_paths("thiswaypoint.xml")
	end
end

while (true) do
	pingrom()
	local time, moreToCome, charname, msg = EventMonitorCheck("Event", "4,1")
	if msg ~= nil then
		print(msg)
	end
end
</onLoad>
</waypoints>
but after client disconnecter and autologin to game i receive:
Image

How correctly fix that?

User avatar
BlubBlab
Posts: 948
Joined: Fri Nov 30, 2012 11:33 pm
Location: My little Pony cafe

Re: EventMonitorStart problem

#2 Post by BlubBlab » Thu Jul 16, 2015 4:10 pm

Yeah because the event isn't part of the ROM client anymore.
You have to write your waypoint file so that it make sure that it is there again.
Jack-of-all-trades, but master-of-only of a few :D

My Reps:
https://github.com/BlubBlab/Micromacro-with-OpenCV (My version of MM2 with OpenCV and for MS Visual Studio)
https://github.com/BlubBlab/rom-bot (rombot with no stop WP and advanced human emulation mode and some other extensions)
https://github.com/BlubBlab/Micromacro-2-Bot-Framework ( A work in progress )
My Tools : viewtopic.php?f=10&t=6226

Stionowl1943
Posts: 35
Joined: Thu Jun 04, 2015 11:57 am

Re: EventMonitorStart problem

#3 Post by Stionowl1943 » Thu Jul 16, 2015 4:36 pm

You mean when i use waypoint file it must work?
Now is correctly?

Code: Select all

<?xml version="1.0" encoding="utf-8"?><waypoints type="TRAVEL">
<onLoad>

EventMonitorStart("Event", "CHAT_MSG_YELL");

function pingrom()
   ping = RoMScript("GetPing()")
   if ping == nil then
      yrest(60000)
      repeat
         yrest(5000)
         local pingserver = system("ping xxx.xxx.xxx.xxx -n 1")
      until string.find(pingserver, "Lost = 0")
      print("NET ON")
      reloginwin(CurrentLoginChar,CurrentLoginAcc)
      load_paths("thiswaypoint.xml")
   end
end
</onLoad>

<!-- #  1 --><waypoint x="-" z="-" y="">
   pingrom()
   local time, moreToCome, charname, msg = EventMonitorCheck("Event", "4,1")
   if msg ~= nil then
      print(msg)
   end
</waypoint>
</waypoints>

User avatar
BlubBlab
Posts: 948
Joined: Fri Nov 30, 2012 11:33 pm
Location: My little Pony cafe

Re: EventMonitorStart problem

#4 Post by BlubBlab » Fri Jul 17, 2015 4:42 pm

I think maybe you should use an player:update() , the first version seems more correct because an waypoint without coordinates can be pushed to the side by rombot now.
Jack-of-all-trades, but master-of-only of a few :D

My Reps:
https://github.com/BlubBlab/Micromacro-with-OpenCV (My version of MM2 with OpenCV and for MS Visual Studio)
https://github.com/BlubBlab/rom-bot (rombot with no stop WP and advanced human emulation mode and some other extensions)
https://github.com/BlubBlab/Micromacro-2-Bot-Framework ( A work in progress )
My Tools : viewtopic.php?f=10&t=6226

Stionowl1943
Posts: 35
Joined: Thu Jun 04, 2015 11:57 am

Re: EventMonitorStart problem

#5 Post by Stionowl1943 » Fri Jul 17, 2015 8:04 pm

1 # Method with waypoint file.
Doesnt work.
After disconnect i see only in console window:
[6] = "Moving to waypoint...",

2 # Method player:update()
Doesnt work.
I receive the same message like before.

Code: Select all

<?xml version="1.0" encoding="utf-8"?><waypoints type="TRAVEL">
<onLoad>
player:update()
EventMonitorStart("Event", "CHAT_MSG_YELL");

function pingrom()
   ping = RoMScript("GetPing()")
   if ping == nil then
      yrest(60000)
      repeat
         yrest(5000)
         local pingserver = system("ping xxx.xxx.xxx.xxx -n 1")
      until string.find(pingserver, "Lost = 0")
      print("NET ON")
      reloginwin(CurrentLoginChar,CurrentLoginAcc)
      loadPaths("thiswaypoint.xml")
   end
end

while (true) do
	player:update()
   pingrom()
   local time, moreToCome, charname, msg = EventMonitorCheck("Event", "4,1")
   if msg ~= nil then
      print(msg)
   end
end
</onLoad>
</waypoints>

btw. when i try put EventMonitorStart("Event", "CHAT_MSG_YELL"); in while (true) do section, it work but catch only 30% of messages.


Ok, i think i found way!

Code: Select all

loadPaths("thiswaypoint.xml")
EventMonitorStart("Event", "CHAT_MSG_PARTY");

User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: EventMonitorStart problem

#6 Post by lisa » Sat Jul 18, 2015 7:57 pm

The issue is that you are loading the same WP in an onload only WP, remove the loadpath and just keep using the same WP after changing char/reclogging.

Which of course means that you need to start monitoring again after the client has restarted.
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Bing [Bot] and 35 guests