waypoint wait problem

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Post Reply
Message
Author
kanta
Posts: 424
Joined: Thu Nov 11, 2010 4:08 pm

waypoint wait problem

#1 Post by kanta »

I have a waypoint setup that's been working for the most part. Occasionally it fails and I need to somehow put a timer into the following function:

Code: Select all

	<!-- #133 --><waypoint x="3526" z="2693" y="47">
			while (true) do
   settings.options.MAX_TARGET_DIST = 300;
   player:findTarget("Boddosh");
   local target = player:getTarget();
   if(target.Name == "Boddosh") then
   player:restrnd(101, 8, 10);
   break;
   end;
yrest(300)
end;		
  </waypoint> <!-- Boddosh room -->
	<!-- #134 --><waypoint x="3621" z="2771" y="49">	</waypoint>
	<!-- #135 --><waypoint x="3697" z="2599" y="47">	</waypoint>
	<!-- #136 --><waypoint x="3905" z="2626" y="47">	</waypoint>
	<!-- #137 --><waypoint x="4037" z="2648" y="47">	</waypoint>
	<!-- #138 --><waypoint x="3905" z="2626" y="47">	</waypoint>
	<!-- #139 --><waypoint x="3697" z="2599" y="47">	</waypoint>
	<!-- #140 --><waypoint x="3621" z="2771" y="49">	</waypoint>
	<!-- #141 --><waypoint x="3526" z="2693" y="47"> </waypoint>
	<!-- #142 --><waypoint x="3566" z="2692" y="49">
			while (true) do
   settings.options.MAX_TARGET_DIST = 300;
   player:findTarget("Boddosh");
   local target = player:getTarget();
   if(target.Name == "Boddosh") then
   player:restrnd(101, 12, 15);
   break;
   end;
yrest(300)
end;		
  	</waypoint>
I've been looking around for a way to do it on my own but I haven't been able to find anything yet. The first occurrence is fine. My character gets to the entrance of the Boddosh room, waits till it detects Boddosh then waits 8 - 10 seconds for him to move back out of the room so I can clear 1/2 the room safely. It then goes back towards the entrance to wait a second time so I can clear the remaining mobs. On occasion Boddosh catches my character before it makes it to safety and it somehow lives through the fight before the second wait occurrence happens. Because of this it will wait indefinitely at the second wait. Is there some way to get a timer in there so it will continue after approximately 2 minutes?
Scout/Knight/Rogue 70/66/66
User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: waypoint wait problem

#2 Post by rock5 »

First, if you are only going to set MAX_TARGET_DIST = 300 then you only need to do it once, either where you first need to change it or in an 'onLoad' section at the top of your waypoint file. If you only need it at 300 for the boddosh fight then you should be changing it back after the fight or room.

To add a timer just change the while loop to a check for the time.

Code: Select all

	settings.options.MAX_TARGET_DIST = 300;
	local startwait = os.clock()
	while ( 120 > (os.clock() - startwait) ) do
		player:findTarget("Boddosh");
		local target = player:getTarget();
		if(target.Name == "Boddosh") then
			player:restrnd(101, 12, 15);
			break;
		end;
		yrest(300)
	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
kanta
Posts: 424
Joined: Thu Nov 11, 2010 4:08 pm

Re: waypoint wait problem

#3 Post by kanta »

thank you
Scout/Knight/Rogue 70/66/66
Post Reply