Closed cybman closed 9 years ago
im using the follow dir structure
c:\auto-coc.sikuli\auto-coc-master>
i found a way to open the script, dont know is the correct one
the dir name must be equal to python script ending with .sikuli theattack-and-rebuild-troops.py
so i must changed the dir to attack-and-rebuild-troops..sikuli
now i can open the script but when i run it didnt do nothing
Error training new troops <type 'org.sikuli.script.FindFailed'> FindFailed: can not find P(1420482460039.png) S: 0.9 on the screen. Line 1574, in file Region.java
Error starting the attack process
what is the resolution of bluestacks?
@cybman You're correct, the script name and the folder name must be the same.
The "Error training new troops" error is because it can't find the image on the screen (1420482460039.png) so it doesn't know where to click.
You can re-train the script by changing the images to match your screen. The easiest way to do it is via the SikuliX IDE but you can do it manually too.
thx for the reply
im changing all the images but i have some problems, some pictures arent detected
village = Region((cocWindow.x + 210), (cocWindow.y + 85), 1025, 790)
i think that reason is that, need do decrypt the coordinates :)
or i change the village.find to cocwindow.find....
You can change it to cocWindow.find() that works fine
i changed to cocWindow and fixed the picture problem, but now i have another problem. the script isnt choosing the first barrack, so is stalling in the dark barrack because isnt finding any troop picture, any clue?
You need to change the training image it is looking for. If it is selecting the dark barracks then you need to change the image so it only matches the normal barracks. Dark barracks/troops aren't supported yet so it will stall looking for troops.
i Have a crazy one for you.
[debug] getWindow: java.awt.Rectangle[x=241,y=52,width=966,height=628]
[!] Could not find COC icon, assuming game is already started... Clash of Clans has started and is ready to go! [error] script [ auto-coc-master ] stopped with error in line 751 [error] TypeError ( unsupported operand type(s) for -: 'datetime' and 'bool' ) [error] --- Traceback --- error source first line: module ( function ) statement 718: main ( secondsSinceLast ) diff = datetime.now() - ts; [error] --- Traceback --- end --------------
this is a different issue!
are these time stamps suppose to be true if i want to execute these task/functions
timestamps = { 'testing': False, 'start': False, 'trainTroops': False, 'clearObstacles': False, 'collectResources': False, 'collectStats': False, 'donateTroops': False, '_lastInteraction': False
No they don't have to be True. They get automatically updated with the time stamp when the action is executed.
Yay it works, i had to redo the png file
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?