30 lines of Python brush gold king of glory

principle

King of glory adventure mode where there is a challenge mode where the first pass can get more gold, followed by re-challenge or will obtain a small amount of gold, it's not a bug, you can not wearies brute force manual brush gold.

Recommended levels: the fall of all waste - Witch memories

This output levels using pure hero for about 20 seconds to play BOSS, about 50 seconds to customs clearance, customs clearance can be repeated every rewarded 19 gold coins. Before hanging open advise you to manually clearance experience. This game works.

In simple terms, we need to perform the following steps:

  1. Interface open to challenge levels: the fall of all waste - Witch recall] [click Next
  2. Into the lineup adjustment interface, arranged in advance lineup. [Click checkpoints]
  3. Challenges into the interface. [Click on the top right - automatically - waiting for the end of the challenge]
  4. Enter the challenge to complete the interface. [Click on the screen to continue]
  5. Points rewards into the interface. [Click on the challenge again]
  6. Adjust the interface into the lineup recycled to Step 1 or Step 2 [looks like depends on the game area and version]

As long as you can click on the screen to complete the simulation script brush gold, Andrews analog interface click the easiest way is to send commands to use ADB, do not need to root the phone, no need to install third-party software, convenient and quick. ADB commands tap the screen coordinates [x, y] you can use the command:

adb shell input tap x y

Please refer to iOS users directly github project addresses the principles and micro letter to hop plug similar.

ready

  • This script works on Android games area, you need a real Android phone.
  • Phone will need to turn on USB debugging mode that allows the computer to debug.
  • Computer drive to be installed Andrews, general peas or various butler can help you automatically installed.
  • Computer needs to have ADB set of tools, a lot of ways you can get.
  • ADB tools need to add the PATH environment variable, at any time convenient to call.
  • You need to install Python on your computer, because this is my choice of scripting language.

Professional development testers can also refer to my other two blog:

If only to brush coins, just you need to install the drivers and tools to ADB.

step

If everything is in place, then step is very simple.

environmental test

  1. Connect the phone with USB, if pop-up warning, allow the computer to debug the phone.
  2. Using the Command adb devicesInspection adb and phone status is ready.
$ adb devices
List of devices attached
b******4        device

Tap the screen to simulate, for example, you can open the drawing software, then run the command:

adb shell input tap 500 500

If if everything OK, then you will see there is a point in drawing software location coordinates (500, 500) of. Do not understand the learning process of learning can join my middle exchange Qiuqiu circle back 214 784 758

Code

Clearance need to click on the screen position is fixed, we only need to add comments less than 30 lines of code can be completed.

def tap_screen(x, y):
    os.system('adb shell input tap {} {}'.format(x, y))

def do_money_work():
    print('#0 start the game')
    tap_screen(1600, 970)
    sleep(3)

    print('#1 ready, go!!!')
    tap_screen(1450, 910)
    sleep(15)

    print('#2 auto power on!')
    tap_screen(1780, 40)

    for i in range(25):
        tap_screen(1000, 500)
        sleep(1)

    print('#3 do it again...\n')
    tap_screen(1430, 980)
    sleep(3)

Then we write a main function to loop more proficient.

if __name__ == '__main__':
    for i in range(repeat_times):
        print('round #{}'.format(i + 1))
        do_money_work()

All-takenism

If you like ism, please visit this article Project Address:

then:

  1. Download the project kog.pyto the local, iOS was kog_iOS.py.
  2. The game opens, enter the challenge mode, witch memories lineup adjustment interface.
  3. According to the mobile phone performance and resolution, adjust kog.pyparameters. (Phone resolution, brush gold number, etc.)
  4. Run the following command, run on the phone you can view real-time results.
python kog.py

note:

  1. 4200 gold cap a week, you need to be close to four hours, it does not recommend a full brush, cell phone and you have to rest.
  2. Inscriptions, mobile performance, the hero select will affect the speed of customs clearance, waiting time to fine-tune their own.
  3. If you do not want to be bound by a USB cable, you can consider using a wireless connection Android real machine.

Guess you like

Origin blog.csdn.net/weichen090909/article/details/93783205