Skip to content
This repository was archived by the owner on Jul 2, 2023. It is now read-only.
Open
Show file tree
Hide file tree
Changes from 6 commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
262 changes: 0 additions & 262 deletions .tools/afk-faily.ext.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,268 +6,6 @@
# License : MIT
# ##############################################################################

# ##############################################################################
# Section : Ranhorn
# ##############################################################################

# ##############################################################################
# Function Name : oakInn
# Descripton : Collect Oak Inn
# ##############################################################################
oakInn() {
if [ "$DEBUG" -ge 4 ]; then printInColor "DEBUG" "oakInn" >&2; fi
inputTapSleep 780 270 5 # Oak Inn

_oakInn_COUNT=0
until [ "$_oakInn_COUNT" -ge "$totalAmountOakRewards" ]; do
inputTapSleep 1050 950 # Friends
inputTapSleep 1025 400 5 # Top Friend
sleep 5

oakInn_tryCollectPresent
if [ "$oakRes" = 0 ]; then # If return value is still 0, no presents were found at first friend
# Switch friend and search again
inputTapSleep 1050 950 # Friends
inputTapSleep 1025 530 5 # Second friend

oakInn_tryCollectPresent
if [ "$oakRes" = 0 ]; then # If return value is again 0, no presents were found at second friend
# Switch friend and search again
inputTapSleep 1050 950 # Friends
inputTapSleep 1025 650 5 # Third friend

oakInn_tryCollectPresent
if [ "$oakRes" = 0 ]; then # If return value is still freaking 0, I give up
printInColor "WARN" "Couldn't collect Oak Inn presents, sowy." >&2
break
fi
fi
fi

sleep 2
_oakInn_COUNT=$((_oakInn_COUNT + 1)) # Increment
done

inputTapSleep 70 1810 3
inputTapSleep 70 1810 0

wait
verifyHEX 20 1775 d49a61 "Attempted to collect Oak Inn presents." "Failed to collect Oak Inn presents."
}

# ##############################################################################
# Function Name : oakInn_presentTab
# Descripton : Search available present tabs in Oak Inn
# ##############################################################################
oakInn_presentTab() {
if [ "$DEBUG" -ge 4 ]; then printInColor "DEBUG" "oakInn_presentTab" >&2; fi
oakInn_presentTabs=0
if testColorOR 270 1800 c79663; then # 1 gift c79663
oakInn_presentTabs=$((oakInn_presentTabs + 1000)) # Increment
fi
if testColorOR 410 1800 bb824f; then # 2 gift bb824f
oakInn_presentTabs=$((oakInn_presentTabs + 200)) # Increment
fi
if testColorOR 550 1800 af6e3b; then # 3 gift af6e3b
oakInn_presentTabs=$((oakInn_presentTabs + 30)) # Increment
fi
if testColorOR 690 1800 b57b45; then # 4 gift b57b45
oakInn_presentTabs=$((oakInn_presentTabs + 4)) # Increment
fi
}

# ##############################################################################
# Function Name : oakInn_searchPresent
# Descripton : Searches for a "good" present in oak Inn
# ##############################################################################
oakInn_searchPresent() {
if [ "$DEBUG" -ge 4 ]; then printInColor "DEBUG" "oakInn_searchPresent " >&2; fi
inputSwipe 400 1600 400 310 50 # Swipe all the way down
sleep 1

if testColorOR 540 990 833f0e; then # 1 red 833f0e blue 903da0
inputTapSleep 540 990 3 # Tap present
inputTapSleep 540 1650 1 # Ok
inputTapSleep 540 1650 0 # Collect reward
oakRes=1
else
if testColorOR 540 800 a21a1a; then # 2 red a21a1a blue 9a48ab
inputTapSleep 540 800 3
inputTapSleep 540 1650 1 # Ok
inputTapSleep 540 1650 0 # Collect reward
oakRes=1
else
if testColorOR 540 610 aa2b27; then # 3 red aa2b27 blue b260aa
inputTapSleep 540 610 3
inputTapSleep 540 1650 1 # Ok
inputTapSleep 540 1650 0 # Collect reward
oakRes=1
else
if testColorOR 540 420 bc3f36; then # 4 red bc3f36 blue c58c7b
inputTapSleep 540 420 3
inputTapSleep 540 1650 1 # Ok
inputTapSleep 540 1650 0 # Collect reward
oakRes=1
else
if testColorOR 540 220 bb3734; then # 5 red bb3734 blue 9442a5
inputTapSleep 540 220 3
inputTapSleep 540 1650 1 # Ok
inputTapSleep 540 1650 0 # Collect reward
oakRes=1
else # If no present found, search for other tabs
oakRes=0
fi
fi
fi
fi
fi
}

