Jump to content
Sign in to follow this  
bht888

How to train and use El Primo

Recommended Posts

Hello, thanks for your work! I want to use witches as my replacement troop and custom train troops (not quick train). I followed your instructions plus I made an El Primo image from the troop training bar and added it to /imgxml/Train/Train_Train/

 

Everything works except for training the El Primo's. The bot can't find the image because it slides the troop bar to the left, which puts the El Primo image out of view. If I quickly slide the troop bar back to the right, it will train the El Primos.

 

Can you suggest how I can temporarily set the bot to find the witch on the left side of the troop bar and not slide the troop bar to the right before training?

Share this post


Link to post
Share on other sites

Hello, thanks for your work! I want to use witches as my replacement troop and custom train troops (not quick train). I followed your instructions plus I made an El Primo image from the troop training bar and added it to /imgxml/Train/Train_Train/

 

Everything works except for training the El Primo's. The bot can't find the image because it slides the troop bar to the left, which puts the El Primo image out of view. If I quickly slide the troop bar back to the right, it will train the El Primos.

 

Can you suggest how I can temporarily set the bot to find the witch on the left side of the troop bar and not slide the troop bar to the right before training?

Share this post


Link to post
Share on other sites

Hello, thanks for your work! I want to use witches as my replacement troop and custom train troops (not quick train). I followed your instructions plus I made an El Primo image from the troop training bar and added it to /imgxml/Train/Train_Train/

 

Everything works except for training the El Primo's. The bot can't find the image because it slides the troop bar to the left, which puts the El Primo image out of view. If I quickly slide the troop bar back to the right, it will train the El Primos.

 

Can you suggest how I can temporarily set the bot to find the witch on the left side of the troop bar and not slide the troop bar to the right before training?

Very sorry about multiple posts, my browser wasn't refreshing correctly. Please delete this post and the dups. Thanks

 

 

6 minutes ago, xjenxnx said:

Hello, thanks for your work! I want to use witches as my replacement troop and custom train troops (not quick train). I followed your instructions plus I made an El Primo image from the troop training bar and added it to /imgxml/Train/Train_Train/

 

Everything works except for training the El Primo's. The bot can't find the image because it slides the troop bar to the left, which puts the El Primo image out of view. If I quickly slide the troop bar back to the right, it will train the El Primos.

 

Can you suggest how I can temporarily set the bot to find the witch on the left side of the troop bar and not slide the troop bar to the right before training?

Very sorry about multiple posts, my browser wasn't refreshing correctly. Please delete this post and the dups. Thanks

 

After reading the previous posts more closely, I think Triplem answered my question. Testing now.

 

Share this post


Link to post
Share on other sites
1 час назад, Urannniko сказал:

Hello, in the folders of the bot files have the extension xml, and you give png. Do I need to format them somehow?

I apologize, read that the bot with png also works.

Share this post


Link to post
Share on other sites
18 hours ago, TripleM said:

To make Witches work, you have to adjust COCBot\functions\CreateArmy\TrainSystem.au3, line 730:

Func IsElixirTroop($Troop)
	Local $iIndex = TroopIndexLookup($Troop, "IsElixirTroop")
	If $iIndex = $eWitc Then Return True
	If $iIndex >= $eBarb And $iIndex <= $eMine Then Return True
	Return False
EndFunc   ;==>IsElixirTroop

Func IsDarkTroop($Troop)
	Local $iIndex = TroopIndexLookup($Troop, "IsDarkTroop")
	If $iIndex = $eWitc Then Return False
	If $iIndex >= $eMini And $iIndex <= $eIceG Then Return True
	Return False
EndFunc   ;==>IsDarkTroop

 

@TripleM thanks for helping mate....it solved half the problem of not selecting the actual witch...now the only problem is it doesn't recognize the witc icon and skips EL-Primo ...i dont think i did anything wrong

Share this post


Link to post
Share on other sites
51 minutes ago, sniper199999 said:

@TripleM thanks for helping mate....it solved half the problem of not selecting the actual witch...now the only problem is it doesn't recognize the witc icon and skips EL-Primo ...i dont think i did anything wrong

You need the image for imgxml\ArmyOverview\Troops in imgxml\Train\Train_Train too.

Share this post


Link to post
Share on other sites

I'll be honest, if you're going to change code, it'd keep it as healers and just change the Troop cost in the code.

 

in the file \COCBot\MBR Global Variables.au3

 

line 620-622:

Global Const $g_aiTroopSpace[$eTroopCount] = [ _
        1, 1, 5, 1, 2, 5, 4, 14, 20, 25, 10, 6, 30, _
        2, 5, 8, 30, 12, 30, 6, 15]

 

Change it to:

Global Const $g_aiTroopSpace[$eTroopCount] = [ _
        1, 1, 5, 1, 2, 5, 4, 12, 20, 25, 10, 6, 30, _
        2, 5, 8, 30, 12, 30, 6, 15]

Edited by bht888
  • Like 1

Share this post


Link to post
Share on other sites
4 minutes ago, bht888 said:

I'll be honest, if you're going to change code, it'd keep it as healers and just change the Troop cost in the code.

 

in the file \COCBot\MBR Global Variables.au3

 

line 620-622:

Global Const $g_aiTroopSpace[$eTroopCount] = [ _
        1, 1, 5, 1, 2, 5, 4, 14, 20, 25, 10, 6, 30, _
        2, 5, 8, 30, 12, 30, 6, 15]

 

Change it to:

Global Const $g_aiTroopSpace[$eTroopCount] = [ _
        1, 1, 5, 1, 2, 5, 4, 12, 20, 25, 10, 6, 30, _
        2, 5, 8, 30, 12, 30, 6, 15]

That is a possibility too. Now the community has more options on how to achieve it. And maybe learn something on the way. :cool:

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.

Sign in to follow this  

×
×
  • Create New...