alternative Merchant-waypoint

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Post Reply
Message
Author
nofuture
Posts: 2
Joined: Sat Mar 20, 2010 6:34 am

alternative Merchant-waypoint

#1 Post by nofuture » Sat Mar 20, 2010 7:10 am

Hiho,

I want to add to my profile/waypoint an alternative waypoint, if i have more then x items in my bag or the durabily of my armor/weapon is too low.
On the wiki-page i´ve read all i need, but it still don´t get back on the "main-waypoint"

this is my code (first i had the code in the profile in the onload-tag, now in the waypoint without onload - both works):

Code: Select all

<waypoints>
inventory:update();
occupiedSlots, totalSlots = sendMacro("GetBagCount();");

	if( occupiedSlots > 60 ) then
		printf( occupiedSlots );
		loadPaths( "waypoint_merchant" );
	end;
<!-- #  1 --><waypoint x="-..." z="...">	</waypoint>
</waypoints>
in the micromacro-window it show me for example "63" at start and say that it loads "waypoint_merchant.xml".
If the Merchant-Waypoint ends, i have at the end of "waypoint_merchant.xml" linked back:

Code: Select all

<waypoints type="TRAVEL">
	<!-- #  1 --><waypoint x="-..." z="..." type="NORMAL">	</waypoint>
...
loadPaths( "waypoint" );
</waypoints>
But after the bot arrived the end of "waypoint_merchant.xml" it restart the merchant-waypoint and don´t load the main-waypoint to make the check to farm the main-waypoint :(

someone know that problem and can tell me, what could be wrong?

thx

nofuture

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

Re: alternative Merchant-waypoint

#2 Post by Administrator » Sat Mar 20, 2010 9:15 am

loadPaths( "waypoint" );
</waypoints>
There's your problem. The loadPaths() call must be inside a waypoint tag, otherwise it wouldn't know when to call it.

nofuture
Posts: 2
Joined: Sat Mar 20, 2010 6:34 am

Re: alternative Merchant-waypoint

#3 Post by nofuture » Sat Mar 20, 2010 2:50 pm

thank you,
you´re right, that was the problem.
now it works :-)

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

Re: alternative Merchant-waypoint

#4 Post by rock5 » Sun Mar 21, 2010 5:09 am

I never realised you could put code outside of waypoint tags.

Does that get executed when the waypoint file is loaded?

Why haven't I ever seen that mentioned before?

That's perfect for changing profile setting to match the waypoint file.

For instance I used to put 'settings.profile.mobs = {"Beetle"};' in a waypoint tag of a waypoint file for killing beetles, but I could just leave it outside of tags so it gets executed as soon as the file is loaded?
  • 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: alternative Merchant-waypoint

#5 Post by Administrator » Sun Mar 21, 2010 10:17 am

Code: Select all

I never realised you could put code outside of waypoint tags.
You can't. It won't generate an error, but it also won't do anything.

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

Re: alternative Merchant-waypoint

#6 Post by rock5 » Sun Mar 21, 2010 5:37 pm

Administrator wrote:

Code: Select all

I never realised you could put code outside of waypoint tags.
You can't. It won't generate an error, but it also won't do anything.
Doesn't the first block of code above have some code outside of waypoint tags?

You only corrected him on the loadpaths being outside of tags? And he indicated, once he fixed that, that it worked?
  • 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: alternative Merchant-waypoint

#7 Post by Administrator » Sun Mar 21, 2010 6:55 pm

That code should also not do anything. If it did, that would be a bug.

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

Re: alternative Merchant-waypoint

#8 Post by rock5 » Sun Mar 21, 2010 8:46 pm

It would be cool if you could use something like 'onload' tags with waypoint files. Any chance that could be implemented?
  • 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: alternative Merchant-waypoint

#9 Post by Administrator » Mon Mar 22, 2010 6:45 pm

rock5 wrote:It would be cool if you could use something like 'onload' tags with waypoint files. Any chance that could be implemented?
You can with r428.

Code: Select all

<waypoints>
     <onLoad>doSomething();</onLoad>
</waypoints>

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

Re: alternative Merchant-waypoint

#10 Post by rock5 » Mon Mar 22, 2010 7:08 pm

Administrator wrote:
rock5 wrote:It would be cool if you could use something like 'onload' tags with waypoint files. Any chance that could be implemented?
You can with r428.

Code: Select all

<waypoints>
     <onLoad>doSomething();</onLoad>
</waypoints>
Oh cool. Excellent!

Thank you sooo much.
  • 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

unicron
Posts: 38
Joined: Fri Mar 05, 2010 3:29 pm

Re: alternative Merchant-waypoint

#11 Post by unicron » Wed Mar 24, 2010 6:25 pm

I had been wondering exactly how to integrate filled bag slots with my waypoints and the onload. Useful thread.

Post Reply

Who is online

Users browsing this forum: Semrush [Bot] and 1 guest