Problem with waypoint

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Post Reply
Message
Author
metralla123
Posts: 11
Joined: Fri Jul 22, 2011 8:52 pm

Problem with waypoint

#1 Post by metralla123 » Wed Aug 01, 2012 6:59 am

Hi buddies, I have a problem with a part of a waypoint, took 3 days trying to solve it but without success.

Code: Select all

<waypoint x="3075" z="2710" y="250">EventMonitorStart("loteado","WARNING_MESSAGE"); 
   local target = player:getTarget();</waypoint>
        <waypoint x="3015" z="2742" y="248"> if player:target_Object(113137,7000,false,false) then
     printf("Loteando\n");
     repeat
       local time, moretocome, msg = EventMonitorCheck("loteado","1")
      if msg ~= nil then
           if string.find(msg, "You have already opened this treasure chest") then
              cprintf(cli.red, "Siguiente\n");
             __WPL:setWaypointIndex(__WPL:findWaypointTag("1cofre"));
	EventMonitorStop("loteado");
        break;
	end
      end
until true
      end			
</waypoint>
	<waypoint x="2960" z="2934" y="248">
        player:update();
        sendMacro("LeaveParty();");
        yrest(4000);
        waitForLoadingScreen();sendMacro('InviteByName("Charnamer")');
        __WPL:setWaypointIndex(__WPL:findWaypointTag("comienzo"));
        end 	</waypoint>
        <waypoint x="2960" z="2934" y="248" tag="1cofre"></waypoint>
	<waypoint x="2965" z="3107" y="248"></waypoint>
	<waypoint x="3026" z="3199" y="248"></waypoint>
When the bot not loot the chest and get the warning message is functioning normally but when loot, walk around and break.
Any help? Thanks!!
I use google translator ;)

User avatar
Rintintin
Posts: 55
Joined: Tue Jan 01, 2013 7:45 am
Location: Germany

Re: Problem with waypoint

#2 Post by Rintintin » Tue Jan 01, 2013 11:04 am

Where is this and is it for?
in-game coords or name of the ini might behelpful

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

Re: Problem with waypoint

#3 Post by lisa » Tue Jan 01, 2013 4:15 pm

Code: Select all

if player:target_Object(113137,7000,false,false) then
	printf("Loteando\n");
	repeat
		local time, moretocome, msg = EventMonitorCheck("loteado","1")
		if msg ~= nil then
			if string.find(msg, "You have already opened this treasure chest") then
				cprintf(cli.red, "Siguiente\n");
				__WPL:setWaypointIndex(__WPL:findWaypointTag("1cofre"));
				EventMonitorStop("loteado");
				break;
			end
		end
	until true
end
I think the issue might be with the logic of the code, in the repeat all you do is monitor the text, you don't actually try to open the chest again. Also the end of the repeat is just "true" so it will probably stay in the loop forever or until Micromacro errors because of the loop with no yrest(500) in it.

Maybe try something like this.

Code: Select all

if player:target_Object(113137,7000,false,false) then
	printf("Loteando\n");
	repeat
		player:target_Object(113137,7000,false,false)
		yrest(1000)
		local time, moretocome, msg = EventMonitorCheck("loteado","1")
		if msg ~= nil then
			if string.find(msg, "You have already opened this treasure chest") then
				cprintf(cli.red, "Siguiente\n");
				__WPL:setWaypointIndex(__WPL:findWaypointTag("1cofre"));
				EventMonitorStop("loteado");
				break;
			end
		end
	until not player:target_Object(113137,7000,false,false)
end
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

User avatar
ellisdee
Posts: 24
Joined: Mon Sep 26, 2011 3:03 pm

Re: Problem with waypoint

#4 Post by ellisdee » Thu Jan 24, 2013 7:47 pm

Where is this and is it for?
in-game coords or name of the ini might behelpful
Looks like its around one of the 4 chests at the end of Goblins shell run.

Post Reply

Who is online

Users browsing this forum: No registered users and 9 guests