# ##############################################################################
# Function Name : oakInn_tryCollectPresent
# Descripton : Tries to collect a present from one Oak Inn friend
# ##############################################################################
oakInn_tryCollectPresent() {
if [ "$DEBUG" -ge 4 ]; then printInColor "DEBUG" "oakInn_tryCollectPresent" >&2; fi
oakInn_searchPresent # Search for a "good" present
if [ $oakRes = 0 ]; then
oakInn_presentTab # If no present found, search for other tabs
case $oakInn_presentTabs in
0)
oakRes=0
;;
4)
inputTapSleep 690 1800 3
oakInn_searchPresent
;;
30)
inputTapSleep 550 1800 3
oakInn_searchPresent
;;
34)
inputTapSleep 550 1800 3
oakInn_searchPresent
if [ $oakRes = 0 ]; then
inputTapSleep 690 1800 3
oakInn_searchPresent
fi
;;
200)
inputTapSleep 410 1800 3
oakInn_searchPresent
;;
204)
inputTapSleep 410 1800 3
oakInn_searchPresent
if [ $oakRes = 0 ]; then
inputTapSleep 690 1800 3
oakInn_searchPresent
fi
;;
230)
inputTapSleep 410 1800 3
oakInn_searchPresent
if [ $oakRes = 0 ]; then
inputTapSleep 550 1800 3
oakInn_searchPresent
fi
;;
234)
inputTapSleep 410 1800 3
oakInn_searchPresent
if [ $oakRes = 0 ]; then
inputTapSleep 550 1800 3
oakInn_searchPresent
if [ $oakRes = 0 ]; then
inputTapSleep 690 1800 3
oakInn_searchPresent
fi
fi
;;
1000)
inputTapSleep 270 1800 3
oakInn_searchPresent
;;
1004)
inputTapSleep 270 1800 3
oakInn_searchPresent
if [ $oakRes = 0 ]; then
inputTapSleep 690 1800 3
oakInn_searchPresent
fi
;;
1030)
inputTapSleep 270 1800 3
oakInn_searchPresent
if [ $oakRes = 0 ]; then
inputTapSleep 550 1800 3
oakInn_searchPresent
fi
;;
1034)
inputTapSleep 270 1800 3
oakInn_searchPresent
if [ $oakRes = 0 ]; then
inputTapSleep 550 1800 3
oakInn_searchPresent
if [ $oakRes = 0 ]; then
inputTapSleep 690 1800 3
oakInn_searchPresent
fi
fi
;;
1200)
inputTapSleep 270 1800 3
oakInn_searchPresent
if [ $oakRes = 0 ]; then
inputTapSleep 410 1800 3
oakInn_searchPresent
fi
;;
1204)
inputTapSleep 270 1800 3
oakInn_searchPresent
if [ $oakRes = 0 ]; then
inputTapSleep 410 1800 3
oakInn_searchPresent
if [ $oakRes = 0 ]; then
inputTapSleep 690 1800 3
oakInn_searchPresent
fi
fi
;;
1230)
inputTapSleep 270 1800 3
oakInn_searchPresent
if [ $oakRes = 0 ]; then
inputTapSleep 410 1800 3
oakInn_searchPresent
if [ $oakRes = 0 ]; then
inputTapSleep 550 1800 3
oakInn_searchPresent
fi
fi
;;
1234)
inputTapSleep 270 1800 3
oakInn_searchPresent
if [ $oakRes = 0 ]; then
inputTapSleep 410 1800 3
oakInn_searchPresent
if [ $oakRes = 0 ]; then
inputTapSleep 550 1800 3
oakInn_searchPresent
if [ $oakRes = 0 ]; then
inputTapSleep 690 1800 3
oakInn_searchPresent
fi
fi
fi
;;
esac
fi
}

