Skip to content

Commit 878d5b6

Browse files
author
codebroken
committed
v2.8.0
speedBoost, PushBullet fixes, image recognition
1 parent 0548d4a commit 878d5b6

36 files changed

Lines changed: 66 additions & 28 deletions

BrokenBot.au3

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
#pragma compile(Icon, "BrokenBot.org\images\icons\brokenbot.ico")
44
#pragma compile(FileDescription, BrokenBot.org - Clash of Clans Bot)
55
#pragma compile(ProductName, BrokenBot.org - Clash of Clans Bot)
6-
#pragma compile(ProductVersion, 2.7.1)
7-
#pragma compile(FileVersion, 2.7.1)
6+
#pragma compile(ProductVersion, 2.8.0)
7+
#pragma compile(FileVersion, 2.8.0)
88

99
#include <GUIConstants.au3>
1010

11-
$sBotVersion = "2.7.1"
11+
$sBotVersion = "2.8.0"
1212
$sBotTitle = "BrokenBot.org - Break FREE - v" & $sBotVersion
1313

1414
If FileExists (@ScriptDir & "\.developer") Then

BrokenBot.exe

0 Bytes
Binary file not shown.

BrokenBot.org/BrokenBot32.dll

203 KB
Binary file not shown.

BrokenBot.org/functions/ImageSearch/checkDarkElix.au3

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
Func checkDarkElix()
77
_CaptureRegion()
88
$sendHBitmap = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hBitmap)
9-
$res = DllCall(@ScriptDir & "\BrokenBot.org\BrokenBot32.dll", "str", "BrokenBotMatchBuilding", "ptr", $sendHBitmap, "int", 13, "int", 3, "int", 1, "int", 1)
9+
$res = DllCall(@ScriptDir & "\BrokenBot.org\BrokenBot32.dll", "str", "BrokenBotMatchBuilding", "ptr", $sendHBitmap, "int", 13, "int", 3, "int", 1, "int", 1, "int", (IsChecked($chkSpeedBoost) ? (1) : (0)))
1010
_WinAPI_DeleteObject($sendHBitmap)
1111
If IsArray($res) Then
1212
If $res[0] = -1 Then

BrokenBot.org/functions/ImageSearch/checkTownhall.au3

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
Func checkTownhall()
77
_CaptureRegion()
88
$sendHBitmap = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hBitmap)
9-
$res = DllCall(@ScriptDir & "\BrokenBot.org\BrokenBot32.dll", "str", "BrokenBotMatchBuilding", "ptr", $sendHBitmap, "int", 1, "int", 3, "int", 1, "int", 1)
9+
$res = DllCall(@ScriptDir & "\BrokenBot.org\BrokenBot32.dll", "str", "BrokenBotMatchBuilding", "ptr", $sendHBitmap, "int", 1, "int", 3, "int", 1, "int", 1, "int", (IsChecked($chkSpeedBoost) ? (1) : (0)))
1010
_WinAPI_DeleteObject($sendHBitmap)
1111
If IsArray($res) Then
1212
If $res[0] = -1 Then
@@ -37,8 +37,8 @@ Func checkTownhall()
3737
EndIf
3838
Else
3939
SetLog(GetLangText("msgDLLFailure"), $COLOR_RED)
40-
$DEx = 0
41-
$DEy = 0
40+
$THx = 0
41+
$THy = 0
4242
Return "-" ; return 0
4343
EndIf
4444
EndFunc ;==>checkTownhall

BrokenBot.org/functions/Strategies/SharedFunction.au3

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,15 @@ Func ChkDisconnection($disconnected = False)
2626
If _ImageSearch(@ScriptDir & "\images\Lost.bmp", 1, $dummyX, $dummyY, 50) = 1 Then
2727
If $dummyX > 320 and $dummyX < 350 and $dummyY > 330 and $dummyY < 350 Then
2828
$disconnected = True
29-
$speedBump += 500
30-
If $speedBump > 5000 Then
31-
$speedBump=5000
32-
SetLog("Lost Connection! Already searching slowly, not changing anything.", $COLOR_RED)
33-
Else
34-
SetLog("Lost Connection! Slowing search speed by 0.5 secs.", $COLOR_RED)
35-
EndIf
29+
;Looks like lost connection is not related to search speed, test run without bump
30+
SetLog("Lost Connection!", $COLOR_RED)
31+
;~ $speedBump += 500
32+
;~ If $speedBump > 5000 Then
33+
;~ $speedBump=5000
34+
;~ SetLog("Lost Connection! Already searching slowly, not changing anything.", $COLOR_RED)
35+
;~ Else
36+
;~ SetLog("Lost Connection! Slowing search speed by 0.5 secs.", $COLOR_RED)
37+
;~ EndIf
3638
EndIf
3739
EndIf
3840

