Skip to content

Commit 1fb2778

Browse files
author
codebroken
committed
Updates
Fixed another DLL error, fix townhall level reporting in search results, fix archer color detection
1 parent 9281373 commit 1fb2778

11 files changed

Lines changed: 25 additions & 12 deletions

File tree

BrokenBot.au3

Lines changed: 4 additions & 5 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.5.2)
7-
#pragma compile(FileVersion, 2.5.2)
6+
#pragma compile(ProductVersion, 2.5.3)
7+
#pragma compile(FileVersion, 2.5.3)
88

99
#include <GUIConstants.au3>
1010

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

1414
Global $StartupLanguage = IniRead(@ScriptDir & "\config\default.ini", "config", "language", "English")
@@ -70,8 +70,7 @@ If IsArray($CmdLine) Then
7070
EndIf
7171
EndIf
7272

73-
_CaptureRegion()
74-
Local $hHBitmap = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hBitmap)
73+
$hHBitmap = _ScreenCapture_Capture("", 0, 0, 860, 720)
7574
$ret = DllCall(@ScriptDir & "\BrokenBot.org\BrokenBot32.dll", "str", "BrokenBotRedLineCheck", "ptr", $hHBitmap, "int", 1, "int", 1, "int", 0, "int", 0, "int", 0)
7675
_WinAPI_DeleteObject($hHBitmap)
7776
If Not IsArray($ret) Then

BrokenBot.exe

0 Bytes
Binary file not shown.

BrokenBot.org/languages/English.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,7 @@ msgWanted = "Wanted:"
400400
msgGot = "Got:"
401401
msgVariance = "Variance:"
402402
msgNoNextButton = "Cannot locate Next button, Restarting Bot"
403-
msgMidAttack = "MidAttack ResChk:"
403+
msgMidAttack = "Mid-attack resource check:"
404404
msgSearchingMatch = "Searching for match..."
405405
msgOOSAlreadySlow = "Out of sync! Already searching slowly, not changing anything."
406406
msgOOSSlowingSearch = "Out of sync! Slowing search speed by 0.5 secs."

COCBot/Global Variables.au3

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -334,3 +334,5 @@ Global $SpellLightningY = 461
334334
Global $SpellRageX = 650
335335
Global $SpellRageY = 372
336336
Global $LabPos[2]
337+
338+
Global $FontSize

COCBot/functions/Config/ScreenCoordinates.au3

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Global $CampFull[4] = [328, 535, 0xD03840, 20] ;
3232
Global $DropTrophiesStartPoint = [34, 310]
3333
Global $TrainBtn[4] = [541, 602, 0x728BB0, 20] ;
3434
Global $TrainBarbarian[4] = [261, 366, 0x39D8E0, 20] ;
35-
Global $TrainArcher[4] = [369, 366, 0x39D8E0, 20] ;
35+
Global $TrainArcher[4] = [369, 366, 0x2DA7B3, 20] ;
3636
Global $TrainGiant[4] = [475, 366, 0x3DD8E0, 20] ;
3737
Global $TrainGoblin[4] = [581, 366, 0x39D8E0, 20] ;
3838
Global $TrainWallbreaker[4] = [688, 366, 0x3AD8E0, 20] ;

COCBot/functions/Config/readConfig.au3

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,4 +146,10 @@ Func readConfig() ;Reads config and sets it to the variables
146146
Next
147147
$LabPos[0] = IniRead($config, "position", "LabPosX", "")
148148
$LabPos[1] = IniRead($config, "position", "LabPosY", "")
149+
150+
;---------------------------------------------------------------------------------------
151+
; Hidden settings ----------------------------------------------------------------------
152+
;---------------------------------------------------------------------------------------
153+
; These settings can be read in from config but aren't found in the GUI
154+
$FontSize = IniRead($config, "hidden", "fontsize", "8.5")
149155
EndFunc ;==>readConfig

COCBot/functions/Other/SetLog.au3

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ EndFunc ;==>SetLog
88
Func _GUICtrlRichEdit_AppendTextColor($hWnd, $sText, $iColor)
99
Local $iLength = _GUICtrlRichEdit_GetTextLength($hWnd, True, True)
1010
Local $iCp = _GUICtrlRichEdit_GetCharPosOfNextWord($hWnd, $iLength)
11+
_GUICtrlRichEdit_SetFont($hWnd, $FontSize)
1112
_GUICtrlRichEdit_AppendText($hWnd, $sText)
1213
_GUICtrlRichEdit_SetSel($hWnd, $iCp - 1, $iLength + StringLen($sText))
1314
_GUICtrlRichEdit_SetCharColor($hWnd, $iColor)

COCBot/functions/Pixels/_ColorCheck.au3

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ Func CheckPixel($tab)
2828
Return True
2929
Else
3030
SetLog(GetLangText("msgLocationX") & $tab[0] & " Y:" & $tab[1], $COLOR_RED)
31-
SetLog(GetLangText("msgWanted") & _GetPixelColor($tab[0], $tab[1]), $COLOR_RED)
32-
SetLog(GetLangText("msgGot") & Hex($tab[2], 6), $COLOR_RED)
31+
SetLog(GetLangText("msgGot") & _GetPixelColor($tab[0], $tab[1]), $COLOR_RED)
32+
SetLog(GetLangText("msgWanted") & Hex($tab[2], 6), $COLOR_RED)
3333
SetLog(GetLangText("msgVariance") & $tab[3], $COLOR_RED)
3434
Return False
3535
EndIf

COCBot/functions/Strategies/Standard/Search.au3

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ Func Standard_Search()
9393
If $conditionlogstr <> "Dead Base (" Then
9494
$conditionlogstr = $conditionlogstr & ";"
9595
EndIf
96-
$conditionlogstr = $conditionlogstr & " Max Townhall: " & $MaxDeadTH
96+
$conditionlogstr = $conditionlogstr & " Max Townhall: " & $THText[$MaxDeadTH]
9797
EndIf
9898
If IsChecked($chkDeadMeetTHO) Then
9999
If $conditionlogstr <> "Dead Base (" Then
@@ -129,7 +129,7 @@ Func Standard_Search()
129129
If $conditionlogstr <> "Live Base (" Then
130130
$conditionlogstr = $conditionlogstr & ";"
131131
EndIf
132-
$conditionlogstr = $conditionlogstr & " Max Townhall: " & $MaxTH
132+
$conditionlogstr = $conditionlogstr & " Max Townhall: " & $THText[$MaxTH]
133133
EndIf
134134
If IsChecked($chkMeetTHO) Then
135135
If $conditionlogstr <> "Live Base (" Then

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# BrokenBot.org - Clash of Clans Bot
2-
Latest version: 2.5.2
2+
Latest version: 2.5.3
33

44
## Community
55
Forums available for discussion at: http://brokenbot.org/

0 commit comments

Comments
 (0)