Jump to content
Sign in to follow this  
tsingtao75

Super troop Image Issues - Cant train

Recommended Posts

Anyone else having issues training barbarians after they've been added to the superlab? Getting can't find barbs when it goes to train my army.


[1:07:34 PM] No Barbarian Icon found!
[1:07:34 PM] Training 115x Barbarians
[1:07:35 PM] No Barbarian Icon found!
[1:07:36 PM] No Barbarian Icon found!
[1:07:37 PM] No Barbarian Icon found!
[1:07:38 PM] No Barbarian Icon found!
[1:07:39 PM] No Barbarian Icon found!
[1:07:39 PM] TrainIt troop position Barbarian did not find icon
[1:07:39 PM] Seems all your barracks are upgrading!
 

Edited by tsingtao75

Share this post


Link to post
Share on other sites

In "COCBot\Attack\GetAttackBar.au3:"

Find 

		;Add found Stuff into our Arrays
		For $i = 0 To UBound($aAttackBarResult, 1) - 1
			$aTempArray = $aAttackBarResult[$i]
			$aTempMultiCoords = decodeMultipleCoords($aTempArray[1], 40, 40, -1)
			For $j = 0 To UBound($aTempMultiCoords, 1) - 1
				$aTempCoords = $aTempMultiCoords[$j]
				If UBound($aTempCoords) < 2 Then ContinueLoop
				If StringRegExp($aTempArray[0], "(AmountX)", 0) Then
					_ArrayAdd($aSlotAmountX, $aTempCoords[0] & "|" & $aTempCoords[1] & "|" & $iRow, 0, "|", @CRLF, $ARRAYFILL_FORCE_NUMBER)
					$aiOCRLocation[$iRow - 1] = $aTempCoords[1]
				Else
					If StringRegExp($aTempArray[0], "(King)|(Queen)|(Warden)|(Champion)", 0) Then _ArrayAdd($aSlotAmountX, $aTempCoords[0] & "|" & $aTempCoords[1] & "|" & $iRow, 0, "|", @CRLF, $ARRAYFILL_FORCE_NUMBER)
					Local $aTempElement[1][8] = [[$aTempArray[0], $aTempCoords[0], $aTempCoords[1], -1, -1, -1, -1, $iRow]]
					_ArrayAdd($aAttackBar, $aTempElement)
				EndIf
			Next
		Next

Remplace

		;Add found Stuff into our Arrays
		For $i = 0 To UBound($aAttackBarResult, 1) - 1
			$aTempArray = $aAttackBarResult[$i]
			$aTempMultiCoords = decodeMultipleCoords($aTempArray[1], 40, 40, -1)
			For $j = 0 To UBound($aTempMultiCoords, 1) - 1
				$aTempCoords = $aTempMultiCoords[$j]
				If UBound($aTempCoords) < 2 Then ContinueLoop
				If StringRegExp($aTempArray[0], "(AmountX)", 0) Then
					_ArrayAdd($aSlotAmountX, $aTempCoords[0] & "|" & $aTempCoords[1] & "|" & $iRow, 0, "|", @CRLF, $ARRAYFILL_FORCE_NUMBER)
					$aiOCRLocation[$iRow - 1] = $aTempCoords[1]
				Else
					$aTempArray[0] = (StringInStr($aTempArray[0], "Super") <> 0) ? StringTrimLeft($aTempArray[0], 5) : ($aTempArray[0]) ; Team AIO Mod++ SuperTroops fix
					If StringRegExp($aTempArray[0], "(King)|(Queen)|(Warden)|(Champion)", 0) Then _ArrayAdd($aSlotAmountX, $aTempCoords[0] & "|" & $aTempCoords[1] & "|" & $iRow, 0, "|", @CRLF, $ARRAYFILL_FORCE_NUMBER)
					Local $aTempElement[1][8] = [[$aTempArray[0], $aTempCoords[0], $aTempCoords[1], -1, -1, -1, -1, $iRow]]
					_ArrayAdd($aAttackBar, $aTempElement)
				EndIf
			Next
		Next

-------------------------------

