How to mark a waypoint to not be skipped

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Message
Author
Mushroomstamp
Posts: 210
Joined: Wed Oct 27, 2010 11:34 am

How to mark a waypoint to not be skipped

#1 Post by Mushroomstamp » Wed Aug 17, 2011 3:54 pm

Is there some way to mark specific waypoints so that they aren't skipped if overrun?

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

Re: How to mark a waypoint to not be skipped

#2 Post by rock5 » Thu Aug 18, 2011 12:25 am

Why?
  • 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

Mushroomstamp
Posts: 210
Joined: Wed Oct 27, 2010 11:34 am

Re: How to mark a waypoint to not be skipped

#3 Post by Mushroomstamp » Mon Aug 22, 2011 11:29 am

Because if it skips a waypoint, it skips all the code that's supposed to be executed at that waypoint. Could miss a repair or pot restock, waypoint direction change, quest turn-in, etc.

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

Re: How to mark a waypoint to not be skipped

#4 Post by rock5 » Mon Aug 22, 2011 8:41 pm

If a waypoint is skipped it still executes any code from 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
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: How to mark a waypoint to not be skipped

#5 Post by lisa » Mon Aug 22, 2011 11:13 pm

Pretty sure the code isn't done if the waypoint is skipped.

Been playing with a new WP today and it skipped the waypoint with the quest check function, so it didnt check the quest status at all and tried to run to the next coords which is in an entirely diff map lol
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
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: How to mark a waypoint to not be skipped

#6 Post by lisa » Mon Aug 22, 2011 11:24 pm

I might do some work on this next week as an option. I find myself doing a WP with coords close together because of the place I'm in and being small corridors and such. It tries to skip waypoints occasionally after a fight and it never works out well.
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
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: How to mark a waypoint to not be skipped

#7 Post by rock5 » Tue Aug 23, 2011 12:11 am

lisa wrote:Pretty sure the code isn't done if the waypoint is skipped.
There is definately code for it. This is the part that deals with skipped waypoints.

Code: Select all

					-- if next waypoint is 'in front' of current waypoint
					if( math.deg(angleDif) > settings.profile.options.WAYPOINT_PASS_DEGR ) then	-- default 90
						if (settings.profile.options.DEBUG_WAYPOINT) then
							cprintf(cli.yellow, "[DEBUG] We overrun waypoint #%d, skip it and move on to #%d\n",currentWp.wpnum, nextWp.wpnum);
						end
						cprintf(cli.green, "We overrun waypoint #%d, skip it and move on to #%d\n",currentWp.wpnum, nextWp.wpnum);
						WPLorRPL:advance();	-- set next waypoint

						-- execute the action from the skiped wp
						if( currentWp.Action and type(currentWp.Action) == "string" ) then
							local actionchunk = loadstring(currentWp.Action);
							assert( actionchunk,  sprintf(language[150], WPLorRPL.CurrentWaypoint) );
							actionchunk();
						end

					end
Did you get the "We overrun waypoint" message?
  • 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

Mushroomstamp
Posts: 210
Joined: Wed Oct 27, 2010 11:34 am

Re: How to mark a waypoint to not be skipped

#8 Post by Mushroomstamp » Tue Aug 23, 2011 1:54 am

lisa wrote:It tries to skip waypoints occasionally after a fight and it never works out well.
Exactly... I currently use two of the same waypoint when I find one that gets skipped frequently.
rock5 wrote:Did you get the "We overrun waypoint" message?
Yes, it prints the message but does not execute the code.

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

Re: How to mark a waypoint to not be skipped

#9 Post by lisa » Tue Aug 23, 2011 3:17 am

prob just as easy to have a profile option and use it on the code that does the skip.
if profile option doesn't exist(false) then do as usual and skip.

That way if the profile option does exist then it won't skip.
Can easily set the "profile" option in the WP.
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
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: How to mark a waypoint to not be skipped

#10 Post by rock5 » Tue Aug 23, 2011 4:26 am

I managed to do a test. I put a print statement saying "wp2 code executed" in waypoint 2. Here is the output

Code: Select all

