├── CrayonCode_Fishing.au3 ├── FastFind.au3 ├── FastFind.dll ├── FastFind64.dll ├── GUI.au3 ├── ImageSearch.au3 ├── ImageSearchDLLx32.dll ├── ImageSearchDLLx64.dll ├── LICENSE ├── README.md ├── Support.au3 ├── msvcr110.dll ├── msvcr110d.dll └── res ├── esc_worker.png ├── fishing ├── bite_de.png ├── bite_en.png ├── bite_fr.png ├── currently_de.png ├── currently_en.png ├── currently_fr.png ├── drying_clock.png ├── drying_clock_red.png ├── drying_rain.png ├── drying_sunny.png ├── enteramount.png ├── equip_de.png ├── equip_en.png ├── equip_fr.png ├── event │ ├── easter_life.png │ ├── easter_rainbow.png │ ├── easter_raindrop.png │ ├── easter_starpattern.png │ ├── golden_coelacanth.png │ └── striker_seal.png ├── loot_ancientrelic.png ├── loot_coelacanth.png ├── loot_empty.png ├── loot_quantity.png ├── loot_silverkey.png ├── lootbag_de.png ├── lootbag_de1.png ├── lootbag_en.png ├── lootbag_fr.png ├── reelin.png ├── riddle.png ├── rod_balenos.png ├── rod_calpheon.png ├── rod_default.png ├── rod_default_discard.png ├── rod_empty.png ├── rod_epheria.png ├── rod_mediah.png ├── standby_de.png ├── standby_en.png └── standby_fr.png ├── processing_check.png ├── processing_hammer.png ├── reference_empty.png ├── reference_inventory.png └── worker_staminabar.png /CrayonCode_Fishing.au3: -------------------------------------------------------------------------------- 1 | #cs ---------------------------------------------------------------------------- 2 | 3 | AutoIt Version: 3.3.14.2 4 | Author: CrayonCode 5 | Version: Alpha 0.50 6 | Contact: http://www.elitepvpers.com/forum/black-desert/4268940-autoit-crayoncode-bot-project-opensource-free.html 7 | GitHub: https://github.com/CrayonCodeGit/CrayonCode-BDO-Project/ 8 | 9 | #ce ---------------------------------------------------------------------------- 10 | 11 | 12 | #Region ;**** Directives created by AutoIt3Wrapper_GUI **** 13 | #AutoIt3Wrapper_Compile_Both=y ;required for ImageSearch.au3 14 | #AutoIt3Wrapper_UseX64=y ;required for ImageSearch.au3 15 | #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** 16 | 17 | #RequireAdmin 18 | #include "ImageSearch.au3" 19 | #include "FastFind.au3" 20 | #include "Support.au3" 21 | #include "GUI.au3" 22 | #include 23 | #include 24 | #include 25 | #include 26 | 27 | OnAutoItExitRegister(_ImageSearchShutdown) 28 | Opt("MouseClickDownDelay", 100) 29 | Opt("MouseClickDelay", 50) 30 | Opt("SendKeyDelay", 50) 31 | 32 | 33 | Global $Fish = False 34 | Global $Res[4] = [0, 0, @DesktopWidth, @DesktopHeight] 35 | 36 | Global $WorkerEnable = True, $WorkerCD = 10 37 | Global $BuffEnable = True, $BuffCD = 30 38 | Global $BuffKeybinds[2] = [8, 7] 39 | Global $DryFishEnable = True, $DryFishCD = 5, $DryFishMaxRarity = 2 40 | 41 | Global $hTitle = "BLACK DESERT - " 42 | Global $LNG = "en" 43 | Global $ScreenCapLoot = False 44 | Global $LogEnable = True 45 | 46 | Global $aListView1[10] 47 | For $i = 1 to 9 48 | $aListView1[$i] = GUICtrlCreateListViewItem("", $ListView1) 49 | Next 50 | 51 | HotKeySet("^{F1}", "_terminate") 52 | 53 | HotKeySet("{F3}", "PauseToggle") 54 | HotKeySet("{F4}", "Main_Fishing") 55 | HotKeySet("{F5}", "FishingAssist") 56 | 57 | 58 | ; # GUI 59 | Func SetGUIStatus($data) 60 | Local Static $LastGUIStatus 61 | Local Static $Limits = _GUICtrlEdit_SetLimitText ( $ELog, 300000000 ) ; Increase Text Limit since Log usually stopped around 800 lines 62 | If $data <> $LastGUIStatus Then 63 | _GUICtrlEdit_AppendText($ELog, @HOUR & ":" & @MIN & "." & @SEC & " " & $data & @CRLF) 64 | ConsoleWrite(@CRLF & @HOUR & ":" & @MIN & "." & @SEC & " " & $data) 65 | If $LogEnable = True Then LogData(@HOUR & ":" & @MIN & "." & @SEC & " " & $data, "logs/LOGFILE.txt") 66 | $LastGUIStatus = $data 67 | EndIf 68 | EndFunc ;==>SetGUIStatus 69 | 70 | Func GUILoopSwitch() 71 | Switch GUIGetMsg() 72 | Case $GUI_EVENT_CLOSE 73 | Exit 74 | Case $BDryFish 75 | DryFish(True, 3, 0) 76 | Case $BFeedWorker 77 | WorkerFeed(True, 0) 78 | Case $BBuffKeys 79 | Buff(True, 0, $BuffKeybinds) 80 | Case $BPause 81 | PauseToggle() 82 | Case $BQuit 83 | _terminate() 84 | Case $BFish 85 | Main_Fishing() 86 | Case $BMinigame 87 | FishingAssist() 88 | Case $BSave 89 | StoreGUI() 90 | Case $BLoopSide 91 | LoopSideFunctions() 92 | EndSwitch 93 | EndFunc ;==>GUILoopSwitch 94 | 95 | Func InitGUI() 96 | ; LootSettings 97 | Global $LootSettings = IniReadSection("config/settings.ini", "LootSettings") 98 | Switch $LootSettings[1][1] 99 | Case 0 100 | GUICtrlSetData($CRarity, "|Gold|Blue|Green|White|Specials Only", "White") 101 | Case 1 102 | GUICtrlSetData($CRarity, "|Gold|Blue|Green|White|Specials Only", "Green") 103 | Case 2 104 | GUICtrlSetData($CRarity, "|Gold|Blue|Green|White|Specials Only", "Blue") 105 | Case 3 106 | GUICtrlSetData($CRarity, "|Gold|Blue|Green|White|Specials Only", "Gold") 107 | Case 4 108 | GUICtrlSetData($CRarity, "|Gold|Blue|Green|White|Specials Only", "Specials Only") 109 | EndSwitch 110 | GUICtrlSetState($CBSpecial1, CBT($LootSettings[2][1])) 111 | GUICtrlSetState($CBSpecial2, CBT($LootSettings[3][1])) 112 | GUICtrlSetState($CBSpecial3, CBT($LootSettings[4][1])) 113 | GUICtrlSetState($CBEvent, CBT($LootSettings[5][1])) 114 | GUICtrlSetState($CBTrash, CBT($LootSettings[6][1])) 115 | 116 | ; InventorySettings 117 | Global $InventorySettings = IniReadSection("config/settings.ini", "InventorySettings") 118 | GUICtrlSetState($CBDiscardRods, CBT($InventorySettings[1][1])) 119 | GUICtrlSetData($IBufferSize, $InventorySettings[2][1]) 120 | 121 | ; Drying Settings 122 | Global $DryingSettings = IniReadSection("config/settings.ini", "DryingSettings") 123 | GUICtrlSetState($CBDryFish, CBT($DryingSettings[1][1])) 124 | Switch $DryingSettings[2][1] 125 | Case 0 126 | GUICtrlSetData($CDryFish, "|Gold|Blue|Green|White", "White") 127 | Case 1 128 | GUICtrlSetData($CDryFish, "|Gold|Blue|Green|White", "Green") 129 | Case 2 130 | GUICtrlSetData($CDryFish, "|Gold|Blue|Green|White", "Blue") 131 | Case 3 132 | GUICtrlSetData($CDryFish, "|Gold|Blue|Green|White", "Gold") 133 | EndSwitch 134 | GUICtrlSetData($IDryFishInterval, $DryingSettings[3][1]) 135 | 136 | ; WorkerSettings 137 | Global $WorkerSettings = IniReadSection("config/settings.ini", "WorkerSettings") 138 | GUICtrlSetState($CBFeedWorker, CBT($WorkerSettings[1][1])) 139 | GUICtrlSetData($IFeedWorkerInterval, $WorkerSettings[2][1]) 140 | 141 | ; BuffSettings 142 | Global $BuffSettings = IniReadSection("config/settings.ini", "BuffSettings") 143 | GUICtrlSetState($CBBuff, CBT($BuffSettings[1][1])) 144 | GUICtrlSetData($IBuffInterval, $BuffSettings[2][1]) 145 | GUICtrlSetData($IBuffKeys, $BuffSettings[3][1]) 146 | 147 | ; ClientSettings 148 | Global $ClientSettings = IniReadSection("config/settings.ini", "ClientSettings") 149 | GUICtrlSetData($IClientName, $ClientSettings[1][1]) 150 | GUICtrlSetData($CLang, "|en|de|fr", $ClientSettings[2][1]) 151 | 152 | GUICtrlSetState($CBLogFile, CBT($ClientSettings[3][1])) 153 | GUICtrlSetState($CBLootCapture, CBT($ClientSettings[4][1])) 154 | 155 | $hTitle = $ClientSettings[1][1] 156 | $LNG = $ClientSettings[2][1] 157 | $LogEnable = $ClientSettings[3][1] 158 | $ScreenCapLoot = $ClientSettings[4][1] 159 | 160 | Local $TotalStats = IniReadSection("logs/stats.ini", "TotalStats") 161 | Local $SessionStats = IniReadSection("logs/stats.ini", "SessionStats") 162 | 163 | 164 | For $i = 1 To 9 165 | GUICtrlSetData($aListView1[$i], $SessionStats[$i][0] & "|" & $SessionStats[$i][1] & "|" & $TotalStats[$i][1], "") 166 | Next 167 | EndFunc 168 | 169 | Func StoreGUI() 170 | ; LootSettings 171 | Global $LootSettings = IniReadSection("config/settings.ini", "LootSettings") 172 | Switch GUICtrlRead($CRarity) 173 | Case "White" 174 | $LootSettings[1][1] = 0 175 | Case "Green" 176 | $LootSettings[1][1] = 1 177 | Case "Blue" 178 | $LootSettings[1][1] = 2 179 | Case "Gold" 180 | $LootSettings[1][1] = 3 181 | Case "Specials Only" 182 | $LootSettings[1][1] = 4 183 | EndSwitch 184 | $LootSettings[2][1] = CBT(GUICtrlRead($CBSpecial1)) 185 | $LootSettings[3][1] = CBT(GUICtrlRead($CBSpecial2)) 186 | $LootSettings[4][1] = CBT(GUICtrlRead($CBSpecial3)) 187 | $LootSettings[5][1] = CBT(GUICtrlRead($CBEvent)) 188 | $LootSettings[6][1] = CBT(GUICtrlRead($CBTrash)) 189 | IniWriteSection("config/settings.ini", "LootSettings", $LootSettings) 190 | 191 | ; InventorySettings 192 | Global $InventorySettings = IniReadSection("config/settings.ini", "InventorySettings") 193 | $InventorySettings[1][1] = CBT(GUICtrlRead($CBDiscardRods)) ; Discard Rods 194 | $InventorySettings[2][1] = Int(GUICtrlRead($IBufferSize)) 195 | If $InventorySettings[2][1] < 2 Then $InventorySettings[2][1] = 2 196 | IniWriteSection("config/settings.ini", "InventorySettings", $InventorySettings) 197 | 198 | ; DryingSettings 199 | Global $DryingSettings = IniReadSection("config/settings.ini", "DryingSettings") 200 | $DryingSettings[1][1] = CBT(GUICtrlRead($CBDryFish)) 201 | Switch GUICtrlRead($CDryFish) 202 | Case "White" 203 | $DryingSettings[2][1] = 0 204 | Case "Green" 205 | $DryingSettings[2][1] = 1 206 | Case "Blue" 207 | $DryingSettings[2][1] = 2 208 | Case "Gold" 209 | $DryingSettings[2][1] = 3 210 | EndSwitch 211 | $DryingSettings[3][1] = GUICtrlRead($IDryFishInterval) 212 | IniWriteSection("config/settings.ini", "DryingSettings", $DryingSettings) 213 | 214 | ; WorkerSettings 215 | Global $WorkerSettings = IniReadSection("config/settings.ini", "WorkerSettings") 216 | $WorkerSettings[1][1] = CBT(GUICtrlRead($CBFeedWorker)) 217 | $WorkerSettings[2][1] = GUICtrlRead($IFeedWorkerInterval) 218 | IniWriteSection("config/settings.ini", "WorkerSettings", $WorkerSettings) 219 | 220 | ; BuffSettings 221 | Global $BuffSettings = IniReadSection("config/settings.ini", "BuffSettings") 222 | $BuffSettings[1][1] = CBT(GUICtrlRead($CBBuff)) 223 | $BuffSettings[2][1] = GUICtrlRead($IBuffInterval) 224 | $BuffSettings[3][1] = GUICtrlRead($IBuffKeys) 225 | IniWriteSection("config/settings.ini", "BuffSettings", $BuffSettings) 226 | 227 | ; ClientSettings 228 | Global $ClientSettings = IniReadSection("config/settings.ini", "ClientSettings") 229 | $ClientSettings[1][1] = GUICtrlRead($IClientName) 230 | $ClientSettings[2][1] = GUICtrlRead($CLang) 231 | $ClientSettings[3][1] = CBT(GUICtrlRead($CBLogFile)) 232 | $ClientSettings[4][1] = CBT(GUICtrlRead($CBLootCapture)) 233 | IniWriteSection("config/settings.ini", "ClientSettings", $ClientSettings) 234 | 235 | 236 | InitGUI() 237 | EndFunc 238 | 239 | Func CreateConfig() 240 | If FileExists("logs/") = False Then DirCreate("logs/") 241 | If FileExists("config/") = False Then DirCreate("config/") 242 | 243 | 244 | If FileExists("config/settings.ini") = False Then 245 | Local $LootSettings = "" 246 | $LootSettings &= "MinRarity=0" & @LF 247 | $LootSettings &= "loot_Silverkey=1" & @LF 248 | $LootSettings &= "loot_AncientRelic=1" & @LF 249 | $LootSettings &= "loot_Coelacanth=1" & @LF 250 | $LootSettings &= "loot_EventItems=1" & @LF 251 | $LootSettings &= "loot_TrashItems=0" & @LF 252 | IniWriteSection("config/settings.ini", "LootSettings", $LootSettings) 253 | 254 | Local $InventorySettings = "" 255 | $InventorySettings &= "Enable_DiscardRods=1" & @LF 256 | $InventorySettings &= "BufferSize=2" & @LF 257 | IniWriteSection("config/settings.ini", "InventorySettings", $InventorySettings) 258 | 259 | Local $DryingSettings = "" 260 | $DryingSettings &= "Enable_Drying=1" & @LF 261 | $DryingSettings &= "MaxRarity=2" & @LF 262 | $DryingSettings &= "DryingInterval=5" & @LF 263 | IniWriteSection("config/settings.ini", "DryingSettings", $DryingSettings) 264 | 265 | Local $WorkerSettings = "" 266 | $WorkerSettings &= "Enable_FeedWorker=1" & @LF 267 | $WorkerSettings &= "FeedWorkerInterval=60" & @LF 268 | IniWriteSection("config/settings.ini", "WorkerSettings", $WorkerSettings) 269 | 270 | Local $BuffSettings = "" 271 | $BuffSettings &= "Enable_Buff=1" & @LF 272 | $BuffSettings &= "BuffInterval=30" & @LF 273 | $BuffSettings &= "BuffKeys=7,8" & @LF 274 | IniWriteSection("config/settings.ini", "BuffSettings", $BuffSettings) 275 | 276 | Local $ClientSettings = "" 277 | $ClientSettings &= "ClientName=BLACK DESERT - " & @LF 278 | $ClientSettings &= "ClientLanguage=en" & @LF 279 | $ClientSettings &= "Enable_Logfile=1" & @LF 280 | $ClientSettings &= "Enable_ScreencapLoot=0" & @LF 281 | IniWriteSection("config/settings.ini", "ClientSettings", $ClientSettings) 282 | EndIf 283 | 284 | If FileExists("logs/stats.ini") = False Then 285 | Local $Stats = "" 286 | $Stats &= "White=0" & @LF 287 | $Stats &= "Green=0" & @LF 288 | $Stats &= "Blue=0" & @LF 289 | $Stats &= "Gold=0" & @LF 290 | $Stats &= "Silverkey=0" & @LF 291 | $Stats &= "AncientRelic=0" & @LF 292 | $Stats &= "Coelacanth=0" & @LF 293 | $Stats &= "Eventitem=0" & @LF 294 | $Stats &= "Trash=0" 295 | IniWriteSection("logs/stats.ini", "TotalStats", $Stats) 296 | IniWriteSection("logs/stats.ini", "SessionStats", $Stats) 297 | EndIf 298 | 299 | 300 | 301 | EndFunc ;==>CreateConfig 302 | 303 | 304 | 305 | 306 | 307 | ; # Basic 308 | Func DetectFullscreenToWindowedOffset($hTitle) ; Returns $Offset[4] left, top, right, bottom (Fullscreen returns 0, 0, Width, Height) 309 | Local $x1, $x2, $y1, $y2 310 | Local $Offset[4] 311 | Local $ClientZero[4] = [0, 0, 0, 0] 312 | 313 | WinActivate($hTitle) 314 | WinWaitActive($hTitle, "", 5) 315 | WinActivate($hTitle) 316 | Local $Client = WinGetPos($hTitle) 317 | If Not IsArray($Client) Then 318 | SetGUIStatus("E: ClientSize could not be detected") 319 | Return ($ClientZero) 320 | EndIf 321 | 322 | If $Client[2] = @DesktopWidth And $Client[3] = @DesktopHeight Then 323 | SetGUIStatus("Fullscreen detected (" & $Client[2] & "x" & $Client[3] & ") - No Offsets") 324 | Return ($Client) 325 | EndIf 326 | 327 | If Not VisibleCursor() Then CoSe("{LCTRL}") 328 | Opt("MouseCoordMode", 2) 329 | MouseMove(0, 0, 0) 330 | Opt("MouseCoordMode", 1) 331 | $x1 = MouseGetPos(0) 332 | $y1 = MouseGetPos(1) 333 | Opt("MouseCoordMode", 0) 334 | MouseMove(0, 0, 0) 335 | Opt("MouseCoordMode", 1) 336 | $x2 = MouseGetPos(0) 337 | $y2 = MouseGetPos(1) 338 | MouseMove($x1, $y1, 0) 339 | 340 | 341 | $Offset[0] = $Client[0] + $x1 - $x2 342 | $Offset[1] = $Client[1] + $y1 - $y2 343 | $Offset[2] = $Client[0] + $Client[2] 344 | $Offset[3] = $Client[1] + $Client[3] 345 | For $i = 0 To 3 346 | SetGUIStatus("ScreenOffset(" & $i & "): " & $Offset[$i]) 347 | Next 348 | 349 | Return ($Offset) 350 | EndFunc ;==>DetectFullscreenToWindowedOffset 351 | 352 | Func WaitForMenu($show = False, $timeout = 5) 353 | Local Const $WorkerIcon = "res/esc_worker.png" 354 | Local $x, $y, $IS 355 | Local $timer = TimerInit() 356 | $timeout *= 1000 357 | 358 | While TimerDiff($timer) < $timeout 359 | $IS = _ImageSearchArea($WorkerIcon, 1, $Res[0], $Res[1], $Res[2], $Res[3], $x, $y, 50, 0) 360 | If $IS = False Then CoSe("{ESC}") ; Opening Menu 361 | If $IS = True Then 362 | If $show = False Then CoSe("{ESC}") ; Closing Menu 363 | Return True 364 | EndIf 365 | Sleep(2000) 366 | WEnd 367 | Return False 368 | EndFunc ;==>WaitForMenu 369 | 370 | Func OCInventory($open = True) 371 | ;~ Local Const $Offset[2] = [-298, 32] ; Offset from reference_inventory to left border of first Inventory Slot. 372 | Local Const $Offset[2] = [-298, 30] ; Offset from reference_inventory to left border of first Inventory Slot. 373 | Local $IS = False 374 | Local $C[2] 375 | Local $timer = TimerInit() 376 | While Not $IS And $Fish 377 | Sleep(250) 378 | $IS = _ImageSearchArea("res/reference_inventory.png", 0, $Res[0], $Res[1], $Res[2], $Res[3], $C[0], $C[1], 10, 0) 379 | Sleep(250) 380 | If $IS = True Then ; If the inventory is already open... 381 | If $open = True Then ; If $open = True return the inventory coordinates 382 | $C[0] += $Offset[0] 383 | $C[1] += $Offset[1] 384 | Return ($C) 385 | ElseIf $open = False Then ; If $open = False and the inventory is open, then close then inventory and continue the loop 386 | CoSe("i") 387 | Sleep(500) 388 | EndIf 389 | ElseIf $IS = False Then ; ElseIf the inventory was not found yet 390 | If $open = True Then ; Trying to open Inventory when $open = True 391 | CoSe("i") 392 | MouseMove($Res[0] + 1, $Res[1] + 1) 393 | Sleep(500) 394 | ElseIf $open = False Then ; If $open = False and the Inventory is not found then Return True 395 | SetGUIStatus("Inventory closed") 396 | Return True 397 | EndIf 398 | EndIf 399 | If TimerDiff($timer) / 1000 >= 6 Then 400 | SetGUIStatus("OCInventory Timeout") 401 | Return False 402 | EndIf 403 | WEnd 404 | EndFunc ;==>OCInventory 405 | 406 | Func SearchInventory(ByRef $imagelist, $shadevariation = 0, $transparency = "", $reopen = True) ; Returns $C[2] or False 407 | Local $C[2], $IS 408 | If $reopen = True Then OCInventory(False) 409 | Local $InvA = OCInventory(True) 410 | If Not IsArray($InvA) Then Return False 411 | VMouse($InvA[0] + 48 * 8, $InvA[1], 1, "left") ; Click on Inventory to get focus 412 | 413 | Local $IW[4] = [$InvA[0], $InvA[1], $InvA[0] + 48 * 8, $InvA[1] + 47 * 8] 414 | For $k = 0 To 2 415 | MouseFreeZone($IW[0], $IW[1], $IW[2], $IW[3], $IW[0] - 50, $IW[1]) 416 | For $i = 0 To UBound($imagelist) - 1 417 | $IS = _ImageSearchArea($imagelist[$i], 1, $IW[0], $IW[1], $IW[2], $IW[3], $C[0], $C[1], $shadevariation, $transparency) 418 | If $IS = True Then Return $C 419 | Next 420 | If $k < 2 Then ; Scrolling down inventory 421 | MouseMove($IW[0], $IW[1]) 422 | Sleep(50) 423 | For $mw = 0 To 7 424 | MouseWheel("down") 425 | Sleep(50) 426 | Next 427 | EndIf 428 | Sleep(150) 429 | Next 430 | 431 | Return False 432 | 433 | EndFunc ;==>SearchInventory 434 | 435 | Func PauseToggle() 436 | Local Static $PauseToggle = False 437 | $PauseToggle = Not $PauseToggle 438 | If $PauseToggle = False Then 439 | SetGUIStatus("Unpause") 440 | Return True 441 | EndIf 442 | SetGUIStatus("Pause") 443 | While $PauseToggle 444 | Sleep(500) 445 | GUILoopSwitch() 446 | WEnd 447 | Return True 448 | EndFunc ;==>PauseToggle 449 | 450 | Func DetectFreeInventory() 451 | Local $IS, $x, $y 452 | Local $Free = 0 453 | SetGUIStatus("Detecting free inventory space") 454 | OCInventory(False) 455 | Local $InvA = OCInventory(True) 456 | If IsArray($InvA) = False Then Return False 457 | For $L = 0 To 2 Step 1 458 | MouseFreeZone($InvA[0], $InvA[1], $InvA[0] + 500, $InvA[1] + 500, $InvA[0] - 50, $InvA[1]) 459 | For $j = 0 To 7 Step 1 460 | Local $String = $L & $j 461 | For $i = 0 To 7 Step 1 462 | $IS = _ImageSearchArea("res/reference_empty.png", 0, $InvA[0] + $i * 48, $InvA[1] + $j * 47, $InvA[0] + 48 + $i * 48, $InvA[1] + 47 + $j * 47, $x, $y, 25, 0) 463 | If $IS = True Then 464 | $Free += 1 465 | $String &= "[_]" 466 | Else 467 | $String &= "[X]" 468 | EndIf 469 | Next 470 | SetGUIStatus($String) 471 | Next 472 | If $L < 2 Then 473 | MouseMove($InvA[0], $InvA[1]) 474 | Sleep(50) 475 | For $mw = 0 To 7 476 | MouseWheel("down") 477 | Sleep(50) 478 | Next 479 | EndIf 480 | Sleep(150) 481 | Next 482 | OCInventory(False) 483 | SetGUIStatus($Free & " empty slots") 484 | Return ($Free) 485 | EndFunc ;==>DetectFreeInventory 486 | 487 | 488 | ; # Fishing 489 | Func DetectState($FishingState) 490 | Local $x, $y, $IS 491 | 492 | ; Limiting detection region to speed up the process 493 | Local $Left = ($Res[0] + $Res[2]) / 2 - 200 ; Center of BDO Clientwindow - 200 494 | Local $Top = $Res[1] ; Top of BDO Clientwindow 495 | Local $Right = ($Res[0] + $Res[2]) / 2 + 200 ; Center of BDO Clientwindow + 200 496 | Local $Bottom = $Res[1] + 200 ; Top of BDO Clientwidow + 200 497 | 498 | $IS = _ImageSearchArea($FishingState, 1, $Left, $Top, $Right, $Bottom, $x, $y, 10, "White") 499 | If $IS = True Then Return True 500 | Return False 501 | EndFunc ;==>DetectState 502 | 503 | Func GetState() 504 | Local Const $FishingStandby = "res/fishing/standby_" & $LNG & ".png" 505 | Local Const $FishingCurrently = "res/fishing/currently_" & $LNG & ".png" 506 | Local Const $FishingBite = "res/fishing/bite_" & $LNG & ".png" 507 | 508 | If DetectState($FishingBite) = True Then Return ("FishingBite") 509 | If DetectState($FishingCurrently) = True Then Return ("FishingCurrently") 510 | If DetectState($FishingStandby) = True Then Return ("FishingStandby") 511 | Return False 512 | EndFunc ;==>GetState 513 | 514 | Func ReelIn() ; Solves the fishing timing minigame 515 | Local Const $ReelIn = "res/fishing/reelin.png" 516 | Local $x, $y, $IS, $SSN = 1 517 | 518 | CoSe("{SPACE}") 519 | 520 | Local $timer = TimerInit() 521 | While TimerDiff($timer) < 3000 And $Fish 522 | $IS = _ImageSearchArea($ReelIn, 0, $Res[0], $Res[1], $Res[2], $Res[3], $x, $y, 0, "White") 523 | If $IS = True Then ExitLoop 524 | WEnd 525 | 526 | $timer = TimerInit() 527 | While TimerDiff($timer) / 1000 <= 5 And $Fish 528 | FFSnapShot($x, $y, $x + 97, $y + 21, $SSN) 529 | $NS = FFNearestSpot(1, 1, $x, $y, 5933000, 30, False, $x, $y, $x + 97, $y + 21, $SSN) 530 | If Not @error Then 531 | CoSe("{SPACE}") 532 | Return True 533 | EndIf 534 | WEnd 535 | Return False 536 | EndFunc ;==>ReelIn 537 | 538 | Func FindRiddleAnchor() ; Waits 4 Seconds for the letter minigame timeline to appear and returns the position 539 | Local Const $RiddleAnchor = "res/fishing/riddle.png" 540 | Local $timer = TimerInit() 541 | Local $C[2] = [-1, -1] 542 | While TimerDiff($timer) / 1000 <= 4 And $Fish 543 | If _ImageSearchArea($RiddleAnchor, 0, $Res[0], $Res[1], $Res[2], $Res[3], $C[0], $C[1], 10, "0x00ff00") = 1 Then 544 | Return ($C) 545 | EndIf 546 | WEnd 547 | Return False 548 | EndFunc ;==>FindRiddleAnchor 549 | 550 | Func Riddle($iAnchorX, $iAnchorY, $AnchorColor, $SSN) ; Recognizes arrow direction by checking offsets for $AnchorColor 551 | Local Const $ArrowsX[8] = [-2, +3, +3, -2, -2, -2, +3, +3] ; vv^^>><< 552 | Local Const $ArrowsY[8] = [-3, -3, +2, +2, +3, -3, +2, -2] ; vv^^>><< 553 | Local $ai[8], $iL = 4 554 | 555 | For $i = 0 To 7 Step 1 556 | If FFGetPixel($iAnchorX + $ArrowsX[$i], $iAnchorY + $ArrowsY[$i], $SSN) = $AnchorColor Then 557 | $ai[$i] = 1 558 | Else 559 | $ai[$i] = 0 560 | EndIf 561 | Next 562 | 563 | For $j = 3 To 0 Step -1 564 | If $ai[$j * 2] + $ai[$j * 2 + 1] = 2 Then $iL = $j 565 | Next 566 | 567 | Return ($iL) 568 | EndFunc ;==>Riddle 569 | 570 | Func Riddler() ; Solves the fishing letter minigame 571 | Local Const $AnchorOffset[2] = [16, 25] ; relative position to Anchor (pointing to center of the arrow beneath each letter) 572 | Local Const $Spacing = 35 ; Space between each Letter 573 | Local Const $L[5] = ["s", "w", "d", "a", "."] ; basic minigame letters ("." for unidentified) 574 | Local $Word[10], $LetterColor, $text, $Riddle, $Wordlength = 0, $SSN = 1 575 | 576 | Local $aAnchor = FindRiddleAnchor() 577 | If Not IsArray($aAnchor) Then 578 | SetGUIStatus("Perfect Catch?") 579 | Return False 580 | EndIf 581 | 582 | $aAnchor[0] -= 45 ; Base Offset to include letters since anchor is below 583 | $aAnchor[1] -= 60 584 | FFSnapShot($aAnchor[0] - 10, $aAnchor[1] - 10, $aAnchor[0] + $Spacing * 10 + 10, $aAnchor[1] + 40, $SSN) 585 | $LetterColor = FFGetPixel($aAnchor[0] + $AnchorOffset[0], $aAnchor[1] + $AnchorOffset[1], $SSN) 586 | 587 | ; Riddle each letter position from left to right until one is unidentified or last position is reached. 588 | For $i = 0 To 9 Step 1 589 | $Riddle = Riddle($aAnchor[0] + $AnchorOffset[0] + $Spacing * $i, $aAnchor[1] + $AnchorOffset[1], $LetterColor, $SSN) 590 | If $Riddle = 4 Then ; If unidentified exit loop 591 | $Word[$i] = $L[$Riddle] 592 | ExitLoop 593 | Else 594 | $Word[$i] = $L[$Riddle] 595 | $Wordlength += 1 596 | EndIf 597 | Next 598 | 599 | ; If Wordlenght is >= 2 Then send each letter 600 | If $Wordlength < 2 Then 601 | Return (False) 602 | Else 603 | For $i = 0 To 9 Step 1 604 | If $Word[$i] <> "." Then 605 | Sleep(50) ; TODO Settings 606 | CoSe($Word[$i]) 607 | $text &= $Word[$i] 608 | EndIf 609 | Sleep(100) 610 | Next 611 | Return (True) 612 | EndIf 613 | EndFunc ;==>Riddler 614 | 615 | 616 | ; # Fishing Misc 617 | Func Cast() 618 | 619 | SetGUIStatus("Casting Fishingrod") 620 | Sleep(1000) 621 | CoSe("{SPACE}") 622 | 623 | Local $timer = TimerInit() 624 | While GetState() <> "FishingCurrently" And $Fish 625 | Sleep(500) 626 | If TimerDiff($timer) >= 8000 Then Return False 627 | WEnd 628 | Return True 629 | EndFunc ;==>Cast 630 | 631 | Func InspectFishingrod() 632 | Local $equip = "res/fishing/equip_" & $LNG & ".png" 633 | Local $empty = "res/fishing/rod_empty.png" 634 | Local $WeaponOffSet[2] = [-63, 329] 635 | Local $x, $y, $IS = False 636 | 637 | Local $InvA = OCInventory(True) 638 | If IsArray($InvA) = False Then Return False 639 | 640 | $IS = _ImageSearchArea($equip, 1, $Res[0], $Res[1], $Res[2], $Res[3], $x, $y, 25, "White") 641 | If $IS = True Then 642 | SetGUIStatus("Equipment found") 643 | MouseFreeZone($x - 200, $y - 40, $Res[2], $y + 400, $x, $y - 50) 644 | Local $WS[4] = [$x + $WeaponOffSet[0] - 24, $y + $WeaponOffSet[1] - 24, $x + $WeaponOffSet[0] + 24, $y + $WeaponOffSet[1] + 24] 645 | 646 | $IS = _ImageSearchArea($empty, 1, $WS[0], $WS[1], $WS[2], $WS[3], $x, $y, 40) 647 | If $IS = True Then 648 | OCInventory(False) 649 | SetGUIStatus("rod_empty detected") 650 | Return True 651 | ElseIf $IS = False Then 652 | OCInventory(False) 653 | SetGUIStatus("rod_empty missing") 654 | Return False 655 | EndIf 656 | ElseIf $IS = False Then 657 | SetGUIStatus("Equipment missing.") 658 | OCInventory(False) 659 | Return False 660 | EndIf 661 | EndFunc ;==>InspectFishingrod 662 | 663 | Func SwapFishingrod($discard = False) 664 | Local $Fishingrods[5] = ["res/fishing/rod_default.png", "res/fishing/rod_balenos.png", "res/fishing/rod_calpheon.png", "res/fishing/rod_epheria.png", "res/fishing/rod_mediah.png"] 665 | 666 | SetGUIStatus("Trying to swap Fishingrod. Discard = " & $discard) 667 | 668 | Local $C = SearchInventory($Fishingrods, 20) 669 | If IsArray($C) Then 670 | SetGUIStatus("Equipping Fishingrod") 671 | MouseClick("right", $C[0], $C[1]) 672 | If $discard = True Then DiscardEmptyRod() 673 | OCInventory(False) 674 | Return True 675 | Else 676 | SetGUIStatus("No usable Fishingrod found") 677 | If $discard = True Then DiscardEmptyRod() 678 | OCInventory(False) 679 | Return False 680 | EndIf 681 | EndFunc ;==>SwapFishingrod 682 | 683 | Func DiscardEmptyRod() 684 | Local Const $TrashCanOffset[2] = [360, 436] ; X,Y 685 | Local $EmptyRod[1] = ["res/fishing/rod_default_discard.png"] 686 | 687 | SetGUIStatus("Searching for unrepairable Fishingrod") 688 | Local $C = SearchInventory($EmptyRod, 20) 689 | If IsArray($C) Then 690 | Local $InvA = OCInventory(True) 691 | If IsArray($InvA) Then 692 | SetGUIStatus("Discarding Fishingrod.") 693 | MouseMove($C[0], $C[1]) 694 | MouseClickDrag("left", $C[0], $C[1], $C[0] + 100, $C[1], 500) 695 | MouseClick("left", $InvA[0] + $TrashCanOffset[0], $InvA[1] + $TrashCanOffset[1]) 696 | EndIf 697 | Sleep(400) 698 | CoSe("{SPACE}") 699 | Sleep(250) 700 | OCInventory(False) 701 | Return True 702 | Else 703 | SetGUIStatus("No empty Fishingrod detected.") 704 | OCInventory(False) 705 | Return False 706 | EndIf 707 | EndFunc ;==>DiscardEmptyRod 708 | 709 | Func TurnAround() 710 | If VisibleCursor() = True Then CoSe("{LCTRL}") 711 | MouseMove(MouseGetPos(0) + 500, MouseGetPos(1)) 712 | CoSe("ad") 713 | EndFunc ;==>TurnAround 714 | 715 | ; # Fishing Assist 716 | Func FishingAssist() 717 | $Fish = True 718 | SetGUIStatus("FishingAssist launched") 719 | If ReelIn() = True Then Riddler() 720 | 721 | EndFunc ;==>FishingAssist 722 | 723 | 724 | ; # Loot 725 | Func DetectLoot(ByRef $LWref) ; Identifies Rarity by bordercolor and Empty, Trash, Special, Event, Ignore images. 726 | Local Const $Rarity[4] = ["", 0x447726, 0x3C85AB, 0xA28748] ; Green, Blue, Gold 727 | Local Const $SpecialLootIdentifier[4] = ["res/fishing/loot_quantity.png", "res/fishing/loot_silverkey.png", "res/fishing/loot_ancientrelic.png", "res/fishing/loot_coelacanth.png"] 728 | Local Const $lootbag = "res/fishing/lootbag_" & $LNG & ".png" 729 | Local Static $EventIdentifier = _FileListToArray("res/fishing/event/", "*", 0) 730 | Local Static $IgnoreIdentifier = _FileListToArray("res/fishing/ignore/", "*", 0) 731 | Local $Loot[4][3] = [[0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0]] 732 | Local $FF, $x, $y, $SSN = 1 733 | Local $x, $y, $IS = False 734 | 735 | SetGUIStatus("DetectLoot Waiting for Item List") 736 | Local $timer = TimerInit() 737 | While $IS = False And $Fish 738 | $IS = _ImageSearchArea($lootbag, 1, ($Res[0] + $Res[2]) / 2, $Res[1], $Res[2], $Res[3], $x, $y, 20, "White") ; Search on the right half of the window 739 | If $IS = True Then 740 | Local $LWOffset[2] = [-94, 50] 741 | Local $LW[5] = [$x + $LWOffset[0], $y + $LWOffset[1] - 24, $x + $LWOffset[0] + 2, $y + $LWOffset[1] + 24, 47] 742 | $LWref = $LW 743 | ExitLoop 744 | Else 745 | If TimerDiff($timer) > 3000 Then Return False 746 | EndIf 747 | WEnd 748 | 749 | SetGUIStatus("DetectLoot Identifying Loot") 750 | For $j = 0 To 3 Step 1 ; Top left slot to top right slot 751 | For $i = 1 To UBound($Rarity) - 1 Step 1 ;Check for Green, Blue, Gold border 752 | $FF = FFColorCount($Rarity[$i], 10, True, $LW[0] + $LW[4] * $j, $LW[1], $LW[2] + $LW[4] * $j, $LW[3], $SSN) 753 | If $FF > 10 Then 754 | $Loot[$j][0] = $i 755 | EndIf 756 | Next 757 | If $Loot[$j][0] = 0 Then ; If Rarity = 0 then check if slot is empty or has "1" as quantity indicator (trash) 758 | $IS = _ImageSearchArea("res/fishing/loot_empty.png", 0, $LW[0] + $LW[4] * $j, $LW[1], $LW[2] + 44 + $LW[4] * $j, $LW[3], $x, $y, 50, 0) 759 | If $IS = True Then 760 | $Loot[$j][0] = -2 761 | Else ; check for quanity 762 | $IS = _ImageSearchArea($SpecialLootIdentifier[0], 0, $LW[0] + $LW[4] * $j, $LW[1], $LW[2] + 44 + $LW[4] * $j, $LW[3], $x, $y, 40, 0) 763 | If $IS = True Then $Loot[$j][0] = -1 764 | EndIf 765 | EndIf 766 | For $i = 1 To UBound($SpecialLootIdentifier) - 1 Step 1 ; Check for Specials: Silverkey, AncientRelic, Coelacanth 767 | If _ImageSearchArea($SpecialLootIdentifier[$i], 0, $LW[0] + $LW[4] * $j, $LW[1], $LW[2] + 44 + $LW[4] * $j, $LW[3], $x, $y, 20, 0) = 1 Then 768 | $Loot[$j][1] = $i 769 | EndIf 770 | Next 771 | For $i = 1 To UBound($EventIdentifier) - 1 Step 1 ; Check for Event items (includes all images in res/fishing/event/ folder) 772 | If _ImageSearchArea("res/fishing/event/" & $EventIdentifier[$i], 0, $LW[0] + $LW[4] * $j, $LW[1], $LW[2] + 44 + $LW[4] * $j, $LW[3], $x, $y, 25, 0) = 1 Then 773 | $Loot[$j][2] = $i 774 | EndIf 775 | Next 776 | For $i = 1 To UBound($IgnoreIdentifier) - 1 Step 1 ; Check for Ignored Items (includes all images in res/fishing/ignore/ folder) 777 | If _ImageSearchArea("res/fishing/ignore/" & $IgnoreIdentifier[$i], 0, $LW[0] + $LW[4] * $j, $LW[1], $LW[2] + 44 + $LW[4] * $j, $LW[3], $x, $y, 25, 0) = 1 Then 778 | $Loot[$j][2] = -$i 779 | EndIf 780 | Next 781 | Next 782 | 783 | ; ScreenCapping the first 4 Inventory slots 784 | Dim $ScreenCapLoot 785 | If $ScreenCapLoot = True Then 786 | SetGUIStatus("Saving Loot Screenshot") 787 | FFSaveBMP("logs/Loot", True, $LW[0], $LW[1], $LW[2] + $LW[4] * 4, $LW[3]) 788 | EndIf 789 | 790 | ; Creating readable string for status 791 | Local $CWLoot = "Loot:" 792 | For $j = 0 To UBound($Loot, 1) - 1 Step 1 793 | $CWLoot &= "[" 794 | For $i = 0 To UBound($Loot, 2) - 1 Step 1 795 | $CWLoot &= $Loot[$j][$i] 796 | Next 797 | $CWLoot &= "]" 798 | Next 799 | SetGUIStatus($CWLoot) 800 | 801 | Return $Loot 802 | EndFunc ;==>DetectLoot 803 | 804 | Func ResetSession() 805 | Local $SessionStats = IniReadSection("logs/stats.ini", "SessionStats") 806 | For $i = 1 To UBound($SessionStats) - 1 Step 1 807 | $SessionStats[$i][1] = 0 808 | Next 809 | IniWriteSection("logs/stats.ini", "SessionStats", $SessionStats) 810 | InitGUI() 811 | EndFunc ;==>ResetSession 812 | 813 | Func DocLoot(ByRef $Loot) 814 | 815 | Local $TotalStats = IniReadSection("logs/stats.ini", "TotalStats") 816 | Local $SessionStats = IniReadSection("logs/stats.ini", "SessionStats") 817 | 818 | For $i = 0 To UBound($Loot) - 1 Step 1 819 | Switch $Loot[$i][0] 820 | Case -1 ; Trash 821 | $TotalStats[9][1] += 1 822 | $SessionStats[9][1] += 1 823 | Case 0 ; White 824 | $TotalStats[1][1] += 1 825 | $SessionStats[1][1] += 1 826 | Case 1 ; Green 827 | $TotalStats[2][1] += 1 828 | $SessionStats[2][1] += 1 829 | Case 2 ; Blue 830 | $TotalStats[3][1] += 1 831 | $SessionStats[3][1] += 1 832 | Case 3 ; Gold 833 | $TotalStats[4][1] += 1 834 | $SessionStats[4][1] += 1 835 | EndSwitch 836 | 837 | Switch $Loot[$i][1] 838 | Case 1 ; Silverkey 839 | $TotalStats[5][1] += 1 840 | $SessionStats[5][1] += 1 841 | Case 2 ; AncientRelic 842 | $TotalStats[6][1] += 1 843 | $SessionStats[6][1] += 1 844 | Case 3 ; Coelacanth 845 | $TotalStats[7][1] += 1 846 | $SessionStats[7][1] += 1 847 | EndSwitch 848 | 849 | If $Loot[$i][2] > 0 Then ; Event items 850 | $TotalStats[8][1] += 1 851 | $SessionStats[8][1] += 1 852 | EndIf 853 | Next 854 | 855 | 856 | For $i = 1 To 9 857 | GUICtrlSetData($aListView1[$i], $SessionStats[$i][0] & "|" & $SessionStats[$i][1] & "|" & $TotalStats[$i][1], "") 858 | Next 859 | 860 | IniWriteSection("logs/stats.ini", "TotalStats", $TotalStats) 861 | IniWriteSection("logs/stats.ini", "SessionStats", $SessionStats) 862 | EndFunc ;==>DocLoot 863 | 864 | Func DetectEnterQuantity($Left, $Top) 865 | Local Const $Quantity = "res/fishing/enteramount.png" 866 | Local $x, $y, $IS 867 | Sleep(250) 868 | $IS = _ImageSearchArea($Quantity, 0, $Left, $Top, $Res[2], $Res[3], $x, $y, 25, "White") 869 | If $IS = True Then Return True 870 | Return False 871 | EndFunc ;==>DetectEnterQuantity 872 | 873 | Func HandleLoot(ByRef $LS, $Reserve = 0) 874 | Local $LW[5] 875 | Local $Loot = DetectLoot($LW) 876 | If Not IsArray($Loot) Then Return False 877 | DocLoot($Loot) 878 | 879 | Local $Pick[4] = [0, 0, 0, 0] 880 | Local $PickedLoot = 0 881 | Local $Threshold = 0 882 | If $Reserve = 1 Then $Threshold = 41 883 | 884 | ; Make the loot settings understandable and prevent type confusion 885 | Local $LS_Rarity = Int($LS[1][1]) 886 | Local $LS_Silverkey = Int($LS[2][1]) 887 | Local $LS_AncientRelic = Int($LS[3][1]) 888 | Local $LS_Coelacanth = Int($LS[4][1]) 889 | Local $LS_EventItems = Int($LS[5][1]) 890 | Local $LS_TrashItems = Int($LS[6][1]) 891 | 892 | 893 | For $j = 0 To 3 Step 1 894 | If $Loot[$j][0] >= $LS_Rarity Then ; If loot-rarity >= set rarity 895 | $Pick[$j] += 10 ; Rarity 896 | Else 897 | If $Loot[$j][0] = -1 And $LS_TrashItems = 1 Then $Pick[$j] += 1 ; Trash (stackable; don't count towards picked loot) 898 | EndIf 899 | Switch $Loot[$j][1] 900 | Case 1 ; Silverkey 901 | If $LS_Silverkey Then $Pick[$j] += 1 ; (stackable; don't count towards picked loot) 902 | Case 2 ; Ancient Relic 903 | If $LS_AncientRelic Then $Pick[$j] += 30 904 | Case 3 ; Coelacanth 905 | If $LS_Coelacanth Then $Pick[$j] += 20 906 | EndSwitch 907 | If $Loot[$j][2] > 0 And $LS_EventItems Then $Pick[$j] += 21 ; Event items (stackable; don't count towards picked loot) 908 | If $Loot[$j][2] < 0 Then $Pick[$j] = 0 ; ignore items 909 | Next 910 | 911 | Sleep(1250) 912 | SetGUIStatus(StringFormat("Filter: R%s S%s A%s C%s E%s T%s", $LS_Rarity, $LS_Silverkey, $LS_AncientRelic, $LS_Coelacanth, $LS_EventItems, $LS_TrashItems)) 913 | SetGUIStatus("Pick:[" & $Pick[0] & "][" & $Pick[1] & "][" & $Pick[2] & "][" & $Pick[3] & "]") 914 | If $Reserve = 1 Then SetGUIStatus("Relic Reserve reached. Unstackable Picks below " & $Threshold & " will be ignored.") 915 | 916 | For $j = 3 To 0 Step -1 917 | If $Pick[$j] > $Threshold Or (Mod($Pick[$j], 2) = 1 And $Pick[$j] > 0) Then 918 | 919 | If Mod($Pick[$j], 2) = 0 Then $PickedLoot += 1 ; Increase Picked loot if item is not stackable 920 | 921 | If Not VisibleCursor() Then CoSe("{LCTRL}") 922 | Sleep(250) 923 | VMouse($LW[0] + 20 + $LW[4] * $j +1, $LW[1] + 20) 924 | Sleep(50) 925 | VMouse($LW[0] + 20 + $LW[4] * $j, $LW[1] + 20, 1, "Right") 926 | Sleep(100) 927 | If $Pick[$j] = 21 Or $Pick[$j] = 31 Then ; If it's an event item check for quantity. 928 | SetGUIStatus("Trying to pick Event Item. Checking Quantity.") 929 | If DetectEnterQuantity($LW[0], $LW[1]) = True Then 930 | SetGUIStatus("Quantity detected. Collecting all.") 931 | CoSe("f") 932 | Sleep(50) 933 | CoSe("r") 934 | Sleep(50) 935 | EndIf 936 | EndIf 937 | EndIf 938 | Next 939 | If VisibleCursor() Then CoSe("{LCTRL}") 940 | Return $PickedLoot 941 | EndFunc ;==>HandleLoot 942 | 943 | 944 | ; # Drying 945 | Func CheckWeather() 946 | Local Const $WeatherSunny = "res/fishing/drying_sunny.png" 947 | Local Const $WeatherRain = "res/fishing/drying_rain.png" 948 | Local $x, $y, $IS 949 | $IS = _ImageSearchArea($WeatherSunny, 1, $Res[2] - 350, $Res[1], $Res[2], $Res[1] + 100, $x, $y, 50, "White") 950 | If $IS = True Then 951 | SetGUIStatus("Weather: Sunny") 952 | Return True 953 | Else 954 | $IS = _ImageSearchArea($WeatherRain, 1, $Res[2] - 350, $Res[1], $Res[2], $Res[1] + 100, $x, $y, 50, "White") 955 | If $IS = True Then 956 | SetGUIStatus("Weather: Rain") 957 | Return False 958 | Else 959 | SetGUIStatus("Weather: None found") 960 | Return False 961 | EndIf 962 | EndIf 963 | EndFunc ;==>CheckWeather 964 | 965 | Func SelectProductionMethod($Method) ; 0=Shaking, 1=Grinding, 2=Chopping, 3=Drying, 4=Filtering, 5=Heating 966 | Local $x, $y, $IS 967 | Local $ProductionHammer = "res/processing_hammer.png" 968 | Local $ProcessingMethodOffset[2] = [62, -62] 969 | 970 | ; If $Method is a string translate it to int 971 | If IsNumber($Method) = False Then 972 | Switch $Method 973 | Case "Shaking" 974 | $Method = 0 975 | Case "Grinding" 976 | $Method = 1 977 | Case "Chopping" 978 | $Method = 2 979 | Case "Drying" 980 | $Method = 3 981 | Case "Filtering" 982 | $Method = 4 983 | Case "Heating" 984 | $Method = 5 985 | EndSwitch 986 | EndIf 987 | 988 | ; Check for Production window 989 | ; If closed then open it by pressing "l" 990 | ; If open then close it and reopen it by pressing "l" 991 | $IS = _ImageSearchArea($ProductionHammer, 1, $Res[0], $Res[1], $Res[2], $Res[3], $x, $y, 50, 0) 992 | SetGUIStatus("Processing open: " & $IS) 993 | If Not $IS Then 994 | CoSe("l") 995 | Sleep(500) 996 | Else 997 | CoSe("l") 998 | CoSe("l") 999 | Sleep(500) 1000 | EndIf 1001 | ; Check again for Production window and use $x, $y as Anchorpoint 1002 | $IS = _ImageSearchArea($ProductionHammer, 1, $Res[0], $Res[1], $Res[2], $Res[3], $x, $y, 50, 0) 1003 | If $IS = True Then 1004 | SetGUIStatus("Processing open: " & $IS) 1005 | Local $ProductionAnchor[2] = [$x, $y] 1006 | VMouse($ProductionAnchor[0] + $ProcessingMethodOffset[0] * $Method, $ProductionAnchor[1] + $ProcessingMethodOffset[1], 1, "left") ; Selecting the Processing Method 1007 | Return $ProductionAnchor 1008 | Else 1009 | SetGUIStatus("Processing open: " & $IS) 1010 | Return False 1011 | EndIf 1012 | EndFunc ;==>SelectProductionMethod 1013 | 1014 | Func StartProduction(ByRef $ProductionAnchor, ByRef $DryableFishC) 1015 | Local Const $processall = "res/processing_check.png" 1016 | Local $ProcessingStartOffset[2] = [256, -294] 1017 | Local $ProcessingAllIdenticalOffset[2] = [256, -326] 1018 | Local $x, $y, $IS 1019 | 1020 | VMouse($DryableFishC[0], $DryableFishC[1], 1, "Right") 1021 | VMouse($ProductionAnchor[0] + $ProcessingAllIdenticalOffset[0], $ProductionAnchor[1] + $ProcessingAllIdenticalOffset[1], 1) ; Process all identical 1022 | Sleep(250) 1023 | 1024 | $Left = $ProductionAnchor[0] 1025 | $Top = $ProductionAnchor[1] + $ProcessingAllIdenticalOffset[1] - 10 1026 | $Right = $ProductionAnchor[0] + $ProcessingAllIdenticalOffset[0] 1027 | $Bottom = $ProductionAnchor[1] + $ProcessingAllIdenticalOffset[1] + 10 1028 | $IS = _ImageSearchArea($processall, 0, $Left, $Top, $Right, $Bottom, $x, $y, 50, 0) ; Process all identical items? 1029 | If $IS = True Then 1030 | VMouse($ProductionAnchor[0] + $ProcessingStartOffset[0], $ProductionAnchor[1] + $ProcessingStartOffset[1], 1) ; Start processing 1031 | Sleep(250) 1032 | CoSe("{SPACE}") 1033 | Else 1034 | VMouse($ProductionAnchor[0] + $ProcessingStartOffset[0], $ProductionAnchor[1] + $ProcessingStartOffset[1], 1) ; Start processing 1035 | EndIf 1036 | If ProductionActivityCheckLoop() = True Then Return True 1037 | Return False 1038 | EndFunc ;==>StartProduction 1039 | 1040 | Func CheckInventoryForFishBySlot($MaxRarity = 3) 1041 | Local $Clock = "res/fishing/drying_clock.png" 1042 | Local $ClockRed = "res/fishing/drying_clock_red.png" 1043 | Local Const $Rarity[4] = [0xA49A72, 7184194, 6596799, 13742692] ; Green, Blue, Gold 1044 | Local Const $Slot[2] = [48, 47] ; Width, Height and also offset 1045 | Local $C[2], $IS, $Left, $Top, $Right, $Bottom 1046 | 1047 | Local $InvA = OCInventory(True) 1048 | If Not IsArray($InvA) Then Return False 1049 | VMouse($InvA[0] + 48 * 8, $InvA[1], 1, "left") ; Click on Inventory to get focus 1050 | 1051 | Local $IW[4] = [$InvA[0], $InvA[1], $InvA[0] + 48 * 8, $InvA[1] + 47 * 8] 1052 | For $k = 0 To 2 Step 1 1053 | MouseFreeZone($IW[0], $IW[1], $IW[2], $IW[3], $IW[0] - 50, $IW[1]) 1054 | For $j = 0 To 7 Step 1 1055 | For $i = 0 To 7 Step 1 1056 | ; Region of the current inventory slot 1057 | $Left = $InvA[0] + $Slot[0] * $i 1058 | $Top = $InvA[1] + $Slot[1] * $j 1059 | $Right = $InvA[0] + $Slot[0] * $i + $Slot[0] 1060 | $Bottom = $InvA[1] + $Slot[1] * $j + $Slot[1] 1061 | 1062 | $IS = _ImageSearchArea($Clock, 1, $Left, $Top, $Right, $Bottom, $C[0], $C[1], 13, "0x00ff00") ; Check for the white clock 1063 | If $IS = False Then $IS = _ImageSearchArea($ClockRed, 1, $Left, $Top, $Right, $Bottom, $C[0], $C[1], 15, "0x00ff00") ; If no white clock present scan for the red clock 1064 | If $IS = True Then 1065 | For $r = 1 To UBound($Rarity) - 1 Step 1 1066 | $FF = FFColorCount($Rarity[$r], 18, True, $Left, $Top, $Left + 1, $Bottom, 1) 1067 | If $FF > 10 Then 1068 | 1069 | If $r <= $MaxRarity Then 1070 | SetGUIStatus(StringFormat("Dryable fish detected: %s%s%s, rarity: %s", $k, $j, $i, $r)) 1071 | Return $C 1072 | Else 1073 | SetGUIStatus(StringFormat("Dryable fish detected: %s%s%s, rarity: %s MaxRarity exceeded!", $k, $j, $i, $r)) 1074 | ExitLoop (2) 1075 | EndIf 1076 | EndIf 1077 | Next 1078 | SetGUIStatus(StringFormat("Dryable fish detected: %s%s%s, rarity: 0", $k, $j, $i)) 1079 | Return $C 1080 | EndIf 1081 | Next 1082 | Next 1083 | If $k < 2 Then ; Scrolling down inventory 1084 | MouseMove($IW[0], $IW[1]) 1085 | Sleep(50) 1086 | For $mw = 0 To 7 1087 | MouseWheel("down") 1088 | Sleep(50) 1089 | Next 1090 | EndIf 1091 | Sleep(150) 1092 | Next 1093 | Return False 1094 | EndFunc ;==>CheckInventoryForFishBySlot 1095 | 1096 | Func ProductionActivityCheckLoop() ; Adpated 1097 | Local Const $Processing_Hammer = "res/processing_hammer.png" 1098 | Local $IS, $x, $y 1099 | 1100 | SetGUIStatus("Drying started. Waiting for Production end.") 1101 | Sleep(1000) 1102 | $IS = _ImageSearchArea($Processing_Hammer, 1, $Res[0], $Res[1], $Res[2], $Res[3], $x, $y, 50, 0) 1103 | If $IS = True Then Return False 1104 | Local $counter = 0 1105 | While $Fish 1106 | $IS = _ImageSearchArea($Processing_Hammer, 1, $Res[0], $Res[1], $Res[2], $Res[3], $x, $y, 50, 0) 1107 | If $IS = True Then Return True 1108 | Sleep(1000) 1109 | $counter += 1 1110 | If $counter = 20 Then 1111 | CoSe("l") ; reopen in case of interupt 1112 | ElseIf $counter >= 22 Then 1113 | CoSe("l") ; reopen in case of interupt 1114 | $counter = 0 1115 | EndIf 1116 | AntiScreenSaverMouseWiggle(2) 1117 | WEnd 1118 | Return False 1119 | EndFunc ;==>ProductionActivityCheckLoop 1120 | 1121 | Func UnequipWeaponSlot() 1122 | Local $equip = "res/fishing/equip_" & $LNG & ".png" 1123 | Local $WeaponOffSet[2] = [-63, 329] 1124 | Local $x, $y, $IS = False 1125 | 1126 | Local $InvA = OCInventory(True) 1127 | If IsArray($InvA) = False Then Return False 1128 | 1129 | $IS = _ImageSearchArea($equip, 1, $Res[0], $Res[1], $Res[2], $Res[3], $x, $y, 20, "White") 1130 | If $IS = True Then 1131 | SetGUIStatus("Equipment found") 1132 | VMouse($x + $WeaponOffSet[0], $y + $WeaponOffSet[1], 2, "Right") 1133 | Return True 1134 | ElseIf $IS = False Then 1135 | SetGUIStatus("Equipment missing.") 1136 | OCInventory(False) 1137 | Return False 1138 | EndIf 1139 | EndFunc ;==>UnequipWeaponSlot 1140 | 1141 | Func DryFish($DryFishEnable, $DryFishMaxRarity = 3, $DryFishCD = 5) 1142 | If $DryFishEnable = False Then Return False 1143 | Local Static $DryingCooldownTimer = TimerInit() 1144 | 1145 | If $DryFishCD = 0 Then $DryingCooldownTimer = 0 1146 | $Fish = True 1147 | 1148 | If TimerDiff($DryingCooldownTimer) / 1000 / 60 < $DryFishCD Then 1149 | SetGUIStatus("Drying Cooldown (" & $DryFishCD & "m): " & Round($DryFishCD - TimerDiff($DryingCooldownTimer) / 1000 / 60, 1) & "m left.") 1150 | Return False 1151 | Else 1152 | SetGUIStatus(StringFormat("Dry Fish initiated [%.1fm CD]", $DryFishCD)) 1153 | EndIf 1154 | If CheckWeather() = False Then 1155 | SetGUIStatus("Unsuitable weather for drying.") 1156 | Return False 1157 | EndIf 1158 | If UnequipWeaponSlot() = False Then 1159 | SetGUIStatus("Unable to unequip weapon.") 1160 | Return False 1161 | EndIf 1162 | $DryingCooldownTimer = TimerInit() 1163 | SetGUIStatus("Drying requirements met. Starting proces.") 1164 | While $Fish 1165 | If CheckWeather() = False Then 1166 | SetGUIStatus("Unsuitable weather for drying.") 1167 | Return True 1168 | EndIf 1169 | Local $ProductionAnchor = SelectProductionMethod("Drying") 1170 | If Not IsArray($ProductionAnchor) Then 1171 | SetGUIStatus("Could not open Production window.") 1172 | Return True 1173 | EndIf 1174 | Local $DryableFishC = CheckInventoryForFishBySlot($DryFishMaxRarity) 1175 | If Not IsArray($DryableFishC) Then 1176 | SetGUIStatus("No dryable fish found.") 1177 | $DryingCooldownTimer = TimerInit() 1178 | Return True 1179 | EndIf 1180 | If StartProduction($ProductionAnchor, $DryableFishC) = True Then 1181 | SetGUIStatus("Drying successful.") 1182 | ContinueLoop 1183 | Else 1184 | SetGUIStatus("Drying failed.") 1185 | $DryingCooldownTimer = TimerInit() 1186 | Return True 1187 | EndIf 1188 | WEnd 1189 | EndFunc ;==>DryFish 1190 | 1191 | 1192 | ; # Side 1193 | Func WorkerFeed($WorkerEnable, $WorkerCD) 1194 | If $WorkerEnable = False Then Return False 1195 | 1196 | Local Static $WorkerFeedTimer = TimerInit() 1197 | If $WorkerCD = 0 Then $WorkerFeedTimer = 0 1198 | 1199 | Local $TimerDiff = TimerDiff($WorkerFeedTimer) 1200 | $WorkerCD *= 60000 1201 | 1202 | If $TimerDiff > $WorkerCD Then 1203 | Local Const $WorkerIcon = "res/esc_worker.png" 1204 | Local Const $WorkerStamina = "res/worker_staminabar.png" 1205 | Local Const $WorkerOffsets[4][2] = [ _ 1206 | [-33, 464], _ ; Recover All 1207 | [-302, 9], _ ; Select food 1208 | [-249, 145], _ ; Confirm 1209 | [48, 463]] ; Repeat All 1210 | Local $x, $y, $IS 1211 | SetGUIStatus(StringFormat("Feeding Worker [%.1fm CD]", $WorkerCD / 60000)) 1212 | WaitForMenu(True) 1213 | $IS = _ImageSearchArea($WorkerIcon, 1, $Res[0], $Res[1], $Res[2], $Res[3], $x, $y, 10, 0) 1214 | If $IS = True Then 1215 | VMouse($x, $y, 1, "left") 1216 | Sleep(1500) 1217 | $IS = _ImageSearchArea($WorkerStamina, 0, $Res[0], $Res[1], $Res[2], $Res[3], $x, $y, 10, 0) 1218 | If $IS = True Then 1219 | VMouse($x + $WorkerOffsets[0][0], $y + $WorkerOffsets[0][1], 1, "left") ; Recover All 1220 | VMouse($x + $WorkerOffsets[0][0], $y + $WorkerOffsets[0][1] + 10, 1, "left") ; Recover All DIFFERENT LANGUAGES FIX 1221 | VMouse($x + $WorkerOffsets[1][0], $y + $WorkerOffsets[1][1], 1, "left") ; Select food 1222 | Sleep(100) 1223 | VMouse($x + $WorkerOffsets[2][0], $y + $WorkerOffsets[2][1], 1, "left") ; Confirm 1224 | Sleep(1000) 1225 | VMouse($x + $WorkerOffsets[3][0], $y + $WorkerOffsets[3][1], 1, "left") ; Repeat All 1226 | VMouse($x + $WorkerOffsets[3][0], $y + $WorkerOffsets[3][1] + 10, 1, "left") ; Repeat All DIFFERENT LANGUAGES FIX 1227 | CoSe("{ESC}") ; Close Worker List 1228 | $WorkerFeedTimer = TimerInit() 1229 | Return True 1230 | Else 1231 | SetGUIStatus("WorkerStamina missing") 1232 | Return False 1233 | EndIf 1234 | Else 1235 | SetGUIStatus("WorkerIcon missing") 1236 | EndIf 1237 | 1238 | Else 1239 | SetGUIStatus("WorkerFeed Cooldown(" & $WorkerCD / 60000 & "m): " & Round(($WorkerCD - $TimerDiff) / 60000, 1) & "m left.") 1240 | Return False 1241 | EndIf 1242 | EndFunc ;==>WorkerFeed 1243 | 1244 | Func Buff($BuffEnable, $BuffCD, ByRef $Keybinds) 1245 | If $BuffEnable = False Then Return False 1246 | 1247 | Local Static $BuffTimer = TimerInit() 1248 | If $BuffCD = 0 Then $BuffTimer = 0 1249 | $BuffCD *= 60000 1250 | Local $TimerDiff = TimerDiff($BuffTimer) 1251 | 1252 | Local $sKeys = "" 1253 | For $vElement In $Keybinds 1254 | $sKeys &= "[" & $vElement & "]" 1255 | Next 1256 | 1257 | If $TimerDiff > $BuffCD Then 1258 | SetGUIStatus(StringFormat("Using Buff Keybinds [%.1fm CD] Keys:%s", $BuffCD / 60000, $sKeys)) 1259 | 1260 | For $vElement In $Keybinds 1261 | CoSe($vElement) 1262 | Sleep(100) 1263 | Next 1264 | $BuffTimer = TimerInit() 1265 | Return True 1266 | Else 1267 | SetGUIStatus("Buff Cooldown(" & $BuffCD / 60000 & "m): " & Round(($BuffCD - $TimerDiff) / 60000, 1) & "m left. Keys:" & $sKeys) 1268 | Return False 1269 | EndIf 1270 | EndFunc ;==>Buff 1271 | 1272 | Func LoopSideFunctions() 1273 | ; TODO Load Settings 1274 | $Fish = True 1275 | While $Fish 1276 | Sleep(10000) 1277 | Buff($BuffEnable, $BuffCD, $BuffKeybinds) 1278 | WorkerFeed($WorkerEnable, $WorkerCD) 1279 | AntiScreenSaverMouseWiggle() 1280 | WEnd 1281 | EndFunc 1282 | 1283 | 1284 | 1285 | ; # Main 1286 | Func Main_Fishing() 1287 | $Fish = Not $Fish 1288 | If $Fish = False Then 1289 | SetGUIStatus("Stopping Main_Fishing") 1290 | Return False 1291 | EndIf 1292 | 1293 | ; InventorySettings 1294 | $Enable_DiscardRods = IniReadKey("Enable_DiscardRods", $InventorySettings) 1295 | $BufferSize = IniReadKey("BufferSize", $InventorySettings) 1296 | 1297 | ; WorkerSettings 1298 | Dim $WorkerEnable = Int(IniReadKey("Enable_FeedWorker", $WorkerSettings)) 1299 | Dim $WorkerCD = IniReadKey("FeedWorkerInterval", $WorkerSettings) 1300 | 1301 | ; BuffSettings 1302 | Dim $BuffEnable = Int(IniReadKey("Enable_Buff", $BuffSettings)) 1303 | Dim $BuffCD = IniReadKey("BuffInterval", $BuffSettings) 1304 | Dim $BuffKeybinds = StringSplit(StringStripWS(IniReadKey("BuffKeys", $BuffSettings),8), ",", 2) 1305 | 1306 | ; DryingSettings 1307 | Dim $DryFishEnable = Int(IniReadKey("Enable_Drying", $DryingSettings)) 1308 | Dim $DryFishMaxRarity = IniReadKey("MaxRarity", $DryingSettings) 1309 | Dim $DryFishCD = IniReadKey("DryingInterval", $DryingSettings) 1310 | 1311 | $Res = DetectFullscreenToWindowedOffset($hTitle) 1312 | 1313 | Local $Breaktimer = 0 1314 | Local $fishingtimer = 0, $fishingtime 1315 | Local $failedcasts = 0 1316 | Local $RelicReserve = 0 ; TODO implement or remove 1317 | 1318 | Local $avaibleslots = 16 1319 | Local $freedetectedslots = "NotYetDetected" 1320 | 1321 | While $Fish 1322 | GUILoopSwitch() 1323 | Switch GetState() 1324 | Case "FishingBite" ; You feel a bite. Press 'Space' bar to start. 1325 | $Breaktimer = 0 1326 | SetGUIStatus("FishingBite detected. Calling ReelIn.") 1327 | If ReelIn() = True Then 1328 | SetGUIStatus("ReelIn successful. Calling Riddler.") 1329 | Riddler() 1330 | SetGUIStatus("Evaluating loot.") 1331 | 1332 | $avaibleslots -= HandleLoot($LootSettings, $RelicReserve) 1333 | 1334 | Else 1335 | SetGUIStatus("ReelIn failed. Trying to close obstruction.") 1336 | WaitForMenu(False) 1337 | EndIf 1338 | 1339 | ; Inventory Managmenet 1340 | SetGUIStatus(StringFormat("FreeDetectedSlots: %s, AvaibleSlots: %s", $freedetectedslots, $avaibleslots)) 1341 | If $avaibleslots <= 0 Then 1342 | SetGUIStatus("Inventory full! Stopping!") 1343 | $Fish = False 1344 | EndIf 1345 | 1346 | Case "FishingCurrently" ; You are currently fishing. Please wait until you feel a bite. 1347 | $Breaktimer = 0 1348 | AntiScreenSaverMouseWiggle() 1349 | If $fishingtimer <> 0 Then 1350 | $fishingtime = Round(TimerDiff($fishingtimer) / 1000, 0) 1351 | If Mod($fishingtime, 10) = 0 Then SetGUIStatus("Currently fishing. (" & $fishingtime & "s)") 1352 | 1353 | Else 1354 | SetGUIStatus("Currently fishing.") 1355 | EndIf 1356 | 1357 | Case "FishingStandby" ; Press 'Space' near a body of water to start fishing. 1358 | $Breaktimer = 0 1359 | SetGUIStatus("FishingStandby detected.") 1360 | WorkerFeed($WorkerEnable, $WorkerCD) 1361 | Buff($BuffEnable, $BuffCD, $BuffKeybinds) 1362 | If DryFish($DryFishEnable, $DryFishMaxRarity, $DryFishCD) = True Then ; TODO DRY FISH SETTING 1363 | $freedetectedslots = DetectFreeInventory() 1364 | $avaibleslots = $freedetectedslots - $BufferSize 1365 | SwapFishingrod($Enable_DiscardRods) 1366 | EndIf 1367 | 1368 | If $freedetectedslots = "NotYetDetected" Then 1369 | $freedetectedslots = DetectFreeInventory() 1370 | $avaibleslots = $freedetectedslots - $BufferSize 1371 | EndIf 1372 | 1373 | If Cast() = False Then 1374 | $failedcasts += 1 1375 | SetGUIStatus("Casting fishingrod failed.") 1376 | 1377 | If InspectFishingrod() = True Then 1378 | SetGUIStatus("Broken Fishingrod in Weaponslot detected.") 1379 | If SwapFishingrod($Enable_DiscardRods) = True Then 1380 | SetGUIStatus("SwapFishingrod successful.") 1381 | Else 1382 | SetGUIStatus("SwapFishingrod failed. Stopping") 1383 | $Fish = False 1384 | ContinueLoop 1385 | EndIf 1386 | Else 1387 | SetGUIStatus("No broken Fishingrod equipped. Maybe turn around?") 1388 | TurnAround() 1389 | EndIf 1390 | 1391 | Else 1392 | $failedcasts = 0 1393 | SetGUIStatus("Casting fishingrod successful.") 1394 | EndIf 1395 | 1396 | $fishingtimer = TimerInit() 1397 | Case Else ; If no state is detected 1398 | If $Breaktimer = 0 Then 1399 | $Breaktimer = TimerInit() 1400 | SetGUIStatus("Unidentified state") 1401 | ElseIf TimerDiff($Breaktimer) / 1000 > 10 Then 1402 | SetGUIStatus("Trying to resolve unidentified state") 1403 | If WaitForMenu(False) = True Then 1404 | SetGUIStatus("Escape to Menu possible.") 1405 | Else 1406 | SetGUIStatus("Escape to Menu failed") 1407 | ; TODO 1408 | EndIf 1409 | 1410 | If IsProcessConnected("BlackDesert64.exe") = 1 Then 1411 | SetGUIStatus("BlackDesert64.exe is connected") 1412 | Else 1413 | SetGUIStatus("BlackDesert64.exe is DISCONNECTED") 1414 | ; TODO DC HANDLING 1415 | EndIf 1416 | 1417 | If SwapFishingrod($Enable_DiscardRods) = True Then 1418 | SetGUIStatus("SwapFishingrod successful.") 1419 | Else 1420 | SetGUIStatus("SwapFishingrod failed. Stopping") 1421 | $Fish = False 1422 | EndIf 1423 | $Breaktimer = TimerInit() 1424 | Else 1425 | SetGUIStatus("Unidentified state (" & Round(TimerDiff($Breaktimer) / 1000, 0) & "s)") 1426 | EndIf 1427 | EndSwitch 1428 | Sleep(100) 1429 | If $Fish = False Then 1430 | SetGUIStatus("Fishing stopped.") 1431 | $fishingtimer = 0 1432 | EndIf 1433 | WEnd 1434 | 1435 | EndFunc ;==>Main_Fishing 1436 | 1437 | Func Main() 1438 | ObfuscateTitle($Form1_1) 1439 | CreateConfig() 1440 | ResetSession() 1441 | InitGUI() 1442 | While True 1443 | GUILoopSwitch() 1444 | WEnd 1445 | EndFunc ;==>Main 1446 | 1447 | 1448 | 1449 | Main() 1450 | -------------------------------------------------------------------------------- /FastFind.au3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrayonCodeGit/CrayonCode-BDO-Project/d4b86a04a598b5167beb6951fbfe895882c20cb2/FastFind.au3 -------------------------------------------------------------------------------- /FastFind.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrayonCodeGit/CrayonCode-BDO-Project/d4b86a04a598b5167beb6951fbfe895882c20cb2/FastFind.dll -------------------------------------------------------------------------------- /FastFind64.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrayonCodeGit/CrayonCode-BDO-Project/d4b86a04a598b5167beb6951fbfe895882c20cb2/FastFind64.dll -------------------------------------------------------------------------------- /GUI.au3: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #Region ### START Koda GUI section ### Form=c:\program files (x86)\autoit3\scite\koda\forms\fish2.kxf 10 | $Form1_1 = GUICreate("CrayonCode Fishing", 615, 437, 231, 124) 11 | $Tab1 = GUICtrlCreateTab(0, 0, 614, 400) 12 | $Tab_StatusLog = GUICtrlCreateTabItem("Status Log") 13 | $ELog = GUICtrlCreateEdit("", 8, 32, 593, 361, BitOR($GUI_SS_DEFAULT_EDIT,$ES_READONLY)) 14 | GUICtrlSetFont(-1, 8, 400, 0, "Fixedsys") 15 | $Tab_Settings = GUICtrlCreateTabItem("Global Settings") 16 | GUICtrlSetState(-1,$GUI_SHOW) 17 | $Loot_Settings = GUICtrlCreateGroup("Loot Settings", 13, 37, 121, 169) 18 | $LRarity = GUICtrlCreateLabel("Minimum Rarity:", 25, 60, 78, 17) 19 | $CRarity = GUICtrlCreateCombo("", 33, 84, 82, 25, BitOR($CBS_DROPDOWNLIST,$CBS_AUTOHSCROLL)) 20 | GUICtrlSetData(-1, "Gold|Blue|Green|White|Specials Only", "Blue") 21 | GUICtrlSetTip(-1, "Pick up items that are equal or higher Rarity.") 22 | $CBSpecial1 = GUICtrlCreateCheckbox("Loot Silver Key", 25, 164, 97, 17) 23 | GUICtrlSetState(-1, $GUI_CHECKED) 24 | GUICtrlSetTip(-1, "Pick up Silverkey. (Ignores Minimum Rarity)") 25 | $CBSpecial2 = GUICtrlCreateCheckbox("Loot Ancient Relic", 25, 132, 105, 17) 26 | GUICtrlSetState(-1, $GUI_CHECKED) 27 | GUICtrlSetTip(-1, "Pick up Ancient Relics. (Ignores Minimum Rarity)") 28 | $CBSpecial3 = GUICtrlCreateCheckbox("Loot Coelacanth", 25, 148, 97, 17) 29 | GUICtrlSetState(-1, $GUI_CHECKED) 30 | GUICtrlSetTip(-1, "Pick up Coealacanth. (Ignores Minimum Rarity)") 31 | $CBEvent = GUICtrlCreateCheckbox("Loot Event items", 25, 117, 97, 17) 32 | GUICtrlSetState(-1, $GUI_CHECKED) 33 | GUICtrlSetTip(-1, "Pick up event items. (Ignores Minimum Rarity) [You can add new even items by putting a cropped .bmp or .png to res/event]") 34 | $CBTrash = GUICtrlCreateCheckbox("Loot Trash", 25, 181, 97, 17) 35 | GUICtrlSetTip(-1, "Do you want to pick up trash? Are you sure? (Will loot white rarity items with quantity)") 36 | GUICtrlCreateGroup("", -99, -99, 1, 1) 37 | $Side_Functions = GUICtrlCreateGroup("Side Functions", 8, 213, 601, 89) 38 | $CBFeedWorker = GUICtrlCreateCheckbox("Enable Feed Worker", 20, 245, 121, 17) 39 | GUICtrlSetTip(-1, "Will feed workers every 90 minutes. Make sure to have beer in the inventory.") 40 | $IFeedWorkerInterval = GUICtrlCreateInput("30", 226, 243, 41, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_NUMBER)) 41 | GUICtrlSetLimit(-1, 3) 42 | GUICtrlSetTip(-1, "Interval in minutes.") 43 | $Label1 = GUICtrlCreateLabel("Interval:", 174, 247, 42, 17) 44 | $BFeedWorker = GUICtrlCreateButton("Test", 280, 243, 50, 21) 45 | $CBBuff = GUICtrlCreateCheckbox("Enable BuffKeys", 21, 272, 121, 17) 46 | $Label2 = GUICtrlCreateLabel("Interval:", 173, 275, 42, 17) 47 | $IBuffInterval = GUICtrlCreateInput("30", 225, 272, 41, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_NUMBER)) 48 | GUICtrlSetLimit(-1, 3) 49 | GUICtrlSetTip(-1, "Interval in minutes.") 50 | $IBuffKeys = GUICtrlCreateInput("", 328, 272, 121, 21) 51 | $Label3 = GUICtrlCreateLabel("Keys:", 288, 275, 30, 17) 52 | $BBuffKeys = GUICtrlCreateButton("Test", 472, 272, 50, 21) 53 | $BLoopSide = GUICtrlCreateButton("Loop Sidefunctions only", 464, 233, 132, 33) 54 | GUICtrlCreateGroup("", -99, -99, 1, 1) 55 | $Client_Settings = GUICtrlCreateGroup("Client Settings", 144, 37, 457, 169) 56 | $IClientName = GUICtrlCreateInput("", 256, 61, 153, 21) 57 | $Label4 = GUICtrlCreateLabel("Client Name:", 160, 64, 64, 17) 58 | $Label5 = GUICtrlCreateLabel("Client Language:", 160, 96, 84, 17) 59 | $CLang = GUICtrlCreateCombo("", 260, 92, 82, 25, BitOR($CBS_DROPDOWNLIST,$CBS_AUTOHSCROLL)) 60 | GUICtrlSetData(-1, "en|de|fr", "en") 61 | GUICtrlSetTip(-1, "Pick up items that are equal or higher Rarity.") 62 | $CBLogFile = GUICtrlCreateCheckbox("Enable Logfile", 160, 128, 97, 17) 63 | $CBLootCapture = GUICtrlCreateCheckbox("Enable Screencap Loot", 160, 152, 209, 17) 64 | GUICtrlCreateGroup("", -99, -99, 1, 1) 65 | $Drying_Settings = GUICtrlCreateGroup("Drying Settings", 8, 304, 337, 89) 66 | $CBDryFish = GUICtrlCreateCheckbox("Enable Drying Fish", 19, 329, 121, 17) 67 | GUICtrlSetTip(-1, "Will dry fish when inventory is almost full. Empty Slots will be automatically evaluated after.") 68 | $LDryingRarity = GUICtrlCreateLabel("Max Rarity:", 141, 331, 57, 17) 69 | $CDryFish = GUICtrlCreateCombo("", 201, 327, 82, 25, BitOR($CBS_DROPDOWNLIST,$CBS_AUTOHSCROLL)) 70 | GUICtrlSetData(-1, "White|Green|Blue|Gold", "White") 71 | GUICtrlSetTip(-1, "Maxmum rarity to use for drying.") 72 | $BDryFish = GUICtrlCreateButton("Test", 287, 327, 50, 21) 73 | $IDryFishInterval = GUICtrlCreateInput("5", 87, 351, 41, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_NUMBER)) 74 | GUICtrlSetLimit(-1, 3) 75 | GUICtrlSetTip(-1, "Interval in minutes.") 76 | $Label6 = GUICtrlCreateLabel("Interval:", 35, 354, 42, 17) 77 | GUICtrlCreateGroup("", -99, -99, 1, 1) 78 | $Inventory_Settings = GUICtrlCreateGroup("Inventory_Settings", 352, 304, 257, 89) 79 | $CBDiscardRods = GUICtrlCreateCheckbox("Enable Discard Rods", 368, 328, 121, 17) 80 | GUICtrlSetTip(-1, "Discards disposable fishingrods. (Those that can't be repaired)") 81 | $IBufferSize = GUICtrlCreateInput("0", 440, 356, 65, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_NUMBER)) 82 | $Label7 = GUICtrlCreateLabel("Buffer Size:", 368, 360, 58, 17) 83 | GUICtrlCreateGroup("", -99, -99, 1, 1) 84 | $TabSheet1 = GUICtrlCreateTabItem("Tab_Stats") 85 | $ListView1 = GUICtrlCreateListView("|Session|Total|", 24, 40, 570, 342) 86 | GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 0, 100) 87 | GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 1, 100) 88 | GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 2, 100) 89 | GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 3, 100) 90 | GUICtrlCreateTabItem("") 91 | $BSave = GUICtrlCreateButton("Save Settings", 8, 400, 100, 33) 92 | $BFish = GUICtrlCreateButton("Start Fishing [F4]", 256, 400, 100, 33) 93 | $BMinigame = GUICtrlCreateButton("Solve Minigame [F5]", 128, 400, 100, 33) 94 | $BQuit = GUICtrlCreateButton("Quit [CTRL+F1]", 504, 400, 100, 33) 95 | $BPause = GUICtrlCreateButton("Un/Pause [F3]", 384, 400, 100, 33) 96 | GUISetState(@SW_SHOW) 97 | #EndRegion ### END Koda GUI section ### -------------------------------------------------------------------------------- /ImageSearch.au3: -------------------------------------------------------------------------------- 1 | Local $h_ImageSearchDLL = -1 2 | 3 | Func cr($text = "", $addCR = 1, $printTime = False) ;Print to console 4 | Static $sToolTip 5 | If Not @Compiled Then 6 | If $printTime Then ConsoleWrite(@HOUR & ":" & @MIN & ":" & @SEC & ":" & @MSEC & " ") 7 | ConsoleWrite($text) 8 | If $addCR >= 1 Then ConsoleWrite(@CR) 9 | If $addCR = 2 Then ConsoleWrite(@CR) 10 | Else 11 | If $printTime Then $sToolTip &= @HOUR & ":" & @MIN & ":" & @SEC & ":" & @MSEC & " " 12 | $sToolTip &= $text 13 | If $addCR >= 1 Then $sToolTip &= @CR 14 | If $addCR = 2 Then $sToolTip &= @CR 15 | ;~ ToolTip($sToolTip) 16 | EndIf 17 | Return $text 18 | EndFunc ;==>cr 19 | 20 | Func _ImageSearchStartup() 21 | ;~ _WinAPI_Wow64EnableWow64FsRedirection(True) 22 | $sOSArch = @OSArch ;Check if running on x64 or x32 Windows ;@OSArch Returns one of the following: "X86", "IA64", "X64" - this is the architecture type of the currently running operating system. 23 | $sAutoItX64 = @AutoItX64 ;Check if using x64 AutoIt ;@AutoItX64 Returns 1 if the script is running under the native x64 version of AutoIt. 24 | If $sOSArch = "X86" Or $sAutoItX64 = 0 Then 25 | cr("+>" & "@OSArch=" & $sOSArch & @TAB & "@AutoItX64=" & $sAutoItX64 & @TAB & "therefore using x32 ImageSearch DLL") 26 | ;~ TrayTip("","@OSArch=" & $sOSArch & @TAB & "@AutoItX64=" & $sAutoItX64 & @TAB & "ImageSearchDLLx32.dll", 5) 27 | $h_ImageSearchDLL = DllOpen("ImageSearchDLLx32.dll") 28 | If $h_ImageSearchDLL = -1 Then Return "DllOpen failure" 29 | ElseIf $sOSArch = "X64" And $sAutoItX64 = 1 Then 30 | cr("+>" & "@OSArch=" & $sOSArch & @TAB & "@AutoItX64=" & $sAutoItX64 & @TAB & "therefore using x64 ImageSearch DLL") 31 | ;~ TrayTip("","@OSArch=" & $sOSArch & @TAB & "@AutoItX64=" & $sAutoItX64 & @TAB & "ImageSearchDLLx64.dll", 5) 32 | $h_ImageSearchDLL = DllOpen("ImageSearchDLLx64.dll") 33 | If $h_ImageSearchDLL = -1 Then Return "DllOpen failure" 34 | Else 35 | Return "Inconsistent or incompatible Script/Windows/CPU Architecture" 36 | EndIf 37 | Return True 38 | EndFunc ;==>_ImageSearchStartup 39 | 40 | Func _ImageSearchShutdown() 41 | DllClose($h_ImageSearchDLL) 42 | cr(">" & "_ImageSearchShutdown() completed") 43 | Return True 44 | EndFunc ;==>_ImageSearchShutdown 45 | 46 | ; ------------------------------------------------------------------------------ 47 | ; 48 | ; AutoIt Version: 3.0 49 | ; Language: English 50 | ; Description: Functions that assist with Image Search 51 | ; Require that the ImageSearchDLL.dll be loadable 52 | ; 53 | ; ------------------------------------------------------------------------------ 54 | ;=============================================================================== 55 | ; 56 | ; Description: Find the position of an image on the desktop 57 | ; Syntax: _ImageSearchArea, _ImageSearch 58 | ; Parameter(s): 59 | ; $findImage - the image to locate on the desktop 60 | ; $tolerance - 0 for no tolerance (0-255). Needed when colors of 61 | ; image differ from desktop. e.g GIF 62 | ; $resultPosition - Set where the returned x,y location of the image is. 63 | ; 1 for centre of image, 0 for top left of image 64 | ; $x $y - Return the x and y location of the image 65 | ; $transparency - TRANSBLACK, TRANSWHITE or hex value (e.g. 0xffffff) of 66 | ; the color to be used as transparency; can be omitted if 67 | ; not needed 68 | ; 69 | ; Return Value(s): On Success - Returns True 70 | ; On Failure - Returns False 71 | ; 72 | ; Note: Use _ImageSearch to search the entire desktop, _ImageSearchArea to specify 73 | ; a desktop region to search 74 | ; 75 | ;=============================================================================== 76 | Func _ImageSearch($findImage, $resultPosition, ByRef $x, ByRef $y, $tolerance, $transparency = 0) 77 | Return _ImageSearchArea($findImage, $resultPosition, 0, 0, @DesktopWidth, @DesktopHeight, $x, $y, $tolerance, $transparency) 78 | EndFunc ;==>_ImageSearch 79 | 80 | Func _ImageSearchArea($findImage, $resultPosition, $x1, $y1, $right, $bottom, ByRef $x, ByRef $y, $tolerance = 0, $transparency = 0);Credits to Sven for the Transparency addition 81 | If Not FileExists($findImage) Then 82 | ConsoleWriteError(@CRLF & "!Image File not found") 83 | SetError(1, 1, "Image File not found") 84 | Return False 85 | EndIf 86 | If $tolerance < 0 Or $tolerance > 255 Then $tolerance = 0 87 | If $h_ImageSearchDLL = -1 Then _ImageSearchStartup() 88 | 89 | If $transparency <> "" Then $findImage = "*Trans" & $transparency & " " & $findImage 90 | If $tolerance > 0 Then $findImage = "*" & $tolerance & " " & $findImage 91 | $result = DllCall($h_ImageSearchDLL, "str", "ImageSearch", "int", $x1, "int", $y1, "int", $right, "int", $bottom, "str", $findImage) 92 | If @error Then 93 | ConsoleWriteError(@CRLF & "!Image File not found") 94 | SetError(1, 1, "DllCall Error=" & @error) 95 | Return False 96 | EndIf 97 | If $result = "0" Or Not IsArray($result) Or $result[0] = "0" Then Return False 98 | 99 | $array = StringSplit($result[0], "|") 100 | If (UBound($array) >= 4) Then 101 | $x = Int(Number($array[2])); Get the x,y location of the match 102 | $y = Int(Number($array[3])) 103 | If $resultPosition = 1 Then 104 | $x = $x + Int(Number($array[4]) / 2); Account for the size of the image to compute the centre of search 105 | $y = $y + Int(Number($array[5]) / 2) 106 | EndIf 107 | Return True 108 | EndIf 109 | EndFunc ;==>_ImageSearchArea 110 | 111 | ;=============================================================================== 112 | ; 113 | ; Description: Wait for a specified number of seconds for an image to appear 114 | ; 115 | ; Syntax: _WaitForImageSearch, _WaitForImagesSearch 116 | ; Parameter(s): 117 | ; $waitSecs - seconds to try and find the image 118 | ; $findImage - the image to locate on the desktop 119 | ; $tolerance - 0 for no tolerance (0-255). Needed when colors of 120 | ; image differ from desktop. e.g GIF 121 | ; $resultPosition - Set where the returned x,y location of the image is. 122 | ; 1 for centre of image, 0 for top left of image 123 | ; $x $y - Return the x and y location of the image 124 | ; $transparency - TRANSBLACK, TRANSWHITE or hex value (e.g. 0xffffff) of 125 | ; the color to be used as transparency can be omitted if 126 | ; not needed 127 | ; 128 | ; Return Value(s): On Success - Returns 1 129 | ; On Failure - Returns 0 130 | ; 131 | ; 132 | ;=============================================================================== 133 | Func _WaitForImageSearch($findImage, $waitSecs, $resultPosition, ByRef $x, ByRef $y, $tolerance, $transparency = 0) 134 | $waitSecs = $waitSecs * 1000 135 | $startTime = TimerInit() 136 | While TimerDiff($startTime) < $waitSecs 137 | Sleep(100) 138 | If _ImageSearch($findImage, $resultPosition, $x, $y, $tolerance, $transparency) Then 139 | Return True 140 | EndIf 141 | WEnd 142 | Return False 143 | EndFunc ;==>_WaitForImageSearch -------------------------------------------------------------------------------- /ImageSearchDLLx32.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrayonCodeGit/CrayonCode-BDO-Project/d4b86a04a598b5167beb6951fbfe895882c20cb2/ImageSearchDLLx32.dll -------------------------------------------------------------------------------- /ImageSearchDLLx64.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrayonCodeGit/CrayonCode-BDO-Project/d4b86a04a598b5167beb6951fbfe895882c20cb2/ImageSearchDLLx64.dll -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 CrayonCodeGit 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # CrayonCode-BDO-Project 2 | research project to learn autoit 3 | 4 | Run CrayoCode_Fishing.au3 to start the script. 5 | 6 | Requirements: 7 | 8 | BDO EU (or EN/DE/FR client language) 9 | Default BDO Font 10 | 100% UI Scale (UI Settings ingame) 11 | Works in Fullscreen and Windowed Mode (If the text is a little blurry in windowed just use fullscreen instead) 12 | BDO must be visible and active (Doesn't work minimized) 13 | 14 | 15 | Discussion and older versions with more features can be found at https://www.elitepvpers.com/forum/black-desert/4268940-autoit-crayoncode-bot-project-opensource-free.html -------------------------------------------------------------------------------- /Support.au3: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | Func cw($text) 4 | ConsoleWrite(@CRLF & $text) 5 | EndFunc ;==>cw 6 | 7 | Func CoSe($key, $raw = 0) 8 | Dim $hTitle 9 | $hwnd = WinActive($hTitle) 10 | If $hwnd = 0 Then $hwnd = WinActivate($hTitle) 11 | 12 | Local $Pos = WinGetPos($hwnd) 13 | If @error Then 14 | Local $Pos[4] = [0, 0, @DesktopWidth, @DesktopHeight] 15 | EndIf 16 | 17 | Opt("MouseCoordMode", 2) 18 | If MouseGetPos(0) < 0 Or MouseGetPos(0) > $Pos[2] Or MouseGetPos(1) < 0 Or MouseGetPos(1) > $Pos[3] Then MouseMove(100, 100, 0) 19 | Opt("MouseCoordMode", 1) 20 | 21 | ControlSend($hwnd, "", "", $key, $raw) 22 | EndFunc ;==>CoSe 23 | 24 | Func _terminate() 25 | Exit (0) 26 | EndFunc ;==>_terminate 27 | 28 | Func VisibleCursor() 29 | Local $cursor = _WinAPI_GetCursorInfo() 30 | Return ($cursor[1]) 31 | EndFunc ;==>VisibleCursor 32 | 33 | Func VMouse($x, $y, $clicks = 0, $button = "left", $speed = 10) 34 | If Not VisibleCursor() Then CoSe("{LCTRL}") 35 | If $clicks > 0 Then 36 | MouseClick($button, $x, $y, $clicks, $speed) 37 | Else 38 | MouseMove($x, $y, $speed) 39 | EndIf 40 | EndFunc ;==>VMouse 41 | 42 | Func ObfuscateTitle($Title, $length = 5) 43 | Local $newtitle = "" 44 | If $length > 0 Then 45 | For $i = 1 To $length 46 | Switch Random(1, 3, 1) 47 | Case 1 48 | $newtitle &= Chr(Random(65, 90, 1)) ; small letter 49 | Case 2 50 | $newtitle &= Chr(Random(97, 122, 1)) ; big letter 51 | Case 3 52 | $newtitle &= Random(0, 9, 1) ; number 53 | EndSwitch 54 | Next 55 | EndIf 56 | $newtitle &= @HOUR & @MIN & @SEC 57 | WinSetTitle($Title, "", $newtitle) 58 | Return $newtitle 59 | EndFunc ;==>ObfuscateTitle 60 | 61 | Func AntiScreenSaverMouseWiggle($minutes = 2) 62 | Local Static $ScreenSaver = TimerInit() 63 | $minutes *= 60000 64 | 65 | If TimerDiff($ScreenSaver) >= $minutes Then 66 | Local $MPos = MouseGetPos() 67 | MouseMove($MPos[0] + 10, $MPos[1]) 68 | MouseMove($MPos[0], $MPos[1]) 69 | $ScreenSaver = TimerInit() 70 | Return True 71 | EndIf 72 | 73 | Return False 74 | EndFunc 75 | 76 | Func IsProcessConnected($ProcessName) 77 | Local $PID = ProcessExists($ProcessName) 78 | If Not $PID Then Return -1 79 | Local $Pattern = "\s" & $PID & "\s" 80 | Local $iPID = Run(@ComSpec & " /c netstat -aon", @SystemDir, @SW_HIDE, 4 + 2) ; $STDERR_CHILD (0x4) + $STDOUT_CHILD (0x2) 81 | If Not $iPID Then Return -2 82 | Local $sOutput = "" 83 | 84 | While True 85 | $sOutput &= StdoutRead($iPID) 86 | If @error Then ; Exit the loop if the process closes or StdoutRead returns an error. 87 | ExitLoop 88 | EndIf 89 | WEnd 90 | 91 | Return (Int(StringRegExp($sOutput, $Pattern, 0))) ; Returns 1 if connceted, 0 if disconnected. 92 | EndFunc ;==>IsProcessConnected 93 | 94 | Func MouseFreeZone($left, $top, $right, $bottom, $x, $y) 95 | Local $MGS = MouseGetPos() 96 | If Not VisibleCursor() Then CoSe("{LCTRL}") 97 | If $MGS[0] >= $left And $MGS[0] <= $right And $MGS[1] >= $top And $MGS[1] <= $bottom Then MouseMove($x, $y) 98 | EndFunc ;==>MouseFreeZone 99 | 100 | Func IniReadKey($Key, ByRef $aSection) 101 | For $i = 1 To UBound($aSection) - 1 Step 1 102 | If $aSection[$i][0] = $Key Then Return ($aSection[$i][1]) 103 | Next 104 | Return ("KeyNotFound") 105 | EndFunc 106 | 107 | Func CBT($data) ; Transforms Checkbox values for ini 108 | Switch Int($data) 109 | Case 1 110 | Return 1 111 | Case 4 112 | Return 0 113 | Case 0 114 | Return 4 115 | EndSwitch 116 | EndFunc ;==>CBT 117 | 118 | Func LogData($text, $File = "LOGFILE.txt") 119 | Global $LogFile = "" 120 | If $LogFile = "" Then 121 | $LogFile = FileOpen($File, 9) 122 | OnAutoItExitRegister(CloseLog) 123 | EndIf 124 | FileWriteLine($LogFile, $text) 125 | EndFunc ;==>LogData 126 | 127 | Func CloseLog() 128 | If $LogFile <> "" Then 129 | FileClose($LogFile) 130 | EndIf 131 | EndFunc ;==>CloseLog -------------------------------------------------------------------------------- /msvcr110.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrayonCodeGit/CrayonCode-BDO-Project/d4b86a04a598b5167beb6951fbfe895882c20cb2/msvcr110.dll -------------------------------------------------------------------------------- /msvcr110d.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrayonCodeGit/CrayonCode-BDO-Project/d4b86a04a598b5167beb6951fbfe895882c20cb2/msvcr110d.dll -------------------------------------------------------------------------------- /res/esc_worker.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrayonCodeGit/CrayonCode-BDO-Project/d4b86a04a598b5167beb6951fbfe895882c20cb2/res/esc_worker.png -------------------------------------------------------------------------------- /res/fishing/bite_de.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrayonCodeGit/CrayonCode-BDO-Project/d4b86a04a598b5167beb6951fbfe895882c20cb2/res/fishing/bite_de.png -------------------------------------------------------------------------------- /res/fishing/bite_en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrayonCodeGit/CrayonCode-BDO-Project/d4b86a04a598b5167beb6951fbfe895882c20cb2/res/fishing/bite_en.png -------------------------------------------------------------------------------- /res/fishing/bite_fr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrayonCodeGit/CrayonCode-BDO-Project/d4b86a04a598b5167beb6951fbfe895882c20cb2/res/fishing/bite_fr.png -------------------------------------------------------------------------------- /res/fishing/currently_de.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrayonCodeGit/CrayonCode-BDO-Project/d4b86a04a598b5167beb6951fbfe895882c20cb2/res/fishing/currently_de.png -------------------------------------------------------------------------------- /res/fishing/currently_en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrayonCodeGit/CrayonCode-BDO-Project/d4b86a04a598b5167beb6951fbfe895882c20cb2/res/fishing/currently_en.png -------------------------------------------------------------------------------- /res/fishing/currently_fr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrayonCodeGit/CrayonCode-BDO-Project/d4b86a04a598b5167beb6951fbfe895882c20cb2/res/fishing/currently_fr.png -------------------------------------------------------------------------------- /res/fishing/drying_clock.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrayonCodeGit/CrayonCode-BDO-Project/d4b86a04a598b5167beb6951fbfe895882c20cb2/res/fishing/drying_clock.png -------------------------------------------------------------------------------- /res/fishing/drying_clock_red.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrayonCodeGit/CrayonCode-BDO-Project/d4b86a04a598b5167beb6951fbfe895882c20cb2/res/fishing/drying_clock_red.png -------------------------------------------------------------------------------- /res/fishing/drying_rain.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrayonCodeGit/CrayonCode-BDO-Project/d4b86a04a598b5167beb6951fbfe895882c20cb2/res/fishing/drying_rain.png -------------------------------------------------------------------------------- /res/fishing/drying_sunny.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrayonCodeGit/CrayonCode-BDO-Project/d4b86a04a598b5167beb6951fbfe895882c20cb2/res/fishing/drying_sunny.png -------------------------------------------------------------------------------- /res/fishing/enteramount.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrayonCodeGit/CrayonCode-BDO-Project/d4b86a04a598b5167beb6951fbfe895882c20cb2/res/fishing/enteramount.png -------------------------------------------------------------------------------- /res/fishing/equip_de.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrayonCodeGit/CrayonCode-BDO-Project/d4b86a04a598b5167beb6951fbfe895882c20cb2/res/fishing/equip_de.png -------------------------------------------------------------------------------- /res/fishing/equip_en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrayonCodeGit/CrayonCode-BDO-Project/d4b86a04a598b5167beb6951fbfe895882c20cb2/res/fishing/equip_en.png -------------------------------------------------------------------------------- /res/fishing/equip_fr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrayonCodeGit/CrayonCode-BDO-Project/d4b86a04a598b5167beb6951fbfe895882c20cb2/res/fishing/equip_fr.png -------------------------------------------------------------------------------- /res/fishing/event/easter_life.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrayonCodeGit/CrayonCode-BDO-Project/d4b86a04a598b5167beb6951fbfe895882c20cb2/res/fishing/event/easter_life.png -------------------------------------------------------------------------------- /res/fishing/event/easter_rainbow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrayonCodeGit/CrayonCode-BDO-Project/d4b86a04a598b5167beb6951fbfe895882c20cb2/res/fishing/event/easter_rainbow.png -------------------------------------------------------------------------------- /res/fishing/event/easter_raindrop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrayonCodeGit/CrayonCode-BDO-Project/d4b86a04a598b5167beb6951fbfe895882c20cb2/res/fishing/event/easter_raindrop.png -------------------------------------------------------------------------------- /res/fishing/event/easter_starpattern.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrayonCodeGit/CrayonCode-BDO-Project/d4b86a04a598b5167beb6951fbfe895882c20cb2/res/fishing/event/easter_starpattern.png -------------------------------------------------------------------------------- /res/fishing/event/golden_coelacanth.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrayonCodeGit/CrayonCode-BDO-Project/d4b86a04a598b5167beb6951fbfe895882c20cb2/res/fishing/event/golden_coelacanth.png -------------------------------------------------------------------------------- /res/fishing/event/striker_seal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrayonCodeGit/CrayonCode-BDO-Project/d4b86a04a598b5167beb6951fbfe895882c20cb2/res/fishing/event/striker_seal.png -------------------------------------------------------------------------------- /res/fishing/loot_ancientrelic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrayonCodeGit/CrayonCode-BDO-Project/d4b86a04a598b5167beb6951fbfe895882c20cb2/res/fishing/loot_ancientrelic.png -------------------------------------------------------------------------------- /res/fishing/loot_coelacanth.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrayonCodeGit/CrayonCode-BDO-Project/d4b86a04a598b5167beb6951fbfe895882c20cb2/res/fishing/loot_coelacanth.png -------------------------------------------------------------------------------- /res/fishing/loot_empty.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrayonCodeGit/CrayonCode-BDO-Project/d4b86a04a598b5167beb6951fbfe895882c20cb2/res/fishing/loot_empty.png -------------------------------------------------------------------------------- /res/fishing/loot_quantity.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrayonCodeGit/CrayonCode-BDO-Project/d4b86a04a598b5167beb6951fbfe895882c20cb2/res/fishing/loot_quantity.png -------------------------------------------------------------------------------- /res/fishing/loot_silverkey.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrayonCodeGit/CrayonCode-BDO-Project/d4b86a04a598b5167beb6951fbfe895882c20cb2/res/fishing/loot_silverkey.png -------------------------------------------------------------------------------- /res/fishing/lootbag_de.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrayonCodeGit/CrayonCode-BDO-Project/d4b86a04a598b5167beb6951fbfe895882c20cb2/res/fishing/lootbag_de.png -------------------------------------------------------------------------------- /res/fishing/lootbag_de1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrayonCodeGit/CrayonCode-BDO-Project/d4b86a04a598b5167beb6951fbfe895882c20cb2/res/fishing/lootbag_de1.png -------------------------------------------------------------------------------- /res/fishing/lootbag_en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrayonCodeGit/CrayonCode-BDO-Project/d4b86a04a598b5167beb6951fbfe895882c20cb2/res/fishing/lootbag_en.png -------------------------------------------------------------------------------- /res/fishing/lootbag_fr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrayonCodeGit/CrayonCode-BDO-Project/d4b86a04a598b5167beb6951fbfe895882c20cb2/res/fishing/lootbag_fr.png -------------------------------------------------------------------------------- /res/fishing/reelin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrayonCodeGit/CrayonCode-BDO-Project/d4b86a04a598b5167beb6951fbfe895882c20cb2/res/fishing/reelin.png -------------------------------------------------------------------------------- /res/fishing/riddle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrayonCodeGit/CrayonCode-BDO-Project/d4b86a04a598b5167beb6951fbfe895882c20cb2/res/fishing/riddle.png -------------------------------------------------------------------------------- /res/fishing/rod_balenos.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrayonCodeGit/CrayonCode-BDO-Project/d4b86a04a598b5167beb6951fbfe895882c20cb2/res/fishing/rod_balenos.png -------------------------------------------------------------------------------- /res/fishing/rod_calpheon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrayonCodeGit/CrayonCode-BDO-Project/d4b86a04a598b5167beb6951fbfe895882c20cb2/res/fishing/rod_calpheon.png -------------------------------------------------------------------------------- /res/fishing/rod_default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrayonCodeGit/CrayonCode-BDO-Project/d4b86a04a598b5167beb6951fbfe895882c20cb2/res/fishing/rod_default.png -------------------------------------------------------------------------------- /res/fishing/rod_default_discard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrayonCodeGit/CrayonCode-BDO-Project/d4b86a04a598b5167beb6951fbfe895882c20cb2/res/fishing/rod_default_discard.png -------------------------------------------------------------------------------- /res/fishing/rod_empty.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrayonCodeGit/CrayonCode-BDO-Project/d4b86a04a598b5167beb6951fbfe895882c20cb2/res/fishing/rod_empty.png -------------------------------------------------------------------------------- /res/fishing/rod_epheria.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrayonCodeGit/CrayonCode-BDO-Project/d4b86a04a598b5167beb6951fbfe895882c20cb2/res/fishing/rod_epheria.png -------------------------------------------------------------------------------- /res/fishing/rod_mediah.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrayonCodeGit/CrayonCode-BDO-Project/d4b86a04a598b5167beb6951fbfe895882c20cb2/res/fishing/rod_mediah.png -------------------------------------------------------------------------------- /res/fishing/standby_de.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrayonCodeGit/CrayonCode-BDO-Project/d4b86a04a598b5167beb6951fbfe895882c20cb2/res/fishing/standby_de.png -------------------------------------------------------------------------------- /res/fishing/standby_en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrayonCodeGit/CrayonCode-BDO-Project/d4b86a04a598b5167beb6951fbfe895882c20cb2/res/fishing/standby_en.png -------------------------------------------------------------------------------- /res/fishing/standby_fr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrayonCodeGit/CrayonCode-BDO-Project/d4b86a04a598b5167beb6951fbfe895882c20cb2/res/fishing/standby_fr.png -------------------------------------------------------------------------------- /res/processing_check.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrayonCodeGit/CrayonCode-BDO-Project/d4b86a04a598b5167beb6951fbfe895882c20cb2/res/processing_check.png -------------------------------------------------------------------------------- /res/processing_hammer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrayonCodeGit/CrayonCode-BDO-Project/d4b86a04a598b5167beb6951fbfe895882c20cb2/res/processing_hammer.png -------------------------------------------------------------------------------- /res/reference_empty.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrayonCodeGit/CrayonCode-BDO-Project/d4b86a04a598b5167beb6951fbfe895882c20cb2/res/reference_empty.png -------------------------------------------------------------------------------- /res/reference_inventory.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrayonCodeGit/CrayonCode-BDO-Project/d4b86a04a598b5167beb6951fbfe895882c20cb2/res/reference_inventory.png -------------------------------------------------------------------------------- /res/worker_staminabar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrayonCodeGit/CrayonCode-BDO-Project/d4b86a04a598b5167beb6951fbfe895882c20cb2/res/worker_staminabar.png --------------------------------------------------------------------------------