Find:

		;Add found Stuff into our Arrays
		For $i = 0 To UBound($aAttackBarResult, 1) - 1
			$aTempArray = $aAttackBarResult[$i]
			$aTempMultiCoords = decodeMultipleCoords($aTempArray[1], 40, 40, -1)
			For $j = 0 To UBound($aTempMultiCoords, 1) - 1
				$aTempCoords = $aTempMultiCoords[$j]
				If UBound($aTempCoords) < 2 Then ContinueLoop
				If $bDoubleRow And $aTempCoords[1] >= $iYBelowRowOne Then $iRow = 2
				If StringRegExp($aTempArray[0], "(AmountX)", 0) Then
					_ArrayAdd($aSlotAmountX, $aTempCoords[0] & "|" & $aTempCoords[1] & "|" & $iRow, 0, "|", @CRLF, $ARRAYFILL_FORCE_NUMBER)
					$aiOCRLocation[$iRow - 1] = $aTempCoords[1] ; Store any OCR Location for later use on Heroes
				Else
					If StringRegExp($aTempArray[0], "(King)|(Queen)|(Warden)|(Champion)", 0) Then _ArrayAdd($aSlotAmountX, $aTempCoords[0] & "|" & $aTempCoords[1] & "|" & $iRow, 0, "|", @CRLF, $ARRAYFILL_FORCE_NUMBER)
					Local $aTempElement[1][8] = [[$aTempArray[0], $aTempCoords[0], $aTempCoords[1], -1, -1, -1, -1, $iRow]] ; trick to get the right variable types into our array. Delimiter Adding only gets us string which can't be sorted....
					_ArrayAdd($aAttackBar, $aTempElement)
				EndIf
				$iRow = 1
			Next
		Next

Remplace:

		;Add found Stuff into our Arrays
		For $i = 0 To UBound($aAttackBarResult, 1) - 1
			$aTempArray = $aAttackBarResult[$i]
			$aTempMultiCoords = decodeMultipleCoords($aTempArray[1], 40, 40, -1)
			For $j = 0 To UBound($aTempMultiCoords, 1) - 1
				$aTempCoords = $aTempMultiCoords[$j]
				If UBound($aTempCoords) < 2 Then ContinueLoop
				If $bDoubleRow And $aTempCoords[1] >= $iYBelowRowOne Then $iRow = 2
				If StringRegExp($aTempArray[0], "(AmountX)", 0) Then
					_ArrayAdd($aSlotAmountX, $aTempCoords[0] & "|" & $aTempCoords[1] & "|" & $iRow, 0, "|", @CRLF, $ARRAYFILL_FORCE_NUMBER)
					$aiOCRLocation[$iRow - 1] = $aTempCoords[1] ; Store any OCR Location for later use on Heroes
				Else
					$aTempArray[0] = (StringInStr($aTempArray[0], "Super") <> 0) ? StringTrimLeft($aTempArray[0], 5) : ($aTempArray[0]) ; Team AIO Mod++ SuperTroops fix
					If StringRegExp($aTempArray[0], "(King)|(Queen)|(Warden)|(Champion)", 0) Then _ArrayAdd($aSlotAmountX, $aTempCoords[0] & "|" & $aTempCoords[1] & "|" & $iRow, 0, "|", @CRLF, $ARRAYFILL_FORCE_NUMBER)
					Local $aTempElement[1][8] = [[$aTempArray[0], $aTempCoords[0], $aTempCoords[1], -1, -1, -1, -1, $iRow]] ; trick to get the right variable types into our array. Delimiter Adding only gets us string which can't be sorted....
					_ArrayAdd($aAttackBar, $aTempElement)
				EndIf
				$iRow = 1
			Next
		Next

--------------------------

Paste In ImgXML\AttackBar

AttackBar.zip

 

Compile bot in (x86). @Fliegerfaust @Chilly-Chill 

  • Upvote 1

Share this post


Link to post
Share on other sites
Shouldn't the text be changed in this
 COCBot \ functions \ Attack \ GetAttackBar.au3 Folder ???? 
instead of what you are referring to

 

 

I tried it only unfortunately it doesn't work in nox 6.6.0.5

Edited by jaap

Share this post


Link to post
Share on other sites
hace 6 horas, jaap dijo:
Shouldn't the text be changed in this
 COCBot \ functions \ Attack \ GetAttackBar.au3 Folder ???? 
instead of what you are referring to

 

 

I tried it only unfortunately it doesn't work in nox 6.6.0.5

It was tested on a computer of mine and a friend with different graphics and it worked. It was tested on a PC of mine and a friend with different graphics and it worked. You can reduce the final number to 89 to have more tolerance. plus you have to compile the bot.

Edited by Boldina

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...