Skip to content

Commit

Permalink
2016-05-28 release
Browse files Browse the repository at this point in the history
Adjustments for CoC client update on 2016-05-23
  • Loading branch information
CodeSlinger69 committed May 28, 2016
1 parent 7451602 commit 462ed7b
Show file tree
Hide file tree
Showing 16 changed files with 32 additions and 26 deletions.
Binary file modified ClAsHbOt/ClAsHbOt.exe
Binary file not shown.
4 changes: 2 additions & 2 deletions ClAsHbOt/ImageFiles.data
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ RaidTroopSlot RaidSlots\SlotBarbarian.bmp RaidSlots\SlotArcher.bmp RaidSlots\Slo

RaidSpellSlot RaidSlots\SlotLightningSpell.bmp RaidSlots\SlotHealSpell.bmp RaidSlots\SlotRageSpell.bmp RaidSlots\SlotJumpSpell.bmp RaidSlots\SlotFreezeSpell.bmp RaidSlots\SlotPoisonSpell.bmp RaidSlots\SlotEarthquakeSpell.bmp RaidSlots\SlotHasteSpell.bmp

ArmyCampTroop Camp\CampBarbarian.bmp Camp\CampArcher.bmp Camp\CampGiant.bmp Camp\CampGoblin.bmp Camp\CampWallBreaker.bmp Camp\CampBalloon.bmp Camp\CampWizard.bmp Camp\CampHealer.bmp Camp\CampDragon.bmp Camp\CampPekka.bmp Camp\CampMinion.bmp Camp\CampHogRider.bmp Camp\CampValkyrie.bmp Camp\CampGolem.bmp Camp\CampWitch.bmp Camp\CampLavaHound.bmp Camp\CampBowler.bmp Camp\CampKing.bmp Camp\CampQueen.bmp Camp\CampWarden.bmp Camp\CampHeroDummy.bmp Camp\CampHeroDummy.bmp Camp\CampHeroDummy.bmp
ArmyCampTroop Camp\CampBarbarian.bmp Camp\CampArcher.bmp Camp\CampGiant.bmp Camp\CampGoblin.bmp Camp\CampWallBreaker.bmp Camp\CampBalloon.bmp Camp\CampWizard.bmp Camp\CampHealer.bmp Camp\CampDragon.bmp Camp\CampPekka.bmp Camp\CampBabyDragon.bmp Camp\CampMiner.bmp Camp\CampMinion.bmp Camp\CampHogRider.bmp Camp\CampValkyrie.bmp Camp\CampGolem.bmp Camp\CampWitch.bmp Camp\CampLavaHound.bmp Camp\CampBowler.bmp Camp\CampKing.bmp Camp\CampQueen.bmp Camp\CampWarden.bmp Camp\CampHeroDummy.bmp Camp\CampHeroDummy.bmp Camp\CampHeroDummy.bmp

BarracksTroopSlot Barracks\BarracksBarbarian.bmp Barracks\BarracksArcher.bmp Barracks\BarracksGiant.bmp Barracks\BarracksGoblin.bmp Barracks\BarracksWallBreaker.bmp Barracks\BarracksBalloon.bmp Barracks\BarracksWizard.bmp Barracks\BarracksHealer.bmp Barracks\BarracksDragon.bmp Barracks\BarracksPekka.bmp Barracks\BarracksMinion.bmp Barracks\BarracksHogRider.bmp Barracks\BarracksValkyrie.bmp Barracks\BarracksGolem.bmp Barracks\BarracksWitch.bmp Barracks\BarracksLavaHound.bmp Barracks\BarracksBowler.bmp
BarracksTroopSlot Barracks\BarracksBarbarian.bmp Barracks\BarracksArcher.bmp Barracks\BarracksGiant.bmp Barracks\BarracksGoblin.bmp Barracks\BarracksWallBreaker.bmp Barracks\BarracksBalloon.bmp Barracks\BarracksWizard.bmp Barracks\BarracksHealer.bmp Barracks\BarracksDragon.bmp Barracks\BarracksPekka.bmp Barracks\BarracksBabyDragon.bmp Barracks\BarracksMiner.bmp Barracks\BarracksMinion.bmp Barracks\BarracksHogRider.bmp Barracks\BarracksValkyrie.bmp Barracks\BarracksGolem.bmp Barracks\BarracksWitch.bmp Barracks\BarracksLavaHound.bmp Barracks\BarracksBowler.bmp

