From: Someone Date: Wed, 27 Sep 2017 17:37:09 +0000 (+0200) Subject: use bug to generate deltat-game-credits. X-Git-Url: https://git.somenet.org/pub/jan/scripts.git/commitdiff_plain?ds=inline use bug to generate deltat-game-credits. --- diff --git a/deltat_tc_bug.sh b/deltat_tc_bug.sh new file mode 100755 index 0000000..cd191b1 --- /dev/null +++ b/deltat_tc_bug.sh @@ -0,0 +1,43 @@ +#!/bin/zsh + +# generates tc. +# + +MONEY_MIN="$3" +MONEY_MID="$3" +MONEY_MAX="$3" +if [ -z "$MONEY_MIN" ]; then + MONEY_MIN="0" + MONEY_MID="0" + MONEY_MAX="0" +fi + + +echo "start: $(date -Isec) $@" +for op in `seq 1 1 $1` ; do + ~/Android/Sdk/platform-tools/adb shell input touchscreen tap 525 1650 # click on "=" + ~/Android/Sdk/platform-tools/adb shell input touchscreen tap 950 1450 # click on "inventory" + + for r in `seq 1 1 $2` ; do + ~/Android/Sdk/platform-tools/adb shell input touchscreen tap 800 1550 # click on "Resources" + ~/Android/Sdk/platform-tools/adb shell input touchscreen tap 800 1550 # click on "Resources" + ~/Android/Sdk/platform-tools/adb shell input touchscreen tap 250 350 # click on Resource + ~/Android/Sdk/platform-tools/adb shell input touchscreen tap 950 1100 # click on "+" + ~/Android/Sdk/platform-tools/adb shell input touchscreen tap 950 1750 # click on "move-to-trade" + ~/Android/Sdk/platform-tools/adb shell input touchscreen tap 850 100 # click on "trades" + ~/Android/Sdk/platform-tools/adb shell input touchscreen tap 300 1500 # click on "scrap" + ~/Android/Sdk/platform-tools/adb shell input touchscreen tap 300 1500 # click on "yes" + sleep 1 + ~/Android/Sdk/platform-tools/adb shell input touchscreen tap 800 1125 # click on "really-yes" + sleep 1 + + MONEY_MIN="$(echo 8+$MONEY_MIN|bc)" + MONEY_MID="$(echo 16+$MONEY_MID|bc)" + MONEY_MAX="$(echo 32+$MONEY_MAX|bc)" + echo "done: $op.$r $MONEY_MIN|$MONEY_MID|$MONEY_MAX $(date -Isec)" + done + + ~/Android/Sdk/platform-tools/adb shell input keyevent KEYCODE_BACK # try to go to main game screen + ~/Android/Sdk/platform-tools/adb shell input keyevent KEYCODE_BACK # try to go to main game screen + ~/Android/Sdk/platform-tools/adb shell input touchscreen tap 250 1100 # click on "dont exit game" +done