BrokenBot.org/functions/Village/collectResources.au3

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Func collectResources()
1111
Do
1212
_CaptureRegion()
1313
$sendHBitmap = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hBitmap)
14-
$res = DllCall(@ScriptDir & "\BrokenBot.org\BrokenBot32.dll", "str", "BrokenBotMatchBuilding", "ptr", $sendHBitmap, "int", 27, "int", 3, "int", 17, "int", 1)
14+
$res = DllCall(@ScriptDir & "\BrokenBot.org\BrokenBot32.dll", "str", "BrokenBotMatchBuilding", "ptr", $sendHBitmap, "int", 27, "int", 3, "int", 17, "int", 1, "int", (IsChecked($chkSpeedBoost) ? (1) : (0)))
1515
_WinAPI_DeleteObject($sendHBitmap)
1616
If IsArray($res) Then
1717
If $res[0] = -1 and NOT $foundResource Then

BrokenBot.org/languages/English.ini

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -339,6 +339,8 @@ btnCloseBR = "Close"
339339
heroSkill = "0 = Activate at low HP"
340340
heroSkill2 = ">0 = Activate after number of seconds"
341341
lblDisconnected = "Disconnected :"
342+
chkSpeedBoost = "speedBoost"
343+
chkSpeedBoostTip = "Uses more CPU, but will find buildings faster"
342344
msgMissing = "Missing required file!"
343345
msgMissing1 = "Your system appears to be missing a required file (MSVCP120.DLL) for redline detection to work."
344346
msgMissing2 = "You may continue but the bot will not work as intended."

COCBot/GUI Design.au3

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -449,6 +449,9 @@ $cmbLanguage = GUICtrlCreateCombo("", 30, 130, 347, 20, BitOR($CBS_DROPDOWNLIST,
449449
PopulateLanguages()
450450
_GUICtrlComboBox_SetCurSel($cmbLanguage, _GUICtrlComboBox_FindStringExact($cmbLanguage, $StartupLanguage))
451451

452+
$chkSpeedBoost = GUICtrlCreateCheckbox(GetLangText("chkSpeedBoost"), 40, 170, 100, 15)
453+
GUICtrlSetTip(-1, GetLangText("chkSpeedBoostTip"))
454+
452455
$grpUpdate = GUICtrlCreateGroup(GetLangText("grpUpdate"), 20, 225, 375, 60)
453456
$chkUpdate = GUICtrlCreateCheckbox(GetLangText("chkUpdate"), 40, 250, 225, 15)
454457
GUICtrlSetBkColor($chkUpdate, $COLOR_WHITE)

COCBot/Global Variables.au3

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,12 @@ Global $prevTab = 0
9999
Global $slideOut = 0
100100
Global $slideIn = 0
101101

102-
;Troop types
103-
Global Enum $eBarbarian, $eArcher, $eGiant, $eGoblin, $eWallbreaker, $eMinion, $eHog, $eValkyrie, $eKing, $eQueen, $eCastle, $eLSpell
102+
;Troop types, from 0 ~ 19 so far
103+
Global Enum $eBarbarian, $eArcher, $eGiant, $eGoblin, $eWallbreaker, _
104+
$eBalloon, $eWizard, $eHealer, $eDragon, $ePekka, _
105+
$eMinion, $eHog, $eValkyrie, $eGolem, $eWitch, _
106+
$eLavaHound, _
107+
$eKing, $eQueen, $eCastle, $eLSpell
104108

105109
;Attack Settings
106110
; Shift outer corners 1 pixel for more random drop space

0 commit comments

Comments
 (0)