Requires English Client and 100% UI Scale. This doesn't work in the background, since it's screen-reading.
Guide for custom Presets
Run CrayonCode.au3 to start the GUI.
Latest changes:
Quote:
v0.21
- Few more Status messages added.
- Added handling if ReelIn window is obstructed. (Moved dailyspam escape to reelin instead of riddle)
- Fixed bug in DetectFullscreenToWindowedOffset() where the global $hBDO was overwritten by local.
- Fixed Buttons for sidefunctions not working after they started (Missing GUILoopSwitch)
- Changed loot_silverkey.bmp to stop certain fish from pretending to be silverkeys.
CrayonCodeProcessing.au3 added
- SimpleProcessing will just process all selected materials until you run out.
- CustomProcessing will enable custom recipes and supports up to two ingredients.
- Scans the complete warehouse inventory
- Supported materials are limited to Lumber, Planks, Ores and Melted Shards for now.
- Use of the Alchemy Stone can be enabled.
Requirements:
Standing next to a warehouse with Transport Option.
Auto-Sort for the Warehouse must be ENABLED.
Auto-Sort for the Inventory must be DISABLED.
The first 4 Player Inventory will be used for the processing.
Since I need an image of every material that you wan't to process I will need the help of the community for this.
There is a specific way the images need to be captured, because of the strange rendering of warehouse inventories.
Details will follow soon.
- Changed filestructure
- Changed version naming convention
- Added support for Balenos, Calpheon, Epheria, Mediah fishingrods
- Added CheckClientResolution function to Main() for errorfeedback
- Added SwapFishingrod to case Else "Unidentified state." (tries to equip a rod if no valid state is detected)
- Improved error message for case Else "UI Scale must be at 100%."
- Added experimental region for possible future functions
Bugfixes:
- Fixed bug where lootsettings were only applied after restart
- Fixed bug with reserved slots
- Added mousewiggle every 2 minutes to prevent entering the power saving mode
New things:
- Added Auto-Restock and Restock Settings (Look under the Advanced tab)
- Added selling fish to trade manager
- Added repairing inventory
- Added auctioning ancient relics
- Added storing money & relics to warehouse
About the Auto-Restock:
If you chose specific NPCs make sure to use the full title e.g. <Trade Manager> Bahar instead of just Bahar.
You can test the restock feature and check if the autopathing will fail because of obstacles. Choose differen NPCs if it does.
If no NPC is specified the closest nearby NPC with the needed job will be chosen.
Order of tasks is from top to bottom e.g. selling first and storing last.
Position your horse or boat in a way that you can start fishing after autopathing to it.
When enabled Auto-Restock will start when FreeSlots and Reserved Slots are full. (You can turn off reserved slots by settings them to 0)
It will also Auto-Restock when no usable fishing rod can be detected.
- Fixed bug where BankRelics() and BrokerRelics() didn't scan the last 64 slots
- Added app title obfuscation
- Added randomized delay for Riddle() and ReelIn() [RandomSettings] (check data.ini)
- Reworked the ReelIn() function
- SwapFishingrod() now scans all 192 possible inventory slots
- Added Hotkey CTRL+F1 to terminate the application
New things:
- Added Worker Feeding [WorkerSettings]
About Worker Feeding:
If enabled it will try to feed your workers every 90 minutes before casting the fishing rod
- Improvements to Auto-Restock
- Changed how inventory limit is calculated: Limit = Freeslots - Reserved
- Reworked NearbyNPC() and TrackNPC() to be more reliable
- Changes to InitGUI() and StoreGUI() to improve readability
- ReelIn() function sligthly adjusted (FEEDBACK NEEDED!)
- Reworked DocLoot(), DetectLoot(), HandleLoot()
- Fixed bug where bufffood and worker feeding always launched on startup
- Added function to scan for empty inventory slots
Reworked loot detection:
Slots are evaluated individually and loot picked individually instead of "loot all".
Support for event items added. Add .bmp files to res/event to for new items.
WARNING: Mousecursor must be hidden when you start fishing or it will ignore settings and loot all. (hopefully i'll find a fix soon)
New things:
- Drying fish
About Drying fish:
Enable and specify the highest rarity used for drying in the config [DryingSettings] (0=white,1=green,2=blue,3=gold)
If enabled it will start drying once the the free limit is reached ( atleast 2 reserved slots are advisable)
If the weather is not clear or you are standing in water it will retry after 10 minutes
DONT STAND IN WATER IF YOU WANT TO DRY FISH
If there is no more fish that is allowed to be dried the inventory will be scanned for empty slots.
Your new Freeslots will be the detected empty slots. And your new limit will be emptyslots - reserved slots.
Next version will focus on bugfixes and reworked UI, and in the version after that i will probably look into the broker.
Please leave your ideas.
- Added filter for white items with quanity (Trash no more!)
- Added Eventitems and Trash to Stats
- Small changes to HandleLoot()
- Last detected loot will be highlighted in the Stats Listview
- Various improvements to DryingFish() (e.g. will now wait for clear weather, 5m cooldown, etc. Also: no wiggle movement anymore to cancel drying process. If you try to dry EXPIRED fish you will be stuck in an endless loop!)
- Added Turn() if casting rod fails to fix looking in the wrong direction after movement. (With Auto-Restock enabled it will restock once after 12 fails to and hopefully fix the position error)
- Auto-Restock NPC visit order can now be changed in the settings.
- Fixed several problems with the Inventory Limit
- Added Autodetect function for empty inventory slots
- Functional changes to Free Inventory Slots and Reserved Slots. (Now Empty Slots and Empty Reserve, where Empty Reserve will keep the set number of slots free to prevent "inventory full" errors)
- Updated UI (Missing Settings and added Tooltips)
- Improved Status report (Added timestamped log to Scite Console)
- Fixed cases where the Mousecursor bug from v0.14 could appear
- ResetSession() wont set PickedLoot to 0 anymore
- A whole lot more of minor changes that I lost count of
ClearButton[F5] and emptyslots will be retired next version
- Reworked most functions to deal with different resolutions (Replace config/resolution_settings.ini with your preset)
- Added mousedetection
- Added collecting money from broker when selling relics
- Added escape from daily reward screen
- Changes to HandleLoot()
- Legacy loot method reintroduced (Can be enabled via data.ini [LootSettings] -> LootWithR=1 )
- Drying will now start when Inventory is filled to 2/3
- Relic Reservation (re)added to Inventory Settings. (Lootfilter will only pick up relics if only the set amount of slots is left free)
- Buffer added will effectively reduce the inventory limit to prevent overload errors
- REMOVED FreeInventorySlots (Autodetect is the captain now)
- REMOVED ClearButton[F5]
- Stats relocated to stats.ini (So I don't mess up your stats everytime I change the data.ini)
- Added experimental setting for Auto-Restock [RestockSwapMounts] -> Enabled=1 (Requires Horse AND Boat and will click the opposite selection first to circumvent a bug)
- Added Test Button for FeedWorker, DryFish & Auto-Restart
- Proxy NPCs added to Auto-Restock
- A lot of minor things
New things:
- Support for different resolutions added! (Includes windowed, fullscreen and all resolutions that allow 100% UI Scale)
- Added Digging (Checks for Heatstroke/Hypothermia and uses set Hotkeys)
- Auto-Restart (Will check if the game is disconnected and restart & login to your main server) [SettingsTab] (Password will be saved in plaintext in data.ini!)
- Fixed wrong Offset for FeedWorker()
- Decreased scanning range for RiddleAnchor to fix out of bounds error
- Added LOGFILE option to data.ini (enabled by default)
- Changed Bank & Broker Relics to repeat checking slot with successful detection. (To incorporate autosort)
- Fixed Hotkeys not being applied to DesertDebuff()
- Added shovel button and cd to DesertDebuff() to prevent shards from interrupting the digging.
- Changes to RiddleAnchor again with Offsets based on center width.
- Fixed a bug where the Relic Reserve would stay active if it was reached once.
- Changes to Reserve handling and added status if loot is ignored because of relic reservation for better feedback.
- Now checks for daily rewards window after failed Riddle
New things:
- Added ignore folder to res where you can put cropped .bmp images of special loot you don't want to pick up (works like event items)
- Added Marketplace Bid/Buy for selected items. If everything works fine we will expand functionality. [F5] to Start/Stop.
- Few more Status messages added.
- Added handling if ReelIn window is obstructed. (Moved dailyspam escape to reelin instead of riddle)
- Fixed bug in DetectFullscreenToWindowedOffset() where the global $hBDO was overwritten by local.
- Fixed Buttons for sidefunctions not working after they started (Missing GUILoopSwitch)
- Changed loot_silverkey.bmp to stop certain fish from pretending to be silverkeys.
CrayonCodeProcessing.au3 added
- SimpleProcessing will just process all selected materials until you run out.
- CustomProcessing will enable custom recipes and supports up to two ingredients.
- Scans the complete warehouse inventory
- Supported materials are limited to Lumber, Planks, Ores and Melted Shards for now.
- Use of the Alchemy Stone can be enabled.
Requirements:
Standing next to a warehouse with Transport Option.
Auto-Sort for the Warehouse must be ENABLED.
Auto-Sort for the Inventory must be DISABLED.
The first 4 Player Inventory will be used for the processing.
Since I need an image of every material that you wan't to process I will need the help of the community for this.
There is a specific way the images need to be captured, because of the strange rendering of warehouse inventories.
Tested it out (windows 10 x64)
Worked fine for me. When I changed the fish settings to white it wouldn't pick up fish until I shut it down and reloaded. If you get it to work on 1440p that'd be awesome!
@ @: I forgot the FastFind.dll for the x86 support. Running the script in x64 should work fine.
I updated the files, so it should work both ways now. Thanks for the notice!
If you are running a 32bit system and still have trouble try following:
Change line 12 in CrayonCode.au3 from "#AutoIt3Wrapper_UseX64=y" to "#AutoIt3Wrapper_UseX64=n"
do i need to have some extra program installed for this ?
Perhaps open your inventory so the bot sees your rods.
Edited the code, I made changes to folder structures so that future development will be easier (for me at least).
Steps:
Create a res folder.
Create a config folder.
Move all *.bmp files into the res folder.
Move data.ini into config folder.
I did it this way so that in future, when adding more images, it'll be much more organize and easier to manage.
#cs ----------------------------------------------------------------------------
AutoIt Version: 3.3.14.2
Author: CrayonCode
Version: Alpha 2017.04.04
Contact: http://www.elitepvpers.com/forum/black-desert/4268940-autoit-crayoncode-bot-project-opensource-free.html
#ce ----------------------------------------------------------------------------
#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Compile_Both=y ;required for ImageSearch.au3
#AutoIt3Wrapper_UseX64=y ;required for ImageSearch.au3
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#RequireAdmin
#include "ImageSearch.au3"
#include "FastFind.au3"
#include <ButtonConstants.au3>
#include <ComboConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <TabConstants.au3>
#include <WindowsConstants.au3>
#include <ListViewConstants.au3>
#Region ### START Koda GUI section ### Form=c:\program files (x86)\autoit3\scite\koda\forms\newfish.kxf
$CrayonCode = GUICreate("CrayonCode", 401, 401, 190, 321, -1, BitOR($WS_EX_TOPMOST, $WS_EX_WINDOWEDGE))
$Tab = GUICtrlCreateTab(0, 0, 400, 400)
$Tab_Main = GUICtrlCreateTabItem("Main")
$Group4 = GUICtrlCreateGroup("Stats", 32, 96, 329, 281)
$Label7 = GUICtrlCreateLabel("Status:", 48, 128, 37, 17)
$Edit1 = GUICtrlCreateEdit("", 112, 128, 233, 17, BitOR($ES_CENTER, $ES_NOHIDESEL, $ES_READONLY))
$Label6 = GUICtrlCreateLabel("Inventory:", 48, 176, 51, 17)
$Edit2 = GUICtrlCreateEdit("", 112, 176, 137, 17, BitOR($ES_CENTER, $ES_NOHIDESEL, $ES_READONLY))
GUICtrlSetTip(-1, "Number of looted items / Avaible Inventory Slots ( Reserved Slots). Stops fishing when limit is reached.")
$ButtonClear = GUICtrlCreateButton("Clear [F5]", 264, 168, 75, 33)
GUICtrlSetTip(-1, "Sets looted items to back zero.")
$ListView1 = GUICtrlCreateListView("Type|Session|Total", 48, 208, 298, 158, BitOR($GUI_SS_DEFAULT_LISTVIEW, $WS_VSCROLL), $LVS_EX_FULLROWSELECT)
GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 0, 100)
GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 1, 90)
GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 2, 100)
$ListView1_0 = GUICtrlCreateListViewItem("White", $ListView1)
$ListView1_1 = GUICtrlCreateListViewItem("Green", $ListView1)
$ListView1_2 = GUICtrlCreateListViewItem("Blue", $ListView1)
$ListView1_3 = GUICtrlCreateListViewItem("Gold", $ListView1)
$ListView1_4 = GUICtrlCreateListViewItem("Silver Key", $ListView1)
$ListView1_5 = GUICtrlCreateListViewItem("Ancient Relic", $ListView1)
$ListView1_6 = GUICtrlCreateListViewItem("Coelacanth", $ListView1)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Button1 = GUICtrlCreateButton("Start/Stop [F4]", 64, 40, 115, 49)
GUICtrlSetTip(-1, "Starts/Stops fishing. Shortcut is F4.")
$Button2 = GUICtrlCreateButton("Reset Session [F8]", 208, 40, 115, 49)
GUICtrlSetTip(-1, "Sets Inventory and Session stats back to zero. Shortcut is F8.")
$Tab_Settings = GUICtrlCreateTabItem("Settings")
$Loot_Settings = GUICtrlCreateGroup("Loot Settings", 16, 56, 177, 217)
$LSpecial = GUICtrlCreateLabel("Special Items:", 36, 151, 70, 17)
$LRarity = GUICtrlCreateLabel("Minimum Rarity:", 36, 87, 78, 17)
$CRarity = GUICtrlCreateCombo("", 44, 111, 82, 25, BitOR($CBS_DROPDOWNLIST, $CBS_AUTOHSCROLL))
GUICtrlSetData(-1, "Gold|Blue|Green|White|Specials Only", "Blue")
$CBSpecial1 = GUICtrlCreateCheckbox("Silver Key", 44, 175, 97, 17)
GUICtrlSetState(-1, $GUI_CHECKED)
$CBSpecial2 = GUICtrlCreateCheckbox("Ancient Relic", 44, 207, 97, 17)
GUICtrlSetState(-1, $GUI_CHECKED)
$CBSpecial3 = GUICtrlCreateCheckbox("Coelacanth", 44, 239, 97, 17)
GUICtrlSetState(-1, $GUI_CHECKED)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Inventory_Settings = GUICtrlCreateGroup("Inventory Settings", 208, 56, 177, 217)
$Label1 = GUICtrlCreateLabel("Free Inventory Slots:", 224, 80, 101, 17)
$Input1 = GUICtrlCreateInput("64", 232, 104, 81, 21, BitOR($GUI_SS_DEFAULT_INPUT, $ES_NUMBER))
GUICtrlSetLimit(-1, 3)
GUICtrlSetTip(-1, "Avaible space for Loot specified by Loot Settings.")
$Label2 = GUICtrlCreateLabel("Reserved Slots:", 224, 144, 79, 17)
GUICtrlSetTip(-1, "When the free inventory slots are full, these slots will be reserved for Ancient Relics and Coelacanths.")
$Input2 = GUICtrlCreateInput("8", 232, 168, 81, 21, BitOR($GUI_SS_DEFAULT_INPUT, $ES_NUMBER))
GUICtrlSetTip(-1, "Additional space restricted to selected Special Items.")
$Checkbox1 = GUICtrlCreateCheckbox("Discard", 232, 232, 97, 17)
GUICtrlSetTip(-1, "Throw away fishingrods with zero durability. ")
$Label3 = GUICtrlCreateLabel("Empty Rods:", 224, 208, 64, 17)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Group3 = GUICtrlCreateGroup("Buff Food", 16, 288, 265, 97)
$Checkbox2 = GUICtrlCreateCheckbox("Use Buff Food", 32, 336, 97, 17)
$Combo1 = GUICtrlCreateCombo("", 144, 336, 33, 25, BitOR($CBS_DROPDOWNLIST, $CBS_AUTOHSCROLL))
GUICtrlSetData(-1, "1|2|3|4|5|6|7|8|9|0", "0")
GUICtrlSetTip(-1, "Put your food on one of the hotkeys.")
$Label4 = GUICtrlCreateLabel("Hotkey:", 136, 312, 41, 17)
$Label5 = GUICtrlCreateLabel("Interval:", 216, 312, 42, 17)
$Input3 = GUICtrlCreateInput("30", 224, 336, 41, 21, BitOR($GUI_SS_DEFAULT_INPUT, $ES_NUMBER))
GUICtrlSetLimit(-1, 3)
GUICtrlSetTip(-1, "Interval in minutes.")
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Button3 = GUICtrlCreateButton("Save", 304, 304, 75, 73)
$Tab_Info = GUICtrlCreateTabItem("Info")
$Credits = GUICtrlCreateEdit("", 32, 72, 337, 289, BitOR($ES_CENTER, $ES_READONLY))
GUICtrlSetData(-1, "Author: CrayonCode")
GUICtrlCreateTabItem("")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
#Region - 1920x1080 Values for DetectState()
; Press 'Space' near a body of water to start fishing.
;~ 679, 57, 15000804, E4E4E4 ;P
;~ 1233, 59, 15000804, E4E4E4 ;g
;~ Local $R[5] = [679, 60, 1233, 64, 15000804] ; FishingStandby
; You are currently fishing. Please wait until you feel a bite.
;~ 642, 60, 15000804, E4E4E4 ; Y
;~ 1256, 64, 15000804, E4E4E4 ; t
;~ Local $C[5] = [642, 60, 1256, 64, 15000804] ; FishingCurrently
; You feel a bite. Press 'Space' bar to start.
;~ 733, 60, 15000804, E4E4E4
;~ 1179, 60, 15000804, E4E4E4
;~ Local $B[5] = [733, 60, 1179, 64, 15000804] ; FishingBite
; Press it at the right time
;~ 849, 368, 16777215, FFFFFF
;~ 1068, 372, 16777215, FFFFFF
;~ Local $P[5] = [849, 368, 1068, 372, 16777215]
#EndRegion - 1920x1080 Values for DetectState()
OnAutoItExitRegister(_ImageSearchShutdown)
Opt("MouseClickDownDelay", 100)
Global $Fish = False
Global $Bufftimer
Global $Breaktimer
HotKeySet("{F5}", "ClearInv")
HotKeySet("{F4}", "Fish")
HotKeySet("{F8}", "ResetSession")
Func _terminate()
Exit (0)
EndFunc ;==>_terminate
Func CoSe($key)
$hwnd = WinActive("BLACK DESERT -")
If $hwnd = 0 Then $hwnd = WinActivate("BLACK DESERT -")
If MouseGetPos(0) < 0 Or MouseGetPos(0) > 1920 Or MouseGetPos(1) < 0 Or MouseGetPos(1) > 1080 Then MouseMove(100, 100, 0)
ControlSend($hwnd, "", "", $key)
EndFunc ;==>CoSe
Func DetectState(ByRef $C)
Local $SSN = 1
FFSnapShot($C[0], $C[1], $C[2], $C[3], $SSN)
For $i = 0 To 3 Step 1
$FF = FFGetPixel($C[0], $C[1] + $i, $SSN)
$FF2 = FFGetPixel($C[2], $C[3] - $i, $SSN)
If $FF <> $C[4] Or $FF2 <> $C[4] Then Return False
Next
Return True
EndFunc ;==>DetectState
Func GetState()
Local $R[5] = [679, 60, 1233, 64, 15000804] ; FishingStandby
Local $C[5] = [642, 60, 1256, 64, 15000804] ; FishingCurrently
Local $B[5] = [733, 60, 1179, 64, 15000804] ; FishingBite
If DetectState($B) = True Then Return (30)
If DetectState($C) = True Then Return (20)
If DetectState($R) = True Then Return (10)
Return False
EndFunc ;==>GetState
Func ReelIn()
Local Const $C[5] = [1030, 405, 1095, 424, 5933000] ; left, top, right, bottom, color
Local $P[5] = [849, 368, 1068, 372, 16777215]
Local $SSN = 1
ConsoleWrite [MENTION=3576271]CRLF[/MENTION] & "ReelIn")
CoSe("{SPACE}")
For $i = 0 To 20 Step 1
Sleep(100)
If DetectState($P) = True Then ExitLoop
Next
Local $timer = TimerInit()
While TimerDiff($timer) / 1000 <= 5 And $Fish
FFSnapShot($C[0], $C[1], $C[2], $C[3], $SSN)
For $i = 0 To $C[2] - $C[0] Step 1
For $j = 0 To $C[3] - $C[1] Step 1
$FF = FFGetPixel($C[0] + $i, $C[1] + $j, $SSN)
If $FF > $C[4] - 3000 And $FF < $C[4] Then
CoSe("{SPACE}")
Return True
EndIf
Next
Next
WEnd
Return False
EndFunc ;==>ReelIn
Func FindRiddleAnchor()
Local $timer = TimerInit()
Local $C[2] = [-1, -1]
While TimerDiff($timer) / 1000 <= 4 And $Fish
If _ImageSearchArea("res\tline.bmp", 0, 690, 300, 1150, 580, $C[0], $C[1], 0, 0) = 1 Then
Return ($C)
EndIf
WEnd
Return ($C)
EndFunc ;==>FindRiddleAnchor
Func Riddle($iAnchorX, $iAnchorY, $AnchorColor, $SSN)
Local Const $WordsX[8] = [-2, +3, +3, -2, -2, -2, +3, +3] ; SSWWDDAA
Local Const $WordsY[8] = [-3, -3, +2, +2, +3, -3, +2, -2] ; SSWWDDAA
Local $ai[8], $iL = 4
For $i = 0 To 7 Step 1
If FFGetPixel($iAnchorX + $WordsX[$i], $iAnchorY + $WordsY[$i], $SSN) = $AnchorColor Then
$ai[$i] = 1
Else
$ai[$i] = 0
EndIf
Next
For $j = 3 To 0 Step -1
If $ai[$j * 2] + $ai[$j * 2 + 1] = 2 Then $iL = $j
Next
Return ($iL)
EndFunc ;==>Riddle
Func Riddler()
Local Const $COffset[2] = [60, 55] ; relative position to Anchor (pointing to center of the arrow beneath each letter)
Local Const $L[5] = ["s", "w", "d", "a", "."] ; basic minigame letters ("." for unidentified)
Local Const $Spacing = 35 ; Space between each Letter
Local $SSN = 1
Local $Word[10], $LetterColor, $Riddle, $Wordlength = 0
Local $C = FindRiddleAnchor()
If $C[0] = -1 Or $C[1] = -1 Then Return False
FFSnapShot($C[0] - 90, $C[1] - 90, $C[0] + $Spacing * 10 + 90, $C[1], $SSN)
$LetterColor = FFGetPixel($C[0] - 90 + $COffset[0], $C[1] - 90 + $COffset[1], $SSN)
Local $AnchorC[2] = [$C[0] - 90 + $COffset[0], $C[1] - 90 + $COffset[1]]
For $i = 0 To 9 Step 1
$Riddle = Riddle($AnchorC[0] + $Spacing * $i, $AnchorC[1], $LetterColor, $SSN)
If $Riddle = 4 Then ; If unidentified exit loop
$Word[$i] = $L[$Riddle]
ExitLoop
Else
$Word[$i] = $L[$Riddle]
$Wordlength += 1
EndIf
Next
If $Wordlength < 2 Then
Return (False)
Else
For $i = 0 To 9 Step 1
If $Word[$i] <> "." Then
CoSe($Word[$i])
EndIf
Sleep(100)
Next
Return (True)
EndIf
EndFunc ;==>Riddler
Func DocLoot(ByRef $Loot)
Local $TotalStats = IniReadSection("config\data.ini", "TotalStats")
Switch $Loot[0]
Case 0 ;White
$TotalStats[1][1] += 1
Case 1 ;Green
$TotalStats[2][1] += 1
Case 2 ;Blue
$TotalStats[3][1] += 1
Case 3 ;Gold
$TotalStats[4][1] += 1
EndSwitch
If $Loot[1] = True Then $TotalStats[5][1] += 1
If $Loot[2] = True Then $TotalStats[6][1] += 1
If $Loot[3] = True Then $TotalStats[7][1] += 1
IniWriteSection("config\data.ini", "TotalStats", $TotalStats)
Local $SessionStats = IniReadSection("config\data.ini", "SessionStats")
Switch $Loot[0]
Case 0 ;White
$SessionStats[1][1] += 1
Case 1 ;Green
$SessionStats[2][1] += 1
Case 2 ;Blue
$SessionStats[3][1] += 1
Case 3 ;Gold
$SessionStats[4][1] += 1
EndSwitch
If $Loot[1] = True Then $SessionStats[5][1] += 1
If $Loot[2] = True Then $SessionStats[6][1] += 1
If $Loot[3] = True Then $SessionStats[7][1] += 1
IniWriteSection("config\data.ini", "SessionStats", $SessionStats)
GUICtrlSetData($ListView1_0, $SessionStats[1][0] & "|" & $SessionStats[1][1] & "|" & $TotalStats[1][1], "")
GUICtrlSetData($ListView1_1, $SessionStats[2][0] & "|" & $SessionStats[2][1] & "|" & $TotalStats[2][1], "")
GUICtrlSetData($ListView1_2, $SessionStats[3][0] & "|" & $SessionStats[3][1] & "|" & $TotalStats[3][1], "")
GUICtrlSetData($ListView1_3, $SessionStats[4][0] & "|" & $SessionStats[4][1] & "|" & $TotalStats[4][1], "")
GUICtrlSetData($ListView1_4, $SessionStats[5][0] & "|" & $SessionStats[5][1] & "|" & $TotalStats[5][1], "")
GUICtrlSetData($ListView1_5, $SessionStats[6][0] & "|" & $SessionStats[6][1] & "|" & $TotalStats[6][1], "")
GUICtrlSetData($ListView1_6, $SessionStats[7][0] & "|" & $SessionStats[7][1] & "|" & $TotalStats[7][1], "")
EndFunc ;==>DocLoot
Func DetectLoot()
Local Const $aRarityIdentifier[4] = ["", "res\Rgreen.bmp", "res\Rblue.bmp", "res\Rgold.bmp"]
Local Const $SpecialLootIdentifier[4] = ["", "res\lsilverkey.bmp", "res\lancientpiece.bmp", "res\l250k.bmp"]
Local Const $LootWindowRegion[4] = [1535, 590, 1725, 733] ; left, top, right, bottom
Local $Loot[4] = [0, False, False, False] ; Rarity, silverkey, piece, 250k
Local $LFx, $LFy
For $i = 1 To UBound($aRarityIdentifier) - 1 Step 1
If _ImageSearchArea($aRarityIdentifier[$i], 0, $LootWindowRegion[0], $LootWindowRegion[1], $LootWindowRegion[2], $LootWindowRegion[3], $LFx, $LFy, 10, 0) = 1 Then $Loot[0] = $i
Next
For $i = 1 To UBound($SpecialLootIdentifier) - 1 Step 1
If _ImageSearchArea($SpecialLootIdentifier[$i], 0, $LootWindowRegion[0], $LootWindowRegion[1], $LootWindowRegion[2], $LootWindowRegion[3], $LFx, $LFy, 20, 0) = 1 Then
$Loot[$i] = True
EndIf
Next
Return $Loot
EndFunc ;==>DetectLoot
Func HandleLoot($Rarity = 1, $Silverkey = True, $AncientRelic = True, $Coelacanth = True, $Reserved = False)
Local $Pick = 0
Local $Loot = DetectLoot()
ConsoleWrite [MENTION=3576271]CRLF[/MENTION] & "[LOOT] Rarity: " & $Loot[0] & ", Silverkey: " & $Loot[1] & ", AncientRelic: " & $Loot[2] & ", Coelacanth: " & $Loot[3] & [MENTION=3576271]CRLF[/MENTION])
DocLoot($Loot)
If $Reserved = False Then
If $Loot[0] >= $Rarity Then $Pick += 1
EndIf
If $Loot[1] = True And $Silverkey = True Then $Pick += 1000
If $Loot[2] = True And $AncientRelic = True Then $Pick += 10
If $Loot[3] = True And $Coelacanth = True Then $Pick += 100
If $Pick > 0 Then
CoSe("r")
Sleep(50)
CoSe("r")
If $Pick < 1000 Then Return True
EndIf
Return False
EndFunc ;==>HandleLoot
Func SetGUIStatus($data)
GUICtrlSetData($Edit1, $data, "")
EndFunc ;==>SetGUIStatus
Func SetGUIInventory($PickedLoot)
Local $InventorySettings[3] = [Int(IniRead("config\data.ini", "InventorySettings", "FreeSlots", 16)), Int(IniRead("config\data.ini", "InventorySettings", "ReservedSlots", 8)), Int(IniRead("config\data.ini", "InventorySettings", "DiscardRods", 0))]
GUICtrlSetData($Edit2, $PickedLoot & " / " & $InventorySettings[0] + $InventorySettings[1] & " (" & $InventorySettings[1] & ")", "")
IniWrite("config\data.ini", "CurrentStats", "PickedLoot", $PickedLoot)
Return ($PickedLoot)
EndFunc ;==>SetGUIInventory
Func ResetSession()
Local $SessionStats = IniReadSection("config\data.ini", "SessionStats")
For $i = 1 To UBound($SessionStats) - 1 Step 1
$SessionStats[$i][1] = 0
Next
IniWriteSection("config\data.ini", "SessionStats", $SessionStats)
SetGUIInventory(0)
InitGUI()
EndFunc ;==>ResetSession
Func ClearInv()
SetGUIInventory(0)
EndFunc ;==>ClearInv
Func InitGUI()
Local $LootSettings = IniReadSection("config\data.ini", "LootSettings")
Switch $LootSettings[1][1]
Case 0
GUICtrlSetData($CRarity, "|Gold|Blue|Green|White|Specials Only", "White")
Case 1
GUICtrlSetData($CRarity, "|Gold|Blue|Green|White|Specials Only", "Green")
Case 2
GUICtrlSetData($CRarity, "|Gold|Blue|Green|White|Specials Only", "Blue")
Case 3
GUICtrlSetData($CRarity, "|Gold|Blue|Green|White|Specials Only", "Gold")
Case 4
GUICtrlSetData($CRarity, "|Gold|Blue|Green|White|Specials Only", "Specials Only")
EndSwitch
If $LootSettings[2][1] = 1 Then
GUICtrlSetState($CBSpecial1, 1)
Else
GUICtrlSetState($CBSpecial1, 4)
EndIf
If $LootSettings[3][1] = 1 Then
GUICtrlSetState($CBSpecial2, 1)
Else
GUICtrlSetState($CBSpecial2, 4)
EndIf
If $LootSettings[4][1] = 1 Then
GUICtrlSetState($CBSpecial3, 1)
Else
GUICtrlSetState($CBSpecial3, 4)
EndIf
Local $InventorySettings = IniReadSection("config\data.ini", "InventorySettings")
GUICtrlSetData($Input1, $InventorySettings[1][1])
GUICtrlSetData($Input2, $InventorySettings[2][1])
If $InventorySettings[3][1] = 1 Then
GUICtrlSetState($Checkbox1, 1)
Else
GUICtrlSetState($Checkbox1, 4)
EndIf
Local $FoodSettings = IniReadSection("config\data.ini", "FoodSettings")
If $FoodSettings[1][1] = 1 Then
GUICtrlSetState($Checkbox2, 1)
Else
GUICtrlSetState($Checkbox2, 4)
EndIf
GUICtrlSetData($Combo1, $FoodSettings[2][1])
GUICtrlSetData($Input3, $FoodSettings[3][1])
Local $SessionStats = IniReadSection("config\data.ini", "SessionStats")
Local $TotalStats = IniReadSection("config\data.ini", "TotalStats")
GUICtrlSetData($ListView1_0, $SessionStats[1][0] & "|" & $SessionStats[1][1] & "|" & $TotalStats[1][1], "")
GUICtrlSetData($ListView1_1, $SessionStats[2][0] & "|" & $SessionStats[2][1] & "|" & $TotalStats[2][1], "")
GUICtrlSetData($ListView1_2, $SessionStats[3][0] & "|" & $SessionStats[3][1] & "|" & $TotalStats[3][1], "")
GUICtrlSetData($ListView1_3, $SessionStats[4][0] & "|" & $SessionStats[4][1] & "|" & $TotalStats[4][1], "")
GUICtrlSetData($ListView1_4, $SessionStats[5][0] & "|" & $SessionStats[5][1] & "|" & $TotalStats[5][1], "")
GUICtrlSetData($ListView1_5, $SessionStats[6][0] & "|" & $SessionStats[6][1] & "|" & $TotalStats[6][1], "")
GUICtrlSetData($ListView1_6, $SessionStats[7][0] & "|" & $SessionStats[7][1] & "|" & $TotalStats[7][1], "")
Local $CurrentStats = IniReadSection("config\data.ini", "CurrentStats")
GUICtrlSetData($Edit2, $CurrentStats[1][1] & " / " & $InventorySettings[1][1] + $InventorySettings[2][1] & " (" & $InventorySettings[2][1] & ")", "")
GUICtrlSetData($Edit1, "Settings loaded.", "")
Local $data = "Author: CrayonCode" & [MENTION=3576271]CRLF[/MENTION] & [MENTION=3576271]CRLF[/MENTION]
$data &= "This project is specifically made for the english Black Desert EU/NA client." & [MENTION=3576271]CRLF[/MENTION] & [MENTION=3576271]CRLF[/MENTION]
$data &= "Requirements are 1920x1080 Windowed Fullscreen and the default font." & [MENTION=3576271]CRLF[/MENTION] & [MENTION=3576271]CRLF[/MENTION]
$data &= "This project is Open Source and serves for educational purposes only." & [MENTION=3576271]CRLF[/MENTION] & [MENTION=3576271]CRLF[/MENTION]
$data &= "Contact & Feedback @ http://www.elitepvpers.com/forum/black-desert/4268940-autoit-crayoncode-bot-project-opensource-free.html"
GUICtrlSetData($Credits, $data)
EndFunc ;==>InitGUI
Func StoreGUI()
Local $LootSettings = IniReadSection("config\data.ini", "LootSettings")
Switch GUICtrlRead($CRarity)
Case "White"
$LootSettings[1][1] = 0
Case "Green"
$LootSettings[1][1] = 1
Case "Blue"
$LootSettings[1][1] = 2
Case "Gold"
$LootSettings[1][1] = 3
Case "Specials Only"
$LootSettings[1][1] = 4
EndSwitch
If GUICtrlRead($CBSpecial1) = 1 Then
$LootSettings[2][1] = 1
Else
$LootSettings[2][1] = 0
EndIf
If GUICtrlRead($CBSpecial2) = 1 Then
$LootSettings[3][1] = 1
Else
$LootSettings[3][1] = 0
EndIf
If GUICtrlRead($CBSpecial3) = 1 Then
$LootSettings[4][1] = 1
Else
$LootSettings[4][1] = 0
EndIf
IniWriteSection("config\data.ini", "LootSettings", $LootSettings)
Local $InventorySettings = IniReadSection("config\data.ini", "InventorySettings")
$InventorySettings[1][1] = Int(GUICtrlRead($Input1))
$InventorySettings[2][1] = Int(GUICtrlRead($Input2))
If GUICtrlRead($Checkbox1) = 1 Then
$InventorySettings[3][1] = 1
Else
$InventorySettings[3][1] = 0
EndIf
IniWriteSection("config\data.ini", "InventorySettings", $InventorySettings)
Local $FoodSettings = IniReadSection("config\data.ini", "FoodSettings")
If GUICtrlRead($Checkbox2) = 1 Then
$FoodSettings[1][1] = 1
Else
$FoodSettings[1][1] = 0
EndIf
$FoodSettings[2][1] = GUICtrlRead($Combo1)
$FoodSettings[3][1] = GUICtrlRead($Input3)
IniWriteSection("config\data.ini", "FoodSettings", $FoodSettings)
EndFunc ;==>StoreGUI
Func Fish()
$Fish = Not $Fish
If $Fish = False Then
SetGUIStatus("Pausing.")
Else
SetGUIStatus("Starting.")
EndIf
EndFunc ;==>Fish
Func GUILoopSwitch()
Switch GUIGetMsg()
Case $GUI_EVENT_CLOSE
Exit
Case $Button3 ;Save
StoreGUI()
Case $Button2
ResetSession()
Case $Button1
Fish()
Case $ButtonClear
ClearInv()
EndSwitch
EndFunc ;==>GUILoopSwitch
Func OCInventory($open = True)
Local Const $InventoryRegion = [1095, 226, 1919, 855]
Local $SRx, $SRy, $IS = False
Local $timer = TimerInit()
While Not $IS And $Fish
Sleep(250)
$IS = _ImageSearchArea("res\Bag.bmp", 0, $InventoryRegion[0], $InventoryRegion[1], $InventoryRegion[2], $InventoryRegion[3], $SRx, $SRy, 10, 0)
Sleep(250)
If $IS = True Then
If $open = True Then
Return (True)
ElseIf $open = False Then
CoSe("i")
Sleep(500)
EndIf
ElseIf $IS = False Then
If $open = True Then
CoSe("i")
Sleep(500)
ElseIf $open = True Then
Return (True)
EndIf
EndIf
If TimerDiff($timer) / 1000 >= 3 Then Return False
WEnd
EndFunc ;==>OCInventory
Func InspectFishingrod()
Local Const $WeaponRegion = [1200, 584, 1250, 628]
Local $SRx, $SRy, $IS = False
OCInventory(True)
If MouseGetPos(0) >= $WeaponRegion[0] And MouseGetPos(0) <= $WeaponRegion[2] And MouseGetPos(1) >= $WeaponRegion[1] And MouseGetPos(1) <= $WeaponRegion[3] Then MouseMove(10, 10) ; Keep mouse out of detection range
$IS = _ImageSearchArea("res\emptyrod.bmp", 0, $WeaponRegion[0], $WeaponRegion[1], $WeaponRegion[2], $WeaponRegion[3], $SRx, $SRy, 50, 0)
If $IS = True Then
Return True
ElseIf $IS = False Then
OCInventory(False)
Return False
EndIf
EndFunc ;==>InspectFishingrod
Func SwapFishingrod($discard = False)
Local Const $InvS[3] = [1528, 350, 48] ; X,Y,OFFSET
Local $SRx, $SRy, $IS = False
OCInventory(True)
If MouseGetPos(0) >= $InvS[0] And MouseGetPos(0) <= $InvS[0] + 500 And MouseGetPos(1) >= $InvS[1] And MouseGetPos(1) <= $InvS[1] + 500 Then MouseMove(10, 10) ; Keep mouse out of detection range
For $j = 0 To 7 Step 1
For $i = 0 To 7 Step 1
$IS = _ImageSearchArea("res\fishingrod.bmp", 0, $InvS[0] - 15 + $i * $InvS[2], $InvS[1] - 15 + $j * $InvS[2], $InvS[0] + 15 + $i * $InvS[2], $InvS[1] + 15 + $j * $InvS[2], $SRx, $SRy, 20, 0)
If $IS = True Then
MouseMove($InvS[0] + $i * $InvS[2], $InvS[1] + $j * $InvS[2])
Sleep(50)
MouseClick("right", $InvS[0] + $i * $InvS[2], $InvS[1] + $j * $InvS[2])
If $discard = True Then DiscardEmptyRod()
OCInventory(False)
Return True
EndIf
Next
Next
If $discard = True Then DiscardEmptyRod()
OCInventory(False)
Return False
EndFunc ;==>SwapFishingrod
Func DiscardEmptyRod()
Local Const $InvS[3] = [1528, 350, 48] ; X,Y,OFFSET
Local Const $TrashCan[2] = [1862, 780] ; X,Y
Local $SRx, $SRy, $IS = False
OCInventory(True)
If MouseGetPos(0) >= $InvS[0] And MouseGetPos(0) <= $InvS[0] + 500 And MouseGetPos(1) >= $InvS[1] And MouseGetPos(1) <= $InvS[1] + 500 Then MouseMove(10, 10) ; Keep mouse out of detection range
For $j = 0 To 7 Step 1
For $i = 0 To 7 Step 1
$IS = _ImageSearchArea("res\emptyroddiscard.bmp", 0, $InvS[0] - 20 + $i * $InvS[2], $InvS[1] - 20 + $j * $InvS[2], $InvS[0] + 20 + $i * $InvS[2], $InvS[1] + 20 + $j * $InvS[2], $SRx, $SRy, 20, 0)
If $IS = True Then
MouseMove($InvS[0] + $i * $InvS[2], $InvS[1] + $j * $InvS[2])
Sleep(50)
MouseClickDrag("left", $InvS[0] + $i * $InvS[2], $InvS[1] + $j * $InvS[2], $InvS[0] + $i * $InvS[2] + 30, $InvS[1] + $j * $InvS[2], 500)
MouseMove($TrashCan[0], $TrashCan[1])
MouseClick("left", $TrashCan[0], $TrashCan[1])
Sleep(250)
CoSe("{SPACE}")
Sleep(100)
OCInventory(False)
Return True
EndIf
Next
Next
OCInventory(False)
Return False
EndFunc ;==>DiscardEmptyRod
Func Cast()
Local $C[5] = [642, 60, 1256, 64, 15000804] ; FishingCurrently
If Buff($Bufftimer) = True Then $Bufftimer = TimerInit()
Sleep(1000)
CoSe("{SPACE}")
$timer = TimerInit()
While DetectState($C) = False And $Fish
Sleep(500)
If TimerDiff($timer) / 1000 >= 12 Then Return False
WEnd
Return True
EndFunc ;==>Cast
Func Buff($timer)
Local $FoodSettings = IniReadSection("config\data.ini", "FoodSettings")
If $FoodSettings[1][1] = 1 And TimerDiff($timer) / 1000 / 60 > Int($FoodSettings[3][1]) Then
CoSe($FoodSettings[2][1])
Return True
EndIf
Return False
EndFunc ;==>Buff
Func Main()
Local $LootSettings[4] = [Int(IniRead("config\data.ini", "LootSettings", "Rarity", 2)), Int(IniRead("config\data.ini", "LootSettings", "Silverkey", True)), Int(IniRead("config\data.ini", "LootSettings", "AncientRelic", True)), Int(IniRead("config\data.ini", "LootSettings", "Coelacanth", True))]
Local $InventorySettings[3] = [Int(IniRead("config\data.ini", "InventorySettings", "FreeSlots", 16)), Int(IniRead("config\data.ini", "InventorySettings", "ReservedSlots", 8)), Int(IniRead("config\data.ini", "InventorySettings", "DiscardRods", 0))]
Global $PickedLoot = Int(IniRead("config\data.ini", "CurrentStats", "PickedLoot", 0))
Global $SwappedRods = 0
Local $fishingtimer = 0
Local $Reserved = False
$Fish = False
InitGUI()
While True
GUILoopSwitch()
While $Fish
GUILoopSwitch()
Switch GetState()
Case 30 ; You feel a bite. Press 'Space' bar to start.
$Breaktimer = 0
SetGUIStatus("Reeling in.")
If ReelIn() = True Then
SetGUIStatus("Solving riddle.")
Riddler()
SetGUIStatus("Evaluating loot.")
Sleep(3000)
$PickedLoot = Int(IniRead("config\data.ini", "CurrentStats", "PickedLoot", 0))
If HandleLoot($LootSettings[0], $LootSettings[1], $LootSettings[2], $LootSettings[3], $Reserved) = True Then $PickedLoot += 1
SetGUIInventory($PickedLoot)
If $InventorySettings[0] - $PickedLoot <= 0 Then
If $LootSettings[1] > 0 Then $Reserved = True
If $InventorySettings[0] + $InventorySettings[1] - $PickedLoot <= 0 Then
SetGUIStatus("Inventory full. Stopping.")
$Fish = False
ExitLoop
EndIf
EndIf
EndIf
Case 20 ; You are currently fishing. Please wait until you feel a bite.
$Breaktimer = 0
If $fishingtimer <> 0 Then
SetGUIStatus("Currently fishing. (" & Round(TimerDiff($fishingtimer) / 1000, 0) & "s)")
Else
SetGUIStatus("Currently fishing.")
EndIf
Case 10 ; Press 'Space' near a body of water to start fishing.
$Breaktimer = 0
SetGUIStatus("Ready for fishing.")
If Cast() = False Then
SetGUIStatus("Cast failed. Inspecting equipped fishingrod.")
If InspectFishingrod() = True Then
SetGUIStatus("Swapping fishingrods.")
If SwapFishingrod($InventorySettings[2]) = True Then
$SwappedRods += 1
Else
SetGUIStatus("No fishingrods found. Stopping.")
$Fish = False
ExitLoop
EndIf
EndIf
EndIf
$fishingtimer = TimerInit()
Case Else
SetGUIStatus("Unidentified state.")
If $Breaktimer = 0 Then
$Breaktimer = TimerInit()
ElseIf TimerDiff($Breaktimer) / 1000 > 10 Then
SetGUIStatus("Stopped. No fishing rod equipped?")
$Fish = False
ExitLoop
EndIf
EndSwitch
Sleep(100)
If $Fish = False Then
SetGUIStatus("Fishing stopped.")
$fishingtimer = 0
EndIf
WEnd
WEnd
EndFunc ;==>Main
Main()
@
Add a function that detects rods with +s
Im not sure but I think it does not detect the rods properly.
Also, might as well as add color variation to the pixel search function.
Its also a good idea to let the user specify the X/Y of your Rod in your inventory.
So the bot will look for it exactly in that coordinate.
Also, I made an Auto-turn-in macro.
Its in dotnet the idea is there.
Basically what it does is that after X minutes, it will stop fishing by switching weapons and finding the repair npc and trade npc then goes to find the horse.
Which the horse is parked near the shoreline. XD
#Region "AutoPathing"
Sub SwitchWeapon()
'switch weapon first
a.Send("{i}")
Thread.Sleep(1000)
'right click weapon to switch
a.MouseClick("RIGHT", 974, 223, 2, 10)
Thread.Sleep(1000)
a.Send("{i}")
End Sub
Sub ClickNPCIcon()
a.Send("{LCTRL}")
Thread.Sleep(1000)
a.MouseMove(999, 57, 10)
Thread.Sleep(1000)
a.MouseClick()
End Sub
Sub ClickNPCSearch()
'click on Search box
a.MouseMove(782, 587, 10)
Thread.Sleep(1000)
a.MouseClick()
End Sub
Sub FindRepairNPC()
a.Send("tranan")
Thread.Sleep(1000)
a.Send("{ENTER}")
Thread.Sleep(1000)
a.MouseClick("LEFT", 783, 442, 1, 10)
Thread.Sleep(1000)
AutoPath()
ClickNPCIcon()
End Sub
Sub FindTraderNPC()
a.Send("bahar")
Thread.Sleep(1000)
a.Send("{ENTER}")
Thread.Sleep(1000)
a.MouseClick("LEFT", 827, 496, 1, 10)
Thread.Sleep(1000)
AutoPath()
ClickNPCIcon()
End Sub
Sub AutoPath()
Thread.Sleep(60000)
a.Send("t")
Thread.Sleep(1000)
End Sub
Sub RepairNPC()
a.Send("r")
Thread.Sleep(1000)
a.MouseClick("LEFT", 611, 564, 1, 10)
Thread.Sleep(1000)
a.MouseClick()
Thread.Sleep(1000)
a.MouseClick("LEFT", 908, 722, 1, 10)
Thread.Sleep(1000)
a.Send("{SPACE}")
Thread.Sleep(1000)
a.Send("{ESC}")
Thread.Sleep(1000)
a.Send("{ESC}")
End Sub
Sub TraderNPC() 'complete this after
a.Send("r")
Thread.Sleep(1000)
a.MouseClick("LEFT", 611, 564, 1, 10)
End Sub
Sub FindHorse()
a.MouseClick("LEFT", 69, 141, 1, 10)
Thread.Sleep(1000)
a.MouseClick("RIGHT", 69, 141, 1, 10)
Thread.Sleep(1000)
AutoPath()
End Sub
Sub BacktoFishing()
a.Send("i")
Thread.Sleep(1000)
a.MouseClick("RIGHT", 1054, 224, 1)
Thread.Sleep(1000)
a.Send("{SPACE}")
Thread.Sleep(1000)
End Sub
#End Region
The auto-turn in works. However, its best noted that sometimes you have to "click twice" on the NPC Icon for it to locate the npc.
This is the reason why you will see at the code above I made it "click 2x" or "right click 2x".
Specially when locating the horse.
do i need to have some extra program installed for this ?
No since you already received the error message, but it seems to be unable to find the hardcoded states. (Start fishing, Currently fishing, Bite)
Since it can't find the state on the screen make sure its 1920x1080 resolution and you set the UI Scale to 100%. If you could send a complete fullscreen screenshot I could find out.
Quote:
Originally Posted by killzone
Im not sure but I think it does not detect the rods properly.
Also, might as well as add color variation to the pixel search function.
Its also a good idea to let the user specify the X/Y of your Rod in your inventory.
So the bot will look for it exactly in that coordinate.
The imagesearches all have a variation. The problem with BDO is that the UI scales gradually and the size distortion will make the searches fail everytime.
The transparency of most UI elements is a big problem as well. So I had to find the few solid pixels and had to make sure the color is consistent to avoid wrong state detection.
If you turn autosort off then you can sort your rods yourself. It will pick identified rods from left to right and then go to the next line in the 8x8 inventory without scrolling. In my oppinion this was sufficient. What do you think? (Enchantable and repairable rods will be added later.)
The horse as an anchorpoint for the the pathfinding is a pretty neat idea.
Though we all know how easily the pathfinding just gets stuck on a rock or a mob. I could add it as experimental feature.
I will add a folder structure in the next version and also add tests and improved error messages so I can troubleshoot more effectively.
left to right and then go to the next line in the 8x8 inventory without scrolling
This is good enough for the user to understand that the bot will only check the first 2 lines of your inventory.
So this means, the Row1 & Row2 of your inventory is reserved ONLY for fishing rods.
Maybe also update the instructions in the first post that users must be in Full Window Mode + 100% UI Scaling.
It is worth mentioning what you want the users do before pressing the start.
Lets say, do you want the user to just open inventory then press Start so the bot will pick the Rod and start fishing?
Or you want the user to start the fishing process and then press start bot?
Things like this gets easily confused by the users.
It is worth mentioning what you want the users do before pressing the start.
Lets say, do you want the user to just open inventory then press Start so the bot will pick the Rod and start fishing?
Or you want the user to start the fishing process and then press start bot?
Things like this gets easily confused by the users.
The bot is designed to identify the current state. So you can start it while having a fishing rod equipped, or while fishing, or while a fish is already on the line.
I will add instructions instead of the "Settings loaded" to "Please equip a fishing rod. Then start."
[Opensource] PokeMMO Autoit bots 01/12/2014 - Pokemon - 117 Replies DON'T USE THIS UNTIL WE FIND A WAY TO WORK AROUND THE CAPTCHA!!!
Gnomepy's PokeMMO bot V6.1
*31 january 2013*
Functions:
-Heals when hp/pp is low
-Catches shiny's
-Train EV (currently only Attack, Speed and Sp.Attack are added)
[OPENSOURCE PROJECT] BROWSERGAME 02/06/2012 - Web Development - 8 Replies HEYHO Leute :D ,
Ich suche Leute die Lust hätten mit mir ein eigenes Browsergame zu erstellen.
Also ich bräuchte ein ganzes Team so wie Sponsoren usw.
Wir Brauchen Programmierer
Und eine Idee.
Was genau wir veröffentlichen wollen.
Alle die Vielleicht nicht mit machen wollen aber eine idee haben bitte in den Kommis Schreiben
LG
StreetFight
[OpenSource Project] C++ CoCore 01/26/2011 - CO2 Private Server - 59 Replies Alright, I think I'm done with the lurking for now.. The main reason of me starting this project is to get some people to use C++ instead of C#. There are a few members who I believe have potential, and I think those are pretty much the ones who will take interests into this project.
What is this CoCore, and what does it contain?:
Unknown (?)
Yes.. Unknown. I think I want the members who are interested to provide me with a list of things that should be put in, for example, custom...