Skip to content

Navigation Menu

Sign in
Sign up
This repository was archived by the owner on Jul 2, 2023. It is now read-only.

new feature - collect consumable resources from bag #178

GaryStar started this conversation in Ideas
Discussion options

Will go to bag and check all items on the first row. If the item is of a consumable type, collect it.
Next item will replace the current one so we check again the same position until a consumable is not found (max 20 times)

 printInColor` "INFO" "Collect resources from Bag"
 inputTapSleep 960 444 # go to Bag
 count=0
 for ix in 1 2 3 4 5; do
 x=$((128 + 207*($ix - 1)))
 while_count=0
 until false
 do
 if [[ $while_count -ge 20 ]]; then break; fi
 inputTapSleep $x 400 0.5
 # check if blue button (Use) and the dark rectangle with the amount exists
 # the slider and the rectangle can be a little up or down based on the item
 if testColorOR -d 3 610 1540 aff2bf && (\
 testColorOR -d 3 777 1219 6d553c || \
 testColorOR -d 3 777 1259 6d553c || \
 testColorOR -d 3 777 1285 6d553c || \
 testColorOR -d 3 777 1325 6b553c ); then
 ((count++))
 ((while_count++))
 inputTapSleep 540 1540 0.3 # 'Use'
 inputTapSleep 975 405 0.3
 inputTapSleep 975 405 0.3 # close
 else
 inputTapSleep 975 405 0.3
 break
 fi
 done # until
 done # for ix
 printInColor "DONE" "Collected $count resources from Bag"
 inputTapSleep 40 1780 # home

For now, I've added this in the collectMail() function and it works as expected every time but can be added as a new, separate feature.

July 23 Update: covered latest changes in graphics (items moved a little higher and the Back button was moved down a little)

You must be logged in to vote

Replies: 0 comments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Ideas
Labels
None yet
1 participant

AltStyle によって変換されたページ (->オリジナル) /