GithubHelp home page GithubHelp logo

alentoghostflame / summonerwarbot Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 92.55 MB

Script to automate the daily quests in the mobile game Summoners War

License: GNU General Public License v3.0

Java 100.00%
android-phone adb screenshot

summonerwarbot's Introduction

SummonerWarBot

This is a project to automate the mobile game Summoners War on the Android platform.

Usage

You need an Android phone, and a PC with Android Debug Bridge (ADB) installed as a command accessible from the default terminal.

The PC (Host) is typically linked with the Android phone (Target) with a USB to micro USB cable, but ADB over WiFi does exist, but hasn't been tested with this program.

Main Goal

The one thing that needs to be completed for this project to be considered good.

  1. Automate daily quests.

Side Goals

These goals are not really important, but would be good to implement after the Main Goal is completed.

  1. Collect mana stones and gems from the different buildings that produce them.
  2. When using the Power-Up Circle, only use silver star monsters.
  3. Use up energy to perform tasks based on what is needed/lacking.
  4. Be able to start from a new account, proceed through the tutorial properly, and run the account by itself with no human help.

Methods

To know what is happening on the screen, currently the script takes a screenshot using the Android command "screencap" with a PNG format. It then reads the pixel at a certain coordinate on the screen, and using a array of Hex values located in ArrayHolder.HEXCOLOR, decides if to tap the screen at certain coordinates or not.

Currently working on this: Instead of querying for colors of specific pixels on the screen and deciding what to do based on that, I want it to scan the entirety of the screenshot and logically make decisions based on what it finds, with the overall goal still completing all the daily quests.

Bottlenecks

These are known bottlenecks that slow down either portions or the entire script.

  1. Using screencap to make a PNG file of the Targets screen is slow.
  2. Transferring the PNG image from the Target to the Host is slow (USB 2.0).

Issues

  1. Currently only have a Galaxy S6, with a 1440x2560 (portrait) screen. Anything else will almost certainly break the script, particularly the hex values.

Fixes

These applies to both Bottlenecks and Issues. Not required, but would be good to fix.

  1. Switch from screepcap to something faster
  2. Find method to either shrink the size of image transferred, or increase rate of transfer.

Notes

Hypothetically, with a lot of work, the core methods of this script could be adapted to suit games that don't need the screen to be updated very fast.

summonerwarbot's People

Contributors

alentoghostflame avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.