# ##############################################################################
# Section : Test
# ##############################################################################
Expand Down
37 changes: 20 additions & 17 deletions _wiki/Config.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ The script acts depending on a set of variables. In order to change these, open
| :-------------------- | :-------: | :-------------------------------------------------------------------------------------------------------------------------------------------------------- | :-----: |
| `canOpenSoren` | `Boolean` | If `true`, player has permission to open Soren. | `false` |
| `arenaHeroesOpponent` | `Number` | Choose which opponent to fight in the Arena of Heroes. Possible entries: `1`, `2`, `3`, `4` or `5`, where `1` is the top opponent and `5` the bottom one. | `5` |
| `vipLevel` | `Number` | Current account VIP level. | `0` |
| `campaignChapter` | `String` | Current account campaign chapter. | `0` |
| `campaignStage` | `String` | Current account campaign stage. | `0` |

## General

Expand All @@ -40,29 +43,29 @@ The script acts depending on a set of variables. In order to change these, open

## Store

| Variable | Type | Description | Default | Image |
| Variable | Type | Description | Default | Image |
| :------------------------- | :-------: | :----------------------------------------------------------------- | :-----: | :---------------------------------------------------------------------------------------------------------------------------: |
| `buyStoreDust` | `Boolean` | If `true`, buys Dust for Gold. | `true` | ![Hero's Essence](https://user-images.githubusercontent.com/7203617/132167221-91cfdb08-a624-4ad0-8c6d-d565683298c1.png) |
| `buyStorePoeCoins` | `Boolean` | If `true`, buys Poe Coins for Gold. | `true` | ![Poe Coins](https://user-images.githubusercontent.com/7203617/132167219-2e50cc20-56d3-485c-ae8a-1668e1fb6f9c.png) |
| `buyStorePrimordialEmblem` | `Boolean` | If `true` and possible, buys Primordial Emblems for Gold. | `false` | ![Primordial Emblem](https://user-images.githubusercontent.com/7203617/132167223-8847e3a0-f793-4fd1-a5c6-9c00267e54d1.png) |
| `buyStoreAmplifyingEmblem` | `Boolean` | If `true` and possible, buys Amplifying Emblems for Gold. | `false` | ![Amplifying Emblem](https://user-images.githubusercontent.com/7203617/132167227-82508558-3021-493c-8cfc-bcf2b6071ce8.png) |
| `buyStoreDust` | `Boolean` | If `true`, buys Dust for Gold. | `true` | ![Hero's Essence](https://user-images.githubusercontent.com/7203617/132167221-91cfdb08-a624-4ad0-8c6d-d565683298c1.png) |
| `buyStorePoeCoins` | `Boolean` | If `true`, buys Poe Coins for Gold. | `true` | ![Poe Coins](https://user-images.githubusercontent.com/7203617/132167219-2e50cc20-56d3-485c-ae8a-1668e1fb6f9c.png) |
| `buyStorePrimordialEmblem` | `Boolean` | If `true` and possible, buys Primordial Emblems for Gold. | `false` | ![Primordial Emblem](https://user-images.githubusercontent.com/7203617/132167223-8847e3a0-f793-4fd1-a5c6-9c00267e54d1.png) |
| `buyStoreAmplifyingEmblem` | `Boolean` | If `true` and possible, buys Amplifying Emblems for Gold. | `false` | ![Amplifying Emblem](https://user-images.githubusercontent.com/7203617/132167227-82508558-3021-493c-8cfc-bcf2b6071ce8.png) |
| `buyStoreSoulstone` | `Boolean` | If `true` and possible, buys Elite Soulstones for Diamonds. | `false` | ![Elite Hero Soulstone](https://user-images.githubusercontent.com/7203617/132287360-45c1eb6d-9ddf-45a8-9060-64aa867737b2.png) |
| `buyStoreLimitedGoldOffer` | `Boolean` | If `true`, buys Limited offer for Gold. | `false` | ![Limited Gold Offer](https://user-images.githubusercontent.com/7203617/132167224-49b5dfb6-fce5-4a95-a702-9423ec23939e.png) |
| `buyStoreLimitedDiamOffer` | `Boolean` | If `true`, buys Limited offer for Diamonds. | `false` | ![Limited Diam Offer](https://user-images.githubusercontent.com/7203617/132167220-86102296-3e75-49f9-a7e1-cff87ff0f4f3.png) |
| `buyStoreLimitedGoldOffer` | `Boolean` | If `true`, buys Limited offer for Gold. | `false` | ![Limited Gold Offer](https://user-images.githubusercontent.com/7203617/132167224-49b5dfb6-fce5-4a95-a702-9423ec23939e.png) |
| `buyStoreLimitedDiamOffer` | `Boolean` | If `true`, buys Limited offer for Diamonds. | `false` | ![Limited Diam Offer](https://user-images.githubusercontent.com/7203617/132167220-86102296-3e75-49f9-a7e1-cff87ff0f4f3.png) |
| `buyWeeklyGuild` | `Boolean` | If `true`, buys one Stone from Guild Coins once a Week. | `false` | |
| `buyWeeklyLabyrinth` | `Boolean` | If `true`, buys Rare Soulstones from Labyrinth Tokens once a Week. | `false` | ![Rare Soulstones](https://user-images.githubusercontent.com/7203617/132167981-baac849d-613a-4716-881e-ee21a9b2d4a1.png) |
| `buyWeeklyLabyrinth` | `Boolean` | If `true`, buys Rare Soulstones from Labyrinth Tokens once a Week. | `false` | ![Rare Soulstones](https://user-images.githubusercontent.com/7203617/132167981-baac849d-613a-4716-881e-ee21a9b2d4a1.png) |

## Towers

| Variable | Type | Description | Default |
| :------------------------------- | :-------: | :--------------------------------------------------------------- | :-----: |
| `doMainTower` | `Boolean` | If `true`, tries to battle in Main Tower | `true` |
| `doTowerOfLight` | `Boolean` | If `true`, tries to battle in Tower of Light | `true` |
| `doTheBrutalCitadel` | `Boolean` | If `true`, tries to battle in The Brutal Citadel | `true` |
| `doTheWorldTree` | `Boolean` | If `true`, tries to battle in The World Tree | `true` |
| `doCelestialSanctum` | `Boolean` | If `true`, tries to battle in Celestial Sanctum | `true` |
| `doTheForsakenNecropolis` | `Boolean` | If `true`, tries to battle in The Forsaken Necropolis | `true` |
| `doInfernalFortress` | `Boolean` | If `true`, tries to battle in InfernalFortress | `true` |
| Variable | Type | Description | Default |
| :------------------------ | :-------: | :---------------------------------------------------- | :-----: |
| `doMainTower` | `Boolean` | If `true`, tries to battle in Main Tower | `true` |
| `doTowerOfLight` | `Boolean` | If `true`, tries to battle in Tower of Light | `true` |
| `doTheBrutalCitadel` | `Boolean` | If `true`, tries to battle in The Brutal Citadel | `true` |
| `doTheWorldTree` | `Boolean` | If `true`, tries to battle in The World Tree | `true` |
| `doCelestialSanctum` | `Boolean` | If `true`, tries to battle in Celestial Sanctum | `true` |
| `doTheForsakenNecropolis` | `Boolean` | If `true`, tries to battle in The Forsaken Necropolis | `true` |
| `doInfernalFortress` | `Boolean` | If `true`, tries to battle in InfernalFortress | `true` |

## Campaign

Expand Down
Loading