Suggestion for better waypoint navigation

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Post Reply
Message
Author
User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Suggestion for better waypoint navigation

#1 Post by rock5 » Wed Apr 21, 2010 10:11 pm

I been thinking for awhile now that there is no really reliable waypoint navigation control.

When using "__WPL:setWaypointIndex(index)" if you add waypoints it will no longer point to the correct point. Plus it can be hard to find the right waypoint index if the commented numbers are wrong because of manual changes to the file.

You can use "__WPL:setWaypointIndex(__WPL:getNearestWaypoint(X, Z));" but it is possible to, either intentionally or unintentionally, have different waypoints with the same x, z values. So it's possible to go to the wrong waypoint.

What I envision is being able to add tags to the waypoints that get loaded when the waypoint list gets loaded. Something like this;

Code: Select all

	<!-- #  27 --><waypoint x="1111" z="2222" tag="Repair">	</waypoint>
So when it loads it records somewhere that "Repair"=27, maybe in an array. Then you could make a function to get that value, maybe GetTagIndex("Repair") which returns 27.

So to go to the correct waypoint without fail you would use;

Code: Select all

__WPL:setWaypointIndex(GetTagIndex("Repair"))
You also get the added benefit that you can copy code from 1 waypoint file to another similar waypoint file without having to change all the index values or x, z addresses. You would just need to put the tags at the correct waypoint. Also it wouldn't interfere with the functionality of any current waypoint files.

I don't believe it would be difficult to implement. All you would need to do is add an extra step when loading the waypoint file to read and store the tag values and create a function to get them.

What do you 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

User avatar
Administrator
Site Admin
Posts: 5307
Joined: Sat Jan 05, 2008 4:21 pm

Re: Suggestion for better waypoint navigation

#2 Post by Administrator » Fri Apr 23, 2010 2:29 am

This is included in r437. The the function is CWaypointList:findWaypointTag(tagname). It is case-insensitive, and does not check for unique identifiers (that's up to the user to manage).

Example:

Code: Select all

	<!-- #  1 --><waypoint x="-265" z="-6430" tag="first"></waypoint>
	<!-- #  2 --><waypoint x="-260" z="-6430" tag="second">
		__WPL:setWaypointIndex(__WPL:findWaypointTag("first"));
	</waypoint>

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

Re: Suggestion for better waypoint navigation

#3 Post by rock5 » Fri Apr 23, 2010 4:18 am

Thanks again, you're a star.

I did think it was a good idea. :)
  • 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 3 guests