English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
Molti amici di Wangzhe Rongyao vogliono comprare script e trucchetti per ottenere più facilmente monete e altri oggetti, come comprare eroi nel gioco. Oggi sfruttiamo l'abilità di programmatori per insegnare a tutti come scrivere uno script in Python per guadagnare monete, ecco tutto il contenuto.
Nel modalità avventura di Wangzhe Rongyao c'è una modalità sfida, la prima volta che si supera si ottiene una maggiore quantità di monete, ma se si sfida di nuovo si ottiene solo una piccola quantità di monete, questo non è un bug, ma se non ti dispiace, puoi anche guadagnare monete manualmente con forza bruta.
Livello consigliato: Città in rovina caduta - Ricordi della strega
Questo livello utilizza eroi di uscita pura che possono sconfiggere il boss in circa 20 secondi e completare il livello in circa 50 secondi. Ogni volta che si supera il livello, si ottiene una ricompensa di 19 monete. Si consiglia di completare manualmente il livello prima di utilizzare un trucco. Questo è il principio del gioco.
In simple terms, the following steps need to be executed:
The interface opens to the challenge level: Falling Desert - Witch's Memories [Click Next]
Enter the team adjustment interface, arrange the team in advance. [Click Cross]
Enter the challenge interface. [Click the upper right corner - Auto - wait for the challenge to end]
Enter the challenge completed interface. [Click the screen to continue]
Enter the level reward interface. [Click Re-challenge]
Enter the team adjustment interface, loop to step 1 or step 2 [it seems to depend on the game area and version]
As long as you can simulate screen clicks, you can complete the gold farming script. The simplest way to click on the Android simulation interface is to use ADB to send commands, without needing root access to the phone or installing third-party software, which is convenient and fast. The command to click the screen coordinates [x, y] can be used with the command:
adb shell input tap x y
I'm not clear if there are similar tools and commands for iOS, but if there are, the implementation of automatic gold farming is also very simple.
Preparation
This script is suitable for Android game areas and requires a real Android phone.
The phone needs to enable USB debugging mode to allow the computer to debug.
The Android driver needs to be installed on the computer, which is generally installed automatically by Peanut or various assistants.
The computer needs to have a set of ADB tools, which can be obtained in many ways.
The ADB tool needs to be added to the PATH environment variable for easy calling at any time.
Python needs to be installed on the computer because it is the scripting language I have chosen.
Professional developers and testers can also refer to my other two blogs:
Set up the Appium + Android automation testing environment under Windows
Configure the Appium + Android automation testing environment on Mac OSX
If you just want to farm gold coins, you only need to install the drivers and ADB tools.
Steps
If everything is ready, then the steps are very simple.
Environment detection
Connect the phone to the computer via USB, and if a warning pops up, please allow the computer to debug the phone.
Use the command 'adb devices' to check if adb and the phone are ready.
$ adb devices List of attached devices b******4 device
Simulate screen clicks, for example, you can open the drawing software and then run the command:
adb shell input tap 500 500
If everything is OK, then you will see a point at the position (500,500) of the drawing software.
Code implementation
The screen positions that need to be clicked to clear the game are fixed, and with comments, we only need less than 30 lines of code to complete it.
def tap_screen(x, y): os.system('adb shell input tap {} {} def do_money_work(): print('#0 inizia il gioco') tap_screen(1600, 970) sleep(3) print('#1 pronto, vai!!!') 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 farlo di nuovo...\n') tap_screen(1430, 980) sleep(3)
Poi scriviamo una funzione principale per loopare il denaro.
if __name__ == '__main__': for i in range(repeat_times): print('round #{}'.format(i + 1)) do_money_work()
Poi:
Scarica kog.py dal progetto locale.
Apri il gioco, vai alla modalità sfida, ricorda la strega, l'interfaccia di aggiustamento dell'equipaggio.
A seconda delle prestazioni del telefono e della risoluzione, aggiusta i parametri nel kog.py (risoluzione del telefono, numero di volte di pulizia, ecc.).
Esegui i seguenti comandi per visualizzare l'effetto in tempo reale sul telefono.
python kog.py
Attenzione:
Il limite settimanale di moneta è di 4200, ci vogliono quasi 4 ore, non si consiglia di caricare tutto in una volta, riposati il telefono e te stesso.
Il铭文, la performance del telefono e la scelta dell'eroe influenzano la velocità di completamento, regola la tua attesa.
Se non vuoi essere legato da un cavo di dati USB, considera l'uso di una connessione wireless per l'Android device reale.