Will loadpaths return to waypoint file that called?

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Post Reply
Message
Author
ou81too
Posts: 12
Joined: Fri Jul 23, 2010 2:21 pm

Will loadpaths return to waypoint file that called?

#1 Post by ou81too » Mon Jul 26, 2010 11:46 am

In the following scenario

Code: Select all

waypoint 1
waypoint 2
	if need repair
		loadpaths("repair")
	endif
waypoint 3
waypoint 4
waypoint 5
if the script enters the loadpaths("repair") in waypoint 2, does the script continue with waypoint 3 after finishing with "repair.xml"? Or do I need to add a loadpaths() in my "repair.xml" to have it return to the original waypoint file?

I'm trying to have a generic "repair.xml" that multiple waypoint files could use if I didn't have to add a loadpaths() back to the calling waypoint file.

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

Re: Will loadpaths return to waypoint file that called?

#2 Post by rock5 » Mon Jul 26, 2010 12:23 pm

ou81too wrote:In the following scenario

Code: Select all

waypoint 1
waypoint 2
	if need repair
		loadpaths("repair")
	endif
waypoint 3
waypoint 4
waypoint 5
if the script enters the loadpaths("repair") in waypoint 2, does the script continue with waypoint 3 after finishing with "repair.xml"? Or do I need to add a loadpaths() in my "repair.xml" to have it return to the original waypoint file?

I'm trying to have a generic "repair.xml" that multiple waypoint files could use if I didn't have to add a loadpaths() back to the calling waypoint file.
No, you have to put a returning loadpaths() in the "repair.xml" script. I'm not sure how you could use a generic "repair.xml". It wouldn't be that useful in most cases anyway as repair scripts usually need to travel from the farming area to the repair npc and back and that will be different for each waypoint file.

To reduce the number of waypoint files, what I like to do is combine the repair script with the main waypoint file. These are the steps I take.

1. Start at the location you want to check if you need repairs.
2. Create your farming waypoints as normal (eg. killing mobs or harvesting) until you return to where you started. For this example lets assume you create points 1-10.
3. Take note of the waypoint number ie. 10 and continue to the repair npc. Target the npc then return to the starting point. Lets assume you created another 6 points from 11-16 where point 13 is where you targeted the npc.
4. Save the file then edit it something like this.

Code: Select all

<waypoint 1>
<waypoint 2>
....
<waypoint 9>
<waypoint 10>if (you don't need repair) then goto waypoint 1
<waypoint 11>
<waypoint 12>
<waypoint 13>player:merchant(npc)
<waypoint 14>
<waypoint 15>
<waypoint 16>
Of course this is not an actual waypoint file but what it does is keep looping from 1-10 until it needs repair. Then it travels to the repair npc, returns to the starting point and continues to point 1.

I find this a simple way of doing it. Hope that helps
  • 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 4 guests