Jump to content
Sign in to follow this  
Boldina

[MOD|7.7.1] REMAIN 2.0 Smart Farm Drop Logic

Recommended Posts

[MOD|7.7.1] REMAIN 2.0 Smart Farm Drop Logic

Find  "COCBot\functions\Attack\AttackCSV\ParseAttackCSV.au3" AND REMPLACE ...:

							; REMAIN CMD from @chalicucu
							If $value4 = "REMAIN" Then
								ReleaseClicks()
								SetLog("Drop|Remain:  Dropping left over troops", $COLOR_BLUE)
								; Let's get the troops again and quantities
								If PrepareAttack($g_iMatchMode, True) > 0 Then
									; a Loop from all troops
									For $ii = $eBarb To $eIceG ; launch all remaining troops
										; Loop on all detected troops
										For $x = 0 To UBound($g_avAttackTroops) - 1
											; If the Name exist and haves more than zero is deploy it
											If $g_avAttackTroops[$x][0] = $ii And $g_avAttackTroops[$x][1] > 0 Then
												Local $name = GetTroopName($g_avAttackTroops[$x][0], $g_avAttackTroops[$x][1])
												Setlog("Name: " & $name, $COLOR_DEBUG)
												Setlog("Qty: " & $g_avAttackTroops[$x][1], $COLOR_DEBUG)
												DropTroopFromINI($value1, $index1, $index2, $indexArray, $g_avAttackTroops[$x][1], $g_avAttackTroops[$x][1], $g_asTroopShortNames[$ii], $delaypoints1, $delaypoints2, $delaydrop1, $delaydrop2, $sleepdrop1, $sleepdrop2, $debug)
												CheckHeroesHealth()
												If _Sleep($DELAYALGORITHM_ALLTROOPS5) Then Return
											EndIf
										Next
									Next
								EndIf
							Else
								DropTroopFromINI($value1, $index1, $index2, $indexArray, $qty1, $qty2, $value4, $delaypoints1, $delaypoints2, $delaydrop1, $delaydrop2, $sleepdrop1, $sleepdrop2, $debug)
							EndIf

By it:

; REMAIN CMD from @chalicucu
                            If $value4 = "REMAIN" Then
                                SetLog("Drop|Remain:  Dropping left over troops", $COLOR_BLUE)
                                ; Let's get the troops again and quantities
                                PrepareAttack($DB)
                                Local $Nside = ChkSmartFarm()
                                AttackSmartFarm($Nside[1], $Nside[2])
                            Else
                                DropTroopFromINI($value1, $index1, $index2, $indexArray, $qty1, $qty2, $value4, $delaypoints1, $delaypoints2, $delaydrop1, $delaydrop2, $sleepdrop1, $sleepdrop2, $sleepbeforedrop1, $sleepbeforedrop2, $debug)
                            EndIf

This adds a bit more realism to the attack (I understand that REMAIN was not added to the official version because the attack was unrealistic); It is not my intention to offend Mr. @chalicucu owner of the original code, simply take it as an addition.

Edited by Boldina
  • Like 1
  • Upvote 1

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