DonateTroopSlot Donate\DonateBarbarian.bmp Donate\DonateArcher.bmp Donate\DonateGiant.bmp Donate\DonateGoblin.bmp Donate\DonateWallBreaker.bmp Donate\DonateBalloon.bmp Donate\DonateWizard.bmp Donate\DonateHealer.bmp Donate\DonateDragon.bmp Donate\DonatePekka.bmp Donate\DonateMinion.bmp Donate\DonateHogRider.bmp Donate\DonateValkyrie.bmp Donate\DonateGolem.bmp Donate\DonateWitch.bmp Donate\DonateLavaHound.bmp Donate\DonateBowler.bmp

Expand Down
Binary file added ClAsHbOt/Images/Barracks/BarracksBabyDragon.bmp
Binary file not shown.
Binary file modified ClAsHbOt/Images/Barracks/BarracksBalloon.bmp
Binary file not shown.
Binary file modified ClAsHbOt/Images/Barracks/BarracksGoblin.bmp
Binary file not shown.
Binary file added ClAsHbOt/Images/Barracks/BarracksMiner.bmp
Binary file not shown.
Binary file added ClAsHbOt/Images/Camp/CampBabyDragon.bmp
Binary file not shown.
Binary file added ClAsHbOt/Images/Camp/CampMiner.bmp
Binary file not shown.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Welcome to my automatic farming bot for Clash of Clans. Updated for the March 2

THIS IS THE ONLY FULLY OPEN SOURCE Clash of Clans BOT ON THE INTERNET! (The only one that includes complete source code for its compiled DLL.) Also the easiest to use...just a few choices to be made and you are off and running.

