Endus
Community Developer
- Joined
- Jul 9, 2012
- Messages
- 458
I believe the problem is that you are trying to do the gathering of both Lightning Crystal and Lightning Shard in the same loop.
I think you should break this out into multiple <If Condition>'s where you're only doing the if on a single item at a time
You're right, I think that fixed it. Was that a recent change to Order Bot? I'm assuming the original creator of the profile tested/used it before?
Oh well, I'll fix it up and post a revised edition (once I'm sure it works). Thanks for the help WDIG!
![Smile :) :)](https://cdn.jsdelivr.net/joypixels/assets/8.0/png/unicode/64/1f642.png)
EDIT: Just in case anyone is curious/wants to try it before I'm done testing, this is basically all I've done to it:
Code:
<!-- Gather Lightning Crystals -->
<If Condition="ItemCount(12) < 5000">
<If Condition="not IsOnMap(146)">
<TeleportTo Name="Little Ala Mhigo" AetheryteId="19" />
</If>
<Gather while ="ItemCount(12) < 5000">
<GatherObject>Rocky Outcrop</GatherObject>
<HotSpots>
<HotSpot Radius="95" XYZ="-122.5412, 21.88736, -489.5768" />
</HotSpots>
<ItemNames>
<ItemName>Lightning Crystal</ItemName>
<ItemName>Lightning Shard</ItemName>
</ItemNames>
<GatheringSkillOrder>
<GatheringSkill SpellName="Byregot's Ward" TimesToCast="1" />
</GatheringSkillOrder>
</Gather>
</If>
<!-- Gather Lightning Shards -->
<If Condition="ItemCount(6) < 7500">
<If Condition="not IsOnMap(146)">
<TeleportTo Name="Little Ala Mhigo" AetheryteId="19" />
</If>
<Gather while ="ItemCount(6) < 7500">
<GatherObject>Rocky Outcrop</GatherObject>
<HotSpots>
<HotSpot Radius="95" XYZ="-122.5412, 21.88736, -489.5768" />
</HotSpots>
<ItemNames>
<ItemName>Lightning Shard</ItemName>
</ItemNames>
<GatheringSkillOrder>
<GatheringSkill SpellName="Byregot's Ward" TimesToCast="1" />
</GatheringSkillOrder>
</Gather>
</If>
Crystals need to come before Shards (and Shards needs to be in the Crystal code) due to the fact that we need less Crystals and not all nodes have Crystals (some only have Shards). This should prevent the error "Couldnt Find desired item...picking first one..." as Shards should always be available at these hotspots.
I'm also testing out an improved teleport code since we don't want to bot teleporting back to the Aetheryte just because we're switching from Crystals to Shards @ the same Hotspot.
The only danger I foresee is somehow still mining the max Shards (9999) before you get to the desired Crystal amount (5000). At that point the bot would likely freeze at the node (that only had a Shard available) because it's looking for Crystals and none are available and yet it can't hold anymore Shards. The only solution that I know of would be lowering the amount of desired Crystals so that doesn't happen. That or add a "junk" filler (another item the node happens to have available) for the bot to mine when Shards = 9999 and Crystals < 5000 (although I don't know if that sort of logic is even available for Order Bot).
Last edited: