Skip to content
This repository has been archived by the owner on Oct 1, 2024. It is now read-only.

Commit

Permalink
update install.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
Ptechgithub committed Jun 19, 2024
1 parent d743ee4 commit 83ab85a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,8 @@ main() {
-H "Referer: https://hamsterkombat.io/" \
https://api.hamsterkombat.io/clicker/sync | jq -r '.clickerUser.balanceCoins')

# Check if current balance is above the threshold
if (( $(echo "$current_balance > $min_balance_threshold" | bc -l) )); then
# Check if current balance is above the threshold after purchase
if (( $(echo "$current_balance - $price > $min_balance_threshold" | bc -l) )); then
# Attempt to purchase the best upgrade item
if [ -n "$best_item_id" ]; then
echo -e "${green}Attempting to purchase upgrade '${yellow}$best_item_id${green}'...${rest}"
Expand All @@ -146,7 +146,7 @@ main() {
break
fi
else
echo -e "${red}Current balance ${cyan}(${current_balance}) ${red}is below the threshold ${cyan}(${min_balance_threshold})${red}. Stopping purchases.${rest}"
echo -e "${red}Current balance ${cyan}(${current_balance}) ${red}minus price of item ${cyan}(${price}) ${red}is below the threshold ${cyan}(${min_balance_threshold})${red}. Stopping purchases.${rest}"
break
fi
done
Expand Down

0 comments on commit 83ab85a

Please sign in to comment.