]> git.somenet.org - pub/jan/scripts.git/blob - deltat_tc_bug.sh
use bug to generate deltat-game-credits.
[pub/jan/scripts.git] / deltat_tc_bug.sh
1 #!/bin/zsh
2
3 # generates tc.
4 #
5
6 MONEY_MIN="$3"
7 MONEY_MID="$3"
8 MONEY_MAX="$3"
9 if [ -z "$MONEY_MIN" ]; then
10         MONEY_MIN="0"
11         MONEY_MID="0"
12         MONEY_MAX="0"
13 fi
14
15
16 echo "start: $(date -Isec) $@"
17 for op in `seq 1 1 $1` ; do
18         ~/Android/Sdk/platform-tools/adb shell input touchscreen tap 525 1650 # click on "="
19         ~/Android/Sdk/platform-tools/adb shell input touchscreen tap 950 1450 # click on "inventory"
20
21         for r in `seq 1 1 $2` ; do
22                 ~/Android/Sdk/platform-tools/adb shell input touchscreen tap 800 1550 # click on "Resources"
23                 ~/Android/Sdk/platform-tools/adb shell input touchscreen tap 800 1550 # click on "Resources"
24                 ~/Android/Sdk/platform-tools/adb shell input touchscreen tap 250 350 # click on Resource
25                 ~/Android/Sdk/platform-tools/adb shell input touchscreen tap 950 1100 # click on "+"
26                 ~/Android/Sdk/platform-tools/adb shell input touchscreen tap 950 1750 # click on "move-to-trade"
27                 ~/Android/Sdk/platform-tools/adb shell input touchscreen tap 850 100 # click on "trades"
28                 ~/Android/Sdk/platform-tools/adb shell input touchscreen tap 300 1500 # click on "scrap"
29                 ~/Android/Sdk/platform-tools/adb shell input touchscreen tap 300 1500 # click on "yes"
30                 sleep 1
31                 ~/Android/Sdk/platform-tools/adb shell input touchscreen tap 800 1125 # click on "really-yes"
32                 sleep 1
33
34                 MONEY_MIN="$(echo  8+$MONEY_MIN|bc)"
35                 MONEY_MID="$(echo 16+$MONEY_MID|bc)"
36                 MONEY_MAX="$(echo 32+$MONEY_MAX|bc)"
37                 echo "done: $op.$r $MONEY_MIN|$MONEY_MID|$MONEY_MAX $(date -Isec)"
38         done
39
40         ~/Android/Sdk/platform-tools/adb shell input keyevent KEYCODE_BACK # try to go to main game screen
41         ~/Android/Sdk/platform-tools/adb shell input keyevent KEYCODE_BACK # try to go to main game screen
42         ~/Android/Sdk/platform-tools/adb shell input touchscreen tap 250 1100 # click on "dont exit game"
43 done