Fight finished. Killed 2 Domesticated Boshi. (fight #2 / runtime 0 minutes)
Clearing target.
We overrun waypoint #2, skip it and move on to #3
wp2 code executed
Moving to waypoint #3, (-14550, 34368)
See, it does work.

There must be some other reason why you're not seeing it work. Does the code require you to be at the waypoint for it to work? Like talking to an NPC?
  • 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
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: How to mark a waypoint to not be skipped

#11 Post by lisa » Tue Aug 23, 2011 4:29 am

nah I just do a check for quest complete and out of combat, I guess if it checks while it was still in combat, which I didn't think it would.

Code: Select all

function quest()
		local queststate = getQuestStatus("The Garrison's Request")
        	if queststate == "complete" and (not player.Battling) then
		RoMScript('CastSpellByName("Heffner Camp Transport Spell")')
		waitForLoadingScreen();
		player:target_NPC("Snoop the Stubborn");
		sendMacro("ChoiceOption(2);");
		yrest(1000)
		sendMacro('StaticPopup_OnClick(StaticPopup1, 1);')
		waitForLoadingScreen();
		__WPL:setWaypointIndex(__WPL:findWaypointTag("varanas"));
		end
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
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: How to mark a waypoint to not be skipped

#12 Post by rock5 » Tue Aug 23, 2011 5:37 am

I didn't think it would either but either 'queststate == "complete"' or '(not player.Battling)' must be false because if it entered the if statement and didn't teleport then it would have got stuck in the waitForLoadingScreen function.
  • 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
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: How to mark a waypoint to not be skipped

#13 Post by lisa » Tue Aug 23, 2011 8:57 am

quest was deff complete each time I saw it skip waypoints, so it must be the in combat. Can't use the teleport skill while in combat which is of course why I have the check.
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

Dsanchez
Posts: 77
Joined: Thu Aug 04, 2011 11:20 pm

Re: How to mark a waypoint to not be skipped

#14 Post by Dsanchez » Tue Aug 23, 2011 9:00 am

I've been playing around with waypoints a little bit and have had this problem also where it would skip a waypoint and not execute the code on the previous waypoint.

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

Re: How to mark a waypoint to not be skipped

#15 Post by rock5 » Tue Aug 23, 2011 9:29 am

Dsanchez wrote:I've been playing around with waypoints a little bit and have had this problem also where it would skip a waypoint and not execute the code on the previous waypoint.
Skipped waypoint code does execute. Maybe it just seemed to not run like it did for Lisa. What was the code? Maybe we can figure out why didn't work.
  • 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
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: How to mark a waypoint to not be skipped

#16 Post by lisa » Tue Aug 23, 2011 9:43 am

I still like the idea of having a "profile" type option to set it to always go in order, obviously default would be to skip but you could set the option in WP onload or even a waypoint# and then set it back later to skip even in the same WP file.
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
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: How to mark a waypoint to not be skipped

#17 Post by rock5 » Tue Aug 23, 2011 9:56 am

lisa wrote:I still like the idea of having a "profile" type option to set it to always go in order, obviously default would be to skip but you could set the option in WP onload or even a waypoint# and then set it back later to skip even in the same WP file.
So what you are saying is you want an option so it doesn't skip the waypoints, so it always goes to the waypoints even if it has to go backwards?

I guess the purpose of that would be if you have code at the waypoint that requires you to be at the waypoint?
  • 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
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: How to mark a waypoint to not be skipped

#18 Post by lisa » Tue Aug 23, 2011 10:14 am

And when you are going through tight corridors with lots of turns and obsticles lol
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

Mushroomstamp
Posts: 210
Joined: Wed Oct 27, 2010 11:34 am

Re: How to mark a waypoint to not be skipped

#19 Post by Mushroomstamp » Tue Aug 23, 2011 10:30 am

Saw this in the posted code;

Code: Select all

settings.profile.options.WAYPOINT_PASS_DEGR ) then   -- default 90
Couldn't we do something like;

Code: Select all

<option name="WAYPOINT_PASS_DEGR"	value="180" />
in a profile to double the distance required for it to skip a WP?

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

Re: How to mark a waypoint to not be skipped

#20 Post by rock5 » Tue Aug 23, 2011 10:36 am

Mushroomstamp wrote:Saw this in the posted code;

Code: Select all

settings.profile.options.WAYPOINT_PASS_DEGR ) then -- default 90
Couldn't we do something like;

Code: Select all

<option name="WAYPOINT_PASS_DEGR" value="180" />
in a profile to double the distance required for it to skip a WP?
I noticed the same thing but I think that value is an angle. I think the value you could use is

Code: Select all

settings.profile.options.WAYPOINT_PASS
It defaults to 100 and only skips the waypoint if the distance to the waypoint is less than this value. So setting it to 0 would stop it skipping I think.
  • 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: No registered users and 1 guest