Event Monitoring

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Post Reply
Message
Author
ZZZZZ
Posts: 513
Joined: Sun Oct 21, 2012 1:42 am

Event Monitoring

#1 Post by ZZZZZ » Fri May 17, 2013 9:07 pm

Hey, I have never worked with event monitoring before and looking over past threads I have put what I thought was correct into my goblins waypoint, but all it does is return false and runs endlessly between the 2 waypoint direction changes.

Code: Select all

	<!-- #  5 --><waypoint x="3662" z="3163" y="248">		getTreasureChest()
	__WPL:setForcedWaypointType("NORMAL");
	EventMonitorStart("Earth Chest", "CHAT_MSG_SYSTEM");
	</waypoint>
	<!-- #  6 --><waypoint x="3682" z="3116" y="248">	changeProfileOption("MAX_TARGET_DIST", 150);
	__WPL:setDirection(WPT_FORWARD);
	</waypoint>
	<!-- #  7 --><waypoint x="3733" z="2993" y="248">	</waypoint>
	<!-- #  8 --><waypoint x="3765" z="2898" y="248">	</waypoint>
	<!-- #  9 --><waypoint x="3753" z="2821" y="248">	</waypoint>
	<!-- # 10 --><waypoint x="3709" z="2740" y="248">	</waypoint>
	<!-- # 11 --><waypoint x="3631" z="2664" y="248">	local time, moreToCome, msg = EventMonitorCheck("Earth Chest", "1")
	if string.find(msg, "earth furnace") then
	EventMonitorStop("Earth Chest");
	changeProfileOption("MAX_TARGET_DIST", 50);
			else
	__WPL:setDirection(WPT_BACKWARD);
	end
	</waypoint>
Any help would be great because i wouldnt have a clue lol.

kenzu38
Posts: 279
Joined: Sun Dec 02, 2012 8:52 am

Re: Event Monitoring

#2 Post by kenzu38 » Fri May 17, 2013 11:33 pm

Add a print on what msg it catches.

Code: Select all

if msg ~= nil then
print(msg.."\n")
end
And then make sure you got the capital letters right, as far as I remember string.find is case-sensitive.

And thirdly, your gettreasurechest() function, is it also monitoring something? Might be the one conflicting with your other event monitor.

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Event Monitoring

#3 Post by rock5 » Fri May 17, 2013 11:52 pm

If your close enough to see the chest, why not just check if the chest exists?

Code: Select all

if player:findNearestNameOrId(chestIdOrName) then
   changeProfileOption("MAX_TARGET_DIST", 50);
else
   __WPL:setDirection(WPT_BACKWARD);
end
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 2 guests