[REQ] occupiedSlots, totalSlots = 60/60 then run Merchantxml
-
- Posts: 11
- Joined: Fri Feb 11, 2011 12:26 pm
[REQ] occupiedSlots, totalSlots = 60/60 then run Merchantxml
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?
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?
Re: [REQ] occupiedSlots, totalSlots = 60/60 then run Merchan
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
-
- Posts: 11
- Joined: Fri Feb 11, 2011 12:26 pm
Re: [REQ] occupiedSlots, totalSlots = 60/60 then run Merchan
you rock ^_^
(no pun intended)
(no pun intended)
-
- Posts: 11
- Joined: Fri Feb 11, 2011 12:26 pm
Re: [REQ] occupiedSlots, totalSlots = 60/60 then run Merchan
Code: Select all
if inventory:itemTotalCount("<EMPTY>") == 0 then loadPathS ("Notes_Merchant.xml")
Code: Select all
if inventory:itemTotalCount(0) == 0 then
Re: [REQ] occupiedSlots, totalSlots = 60/60 then run Merchan
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
-
- Posts: 11
- Joined: Fri Feb 11, 2011 12:26 pm
Re: [REQ] occupiedSlots, totalSlots = 60/60 then run Merchan
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
Re: [REQ] occupiedSlots, totalSlots = 60/60 then run Merchan
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'.
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
Who is online
Users browsing this forum: No registered users and 2 guests