Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial fix to get bot to stay online. #2

Closed
wants to merge 17 commits into from
Closed

Initial fix to get bot to stay online. #2

wants to merge 17 commits into from

Conversation

jp31415926
Copy link

Changed windows height to 780 from 720. Modified location of other things to accommodate this change. This will only keep you online, but it's a start.

I'd like to help get the bot back going if you need help. Please let me know.

@paspiz85
Copy link

I'm trying to use this fix but the first problem found is on parsing trained troops. Now I have 50 barbarian, 109 archers and 61 goblins but attack don't start because detect only archers and goblins and its number don't satify Army "Full" Camp. I think (and checked on another bot software) that Train Troops Windows is changed, probably in width. I'm new on this project but I'm very happy if I can be useful 👍

@poode
Copy link

poode commented Dec 12, 2015

hello, i found one bot software made blustacks's screen to be with height= 600 and width=900 and pull screen to up then bot started again working after update but new features will take a time to add in new release , i hope my info helped you :) !

@ludodoucet
Copy link

Change resolution it s ok for stay online, but for progress i think work on the 3d pictures, with the old resolution it is a better way

@paspiz85
Copy link

I agree with ludodoucet

@ludodoucet
Copy link

This project is not very active on github, we write code in private, or there is a fork? Good job john.

@jp31415926
Copy link
Author

The problem with maintaining the current resolution is that the village can slide and parts are covered now that it is 44x44 instead of 40x40. You have to change something to make it all show on the screen.

I have found that most of the images are still OK.

I don't know why they don't use github to develop. I've been trying to contact a few of the developers with no luck. Perhaps they are not interested in getting help. I wanted to work on it so I just did. I hoped that they might notice and let me in the group, but perhaps not.

@ludodoucet
Copy link

The principals features are reunited, I test it...

@bentogoa
Copy link

does not "find" end of attack screen ...

@paspiz85
Copy link

I see that when found a LiveBase, there are a click on button "End Battle" that cause early attack exit. My log is:

2015-12-15 22:47:34 : Click 780,606,1,0 #0155 | Attack - Next Button
2015-12-15 22:47:38 : Attack Take-A-Break OCR result =
2015-12-15 22:47:41 : 43> [G]: 404939 [E]: 405072 [D]: 2736 [T]:33 [TH]: -, -
2015-12-15 22:47:43 : ~~~~~~~~~~~~~~~~ Live Base Found! ~~~~~~~~~~~~~~~~
2015-12-15 22:47:45 : ================ Search Complete =================
2015-12-15 22:47:45 : Initiating attack for: Live Base
2015-12-15 22:47:52 : DLL Troopsbar list: Barbarian|43-86|67#Archer|115-90|108#Goblin|187-90|45
2015-12-15 22:47:52 : -Barbarians 67
2015-12-15 22:47:52 : -Archers 108
2015-12-15 22:47:53 : -Goblins 45
2015-12-15 22:47:53 : ====== Start Attack ======
2015-12-15 22:47:55 : Calculating Smart Attack Strategy
2015-12-15 22:47:57 : Calculated (in 2.08 seconds) :
2015-12-15 22:47:57 : Attacking on a single side
2015-12-15 22:48:11 : Click 68,595,1,0 #0111 <-- PROBABLY THIS IS WRONG
2015-12-15 22:48:11 : Dropping first wave of Barbarians 34
2015-12-15 22:48:11 : Click 484,547,1,0 #0098
2015-12-15 22:48:11 : Click 492,547,1,0 #0098
2015-12-15 22:48:12 : Click 496,547,1,0 #0098
2015-12-15 22:48:12 : Click 504,543,1,0 #0098
2015-12-15 22:48:12 : Click 512,537,1,0 #0098

@jp31415926
Copy link
Author

Thank you for the feedback. However, I the only functions that work so far are training troops. I'm working on other functions as time permits, but it'll probably be sometime before attacking works.

Since I'm not one of the official developers, the other guys probably have a better chance of getting it all working again. I just wanted to help.

I'll keep working on it and see how far I can get. I believe there is some important functionality in a few DLLs that I don't have source code to and I will not be able to fix those if so (unless I can get the source code).

Thanks,
John

@ludodoucet
Copy link

You can edit the code just for return home without have the loots...line 132 returhome file

If _CheckPixel($aEndFightSceneAvl, $bCapturePixel) Then ; check for the gold ribbon in the...

Remplace by If $TakeSS = 0
And uncheck take screenshot of your loot...

@ludodoucet
Copy link

I have only test with dead base, without near red line, with barch...a little bit of deadbase are skipped, but it s found many, and attack...

@ludodoucet
Copy link

Thanks jp

@gbo73
Copy link

gbo73 commented Dec 16, 2015

Hello, nice to see that there is some activities here. I believe they stopped using githup because other bot was stolen their code and sell it. See this thread for more info https://mybot.run/forums/thread-5972.html
I am going to test this version Thanks

@jp31415926
Copy link
Author

@paspiz85, I fixed your click error.

@Milman-G
Copy link

Hi,
Thanks for the fix.
I also fixed the bot but without changing the length from 720 to 780.
And it seems to work fine (sort of, I am still working on it).
Is one way better than the other?

@jp31415926
Copy link
Author

Sounds interesting. Please fork this project and upload your changes. Maybe your approach is better than mine.

Thanks.

@dustyhelp
Copy link

I appreciate what everyone is doing here and was attempting to test the changes made so far without luck. I then realized my laptop doesn't support the pixel height of 780 (it stops at 768) and thus the reason I was unsuccessful in testing. Last night I setup a github account in the hopes of helping those with screen limitations similar to mine and get on today to see Milman-G beat me to it :-) I can't speak for which is BETTER, but I think limiting the resizing to stay within the current resolution would be more compatible on the large for the current user base. There are other working bots out there that are using resolutions of 800x666 and 860x672, it seems they are trying to stay within a certain limit. It seems to be a common theme.

@paspiz85
Copy link

I have a laptop with max resolution fixed to 768 too, and I cannot run bot on this laptop. Now I continue testing on my desktop pc.

@cosote
Copy link
Collaborator

cosote commented Dec 16, 2015

Have a fix for screen problem, resizes the bs window without shrinking it
again ;-)

On Wednesday, December 16, 2015, dustyhelp notifications@github.com wrote:

I appreciate what everyone is doing here and was attempting to test the
changes made so far without luck. I then realized my laptop doesn't support
the pixel height of 780 (it stops at 768) and thus the reason I was
unsuccessful in testing. Last night I setup a github account in the hopes
of helping those with screen limitations similar to mine and get on today
to see Milman-G beat me to it :-) I can't speak for which is BETTER, but I
think limiting the resizing to stay within the current resolution would be
more compatible on the large for the current user base. There are other
working bots out there that are using resolutions of 800x666 and 860x672,
it seems they are trying to stay within a certain limit. It seems to be a
common theme.


Reply to this email directly or view it on GitHub
#2 (comment).

@Milman-G
Copy link

Hi,
Thanks for the support.
I uploaded my changes in a separate pull request.
I hope it is the proper way to work.
Sorry it took so long. I am new to github and it took my some time

@jp31415926
Copy link
Author

I'm using Infinite Screen (http://ynea.futureware.at/cgi-bin/infinite_screen.pl) to force window to be correct resolution on screens that are too small.

For Windows 7, use Width:866 and Height:809
For Windows 8 & 10, use Width 868 and Height still 809

@ludodoucet
Copy link

You can delete the black bar at the down

@ludodoucet
Copy link

RESOLUTION BLUESTACK For LAPTOP 1366*768 in the official forum

@gbo73
Copy link

gbo73 commented Dec 17, 2015

I tried the bot and it works but unfortunately dead base seems to be really rare. I don't know if it would be difficult to make the TH snipe working because it will be more efficient way to farm. Snipe the TH and take the 20% (i see a lot of TH outside in going around TR 1000). TIA

@jp31415926
Copy link
Author

deadbase detection does seem to be poor. I believe the image has changed slightly because when the base is zoomed out all the way it is not the same size (40x40 versus 44x44). Perhaps the width does need to increase a bit.

@gbo73
Copy link

gbo73 commented Dec 17, 2015

Yes I also thing something is wrong with deadbase detection and the new theme will not help (snow). :-(

@gbo73
Copy link

gbo73 commented Dec 17, 2015

Thank you I didn't know a new update has been released now I can see traps and no more snow! I will check if it improve deadbase detection

@gbo73
Copy link

gbo73 commented Dec 17, 2015

Ok now it detects again deadbase it is not perfect but it is a start ;)

@bentogoa
Copy link

No files found: C:\MyBot-master-4\images\Elix*.bmp

there is no dir named Elix

@jp31415926
Copy link
Author

That was an experiment to see if I could improve deadbase detection. Any BMP files in the Elix directory will be read and searched for. The problem is that none of the images I have created work, so I haven't added them to the repo.

@ludodoucet
Copy link

Can we take a screenshot when "not a dead base", for add collector bmp in the db?

I will use sikuli for compare picture, do you think this can help? It is use opencv.

@paspiz85
Copy link

MyBot stop working with following log:

[11:08:26] PureClick 1,40,1,0 #0133 | Away
[11:08:29] PureClick 67,602,1,0 #0138
[11:08:31] Unable to load CoC, attempt to fix it...
[11:08:31] Stopping BlueStacks ....
[11:08:41] Please wait for full BS shutdown....
[11:09:08] BS stopped succesfully
[11:09:08] Checking system tray for ghost icons
[11:09:08] Removed 1 Ghost icon successfully
[11:09:09] Starting BlueStacks and Clash Of Clans
[11:09:10] Please wait while BS/CoC starts....
[11:13:22] Serious error has occurred, please restart PC and try again
[11:13:22] BlueStacks refuses to load, waited 250.94 seconds
[11:13:22] Saving desktop snapshot in TEMP folder for developer review
[11:13:23] Unable to continue........
[11:13:24] ==================== Bot Stop ====================

I checked BSOpenError_* images in temp folder and all contains the BlueStacks window with CoC running

@T-Svensson
Copy link

@paspiz85 I've seen this too. You say that CoC is running, is it zoomed out or just like the app started with a small portion of the base? Those times I've seen it, the bot appears to be stuck in a loop it thinks it has zoomed out while it hasn't.

@paspiz85
Copy link

From screenshot I see only a small portion of the base

@ludodoucet
Copy link

it is really make it in "MyBot-master\SkippedZombies"
But with $debugDeadBaseImage = 1 in COCBot/MBR Global Variables.au3

and https://github.com/jp31415926/MyBot/commit/828fc6c0662b65cc888ee7ce1dd478cd662bd39f

Thank you jp

@MyBotRun MyBotRun closed this Dec 21, 2015
cosote added a commit that referenced this pull request Mar 1, 2019
* Added MyBot.run Forum user authentication registration to bot fixing COPYCAT problems
* Added Android click mode (minitouch or WinAPI) to Bot/Android options, default is now minitouch as it's most stable
* Added REMAIN cmd in csv attack
* Added KOPLAYER 2.0.0 support
* Fixed "Troop ... is not available due to full queue"
* Fixed "Cannot find/verify 'Okay' Button in Army tab #2"
* Fixed minitouch port initialization
* Fixed attackbar troop count detection, when count is 200+
* Fixed minitouch group clicks deploy
* Fixed LeapDroid render mode detecion
* Fixed LeapDroid "device offline" problem
* Fixed SmartFarm debug errors
* Fixed hero sometime not dropped when CSV recalc not detecting hero anymore
* Fixed stopping ADB shell instance when bot stopped
* Fixed bot exeution when "Zone.Identifier" exist on exe or dll files
* Improved BB boat detection to return to home base
* Improved minitouch fixing tcp connection problems
* Improved manual clicks when bot stopped/paused and bot is docked
* Improved BlueStack/BlueStacks2 command line key to be used on any BlueStacks version
* Improved MEmu smartwait closing CoC preventing CoC unresponsiveness crash
* Improved Builder Base village measuring/zoomout
* Improved one star battle end to activate also Warden
* Improved Copycat warning
cosote added a commit that referenced this pull request Mar 1, 2019
* Added MyBot.run Forum user authentication registration to bot fixing COPYCAT problems
* Added Android click mode (minitouch or WinAPI) to Bot/Android options, default is now minitouch as it's most stable
* Added REMAIN cmd in csv attack
* Added KOPLAYER 2.0.0 support
* Fixed "Troop ... is not available due to full queue"
* Fixed "Cannot find/verify 'Okay' Button in Army tab #2"
* Fixed minitouch port initialization
* Fixed attackbar troop count detection, when count is 200+
* Fixed minitouch group clicks deploy
* Fixed LeapDroid render mode detecion
* Fixed LeapDroid "device offline" problem
* Fixed SmartFarm debug errors
* Fixed hero sometime not dropped when CSV recalc not detecting hero anymore
* Fixed stopping ADB shell instance when bot stopped
* Fixed bot exeution when "Zone.Identifier" exist on exe or dll files
* Improved BB boat detection to return to home base
* Improved minitouch fixing tcp connection problems
* Improved manual clicks when bot stopped/paused and bot is docked
* Improved BlueStack/BlueStacks2 command line key to be used on any BlueStacks version
* Improved MEmu smartwait closing CoC preventing CoC unresponsiveness crash
* Improved Builder Base village measuring/zoomout
* Improved one star battle end to activate also Warden
* Improved Copycat warning
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.