Giter Site home page Giter Site logo

auto-coc's People

Contributors

darrensapalo avatar jeffreyhyer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

auto-coc's Issues

unable to load script

Hi i am receiving this error

C:\Users\sskassamali\Downloads\boo>runIDE.cmd -r /auto-coc-master.sikuli -s
+++ running this Java
java version "1.7.0_51"
Java(TM) SE Runtime Environment (build 1.7.0_51-b13)
Java HotSpot(TM) 64-Bit Server VM (build 24.51-b03, mixed mode)
+++ trying to start Sikuli IDE
+++ using: -Xms64M -Xmx512M -Dfile.encoding=UTF-8 -Dsikuli.FromCommandLine -jar
C:\Users\sskassamali\Downloads\boo\sikuli-ide.jar -r /auto-coc-master.sikuli -s
[error] FileManager: Not a valid Sikuli script: C:\auto-coc-master.sikuli
[error] Terminating SikuliX after a fatal error! Sorry, but it makes no sense to
continue!
If you do not have any idea about the error cause or solution, run again
with a Debug level of 3. You might paste the output to the Q&A board.

Script doesn't start

Hi, great work on the script, but somehow its not working for me :/. Whenever I start the script with bluestacks open, I get the error:
[log] App.focus C:\Program Files\BlueStacks\HD-StartLauncher.exe(0) #0

[+] Idle Check
[error] script [ auto-coc ] stopped with error in line 782
[error] AttributeError ( 'bool' object has no attribute 'exists' )
[error] --- Traceback --- error source first line: module ( function ) statement 633: main ( checkIdle ) if (cocWindow.exists("1420184045669.png", 0)):
[error] --- Traceback --- end --------------

sikuli ide crashes

i fallow the instruction option 1 open in sikuli but it crashes and i try to command prompt but i get error filename not specify or syntax error something like that i dont really remember the exactly show in terminal... :( i hope you can help me thanks again

error on script

hi im new on github and want to test your script but i have error when i execute your script this is the error show when i execute the script
name_error
cocWindow = App("Bluestacks").window(0)
cocSidebar = Region((cocWindow.x + 6), (cocWindow.y + 185), 468, 690)
can you explain how can i fix this thanks in advance...

Screen resolution

What is your screen resolution ?
We could change bluestack resolution by running regedt32 with below reg file (for 1024x600), so we don't have to readjust the screen capture you had:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\BlueStacks\Guests\Android\FrameBuffer\0]
"Width"=dword:00000400
"Height"=dword:00000258
"WindowWidth"=dword:00000400
"WindowHeight"=dword:00000258
"GuestWidth"=dword:00000400
"GuestHeight"=dword:00000258
"Depth"=dword:00000010
"FullScreen"=dword:00000000
"WindowState"=dword:00000001
"HideBootProgress"=dword:00000001

unable to attack if i define the min gold and elixir

Hi Jeffery;

can you check my script and see what i am doing wrong now, i am able to attack fine if i set the gold and elixir to 0 but as soon as i change the number it doesn't seem to find it.

[Removed code for brevity]

script load but nothing happen

hi there the sikuli ide load the script but nothing happen and in the cmd there was error show here:

+++ running this Java
java version "1.7.0_76"
Java(TM) SE Runtime Environment (build 1.7.0_76-b13)
Java HotSpot(TM) 64-Bit Server VM (build 24.76-b04, mixed mode)
+++ trying to start Sikuli IDE
+++ using: -Xms64M -Xmx512M -Dfile.encoding=UTF-8 -Dsikuli.FromCommandLine -jar
C:\Users\xxxxxx\Desktop\sikuli\sikuli-ide.jar
Jan 25, 2015 10:48:06 AM java.util.prefs.WindowsPreferences
WARNING: Could not open/create prefs root node Software\JavaSoft\Prefs at root 0
x80000002. Windows RegCreateKeyEx(...) returned error code 5.

i use this script on TH6 i hope you can help me thanks again

Unknown Error

I know a slight amount of coding but im completely lost on this.
I am running your code without touching anything right now and im getting this

Running in the IDE

[error] script [ auto-coc-master ]] stopped with error at line --unknown--
[error] Could not evaluate error source nor reason. Analyze StackTrace!
[error] IndentationError: ('unindent does not match any outer indentation level', ('C:\Users\Jason\AppData\Local\Temp\sikuli-8375529426236112238.py', 746, 8, " if ((timestamps['donateTroops'] == False) or (secondsSinceLast(timestamps['donateTroops']) > 300)):\n"))

i just dont even know what this means. please help.

zoom out

your def to zoom out isnt working with me

made some changes

def zoomOutAndCenter():
try:
startAndFocusApp()

    print "[+] Zooming out and centering village"

    type(Key.DOWN)
    sleep(0.5)
    type(Key.DOWN)
    sleep(0.5)
    type(Key.DOWN)
    sleep(0.5)
    type(Key.DOWN)
    sleep(0.5)
    type(Key.DOWN)
    sleep(0.5)    
    type(Key.DOWN)
    sleep(0.5)    
    type(Key.DOWN)
    sleep(0.5)    
    #updateTimestamp('_lastInteraction')
except:
    print "[!] Something went wrong while trying to zoom out..."

Varying number of barracks

Not all clash of clan villages have four (4) barracks.

Allow users to set the barracks at the top of the config file.
barracksCount = 3

Modify code.

    # Modify as necessary maybe?
    theBarracks = [
        [0,0,0,0,0,0,0,0,0,0],
        [0,0,0,0,0,0,0,0,0,0],
        [0,0,0,0,0,0,0,0,0,0],
    ]
    totalTroops = 0

    for (index, count) in enumerate(troops):
        theBarracks[barracksCount][index] = floor((count / barracksCount))
        theBarracks[barracksCount][index] = floor((count / barracksCount))
        theBarracks[barracksCount][index] = floor((count / barracksCount))

        totalTroops += count

        if (count % barracksCount > 0):
            for i in range(0, (count % barracksCount)):

I'm thinking the solution should be something like this, but I'm not familiar with Python.

cant run the script

gave me this error

c:\cocbot_sikuli>runIDE -r c:/auto-coc.sikuli
+++ running this Java
java version "1.7.0_51"
Java(TM) SE Runtime Environment (build 1.7.0_51-b13)
Java HotSpot(TM) Client VM (build 24.51-b03, mixed mode, sharing)
+++ trying to start Sikuli IDE
+++ using: -Xms64M -Xmx512M -Dfile.encoding=UTF-8 -Dsikuli.FromCommandLine -jar
c:\cocbot_sikuli\sikuli-ide.jar -r c:/auto-coc.sikuli
[error] FileManager: Script folder c:\auto-coc.sikuli does not contain a script
file named auto-coc.xxx
[error] Terminating SikuliX after a fatal error! Sorry, but it makes no sense to
continue!

any idea what is wrong?

Osx milestone?

Hello,

thank you for creating this bot, is there any milestone for OSX using Genymotion?

thank you

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.