Download: [ClAsHbOt.2016-03-28.7z](https://github.com/CodeSlinger69/ClAsHbOt/releases/download/20160328/ClAsHbOt.2016.03.28.7z)
Download: [ClAsHbOt.2016-05-28.7z](https://github.com/CodeSlinger69/ClAsHbOt/releases/download/20160528/ClAsHbOt.2016.05.28.7z)

Discussion thread: [Issue #22](https://github.com/CodeSlinger69/ClAsHbOt/issues/22)

Expand Down
1 change: 0 additions & 1 deletion Source/ClAsHbOt Script/ArmyManager.au3
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,6 @@ EndFunc

Func DequeueTroops(ByRef $hBMP)
Local $dequeueTries = 6

While IsButtonPresent($hBMP, $rTrainTroopsWindowDequeueButton) And $dequeueTries>0 And _
_GUICtrlButton_GetCheck($GUI_AutoRaidCheckBox)=$BST_CHECKED

Expand Down
1 change: 1 addition & 0 deletions Source/ClAsHbOt Script/AutoRaidStrategy0.au3
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ Func AutoRaidExecuteRaidStrategy0(ByRef $hBMP)
EndIf

; Deploy breakers
Sleep(3000)
If $troopIndex[$eTroopWallBreaker][4] > 0 And _GUICtrlButton_GetCheck($GUI_AutoRaidUseBreakers) = $BST_CHECKED Then
DebugWrite("Deploying Breakers")
DeployTroopsToSafeBoxes($eTroopWallBreaker, $troopIndex, $direction)
Expand Down
15 changes: 9 additions & 6 deletions Source/ClAsHbOt Script/ClAsHbOt.au3
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ Atutomatic farming bot for Clash of Clans, with a few other features.
3/21/2016 update todo
- Storage images; Gold: L10.76
5/23/2016 update todo
- Barracks: Baby Dragon & Miner images
- Army Overview: Baby Dragon & Miner images
Other To Do
- Capture "grayed" raid slot images for L1-L4 warden
Expand All @@ -18,14 +22,14 @@ Notes:
#ce

Global $gVersion = "20160415"
Global $gVersion = "20160528"

; For compiling
#pragma compile(Icon, "cube.ico")
#pragma compile(FileDescription, ClAsHbOt - fully open source farm bot)
#pragma compile(ProductName, ClAsHbOt)
#pragma compile(ProductVersion, 2016.04.15)
#pragma compile(FileVersion, 2016.04.15)
#pragma compile(ProductVersion, 2016.05.28)
#pragma compile(FileVersion, 2016.05.28)
#pragma compile(LegalCopyright, https://github.com/CodeSlinger69/ClAsHbOt)
#pragma compile(Out, ClAsHbOt.exe)

Expand Down Expand Up @@ -93,9 +97,8 @@ Func Main()
;TestRaidTroopsCount()
;TestArmyOverviewStatus()
;TestArmyOverviewTroopTimeRemaining()
;TestBarracksStatus()
;TestBarracksTroopSlots()
;TestBuiltTroops()
;TestBarracks()
;TestArmyOverview()
;TestEndBattleLoot()
;TestEndBattleBonus()
;TestDeployBoxCalcs()
Expand Down
16 changes: 8 additions & 8 deletions Source/ClAsHbOt Script/Globals.au3
Original file line number Diff line number Diff line change
Expand Up @@ -67,27 +67,27 @@ Global $gDefenseFarmClicked = False, $gBackgroundModeClicked = False
Global $gAutoNeedToCollectStartingLoot = False, $gAutoNeedToCollectEndingLoot = False

; Lists of troop and spell types
Global Enum $eTroopBarbarian, $eTroopArcher, $eTroopGiant, $eTroopGoblin, $eTroopWallBreaker, _
$eTroopBalloon, $eTroopWizard, $eTroopHealer, $eTroopDragon, $eTroopPekka, _
Global Enum $eTroopBarbarian, $eTroopArcher, $eTroopGiant, $eTroopGoblin, $eTroopWallBreaker, $eTroopBalloon, _
$eTroopWizard, $eTroopHealer, $eTroopDragon, $eTroopPekka, $eTroopBabyDragon, $eTroopMiner, _
$eTroopMinion, $eTroopHogRider, $eTroopValkyrie, $eTroopGolem, $eTroopWitch, _
$eTroopLavaHound, $eTroopBowler, _
$eTroopKing, $eTroopQueen, $eTroopWarden, _
$eTroopKingGrayed, $eTroopQueenGrayed, $eTroopWardenGrayed, $eTroopCount
Global $gTroopCountExcludingHeroes = $eTroopCount-6
Global $gTroopNames[$eTroopCount] = ["Barbarian", "Archer", "Giant", "Goblin", "Wall Breaker", _
"Balloon", "Wizard", "Healer", "Dragon", "Pekka", _
Global $gTroopNames[$eTroopCount] = ["Barbarian", "Archer", "Giant", "Goblin", "Wall Breaker", "Balloon", _
"Wizard", "Healer", "Dragon", "Pekka", "Baby Dragon", "Miner", _
"Minion", "Hog Rider", "Valkyrie", "Golem", "Witch", _
"Lava Hound", "Bowler", _
"Barbarian King", "Archer Queen", "Grand Warden", _
"Barbarian King Grayed", "Archer Queen Grayed", "Grand Warden Grayed"]
Global $gTroopSpace[$eTroopCount] = [ 1, 1, 5, 1, 2, _
5, 4, 14, 20, 25, _
Global $gTroopSpace[$eTroopCount] = [ 1, 1, 5, 1, 2, 5, _
4, 14, 20, 25, 10, 5, _
2, 5, 8, 30, 12, _
30, 8, _
0, 0, 0, _
0, 0, 0 ]
Global $gDonateMaxClicks[$gTroopCountExcludingHeroes] = [ 6, 6, 6, 6, 6, _
6, 6, 2, 1, 1, _
Global $gDonateMaxClicks[$gTroopCountExcludingHeroes] = [ 6, 6, 6, 6, 6, 6, _
6, 2, 1, 1, 2, 6, _
6, 6, 4, 1, 2, _
1, 4 ]
Global Enum $eSpellLightning, $eSpellHeal, $eSpellRage, $eSpellJump, $eSpellFreeze, $eSpellPoison, _
Expand Down
6 changes: 3 additions & 3 deletions Source/ClAsHbOt Script/RegionDefs.au3
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ Global $rElixTextBox[10] = [50, 99, 125, 111, 0xffe8fd, 9, 34, 105, 0xE049D0, 2
Global $rDarkTextBox[10] = [50, 127, 125, 139, 0xf3f3f3, 9, 34, 133, 0x504060, 25]
Global $rCupsTextBox[10] = [50, 169, 125, 181, 0xffffff, 9, 34, 175, 0xC69624, 25]

Global $rBarracksTroopBox[10] = [170, 321, 697, 529]
Global $rBarracksTroopBox[10] = [120, 321, 729, 520]
Global $rBarracksButtonOffset[4] = [0, 5, 87, 56]
Global $rBarracksWindowTextBox[10] = [126, 178, 290, 190, 0xffffff, 9, 0, 0, 0, 0]
Global $rBarracksWindowTextBox[10] = [122, 178, 286, 190, 0xffffff, 9, 0, 0, 0, 0]
Global $rArmyOverviewWindowTextBox[10] = [143, 175, 275, 190, 0x494949, 60, 0, 0, 0, 0]
Global $rArmyOverviewTroopTimeRemainingTextBox[10] = [675, 176, 725, 186, 0x766A52, 70, 732, 182, 0xFFFFFF, 0]
Global $rRaidSlotTroopCountTextBox[10] = [0, 0, 0, 0, 0xffffff, 9, 0, 0, 0, 0]
Expand Down Expand Up @@ -56,7 +56,7 @@ Global $rLiveReplayEndScreenReturnHomeButton[8] = [14, 624, 110, 680, 71, 654, 0
Global $rWindowVillageWasAttackedOkayButton[8] = [360, 494, 500, 549, 429, 539, 0x5FAC10, 6]
Global $rSafeAreaButton[8] = [819, 0, 859, 20, 0, 0, 0, 0]
Global $rCollectorButton[8] = [0, 0, 14, 28, 0, 0, 0, 0]
Global $rTrainTroopsWindowDequeueButton[8] = [559, 201, 577, 216, 568, 213, 0xD00000, 0]
Global $rTrainTroopsWindowDequeueButton[8] = [554, 201, 572, 216, 563, 207, 0xFFFFFF, 0]
Global $rArmyManagerButton[8] = [15, 561, 62, 609, 31, 577, 0xF8F0E0, 0]
Global $rArmyManagerWindowCloseButton[8] = [712, 128, 748, 161, 728, 143, 0xFDFEFD, 6]
Global $rArmyManagerWindowStandard1Button[8] = [224, 555, 280, 605, 231, 563, 0x888070, 0]
Expand Down
13 changes: 8 additions & 5 deletions Source/ClAsHbOt Script/Test.au3
Original file line number Diff line number Diff line change
Expand Up @@ -159,14 +159,12 @@ Func TestRaidTroopsCount()
Next
EndFunc

Func TestBarracksStatus()
Local $hHBITMAP = CaptureFrameHBITMAP("TestBarracksStatus")
Func TestBarracks()
Local $hHBITMAP = CaptureFrameHBITMAP("TestBarracks")
Local $queueStatus = ScrapeFuzzyText($hHBITMAP, $fontBarracksStatus, $rBarracksWindowTextBox)
DebugWrite("Barracks queue status: " & $queueStatus)
_WinAPI_DeleteObject($hHBITMAP)
EndFunc

Func TestBarracksTroopSlots()
Local $troopSlots[$gTroopCountExcludingHeroes][4]
For $i = $eTroopBarbarian To $eTroopLavaHound
$troopSlots[$i][0] = -1
Expand All @@ -181,7 +179,12 @@ Func TestBarracksTroopSlots()
Next
EndFunc

Func TestBuiltTroops()
Func TestArmyOverview()
Local $hHBITMAP = CaptureFrameHBITMAP("TestArmyOverview")
Local $queueStatus = ScrapeFuzzyText($hHBITMAP, $fontArmyOverviewStatus, $rArmyOverviewWindowTextBox)
DebugWrite("Army Overview queue status: " & $queueStatus)
_WinAPI_DeleteObject($hHBITMAP)

Local $builtTroopCounts[$eTroopCount][5]
For $i = 0 To UBound($builtTroopCounts)-1
$builtTroopCounts[$i][0] = -1
Expand Down
Binary file modified WikiImages/ClAsHbOt screenshot.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 462ed7b

Please sign in to comment.