Cancel all previous rombot actions?

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

Cancel all previous rombot actions?

#1 Post by ZZZZZ » Wed Aug 06, 2014 2:10 am

I can't remember if there was something to deal with this already, I think I may have asked before but not sure.

Is there a command to stop the execution of all previously loaded code, so that I can then continue with something else?
Sometimes my alts will crash in mini-games and it simply gets to 10/10 stuck errors then I had it going to sleep. So I decided to change it so if it hits 10/10 it runs the client restart function and then, depending on what waypoint it was in when it crashed, loads the waypoint for the next minigame.

The issue im having though, is that after reloging it'll still try and finish what ever it was doing before it starts what I need it to.

Example of the function I added to Unstickfailure:

Code: Select all

	<onUnstickFailure><![CDATA[
      if ShellAlts() == true then
			local currentWP = string.lower(__WPL.FileName)
			ChangeCharRestart("current")
			if currentWP == "example" then
				loadPaths("example2");
			end
		else
			player:sleep();
		end
	]]></onUnstickFailure>

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

Re: Cancel all previous rombot actions?

#2 Post by rock5 » Wed Aug 06, 2014 3:02 am

Normal waypoint files shouldn't have a problem because if it gets stuck between waypoints then when it runs your unstick code then it would load the new file and immediately start using it. Many of the mini games don't use waypoints but run in the onload or use long complex functions to do tasks. If it gets stuck in the middle of a lot of code it will always try to finish that code before using any newly loaded waypoint file. This can't be helped. As far as I know you can't stop a function or block of code from finishing executing from the outside. Any checks would have to be done within the function. In regards to mini games, the mini games themselves would have to check for failures and they would have to check for failures at every possibly place it could get stuck. That's too much work. It might be possible to start a new MM console and run a new instance of the waypoint file you are running but I'm not sure how to do it.
  • 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

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

Re: Cancel all previous rombot actions?

#3 Post by BlubBlab » Wed Aug 06, 2014 5:41 am

You can try this:
Huge a new function like I described here http://solarstrike.net/phpBB3/viewtopic.php?f=6&t=5764 in post 2, for the purpose of huge a function after restart.

Put in the new function loadPaths() with what you want to load after you failed. I'm not sure if it works 100% but I saw very often that the follow code after loadPaths() never got executed. Otherwise you have to set flags that return out of the waypoint file.
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

Post Reply

Who is online

Users browsing this forum: Semrush [Bot] and 5 guests