Skip to content

Commit

Permalink
AutoBazaar (Visitors Macro):
Browse files Browse the repository at this point in the history
 = Buying hotfix (Another one?)
  • Loading branch information
May2Beez committed Mar 29, 2024
1 parent 06dd972 commit 338f5ed
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ baseGroup=com.jelly.farmhelperv2
mcVersion=1.8.9
modid=farmhelperv2
modName=FarmHelper
version=2.5.11
version=2.5.12
shouldRelease=true
Original file line number Diff line number Diff line change
Expand Up @@ -328,15 +328,12 @@ private void handleBuyFromBz() {
case CLICK_BUY:
if (!this.hasTimerEnded()) return;

int instaBuySlot = (this.buyNowButtonSlot == -1) ? InventoryUtils.getSlotIdOfItemInContainer("Custom Amount") : this.buyNowButtonSlot;
if (instaBuySlot == -1) {
System.out.println("Could not find slot to click to buy. Waiting");
Slot slot = InventoryUtils.getSlotOfItemInContainer("Custom Amount");
if (slot == null || !slot.getHasStack()) {
System.out.println("Slot is null");
return;
}

Slot slot = InventoryUtils.getSlotOfId(instaBuySlot);
if (slot == null || !slot.getHasStack()) return;

boolean foundPrice = false;

if (this.maxSpendLimit != 0) {
Expand Down Expand Up @@ -369,7 +366,7 @@ private void handleBuyFromBz() {
}

this.buyState = BuyState.BUY_VERIFY;
InventoryUtils.clickContainerSlot(instaBuySlot, InventoryUtils.ClickType.LEFT, InventoryUtils.ClickMode.PICKUP);
InventoryUtils.clickContainerSlot(slot.slotNumber, InventoryUtils.ClickType.LEFT, InventoryUtils.ClickMode.PICKUP);
this.timer.schedule(2000);
break;
case BUY_VERIFY:
Expand Down

0 comments on commit 338f5ed

Please sign in to comment.