diff --git a/assets/templates/inventory/inventory_no_gold.png b/assets/templates/inventory/inventory_no_gold.png index c192c9e..8512738 100644 Binary files a/assets/templates/inventory/inventory_no_gold.png and b/assets/templates/inventory/inventory_no_gold.png differ diff --git a/src/inventory/personal.py b/src/inventory/personal.py index 2d5c765..dfe12ab 100644 --- a/src/inventory/personal.py +++ b/src/inventory/personal.py @@ -89,13 +89,17 @@ def stash_all_items(items: list = None): if Config().char["stash_gold"]: if not is_visible(ScreenObjects.GoldNone): Logger.debug("Stashing gold") - common.select_tab(min(1, stash.get_curr_stash()["gold"])) + gold_tab = min(1, stash.get_curr_stash()["gold"]) + common.select_tab(gold_tab) wait(0.7, 1) stash_full_of_gold = False # Try to read gold count with OCR try: gold_amount = common.read_gold(grab(), "stash") - stash_full_of_gold = ((gold_amount == 2500000) or (gold_amount==12500000)) + if gold_tab == 0: + stash_full_of_gold = (gold_amount >= 2500000) + else: + stash_full_of_gold = (gold_amount >= 12500000) except: pass if not stash_full_of_gold: # If gold read by OCR fails, fallback to old method @@ -114,7 +118,7 @@ def stash_all_items(items: list = None): stash.set_curr_stash(gold = (stash.get_curr_stash()["gold"] + 1)) if Config().general["info_screenshots"]: cv2.imwrite("./log/screenshots/info/info_gold_stash_full_" + time.strftime("%Y%m%d_%H%M%S") + ".png", grab()) - if stash.get_curr_stash()["gold"] > 3: + if stash.get_curr_stash()["gold"] > 1: #decide if gold pickup should be disabled or gambling is active vendor.set_gamble_status(True) else: