The Bytecode Club
Log inJoin the club
Video Game Reverse Engineering

🧱 5.4.2.5.2 - Better Troops Deployment (LF Style), Fixed Train Troops

Started by safar46 · Jan 25, 2015

546 replies7,799,713 viewsLocked
Feb 1, 2015#271

SongHyeKyo wrote:

lucianone wrote:

hello i have this problem. at first i want to try the new feature meet TH req and outside TH

[12:06:58 PM] (124) [G]: 72490        [E]: 58500        [D]: 265          [T]: 24           [TH]: -            [THL]: -
[12:07:03 PM] (125) [G]: 130511       [E]: 147733       [D]: 0            [T]: 13           [TH]: -            [THL]: -

but i got this one, it can't get the TH or the THL

Set your maximal th level in search setting ..

i already have set it to TH 8, and tick the meet townhall level. but seems still like that.
note: win 7 x64 bit, already try both compile 32bit and 64bit. compiled 32bit getting error and can't work at all, 64bit getting result like that

Feb 1, 2015#272

@safar46
i would like to ask if you can integrate @FastFrench Attack Algorithm into your bot?
Thanks in advance.

Yes please, His Attack algorithm is really good. I been trying to put it into safa's code but its still deploying in the old fashion

Feb 1, 2015#273

dinobot wrote:

'-=*[Swoop wrote:

*=-' pid='5427' dateline='1422763570']

k3iroll wrote:

1- Try to re-install AutoIt

Why?  5.4.2.2 works perfectly fine

k3iroll wrote:

2- Delete config

I cant see how this is going to help.  Surely new versions are compatible with pre existing settings.

k3iroll wrote:

3- Compile to x86

Why? 5.4.2.2 works perfectly fine with this in 64 bit mode

This is under development section.. If you think you are good enough to fix the problem, why ask? When people suggested solution, why resist? It is all trial and error. If you think this development bot is unstable and you can also continue with your older version that is stable to you.

Actually, as a developer myself I was providing all the info that I could to help contribute to someone who had the time to fix the problem.  I don't have that luxury at the moment so I contribute what I can and that is logs and config.  I don't see any demands above for a solution to the issue I raised.

As for the suggestions above?  The only one that was missing was the suggestion to reboot the pc.  If I was looking for first line support desk support I'd have asked in the help forum and not posted my logs here.

Obviously I am using the older version now, but I also hope that my contribution of logs, config and platform help in someway to contribute to the greater product.

Feb 1, 2015#274

What is your setting guys in this bot version?

Feb 1, 2015#275

bluestacks: 0.9.1.4057 (disable desktop composition)
win 7 x64 OS
bot version: "COC Bot v5.4.2.4 Safar46's Mods" (run script X86)

Thanks @Safar46 for this update.
I'm having problem on Trophy Drop on this version. My trophy count (1680) is already greater than the set value (1600) but still not dropping trophy. But i did some workaround by changing the position of

DropTrophy()

in the Func Idle(). And it works well now with trophy drop.

Func Idle() ;Sequence that runs until Full Army
	Local $TimeIdle = 0 ;In Seconds
		If $fullArmy = False Then
			While $fullArmy = False
				Local $hTimer = TimerInit()
				If _Sleep(1000) Then ExitLoop
				checkMainScreen()
				If _Sleep(1000) Then ExitLoop
				ZoomOut()
				DropTrophy()
				If $iCollectCounter > $COLLECTATCOUNT Then ; This is prevent from collecting all the time which isn't needed anyway
					Collect()
					If _Sleep(1000) Or $RunState = False Then ExitLoop
					$iCollectCounter = 0
				 EndIf
				Train()
				If $fullArmy Then ExitLoop
				If _Sleep(1000) Then ExitLoop
				If _Sleep(1000) Then ExitLoop
				If $iDonateCounter > $DONATEATCOUNT Then
				  DonateCC()
					If _Sleep(1000) Or $RunState = False Then ExitLoop
					$iDonateCounter = 0
				 EndIf
				SetLog("~~~Waiting for full army~~~")
				If _Sleep(30000) Then ExitLoop
				Click(1, 1) ;Click Away
				$TimeIdle += Round(TimerDiff($hTimer) / 1000, 2) ;In Seconds
				SetLog("Time Idle: " & Floor(Floor($TimeIdle / 60) / 60) & " hours " & Floor(Mod(Floor($TimeIdle / 60), 60)) & " minutes " & Floor(Mod($TimeIdle, 60)) & " seconds")
			WEnd
		EndIf
EndFunc   ;==>Idle

By the way, background mode still not working on me.

Feb 1, 2015#276

Ok after testing the bot on the same computers spec, one Windows 7 32BIT and one Windows 7 64Bit

The 64bit have lots of errors and problems,many functions not working:
If the bot get "sync out.." error,its relogging but not zooming out and continue to bot, Background mode not working, Attacking bases with full army but the barracks not full..."client and server sync" problem are more often then before, Donate only Archers..ETC not working.
TH sniping have problems and errors too,somtimes its cause the bot to stop.

32bit:
Background working,its worked 4 hours + ,the only 1 problem i had is the bot go into "out of sync.." and the same as 64bit the bot connected back but was on "zoom in" and not zoomed out and continued to bot..

thank you alot safar for you great job!

Feb 1, 2015#277

Good work everyone...

How can I edit / change the script to produce dragon or other troop?

Thanks in advance

Feb 1, 2015#278

i've been testing around 8 hs, and got 2 problems....after train troops, the bot doesnt close the las barrack, so it can request to cc troops...and 2, while searching, get out of sync, restart but doesnt zoomed out...start searching again, and fail attaking...

Feb 1, 2015#279

i've been testing around 8 hs, and got 2 problems....after train troops, the bot doesnt close the las barrack, so it can request to cc troops...and 2, while searching, get out of sync, restart but doesnt zoomed out...start searching again, and fail attaking...

for the last barrack issue, edit the code in the "Func Train()"

		SetLog("Training Troops Complete")
		Click(1, 1, 2, 250); Click away twice with 250ms delay
		ExitLoop
	WEnd
EndFunc   ;==>Train
Feb 1, 2015#280

Regards to the out of sync, try revert to old coding in 5.4.2.2 as below... Swapping of return false and true.

Please test out and report back..

 Func checkNextButton() ;Checks for Out of Sync or Connection Lost errors
 	$Message = _PixelSearch(457, 300, 458, 330, Hex(0x33B5E5, 6), 10) ;Check for out of sync or inactivity
 	If IsArray($Message) = False Then
		Return False ;Button available
 	Else
		Return True ;Out of sync or inactivity error.
 	EndIf
EndFunc   ;==>checkNextButton
This discussion is closed.