Skip to content

Commit

Permalink
Updates
Browse files Browse the repository at this point in the history
Fixed another DLL error, fix townhall level reporting in search results,
fix archer color detection
  • Loading branch information
codebroken committed May 14, 2015
1 parent 9281373 commit 1fb2778
Show file tree
Hide file tree
Showing 11 changed files with 25 additions and 12 deletions.
9 changes: 4 additions & 5 deletions BrokenBot.au3
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
#pragma compile(Icon, "BrokenBot.org\images\icons\brokenbot.ico")
#pragma compile(FileDescription, BrokenBot.org - Clash of Clans Bot)
#pragma compile(ProductName, BrokenBot.org - Clash of Clans Bot)
#pragma compile(ProductVersion, 2.5.2)
#pragma compile(FileVersion, 2.5.2)
#pragma compile(ProductVersion, 2.5.3)
#pragma compile(FileVersion, 2.5.3)

#include <GUIConstants.au3>

$sBotVersion = "2.5.2"
$sBotVersion = "2.5.3"
$sBotTitle = "BrokenBot.org - Break FREE - v" & $sBotVersion

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

_CaptureRegion()
Local $hHBitmap = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hBitmap)
$hHBitmap = _ScreenCapture_Capture("", 0, 0, 860, 720)
$ret = DllCall(@ScriptDir & "\BrokenBot.org\BrokenBot32.dll", "str", "BrokenBotRedLineCheck", "ptr", $hHBitmap, "int", 1, "int", 1, "int", 0, "int", 0, "int", 0)
_WinAPI_DeleteObject($hHBitmap)
If Not IsArray($ret) Then
Expand Down
Binary file modified BrokenBot.exe
Binary file not shown.
2 changes: 1 addition & 1 deletion BrokenBot.org/languages/English.ini
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ msgWanted = "Wanted:"
msgGot = "Got:"
msgVariance = "Variance:"
msgNoNextButton = "Cannot locate Next button, Restarting Bot"
msgMidAttack = "MidAttack ResChk:"
msgMidAttack = "Mid-attack resource check:"
msgSearchingMatch = "Searching for match..."
msgOOSAlreadySlow = "Out of sync! Already searching slowly, not changing anything."
msgOOSSlowingSearch = "Out of sync! Slowing search speed by 0.5 secs."
Expand Down
2 changes: 2 additions & 0 deletions COCBot/Global Variables.au3
Original file line number Diff line number Diff line change
Expand Up @@ -334,3 +334,5 @@ Global $SpellLightningY = 461
Global $SpellRageX = 650
Global $SpellRageY = 372
Global $LabPos[2]

Global $FontSize
2 changes: 1 addition & 1 deletion COCBot/functions/Config/ScreenCoordinates.au3
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Global $CampFull[4] = [328, 535, 0xD03840, 20] ;
Global $DropTrophiesStartPoint = [34, 310]
Global $TrainBtn[4] = [541, 602, 0x728BB0, 20] ;
Global $TrainBarbarian[4] = [261, 366, 0x39D8E0, 20] ;
Global $TrainArcher[4] = [369, 366, 0x39D8E0, 20] ;
Global $TrainArcher[4] = [369, 366, 0x2DA7B3, 20] ;
Global $TrainGiant[4] = [475, 366, 0x3DD8E0, 20] ;
Global $TrainGoblin[4] = [581, 366, 0x39D8E0, 20] ;
Global $TrainWallbreaker[4] = [688, 366, 0x3AD8E0, 20] ;
Expand Down
6 changes: 6 additions & 0 deletions COCBot/functions/Config/readConfig.au3
Original file line number Diff line number Diff line change
Expand Up @@ -146,4 +146,10 @@ Func readConfig() ;Reads config and sets it to the variables
Next
$LabPos[0] = IniRead($config, "position", "LabPosX", "")
$LabPos[1] = IniRead($config, "position", "LabPosY", "")

;---------------------------------------------------------------------------------------
; Hidden settings ----------------------------------------------------------------------
;---------------------------------------------------------------------------------------
; These settings can be read in from config but aren't found in the GUI
$FontSize = IniRead($config, "hidden", "fontsize", "8.5")
EndFunc ;==>readConfig
1 change: 1 addition & 0 deletions COCBot/functions/Other/SetLog.au3
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ EndFunc ;==>SetLog
Func _GUICtrlRichEdit_AppendTextColor($hWnd, $sText, $iColor)
Local $iLength = _GUICtrlRichEdit_GetTextLength($hWnd, True, True)
Local $iCp = _GUICtrlRichEdit_GetCharPosOfNextWord($hWnd, $iLength)
_GUICtrlRichEdit_SetFont($hWnd, $FontSize)
_GUICtrlRichEdit_AppendText($hWnd, $sText)
_GUICtrlRichEdit_SetSel($hWnd, $iCp - 1, $iLength + StringLen($sText))
_GUICtrlRichEdit_SetCharColor($hWnd, $iColor)
Expand Down
4 changes: 2 additions & 2 deletions COCBot/functions/Pixels/_ColorCheck.au3
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ Func CheckPixel($tab)
Return True
Else
SetLog(GetLangText("msgLocationX") & $tab[0] & " Y:" & $tab[1], $COLOR_RED)
SetLog(GetLangText("msgWanted") & _GetPixelColor($tab[0], $tab[1]), $COLOR_RED)
SetLog(GetLangText("msgGot") & Hex($tab[2], 6), $COLOR_RED)
SetLog(GetLangText("msgGot") & _GetPixelColor($tab[0], $tab[1]), $COLOR_RED)
SetLog(GetLangText("msgWanted") & Hex($tab[2], 6), $COLOR_RED)
SetLog(GetLangText("msgVariance") & $tab[3], $COLOR_RED)
Return False
EndIf
Expand Down
4 changes: 2 additions & 2 deletions COCBot/functions/Strategies/Standard/Search.au3
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ Func Standard_Search()
If $conditionlogstr <> "Dead Base (" Then
$conditionlogstr = $conditionlogstr & ";"
EndIf
$conditionlogstr = $conditionlogstr & " Max Townhall: " & $MaxDeadTH
$conditionlogstr = $conditionlogstr & " Max Townhall: " & $THText[$MaxDeadTH]
EndIf
If IsChecked($chkDeadMeetTHO) Then
If $conditionlogstr <> "Dead Base (" Then
Expand Down Expand Up @@ -129,7 +129,7 @@ Func Standard_Search()
If $conditionlogstr <> "Live Base (" Then
$conditionlogstr = $conditionlogstr & ";"
EndIf
$conditionlogstr = $conditionlogstr & " Max Townhall: " & $MaxTH
$conditionlogstr = $conditionlogstr & " Max Townhall: " & $THText[$MaxTH]
EndIf
If IsChecked($chkMeetTHO) Then
If $conditionlogstr <> "Live Base (" Then
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# BrokenBot.org - Clash of Clans Bot
Latest version: 2.5.2
Latest version: 2.5.3

## Community
Forums available for discussion at: http://brokenbot.org/
Expand Down
5 changes: 5 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
## Change Log:

### v2.5.3
* Fixed display of townhall levels in search results.
* Fixed color recognition for archers.
* Added hidden setting for adjusting font size of log. Add it to the [hidden] section of your ini file. For example: "fontsize=6"

### v2.5.2
* Improved auto-update. Now bot actually can download and apply the update for you.
* Improved DLL error detection. Informs the user if they are missing the proper version and directs them about how to resolve. Falls back to dropping troops at the edge if DLL isn't working.
Expand Down

0 comments on commit 1fb2778

Please sign in to comment.