Poll: How interesting sound those changes ?
You do not have permission to vote in this poll.
Not interesting at all, go away!

1 3.45%
Yep, why not, you'll probably find something better to do at a later time

5 17.24%
I want it... NOW!

23 79.31%
Total 29 vote(s) 100%
* You voted for this item. [Show Results]


Thread Rating:
  • 3 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
FastFrench's changes
#1
Hello,

as I got some time today to play with the code, I've done some changes on the source script (still have to test them):
 - I've splitted the big script file  into several 3 smaller files:
     * the main file, with all the stuff except what is explicitely in one of the next 2 Wink
     * one with pixels configuration (that's where you'll have to go when images are changing when a new version of is launched). I've removed most hardcoded coordinates and colors (but not all, some coordinates are still not clear for me, so can't name them) from the main script to isolate them in a specific file. This way the code is much more maintenable.
     * OCR-related stuff. I also isolated this, as I guess it may be a temporary solution. For instance we will have to use a real OCR to make decent clan troops donations.
 - I've greatly reduced code redundancy, so now the same is done with significatively less lines (it should easier to read and maintain)
 - I now support only one "algorithm" for attacks with the following changes :
     * it uses all the troops available (restricted to barbarian, archers, goblins, wallbreakers, giants, king and queen)
     * you can ask it not to use the clan castle
     * instead of dropping troops in 5 discret points for each edge, it now makes a uniform distribution amongst the edge (so less vulnerable to area attacks).
 - Also added the possibility to attaque from a single edge (quite usefull when you uses giants and wallbreakers).


The fact some parts of the code are much smaller make it very EZ now to experiment new attack strategies (order, number and composition of waves, delays...).

It will probably take a couple of days to finalize and do some testing on this.

What do you think about those changes ?
And if someone is interested, where should I put the modified script ? (into a branch in GitHub, on the repository you use here, or somewhere else ?)
Reply
#2
Good changes, however 5.5 introduces new packaging, if you'd like to be added into the Developer Skype group feel free to PM me your Skype.
Reply
#3
Instead of working on your own revised version why don't you team up with us and we may be able to implement your changes into our next release.
Reply
#4
Thanks for your answers.

Yep, that's surely a better idea to work together. I'm just not very found of Skype (Scripting often at work, and I won't use Skype there).

Also, with only 1 big script file, it's not easy to be several working at the same time.

I've juste tested "COC Bot v5.4.2.2.2 More Troops Options edit speed train" this night : good ideas in it. But I've build my version on "COC Bot v5.4.2.2 - donate + giant", which is already wuite far away from "official" COC Bot v5.4.2.2.

Quite hard to resynchronize that all each time.
Reply
#5
We are not longer working from a large script. all of the workings have been split into easy to identify au3 files makimh it much easier for everyone to work with. We are now working with v5.5.
Reply
#6
That's good, should be easier to work on it now Wink

The current branch is not on GitHub ?
Reply
#7
So, really, you want it?

OK then, here it is : FastFrench Rel1 - 5.4.2.2 based

What it does :
- Improved attack mode, using all troops available (Barbarians, Archers, Giants, Goblins, Wallbreakers). I've only tested it with barbarians (1 barrack) + archers (2 barrack)+ goblins (1 barrack)
I'm confident that the attack should work just fine with wallbreakers and giants, but not tested the automatic production of them (more détails for attacks on 1st message).
I recommand setting production per barrack, as it's the most reliable setting for now. I'll work later on the addition of giants & wallbreakers (and maybe the others).
- Some parts rewritten, now more readable and easier to change (despite I've added several parts, total scipt size is 10% smaller now).
- Most screen dependant stufff in a different script file, with explicit names for each referenced coordinates and colors.
- Donations of CC works fine, with fast reaction time, but hardcoded troups (1 goblin if any, 2 barbarians if any and up to 5 archers if any).

I hope you'll like it. Thank you to let me know how it goes.

I'll see how this may be merged with 5.5 coming version.
Reply
#8
(01-29-2015, 02:18 AM)FastFrench Wrote:  So, really, you want it?

OK then, here it is : FastFrench Rel1 - 5.4.2.2 based

What it does :
 - Improved attack mode, using all troops available (Barbarians, Archers, Giants, Goblins, Wallbreakers). I've only tested it with barbarians (1 barrack) + archers  (2 barrack)+ goblins (1 barrack)
I'm confident that the attack should work just fine with wallbreakers and giants, but not tested the automatic production of them (more détails for attacks on 1st message).
I recommand setting production per barrack, as it's the most reliable setting for now. I'll work later on the addition of giants & wallbreakers (and maybe the others).
 - Some parts rewritten, now more readable and easier to change (despite I've added several parts, total scipt size is 10% smaller now).
 - Most screen dependant stufff in a different script file, with explicit names for each referenced coordinates and colors.
 - Donations of CC works fine, with fast reaction time, but hardcoded troups (1 goblin if any, 2 barbarians if any and up to 5 archers if any).
 
I hope you'll like it. Thank you to let me know how it goes.

I'll see how this may be merged with 5.5 coming version.

hi thank you for you version,how i can delete the release cc troops function when im attacking?
Reply
#9
Code 
Arf, I couldn't resist to make last minute cosmetic changes after my testings, and of course it's never a good idea.
It SHOULD not drop the CC troops, as the option to change this is disabled. But as I've uncommented some code about this, I can't be definitively sure it works as expected.

So, here is the updated version that enables the option. If it doesn't work, please just comment out the following lines :
Code:
Func dropCC($x, $y, $slot) ;Drop clan castle
    SetLog("Dropping Clan Castle")
    SelectDropTroupe($slot)
    Click($x, $y)
EndFunc   ;==>dropCC
=>
Code:
Func dropCC($x, $y, $slot) ;Drop clan castle
;~     SetLog("Dropping Clan Castle")
;~     SelectDropTroupe($slot)
;~     Click($x, $y)
EndFunc   ;==>dropCC


Here is the new link :
FastFrench Rel2 - 5.4.2.2 based

I can't test it right now, but I'll fix this options if needed ASAP.


Thanks
Reply
#10
As far as I can tell, it works fine with dropping CC
Reply
 


Forum Jump:


Users browsing this thread: 3 Guest(s)

About The Bytecode Club

We're a community focused on Reverse Engineering, we try to target Java/Android but we also include other langauges/platforms. We pride ourselves in supporting and free and open sourced applications.

Website