[REQ] occupiedSlots, totalSlots = 60/60 then run Merchantxml

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Post Reply
Message
Author
Ascendency4
Posts: 11
Joined: Fri Feb 11, 2011 12:26 pm

[REQ] occupiedSlots, totalSlots = 60/60 then run Merchantxml

#1 Post by Ascendency4 » Tue May 03, 2011 5:26 am

i "think" my request is fairly simple but my lack of knowledge regarding syntax for this bot has left me stumped on this one.

i have many many waypoints which run a simple loop out gathering various things far far from a vendor so in the last <waypoint> </waypoint> of each loop i would like to do a bag count check.

all my bots have the normal two bags so it would check if 60/60 slots are full if so. run blahblah_Merchant.xml which would be a waypoint that reverts to the long walk to a vendor, cleans my bags, maybe mails off runes/dailies/mats then walks back.

would someone be so kind as to provide me the proper code to do a bagcheck and revert to another waypoint if the conditions are met?

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

Re: [REQ] occupiedSlots, totalSlots = 60/60 then run Merchan

#2 Post by rock5 » Tue May 03, 2011 8:08 am

Yes, pretty simple.

Code: Select all

if inventory:itemTotalCount("<EMPTY>") == 0 then -- 0 empty spaces in bag
    loadPathS("blahblah_Merchant.xml")
end
  • 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

Ascendency4
Posts: 11
Joined: Fri Feb 11, 2011 12:26 pm

Re: [REQ] occupiedSlots, totalSlots = 60/60 then run Merchan

#3 Post by Ascendency4 » Tue May 03, 2011 10:00 am

you rock ^_^



(no pun intended)

Ascendency4
Posts: 11
Joined: Fri Feb 11, 2011 12:26 pm

Re: [REQ] occupiedSlots, totalSlots = 60/60 then run Merchan

#4 Post by Ascendency4 » Tue May 03, 2011 11:30 am

Code: Select all

if inventory:itemTotalCount("<EMPTY>") == 0 then loadPathS ("Notes_Merchant.xml") 
is giving me a " XML Parse "error. it doesnt seem to be capable of compiling the ("<EMPTY>") would simply:

Code: Select all

 if inventory:itemTotalCount(0) == 0 then 
reach the same effect? or am i missing something?

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

Re: [REQ] occupiedSlots, totalSlots = 60/60 then run Merchan

#5 Post by rock5 » Tue May 03, 2011 11:45 am

That's what I usually do but I thought I'd do something different this time. It does work, I tested it. Maybe the capital S in loadPathS is causing the error, sorry. Also, did you include an 'end'?
  • 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

Ascendency4
Posts: 11
Joined: Fri Feb 11, 2011 12:26 pm

Re: [REQ] occupiedSlots, totalSlots = 60/60 then run Merchan

#6 Post by Ascendency4 » Tue May 03, 2011 12:07 pm

Code: Select all

<?xml version="1.0" encoding="utf-8"?><waypoints>
	<!-- #  1 --><waypoint x="10274" z="7289" y="-9"> </waypoint>
	<!-- #  2 --><waypoint x="10018" z="7556" y="20">	</waypoint>
	<!-- #  3 --><waypoint x="9713" z="7597" y="12">	</waypoint>
	<!-- #  4 --><waypoint x="9595" z="7414" y="7">	</waypoint>
	<!-- #  5 --><waypoint x="9749" z="7088" y="-8">	</waypoint>
	<!-- #  6 --><waypoint x="10191" z="7149" y="-3">	if inventory:itemTotalCount("<EMPTY>") == 0 then loadPathS("Earthcrabs_Merchant.xml") end </waypoint>
</waypoints> 

no idea where i went wrong. however rombot appears to be upset about the ("<EMPTY>") as my yellow text error message says line: 7 Collumn: 139 Pos: 500 Message: mismatched tag

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

Re: [REQ] occupiedSlots, totalSlots = 60/60 then run Merchan

#7 Post by rock5 » Tue May 03, 2011 12:25 pm

Ah yes, the '<' bracket problem. That's probably why I used to use '0' instead. I forgot about that. I tested it with the command line script. That doesn't suffer from that problem. That's why it worked. Yeh, so just use 0.

And don't forget to change the capital 'S' to a small 's'.

Code: Select all

   <!-- #  6 --><waypoint x="10191" z="7149" y="-3">   if inventory:itemTotalCount(0) == 0 then loadPaths("Earthcrabs_Merchant.xml") end </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

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests