Jump to content
chalicucu

Multi COC accounts on 1 emulator + 1 bot! (Switch Account)

Recommended Posts

Hi.

My computer doesn't like multi bot + multi emulator

So I modified bot for run 3 COC accounts on 1 bot + 1 emulator (mine is bluestack, other should be ok).

if army camp < 70%, Bot will auto switch to other account to play

If someone like this mod, I will share ;)

 

=========================================================

That is original idea. Now it's growing up to support many other features.

Here is FULL FEATURE LIST:

Spoiler

1. Switch accounts up to 8!
    To set up total accounts on emulator, go to tab Bot\Profiles and set at "Total CoC Accounts"


2. Dynamic choose group of accounts to play one time:
   - By GUI setup, go to tab Bot\Profiles and set "Accounts Playing List"
         Example: set order as "123"
           mean bot will play on three accounst: 1st, 2nd and 3rd, and switching step is: 1->2->3->1 ..... Change the value to your case.
   - For RUNNING TIME setup, use pushbullet message: BOT ACC ..., BOT ADD <account no>, or BOT REM <account no>
     eg: BOT ACC 138 => bot play with switching step is: 1->3->8->1 .....
         BOT ACC 1386 => add account 6 to order list => bot play with switching step is: 1->3->8->6->1 .....
         BOT ACC 3 => play only on account 3
         BOT ADD 6 => add account number 6 to playing list
         BOT REM 6 => remove account number 6 from playing list


3. Dynamic setup profiles correspond to accounts (& switch profile):
   - By GUI setup, go to tab Bot\Profiles and set "Mapping profile Indexs", choose profiles' index correspond to all accounts registered on your emulator:
     Example, set as: 12311111
     Digit N is the profile index correspond to account N. I have 8 accounts so set up with 8 digits
     For example, you have 2 accounts and the 1st one using profile 1, the 2nd one using profile 3, just set up: profile = 13
   - For RUNNING TIME setup, use pushbullet commands: BOT PRO ..., BOT ALLPRO ...  and BOT MAP ...
    BOT PRO use for set up profiles correspond to playing accounts in ordered step. Example, you have 3 accounts set up by BOT ACC 138, so with command: BOT PRO 124, account 1 will use profile 1, account 3 use profile 2, and account 8 use profile 4
    BOT ALLPRO use for set up profiles correspond to all exists accounts. Example, BOT ALLPRO 12323245 will set up profile for all 8 accounts with digit N is profile index of account N
    BOT MAP will set up profile for only one account: BOT MAP 2-5 => account 2 use profile 5

    (Tips: in my experience, I always setup 1 account as train/donate only with full army setting to >=80%. If the donation account require 100% as full army, it will take longer time to stay at this acc.

      To setup profile as train/donate only, go to tab "Village\Misc" and check "Halt attack" box, then set "when..." option is "Now (Train/Donate Only)" )

 

4. Provide Multi Switching Mode

  * Mode 0: shortest training. (smart idea and init code by @demen , modified by me)

    The Bot will play first round of play list as ordered,  then identify which account is attacking account and which one is donating account.

    From the 2nd round, Bot play attacking account first. It choose which account has the shortest training time to switch to and attack when reaching full army

    After playing around with attacking accounts by that method, Bot switch to donating accounts, donate then again comeback to attacking accounts.

    And so on...

 

    * Mode 1: Ordered playing list.

    Bot play accounts sequentially as ordered in play list. This is the original method  provided from previous version

 

     * Mode 2: Random.

     It mean that the switching is randomized. Any account in play list can be next switching account.

    

   How to setup this option:

   - On Swtich CoC Account GUI, choose mode on "Switching Mode" option.

   - By pushbullet command: BOT MODE <mode ID> 

     Example: BOT MODE 0 => mode set as Shortest training mode


5. Get current order by pushbullet msg: BOT GETORDER


6. Option to enable/disable attack plan.
   If this option is disabled, the attack plan of profile have no meaning, bot will always go to attack after full army
   - On GUI, config on tab Bot\Profiles => set check box "Check attack plan"
   - Pushbullet command: BOT ATKP 1 => enable attack plan,
                             and: BOT ATKP 0 => disable attack plan

 

7. Option to tell the bot go to relax, if one account in order list is not in attack plan. Set "Relax attack together" on GUI

Note that all the BOT command will be applied on next switching step.

 

 

==========================================================================================

Download latest version: for bot v6.1.3: SwitchAcc_botV6.1.3_V2.3.zip

                                        & bot v6.1.4: SwitchAcc_botV6.1.4_V2.3.zip

(Extract then replace to your official bot. Backup your "Profiles\profile.ini" file if you want to keep your current switch account configuration.

If you apply zip file, you need autoIT software to support run bot by the file "mybot.run.au3".

Or check here https://mybot.run/forums/index.php?/topic/8714-guide-how-to-recompile-the-bot-run-bot-as-script/ to recompile mybot.run.exe file)

 

For full bot with official v6.1.4 + switchCoCAcc, download on github: MyBot-release-MBR_6.1.4_chalicucu_switchCocAcc (GITHUB)

==========================================================================================

 

Setting up your accounts and profiles for play! You need to create profiles and map them to accounts. Current version support up to 9 profiles (I think enough now).

Check my sample setting and descriptions post for know how to do this:

My sample settings & descriptions:

SampleV2.3.PNG 

 

Description here: 

Spoiler

 

 

On the other hand, if you want a simple setting, example you have 3 accounts, just create 3 profiles , then setup total acc = 3, account playing list = 123, map profile index = 123

For Pushbullet install instructions, check here: https://mybot.run/forums/index.php?/topic/2636-guide-how-do-i-install-pushbullet/&page=1

=========================================================

 

And here is the improvement log:

Spoiler

* 07/28/2016: STM mode fixing when first switching match current account

                : fix donation & training custom army mode of official bot (v6.1.4 zip file only)

* 07/27/2016: fix special bug for STM mode (shortest training mode) and network disconnected

* 07/19/2016:

  Provide Multi Switching Mode: Mode 0: shortest training (new), Mode 1: Ordered playing list, Mode 2: Random (new)

 

  SampleV2.3_MODE.PNG

 

  Download here:  

* 07/08/2016:

   New feature support:

  1. Option to enable/disable attack plan. If this option is disabled, the attack plan of profile have no meaning, bot will always go to attack after full army

      - On GUI, config on tab Bot\Profiles => set check box "Check attack plan"

      - Pushbullet command: BOT ATKP 1 => enable attack plan,

                                and: BOT ATKP 0 => disable attack plan

  2. Add pushbullet commands:

      - BOT ADD <account no> : add 1 account to playing list, eg: BOT ADD 6

      - BOT REM <account no>: remove 1 account from playing list, eg: BOT REM 6

  3. Correct STATS for each account

  4. Improve switching in case of network disconnected.

  5. Improve check main screen to reject stuck on loading village

  6. Change attack log file to account based. Check on folder Profiles\Logs

 Download here:  SwitchAcc_botV6.1.3_V2.3.zipSwitchAcc_botV6.1.4_V2.3.zip

Sample Setting:

image.png

* 07/01/2016:

  NEW VERSION AVAILABLE:

  1. Config on GUI (tab Bot\Profiles) (mod by @demen  and me):

      - Option to enable/disable switch feature.

      - Set up total accounts on emulator.

      - Set up botting order (switching step).

      - Set up profile order, correspond to each account.

      - Option to tell the bot go to relax, if one account in order list is not in attack plan

  2. Fix problem with BOT ALLPRO command.

Download Here: SwitchAcc_botV6.1.2_V2.2.zip for bot version 6.1.2

and here: SwitchAcc_botV6.1.3_V2.2.zip for bot version 6.1.3

 

* 06/28/2016: fix termination error after BOT MAP

* 06/27/2016:

  Hey guys. I posted new version of this MOD. But after that it lost. Now I have to post AGAIN. :sick:

  So it maybe quite short and not enough to understand (also 'cause of my English is not good)

  Anyway, here is what this version can do:

1. Switch accounts up to 8!

   In the file "COCBot\MBR Global Variables.au3", go to line 1434 and set up how many google account you have on emulator, mine is 8:

         Global Const $nTotalCOCAcc = 8

2. Choose some accounts to play one time:

   - For first time setup, in the file "Profiles\profile.ini", choose accounts' index and switching step at line:

         order=123

     123 mean bot will play on three accounst: 1st, 2nd and 3rd, and switching step is: 1->2->3->1 ..... Change the value to your case.

   - For RUNNING TIME setup, use pushbullet message: BOT ACC ...

     eg: BOT ACC 138 => bot play with switching step is: 1->3->8->1 .....

           BOT ACC 1386 => add account 6 to order list => bot play with switching step is: 1->3->8->6->1 .....

           BOT ACC 3 => play only on account 3

 3. Choose profiles correspond to accounts:

   - For first time setup, in the file "Profiles\profile.ini", choose profiles' index correspond to all accounts registered on your emulator:

         profile=12311111

     Digit N is the profile index correspond to account N. I have 8 accounts so set up with 8 digits

     For example, you have 2 accounts and the 1st one using profile 1, the 2nd one using profile 3, just set up: profile = 13

  - For RUNNING TIME setup, use pushbullet commands: BOT PRO ..., BOT ALLPRO ...  and BOT MAP ...

    BOT PRO use for set up profiles correspond to playing accounts in ordered step. Example, you have 3 accounts set up by BOT ACC 138, so with command: BOT PRO 124, account 1 will use profile 1, account 3 use profile 2, and account 8 use profile 4

    BOT ALLPRO use for set up profiles correspond to all exists accounts. Example, BOT ALLPRO 12323245 will set up profile for all 8 accounts with digit N is profile index of account N

    BOT MAP will set up profile for only one account: BOT MAP 2-5 => account 2 use profile 5

4. Get current order by pushbullet msg: BOT GETORDER

 

All the BOT commands will be applied on next switching

That's all functional supported on this version.

This version also fix the problem of training with custom army mode.

Just replace the files on the root folder of bot, then run file mybot.run.au3 and enjoy!

Download here: SwitchCOCAcc_Botv6.1.2_V2.1_w. Demen GUI.rar (my mod with nice GUI created by @demen )

 

 

Thank all for give me new ideas. And special thanks for @demen, @nangkring and @Roro-Titi for their interesting and sharing the full integrated bot.

 

* More History:

Spoiler

 

More functions/Change log:

Spoiler

*** 06/18/2016:

- Fix wrong pushbullet last attack message after change account.

- Request bot play on only 1 account (no switching) by pushbullet message, eg: "BOT ACC 222" => only play account 2

- New pushbullet message to get current order information: BOT GETORDER

=> reply sample: 

      Ordered COC acc: 231 (3->1->2->3)
      Current:  3
      Bot profile: 674 (6.DE, 7.donate2, 4Go)

- Better Pushbullet's reply message

- Request CC before switching

 Download new version: SwitchCOC_Bot v6.1.2.zip

*** 06/14/2016:

- Switch bot profile correspond to COC account.

  On bot window, go to tab Bot-> Profile, you can see the list of "switch profiles".

  I set up default order of profiles is 1,2,3. That mean 1st COC account correspond to 1st bot profile, 2nd COC acc ~ 2nd bot profile and so on.

  You can change this set up by change value of variable $anBotProfileIdx on the file "MBR Global Variables.au3"

 

- Add pushbullet messages to reorder COC accounts:

  Message syntax: BOT ACC <Target1><Target2><Target3>

  with target1 is index of account to switch to if current account is the 1st one

         target2 is index of account to switch to if current account is the 2nd one

         target3 is index of account to switch to if current account is the 3rd one

  Example: BOT ACC 231 ==> switch from 1->2->3->1

                BOT ACC 312 ==> switch from 1->3->2->1

                BOT ACC 211 ==> switch 2<->1

  (notice: you can set up default order by variable anCOCAccIdx on the file "MBR Global Variables.au3"

 Reply sample: Reordered COC account: 231 (3->1->2->3)

- Add pushbullet messages to reorder bot profile:

  Message syntax: BOT PRO <Pro1><Pro2><Pro3>

  with ProN correspond to COC account N

  Example: BOT PRO 123

                BOT PRO 142

                BOT PRO 112

 Reply sample: Reordered bot profile: 674 (6.DE, 7.donate2, 4Go)

 

 

***** Mod from bot v6.1.2 available **********

Enjoy!

SwitchCOC_Bot v6.1.2.zip

 

****************************************

 

Updated 6/6/2016:

Spoiler

 

I improved some scripts. This is still bot v6.1.1, it still good for me.

Anyone want to tracing this please follow the comment with text "NDTHUAN' in the code.

 

On the file mybot.run.au3, go to line 363-387, u can see I comment on the code with "Click First Account", "Click Second Account", "Click Third Account"

Choose the correct account u want by remove the character ";" at first of the line.

 

At lines 381 and 386 is total troops capacity of villages, u also need to modify it to your case. Mine is Hall9 with 220 camp :)

 

 

waitMainScreen.au3

MBR Global Variables.au3

 

MyBot.run.au3

 

 

 

*************** Update June 13, 2016:

Spoiler

 

New functions available:

- Switch bot profile correspond to COC account.

  On bot window, go to tab Bot-> Profile, you can see the list of "switch profiles".

  I set up default order of profiles is 1,2,3. That mean 1st COC account correspond to 1st bot profile, 2nd COC acc ~ 2nd bot profile and so on.

  You can change this set up by change value of variable $anBotProfileIdx on the file "MBR Global Variables.au3"

 

- Add pushbullet messages to reorder COC accounts:

  Message syntax: BOT ACC <Target1><Target2><Target3>

  with target1 is index of account to switch to if current account is the 1st one

         target2 is index of account to switch to if current account is the 2nd one

         target3 is index of account to switch to if current account is the 3rd one

  Example: BOT ACC 231 ==> switch from 1->2->3->1

                BOT ACC 312 ==> switch from 1->3->2->1

                BOT ACC 211 ==> switch 2<->1

  (notice: you can set up default order by variable anCOCAccIdx on the file "MBR Global Variables.au3"

 

- Add pushbullet messages to reorder bot profile:

  Message syntax: BOT PRO <Pro1><Pro2><Pro3>

  with ProN correspond to COC account N

  Example: BOT PRO 123

                BOT PRO 142

                BOT PRO 112

 

 

If you using bot v6.1.1, using these files:

Spoiler

MyBot.run.au3                   (on root folder of bot)

MBR Global Variables.au3     (folder COCBot\)

PushBullet.au3                     (folder COCBot\functions\Village)

waitMainScreen.au3             (folder COCBot\functions\Main Screen)

checkObstacles.au3              (folder COCBot\functions\Main Screen)

 

 

 

For v6.1.2, manual input code following steps (oops, it quite complex):

Spoiler

 

1. In the file "MBR Global Variables.au3", add script to the end:


Global $profile = $sProfilePath & "\profile.ini"		
Global $nCurCOCAcc = 2     ;NDTHUAN Current COC account index : 1 of 3 acc
Global $anCOCAccIdx[3] = [3, 1, 2]       ; 1->3->2->1
						;[target1, target2, target3]
						; target COC account to switch to: If current is 1, switch-> target1
														;  If current is 2, switch-> target2 ....
Global $anBotProfileIdx[3] = [1, 2, 3]		;	bot profile index correspond to COC account
Local $lsCOCaccs
InireadS($lsCOCaccs,$profile, "switchcocacc", "order", "000")
If Number(StringMid($lsCOCaccs, 1, 1)) > 0 Then $anCOCAccIdx[0] = Number(StringMid($lsCOCaccs, 1, 1))
If Number(StringMid($lsCOCaccs, 2, 1)) > 0 Then $anCOCAccIdx[1] = Number(StringMid($lsCOCaccs, 2, 1))
If Number(StringMid($lsCOCaccs, 3, 1)) > 0 Then $anCOCAccIdx[2] = Number(StringMid($lsCOCaccs, 3, 1))

InireadS($lsCOCaccs,$profile, "switchcocacc", "profile", "000")
If Number(StringMid($lsCOCaccs, 1, 1)) > 0 Then $anBotProfileIdx[0] = Number(StringMid($lsCOCaccs, 1, 1))
If Number(StringMid($lsCOCaccs, 2, 1)) > 0 Then $anBotProfileIdx[1] = Number(StringMid($lsCOCaccs, 2, 1))
If Number(StringMid($lsCOCaccs, 3, 1)) > 0 Then $anBotProfileIdx[2] = Number(StringMid($lsCOCaccs, 3, 1))

 

2. In the file "Mybot.run.au3", add switch account function to end of file:


SetLog("Ordered COC account: " & $anCOCAccIdx[0] & $anCOCAccIdx[1] & $anCOCAccIdx[2], $COLOR_GREEN);
	SetLog("Ordered bot profile: " & $anBotProfileIdx[0] & $anBotProfileIdx[1] & $anBotProfileIdx[2], $COLOR_GREEN);
	if $nCurCOCAcc = $anCOCAccIdx[$nCurCOCAcc - 1] And Not $FirstStart Then		;Loopping 1 account, disable switching
		SetLog("Target account is current one. Nothing to do..", $COLOR_GREEN)
		Return
	EndIf
	$nCurCOCAcc = $anCOCAccIdx[$nCurCOCAcc - 1]     ;
	
	;If $nCurCOCAcc = $anCOCAccIdx[$nCurCOCAcc - 1]  Then $FirstStart = False
    Local Const $XConnect = 431
    Local Const $YConnect = 434
    Local Const $ColorConnect = 4284458031      ;Connected Button: green
    Click(800, 585, 1, 0, "Click Setting")      ;Click setting
    If _Sleep(3000) Then Return
    If _ColorCheck(_GetPixelColor($XConnect, $YConnect, True), Hex($ColorConnect, 6), 20) Then       ;Green
        Click($XConnect, $YConnect, 1, 0, "Click Connected")      ;Click Connect
    EndIf
    
    If _Sleep(3000) Then Return
    Click($XConnect, $YConnect, 1, 0, "Click DisConnect")      ;Click DisConnect
    If _Sleep(8000) Then Return
    
    Click(383, 300 + 80*($nCurCOCAcc - 1), 1, 0, "Click Account " & $nCurCOCAcc)      ;Click Google Account
    ;need check acc clicked or not-------------------------

    #CS 
    If $nCurCOCAcc = 1 Then     ;switch 1st and 3rd account : 1->3->2->1
        Click(383, 460, 1, 0, "Click Third Account")      ;Click Third Account
        $nCurCOCAcc = 3
        $TotalCamp = 220    ; Account TotalCamp
        _GUICtrlComboBox_SetCurSel($cmbProfile,1-1)
    ElseIf $nCurCOCAcc = 2 Then
        Click(383, 300, 1, 0, "Click First Account")      ;Click First Account
        $nCurCOCAcc = 1
        $TotalCamp = 220    ; Account TotalCamp
        _GUICtrlComboBox_SetCurSel($cmbProfile,4-1)
    Else
        Click(383, 380, 1, 0, "Click Second Account")      ;Click Second Account
        $nCurCOCAcc = 2
        $TotalCamp = 200    ; Account TotalCamp
        _GUICtrlComboBox_SetCurSel($cmbProfile,2-1)
    EndIf
     #CE
    	
    If _Sleep(8000) Then Return
    Local $idx = 0
    While 1
        If _ColorCheck(_GetPixelColor($XConnect, $YConnect, True), Hex($ColorConnect, 6), 20) Then       ;Blue
            Setlog("Still current account", $COLOR_RED)
            If $idx >= 10 Then
                ClickP($aAway, 1, 0, "#0167") ;Click Away
                If _Sleep(2000) Then Return
                ;SwitchCOCAcc()     ;force switch
				_GUICtrlComboBox_SetCurSel($cmbProfile,$anBotProfileIdx[$nCurCOCAcc - 1] - 1)
				cmbProfile()
                Return
            EndIf
		ElseIf _ColorCheck(_GetPixelColor($XConnect, $YConnect, True), Hex(4291299336, 6), 20) Then       ;red
			If _Sleep(4000) Then Return
			Setlog("Still disconnect button", $COLOR_RED)
		ElseIf _ColorCheck(_GetPixelColor($XConnect, $YConnect, True), Hex(4294309365, 6), 20) Then 	;not yet clicked google acc
			Click(383, 300 + 80*($nCurCOCAcc - 1), 1, 0, "Click Account " & $nCurCOCAcc)      ;Click Google Account
		Else	;4293454048
            Setlog("Changing to account [" & $nCurCOCAcc & "]", $COLOR_RED)
            ExitLoop
        EndIf
        $idx = $idx + 1
        If _Sleep(1000) Then Return
    WEnd
    ;If _Sleep(1000) Then Return
    $idx = 0
    While $idx <= 30
        If _ColorCheck(_GetPixelColor(443, 430, True), Hex(4284390935, 6), 20) Then 
            Setlog("Load button appears", $COLOR_RED)
            ExitLoop
        Else
            Setlog("Wait!", $COLOR_RED)
            If _Sleep(1000) Then Return
			$idx = $idx + 1
			If $idx >= 31 Then 
				ClickP($aAway, 1, 0, "#0167") ;Click Away
				Return False
			EndIf
        EndIf
    WEnd
    $idx = 0
    While _ColorCheck(_GetPixelColor(443, 430, True), Hex(4284390935, 6), 20) And $idx <= 40
        If _Sleep(1000) Then Return
        Click(443, 430, 1, 0, "Click Load")      ;Click Load
        $idx = $idx + 1
    WEnd
    If _Sleep(5000) Then Return
    Click(353, 180, 1, 0, "Click Text box")      ;Click Text box
    If _Sleep(2000) Then Return
    If SendText("CONFIRM") = 0 Then
        Setlog("Error sending CONFIRM text", $COLOR_RED)
        Return
    EndIf
    If _Sleep(3000) Then Return
    PureClick(463, 180, 1, 0, "Click CONFIRM")      ;Click CONFIRM
    If _Sleep(3000) Then Return
    ClickP($aAway, 1, 0, "#0167") ;Click Away
    _GUICtrlComboBox_SetCurSel($cmbProfile,$anBotProfileIdx[$nCurCOCAcc - 1] - 1)
    cmbProfile()
	
	;init for new acc
	VillageReport()
	$Is_ClientSyncError = False
	$Is_SearchLimit = False
	;$Quickattack = False
	$quicklyfirststart = True
	$fullArmy = False
	$TotalTrainedTroops = 0
	$iGoldLast = "" 	;pushbullet init for last attack
	$iElixirLast = ""

3. Add code to "function Idle()" of file Mybot.run.au3:

    Find function by string "Func Idle()"

    In function, find line:

                    While $fullArmy = False Or $bFullArmyHero = False

   then add more condition as:

                    While $fullArmy = False Or $bFullArmyHero = False  Or $CommandStop = 0

   

    Still in this function, find first line match "If $CommandStop = -1" Then SetLog("====== Waiting for full army ======", $COLOR_GREEN) ...., change to :


        If $CommandStop = -1 Or $CommandStop = 0 Then 	;NDTHUAN
            SetLog("====== Waiting for full army ======", $COLOR_GREEN)
            If (($CurCamp/$TotalCamp)*100) < 85 Or $CommandStop = 0 Then    ;NDTHUAN
                RequestCC()
				SetLog("====== Switching COC account ======", $COLOR_GREEN)
				SwitchCOCAcc()      ;NDTHUAN switch COC acc
				BotCommand()
				_RunFunction("DonateCC,Train")
                If $CommandStop <> 0 And ($CurCamp/$TotalCamp)*100 < 96 Then		;new village camp
                    CloseCOC()
                    SetLog("====== Sleeping 2 minutes ======", $COLOR_GREEN)
                    If _Sleep(120000) Then Return
                    OpenCOC()
                Else
                    If _Sleep(2000) Then Return
                EndIf
				Return	1
            Else
                If _Sleep(30000) Then Return
				;SetLog("= IDLE 2", $COLOR_GREEN)
            EndIf
        EndIf

4. Add code to "function runBot()" of file mybot.run.au3:

  - Add new line at 1st line of function:


SwitchCOCAcc();  first match acc and profile

 - Find line "Idle()" and change to:

          If Idle()= 1 Then ContinueLoop

         

5. Add code to "Func AttackMain()" of file mybot.run.au3:

 Find the line "Setlog(" - wait troops and/or heroes according to search settings", $COLOR_BLUE)", insert new line after that:


BotCommand()

6. Add code to "Func _RemoteControlPushBullet()" of the file "PushBullet.au3":

   Find "Case Else" and add this code:


Local $comboBoxArray
If StringLeft($body[$x], 7) = "BOT ACC" Then		;NDThuan order switch COC Account
							If Number(StringMid($body[$x], 9, 1)) > 0 Then $anCOCAccIdx[0] = Number(StringMid($body[$x], 9, 1))
							If Number(StringMid($body[$x], 10, 1)) > 0 Then $anCOCAccIdx[1] = Number(StringMid($body[$x], 10, 1))
							If Number(StringMid($body[$x], 11, 1)) > 0 Then $anCOCAccIdx[2] = Number(StringMid($body[$x], 11, 1))
							IniWriteS($profile, "switchcocacc", "order", String($anCOCAccIdx[0]) & String($anCOCAccIdx[1]) & String($anCOCAccIdx[2]))
							SetLog("Reordered COC account: [" & $body[$x] & "]", $COLOR_RED)
							_PushToPushBullet("Reordered COC account: " & $anCOCAccIdx[0] & $anCOCAccIdx[1] & $anCOCAccIdx[2] _
											& " (" & $nCurCOCAcc & "->" & $anCOCAccIdx[$nCurCOCAcc - 1] & "->" & $anCOCAccIdx[$anCOCAccIdx[$nCurCOCAcc - 1] -1] & "->" & $anCOCAccIdx[$anCOCAccIdx[$anCOCAccIdx[$nCurCOCAcc - 1] -1] -1 ] _
											& ")")
							_DeleteMessageOfPushBullet($iden[$x])
						ElseIf StringLeft($body[$x], 7) = "BOT PRO" Then		;NDThuan order switch bot profile
							If Number(StringMid($body[$x], 9, 1)) > 0 Then $anBotProfileIdx[0] = Number(StringMid($body[$x], 9, 1))
							If Number(StringMid($body[$x], 10, 1)) > 0 Then $anBotProfileIdx[1] = Number(StringMid($body[$x], 10, 1))
							If Number(StringMid($body[$x], 11, 1)) > 0 Then $anBotProfileIdx[2] = Number(StringMid($body[$x], 11, 1))
							IniWriteS($profile, "switchcocacc", "profile", String($anBotProfileIdx[0]) & String($anBotProfileIdx[1]) & String($anBotProfileIdx[2]))
							SetLog("Reordered Bot profile: [" & $body[$x] & "]", $COLOR_RED)
							$comboBoxArray = _GUICtrlComboBox_GetListArray($cmbProfile)
							_PushToPushBullet("Reordered bot profile: " & $anBotProfileIdx[0] & $anBotProfileIdx[1] & $anBotProfileIdx[2] _
												& " (" & $comboBoxArray[$anBotProfileIdx[0]] & ", " & $comboBoxArray[$anBotProfileIdx[1]] & ", " & $comboBoxArray[$anBotProfileIdx[2]] & ")")
							_DeleteMessageOfPushBullet($iden[$x])
						ElseIf $body[$x] = "BOT GETORDER" Then		;NDThuan inquiry acc order
							SetLog("Get order: [" & $body[$x] & "]", $COLOR_RED)
							$comboBoxArray = _GUICtrlComboBox_GetListArray($cmbProfile)
							_PushToPushBullet("Ordered COC acc: " & $anCOCAccIdx[0] & $anCOCAccIdx[1] & $anCOCAccIdx[2] _
												& " (" & $nCurCOCAcc & "->" & $anCOCAccIdx[$nCurCOCAcc - 1] & "->" & $anCOCAccIdx[$anCOCAccIdx[$nCurCOCAcc - 1] -1] & "->" & $anCOCAccIdx[$anCOCAccIdx[$anCOCAccIdx[$nCurCOCAcc - 1] -1] -1 ] _
												& ")\nCurrent:  " & $nCurCOCAcc _
												& "\nBot profile: " & $anBotProfileIdx[0] & $anBotProfileIdx[1] & $anBotProfileIdx[2] _
												& " (" & $comboBoxArray[$anBotProfileIdx[0]] & ", " & $comboBoxArray[$anBotProfileIdx[1]] & ", " & $comboBoxArray[$anBotProfileIdx[2]] & ")")
							_DeleteMessageOfPushBullet($iden[$x])
						EndIf

 

7. Add code to the file "checkObstacles.au3":

   Add new lines after the line "Func checkObstacles()":

   If _ColorCheck(_GetPixelColor(443, 430, True), Hex(4284390935, 6), 20) Then
        PureClick(383, 430, 1, 0, "Click Cancel")      ;Click Cancel
    EndIf

 

 

 

==> That's all, run bot by script mybot.run.au3 and hope it work for you!

*** Update 14/03/2016: fixed function SwitchCOCAcc and Idle . Update file Mybot.run.au3

 

 

 

 

 

SwitchAcc_botV6.1.3_V2.2.1.zip

Edited by chalicucu
STM mode fixing when first switching match current account
  • Upvote 14

Share this post


Link to post
Share on other sites
8 minutes ago, dharyadi said:

latest version  ?

yes. for bot v6.1.1.

1 minute ago, saladin1985 said:

like a multy farming feature..?

I mean 3 villages continuously playing on 1 bluestacks. 

Share this post


Link to post
Share on other sites

Nope. when 1 acc building troops, bot auto click to disconnect current google acc (on COC: setting-> Connect ) then click to connect other acc to play

My mod only work for 3 accounts. Not sure to other case because it relate to screen coordinate 

If villages have differrent troop capacity, should use "Force total army camp" option of bot

I attack the file that run for 2 of 3 villages here

MyBot.run.au3

Edited by chalicucu

Share this post


Link to post
Share on other sites
Just now, chalicucu said:

Nope. when 1 acc building troops, bot auto click to disconnect current google acc (on COC: setting-> Connect ) then click to connect other acc to play 

its the same like multy farming bro ..

Just now, Harry DS Alsyundawy said:

i use multi bot multi emulator but in 5.3.2 version only with memu 2.5.0

Screenshot_67b467d.png
Screenshot_666eb6a.png
Clipboard-100538.jpg

 My PC not strong for running like your pc bro .. salam KWI hehehe

Share this post


Link to post
Share on other sites
15 hours ago, Harry DS Alsyundawy said:

i use multi bot multi emulator but in 5.3.2 version only with memu 2.5.0

Screenshot_67b467d.png
Screenshot_666eb6a.png
Clipboard-100538.jpg

Can you show me your system configuration? Because I have plan to build the PC to run multiple COC account. Thanks you!

Edited by knphoenix

Share this post


Link to post
Share on other sites

"F:\PortableApps\_Coc\MyBot-release-MBR_6.1.2 - Copy\COCBot\GUI\MBR GUI Design Child Village - Donate.au3" (351) : ==> Variable used without being declared.:
$grpBarbarians = GUICtrlCreateGroup($sTxtBarbarians, $x - 20, $y - 20, 430, 190)
$grpBarbarians = GUICtrlCreateGroup(^ ERROR

 

Sorry, with 6.1.1 works!

Edited by Martinel

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...