Tweety
New Member
- Joined
- Sep 6, 2013
- Messages
- 317
- Reaction score
- 0
It's a PB AH profile.
The part that crashes HB is this one:
The triple withdraw is because the bot gets 5-6 items, posts them and then goes to bang to get more while he could've gotten 20 items at ones.
The bot gets items, posts, goes back, gets items, posts, when he runs out of items to get because the max amount on AH is reached he crashes.
I think I have an endless circle there.
However, I've read the code a thousand times - it does not have endless circle IMO.
It checks if we have difference in our free bag slots - if there are posts and runs the subroutine again.
However if there is no difference = we didn't get new items it should just go out of the subroutine.
Here's the whole while that I got:
The part that crashes HB is this one:
Code:
<SubRoutine SubRoutineName="Check Bag Slots">
<If Condition="(int)var3 == (int)Me.FreeBagSlots" IgnoreCanRun="True">
<CustomAction Code="Log (Colors.Crimson,"AHBuddy: ",Colors.BlanchedAlmond,"No new items.");" />
<CustomAction Code="vara4 = 2;" />
</If>
<If Condition="(int)var3 != (int)Me.FreeBagSlots" IgnoreCanRun="True">
<CustomAction Code="var3 = (int)Me.FreeBagSlots;" />
<CustomAction Code="Log (Colors.Crimson,"AHBuddy: ",Colors.BlanchedAlmond,"Got new items.");" />
<CustomAction Code="vara4 = 1;" />
<StackItemsAction />
</If>
<If Condition="vara4 == 1" IgnoreCanRun="True">
<CallSubRoutine SubRoutineName="PostToAH" />
<CustomAction Code="var3 = (int)Me.FreeBagSlots;" />
<CallSubRoutine SubRoutineName="WithdrawBank" />
<CallSubRoutine SubRoutineName="WithdrawBank" />
<CallSubRoutine SubRoutineName="WithdrawBank" />
<CallSubRoutine SubRoutineName="Check Bag Slots" />
</If>
</SubRoutine>
The bot gets items, posts, goes back, gets items, posts, when he runs out of items to get because the max amount on AH is reached he crashes.
I think I have an endless circle there.
However, I've read the code a thousand times - it does not have endless circle IMO.
It checks if we have difference in our free bag slots - if there are posts and runs the subroutine again.
However if there is no difference = we didn't get new items it should just go out of the subroutine.
Here's the whole while that I got:
Code:
<While Condition="true" IgnoreCanRun="True">
<If Condition="(HasNewMail || MailCount> 0)" IgnoreCanRun="True">
<CustomAction Code="Log (Colors.Crimson,"AHBuddy: ",Colors.BlanchedAlmond,"There is new mail.");" />
<GetMailAction GetMailType="AllItems" ItemID="" CheckNewMail="True" MaxCODAmount="0g0s0c" MinFreeBagSlots="0" AutoFindMailBox="True" Location="0, 0, 0" />
</If>
<StackItemsAction />
<If Condition="(bool)var1 && (bool)Settings["Cancel Undercut Auctions"]" IgnoreCanRun="True">
<CustomAction Code="Log (Colors.Crimson,"AHBuddy: ",Colors.BlanchedAlmond,"Checking for undercut auctions.");" />
<CancelAuctionAction UseCategory="False" ItemID="0" AutoFindAh="True" MinBuyout="0g0s1c" IgnoreStackSizeBelow="1" />
</If>
<CustomAction Code="var1 = false;" />
<CallSubRoutine SubRoutineName="Get mail" />
<SubRoutine SubRoutineName="Get mail">
<CustomAction Code="var5 = false;" />
<CustomAction Code="Log (Colors.Crimson,"AHBuddy: ",Colors.BlanchedAlmond,"Checking for new mail.");" />
<CustomAction Code="var3 = (int)Me.FreeBagSlots;" />
<If Condition="(!HasNewMail && MailCount == 0)" IgnoreCanRun="True">
<CustomAction Code="Log (Colors.Crimson,"AHBuddy: ",Colors.BlanchedAlmond,"NO new mail.");" />
</If>
<If Condition="(HasNewMail || MailCount> 0)" IgnoreCanRun="True">
<CustomAction Code="Log (Colors.Crimson,"AHBuddy: ",Colors.BlanchedAlmond,"There is new mail.");" />
<GetMailAction GetMailType="AllItems" ItemID="" CheckNewMail="True" MaxCODAmount="0g0s0c" MinFreeBagSlots="0" AutoFindMailBox="True" Location="0, 0, 0" />
</If>
<If Condition="(int)var3 != (int)Me.FreeBagSlots" IgnoreCanRun="True">
<CustomAction Code="Log (Colors.Crimson,"AHBuddy: ",Colors.BlanchedAlmond,"Got new items from mail, posting on AH.");" />
<StackItemsAction />
<CallSubRoutine SubRoutineName="PostToAH" />
<CustomAction Code="var5 = true;" />
</If>
<If Condition="(int)var3 == (int)Me.FreeBagSlots" IgnoreCanRun="True">
<CustomAction Code="Log (Colors.Crimson,"AHBuddy: ",Colors.BlanchedAlmond,"No new items to post on AH.");" />
</If>
<If Condition="(HasNewMail || MailCount > 0) && (bool)var5" IgnoreCanRun="True">
<CallSubRoutine SubRoutineName="Get mail" />
</If>
</SubRoutine>
<StackItemsAction />
<CustomAction Code="Log (Colors.Crimson,"AHBuddy: ",Colors.BlanchedAlmond,"Time for Bank.");" />
<CustomAction Code="var3 = (int)Me.FreeBagSlots;" />
<CallSubRoutine SubRoutineName="WithdrawBank" />
<CallSubRoutine SubRoutineName="Check Bag Slots" />
<SubRoutine SubRoutineName="Check Bag Slots">
<If Condition="(int)var3 == (int)Me.FreeBagSlots" IgnoreCanRun="True">
<CustomAction Code="Log (Colors.Crimson,"AHBuddy: ",Colors.BlanchedAlmond,"No new items.");" />
<CustomAction Code="vara4 = 2;" />
</If>
<If Condition="(int)var3 != (int)Me.FreeBagSlots" IgnoreCanRun="True">
<CustomAction Code="var3 = (int)Me.FreeBagSlots;" />
<CustomAction Code="Log (Colors.Crimson,"AHBuddy: ",Colors.BlanchedAlmond,"Got new items.");" />
<CustomAction Code="vara4 = 1;" />
<StackItemsAction />
</If>
<If Condition="vara4 == 1" IgnoreCanRun="True">
<CallSubRoutine SubRoutineName="PostToAH" />
<CustomAction Code="var3 = (int)Me.FreeBagSlots;" />
<CallSubRoutine SubRoutineName="WithdrawBank" />
<CallSubRoutine SubRoutineName="WithdrawBank" />
<CallSubRoutine SubRoutineName="WithdrawBank" />
<CallSubRoutine SubRoutineName="Check Bag Slots" />
</If>
</SubRoutine>
<WaitAction Condition="false" Timeout="250000" />
</While>