jeffreyhyer / auto-coc Goto Github PK
View Code? Open in Web Editor NEWBot to auto play Clash of Clans via BlueStacks Android emulator on Windows
Bot to auto play Clash of Clans via BlueStacks Android emulator on Windows
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.
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 --------------
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
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...
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
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]
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
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.
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..."
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.
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?
Hello,
thank you for creating this bot, is there any milestone for OSX using Genymotion?
thank you
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.