[AutoIt] CrayonCode Bot Project (OpenSource & Free)

04/28/2017 07:03 samm001#316
Hi CrayonCode
Thank you a million times for the amazing work .
I managed to make this work with the Japanese client .The script start fishing but fail to hit the blue bar at the right time any help appreciated thx
04/28/2017 07:33 killzone#317
@[Only registered and activated users can see links. Click Here To Register...]
I think the digging gets canceled once you looted crystals because of the Lucky animation.
You know, when you find rare your character jumps for joy lmao.
Tip to everyone: Disable all notifications.

Also, launch_connect.bmp = the same image as delete character.

To anyone who has maid outfit.
Submit a screenshot in BitMap (*.bmp) 1920x1080 resolution with the buttons in storage and some of the materials needed to be searched to begin processing.

Post the Screenshot as attachment OR zip them.
CrayonCode can begin with adding the processing function when information is available.
04/28/2017 07:41 RyliaH#318
.
04/28/2017 08:02 acutep#319
Is there an option where I discard the non dry-able fish and only collect the ones I can dry? The inventory seems to fill up pretty quickly with non dry-able fish.
04/28/2017 09:42 KKK76#320
Quote:
Originally Posted by killzone View Post
@[Only registered and activated users can see links. Click Here To Register...]
I think the digging gets canceled once you looted crystals because of the Lucky animation.
You know, when you find rare your character jumps for joy lmao.
Tip to everyone: Disable all notifications.

Also, launch_connect.bmp = the same image as delete character.

To anyone who has maid outfit.
Submit a screenshot in BitMap (*.bmp) 1920x1080 resolution with the buttons in storage and some of the materials needed to be searched to begin processing.

Post the Screenshot as attachment OR zip them.
CrayonCode can begin with adding the processing function when information is available.


I get to work
04/28/2017 10:53 KKK76#321
@[Only registered and activated users can see links. Click Here To Register...] @[Only registered and activated users can see links. Click Here To Register...]
I've attached screenshots and some of the materials (Chopping and Heating)
04/28/2017 12:00 killzone#322
Quote:
Originally Posted by acutep View Post
Is there an option where I discard the non dry-able fish and only collect the ones I can dry? The inventory seems to fill up pretty quickly with non dry-able fish.
There's none.
You can set the fisher to Loot gold fishes & dry gold fishes.

Although it is possible to only dry specific fish but thats another function / work to be added to the bot.
This means, we need another "image" of the fish to dry.
For example, dry "Grunt" but not dry "Eels" if you are fishing in veila.

@[Only registered and activated users can see links. Click Here To Register...]
When you are about to add the function of processing, please add 2 options.
1. Use processing with "maid outfit".
2. Use process normally (must benear storage).
Edit: May I ask for the tutorial of resolution_settings? Ive had hard times switching resolution to trace the Coordinates.
04/28/2017 18:50 Boian#323
@[Only registered and activated users can see links. Click Here To Register...] : Boian[/MENTION] You are right. I forgot to actually apply the settings to the function.
Some questions though. Do you have to loot manually once you got the crystal shard or is pressing the hotkey for a shovel enough to loot it and start again?
So do I have to check for the shard or is periodically spamming the shovel hotkey enough to keep digging?

It's ok to spam shovel hotkey ,shards have been send auto to your inventory, if you add BMP regular shard ones will do fine.
04/28/2017 18:59 RyliaH#324
.
04/28/2017 19:45 CrayonCode#325
We will work through resolution_settings.ini so you can create your own preset.

The resolution must allow 100% UI Scale or all dynamic Imagesearches will fail. (1280x720 for example won't work because auf max 90% UI Scale)

Presets are language and resolution specific. Since the text varies, your preset will be only be working for the language you created the preset for. (Atleast the parts that involve text like [Fishing])

Please post your custom presets in this thread with this title format:
resolution_settings[WIDTH]x[HEIGHT][LANGUAGE]
e.g. resolution_settings2560x1440FR or resolution_settings1920x1080DE

Lines that start with ; are comments and can be ignored.



[Resolution] Define your resolution. 1280x768 in this example:
Quote:
[Resolution]
1280=768
The gameclient resolution will be compared with this one. If they don't match you will receive an error.



[GameStart] Define the x & y relative coordinates of the Enter and Connect buttons:
Quote:
[GameStart]
; Main Server "Enter" x=y
1191=662
; "CONNECT" x=y
628=729
A rough x & y position is enough. We only try to click the button.
1191=662 (x=y)
[Only registered and activated users can see links. Click Here To Register...]
628=729 (x=y)
[Only registered and activated users can see links. Click Here To Register...]



[Fishing] Define the coordinates for the region. Look for atleast 4 Pixels on top of eachother with the Hex color 0xE4E4E4. We need to be very precise with position and color. Every pixel counts!
FishingStandby=359, 57, 913, 61, 0xE4E4E4 (CurrentStateName=x1, top, x2, bottom, color)
We will call x1 left and x2 right despite not bein a rectangle region, but 2 seperate stripes with the same top and bottom)
The script checks the left coordinate from top to bottom and the right coordinate from top to bottom.
Quote:
[Fishing]
FishingStandby=359, 57, 913, 61, 0xE4E4E4
FishingCurrently=322, 57, 936, 61, 0xE4E4E4
FishingBite=413, 57, 859, 61, 0xE4E4E4
PressIt=529, 370, 748, 374, 0xFFFFFF
ReelIn=675, 406, 772, 423, 0x5A87C8
LootWindow=898, 282, 900, 327, 46
Here we take 5 pixels from "P" on the left and "g" on the right for FishingStandby. Make sure the pixels have all the color 0xE4E4E4.
FishingStandby=359, 57, 913, 61, 0xE4E4E4 (FishingStandby=left, top, right, bottom, color)
[Only registered and activated users can see links. Click Here To Register...]

The same for FishingCurrently:
FishingCurrently=322, 57, 936, 61, 0xE4E4E4 (FishingCurrently=left, top, right, bottom, color)
[Only registered and activated users can see links. Click Here To Register...]

And for FishingBite:
FishingBite=413, 57, 859, 61, 0xE4E4E4 (FishingBite=left, top, right, bottom, color)
[Only registered and activated users can see links. Click Here To Register...]

For PressIt we need the coordinate with the color 0xFFFFFF:
PressIt=529, 370, 748, 374, 0xFFFFFF (PressIt=left, top, right, bottom, color)
[Only registered and activated users can see links. Click Here To Register...]

ReelIn describes the region where the blue bar can be pressed:
ReelIn=675, 406, 772, 423, 0x5A87C8 (ReelIn=left, top, right, bottom, defaultcolor)
[Only registered and activated users can see links. Click Here To Register...]

LootWindow Checks the left border of the first slot in the item list.
LootWindow=898, 282, 900, 327, 46 (LootWindow=left, top, right, bottom, slotwidth)
[Only registered and activated users can see links. Click Here To Register...]



[Restock] & [WorkerSettings] We Mostly need rough coordinates here. It doesn't have to be very precise.
Quote:
[Restock]
NPCSearchIcon=913, 28
MapRegion=1215, 48, 1230, 50
SellAllButton=1120, 437
Horse=44, 124
Boat=93, 123

[WorkerSettings]
WorkerListPosition=899, 294
NPCSearchIcon=913, 28 (NPCSearchIcon=x, y)
MapRegion=1215, 48, 1230, 50 (MapRegion=left, top, right, bottom)
Horse=44, 124 (Horse=x, y)
Boat=93, 123 (Boat=x, y)
WorkerListPosition=899, 294 (WorkerListPosition=x, y)
[Only registered and activated users can see links. Click Here To Register...]

SellAllButton=1120, 437 (SellAllButton=x, y)
[Only registered and activated users can see links. Click Here To Register...]



A complete example:
Quote:
[Resolution]
1280=768

[GameStart]
; Main Server "Enter" x=y
1191=662
; "CONNECT" x=y
628=729

[Fishing]
FishingStandby=359, 57, 913, 61, 0xE4E4E4
FishingCurrently=322, 57, 936, 61, 0xE4E4E4
FishingBite=413, 57, 859, 61, 0xE4E4E4
PressIt=529, 370, 748, 374, 0xFFFFFF
ReelIn=675, 406, 772, 423, 0x5A87C8
LootWindow=898, 282, 900, 327, 46

[Restock]
NPCSearchIcon=913, 28
MapRegion=1215, 48, 1230, 50
SellAllButton=1120, 437
Horse=44, 124
Boat=93, 123

[WorkerSettings]
WorkerListPosition=899, 294
Those are all hard coordinates we need at the moment.
With increasing functionality there might be a need for more of those. I will keep this post up to date.
I hope people will share their presets.
04/28/2017 21:00 killzone#326
resolution_settings1360x768EN_windowmode.ini

Code:
[Resolution]
1360=768

[GameStart]
; Main Server "Enter" x=y
1271=661
; "CONNECT" x=y
714=730

[Fishing]
FishingStandby=399, 86, 851, 84, 0xE4E4E4
FishingCurrently=386, 84, 956, 84, 0xE4E4E4
FishingBite=453, 88, 867, 82, 0xE4E4E4
PressIt=569, 401, 788, 400, 0xFFFFFF
ReelIn=750, 440, 800, 440, 0x5A87C8   ;preset = 5A87C8 ;myresult = 5E8EA7
LootWindow=975, 280, 975, 320, 46

[Restock]
NPCSearchIcon=995, 60
MapRegion=1265, 70, 1290, 70
SellAllButton=1777, 755
Horse=36, 122
Boat=94, 121

[WorkerSettings]
WorkerListPosition=215, 146
This doesnt work yet Im just putting it here for future use. xD
Also, when you try to run the script with the settings above, you get snapshot errors if the client is 1360x768 (FullWindow).
Error: resolution deviates if 1360x768 Window Mode

Also, I edited the "FeedWorker" function to suit with the 1360x768 resolution because its 100% UI Scale, the Worker Window is Cut short.
So, the edits is to click the "Sticky Ui" button to force the Worker Window in 100% UI. Then click the Worker buttons to feed the workers. Then click again the Sticky UI button to untoggle Sticky UI before pressing Escape to close Worker List.


First StickUI (to Toggle StickyUI)

To Untoggle StickyUI
Apologize in advance, AutoIt is not my forte so this is a learning process for me.

Feel free to correct this.


Attached is a Text file, just rename it to .ini.
04/28/2017 22:02 CrayonCode#327
I just released v0.18 with minor changes.

@[Only registered and activated users can see links. Click Here To Register...] The workerlist gets dragged up to account for getting cut short on lower resolutions.
Is it still too far down with 1360x768? Because I can just drag it even further up.
You can usually just copy the ReelIn color since it searches with shadevariation.
PS: v0.18 will now also log the detected $ResOffset. Check what size it is detecting.

@[Only registered and activated users can see links. Click Here To Register...] v0.16 - Added escape from daily reward screen
You are using 1920 right? Maybe it doesn't overlap the fishing states. I'll have to look into it.

@[Only registered and activated users can see links. Click Here To Register...] check v0.18 for the digging now. What exactly did you mean by adding BMP ?

@[Only registered and activated users can see links. Click Here To Register...] go create your preset and let me know if there are any bugs.

@[Only registered and activated users can see links. Click Here To Register...] I can create a filter for every fish, if you screenshot every fish. How am I supposed to know which fish isn't dryable? But I could think about adding a custom folder similiar to the eventitems, where you just put a cropped .bmp of the things you don't want to loot.

@[Only registered and activated users can see links. Click Here To Register...] Find this line and delete it for now.
Code:
If $freedetectedslots - $PickedLoot - $InventorySettings[2][1] - $InventorySettings[1][1] <= 0 Then $Reserve = 1
I'll push new version with changes tomorrow. Also adding an ignore feature @[Only registered and activated users can see links. Click Here To Register...] requested.
BTW where do you fish that it takes you 90 seconds between bites? Geez that's like forever.
04/28/2017 23:32 s3anlike#328
@[Only registered and activated users can see links. Click Here To Register...] so about Fail Looting heres the link from Logfile:

[Only registered and activated users can see links. Click Here To Register...]

I think its because of "Feed Worker" Function while pickup fish window..

heres the picture from my Loot Settings

[IMG=expandable: 1][Only registered and activated users can see links. Click Here To Register...][/IMG]

PS: The bot was Fishing for 12 hours and its picked up only Relicts?..
And is there a way to include repair for equipment too if anyone using a float for fishing?
04/29/2017 05:56 imedbox#329
Get loop for Trying to equip fishingrod !!!

[Only registered and activated users can see links. Click Here To Register...]


resolution_settings fr

[Resolution]
1920=1080

[GameStart]
; Main Server "Enter" x=y
1828=973
; "CONNECT" x=y
1273=1043

[Fishing]
FishingStandby=708, 72, 1858, 88, 0xE4E4E4
FishingCurrently=766, 76, 1791, 84, 0xE4E4E4
FishingBite=916, 75, 1661, 88, 0xE4E4E4
PressIt=1096,, 497, 1478, 501, 0xFFFFFF
ReelIn=1326, 551, 1454, 551, 0x5A87C8
LootWindow=1538, 594, 1540, 638, 46

[Restock]
NPCSearchIcon=1555, 26
MapRegion=1820, 48, 1835, 50
SellAllButton=1777, 755
Horse=36, 122
Boat=94, 121

[WorkerSettings]
WorkerListPosition=1530, 294
04/29/2017 08:07 nuclear808#330
Quote:
Originally Posted by imedbox View Post
Get loop for Trying to equip fishingrod !!!

[Only registered and activated users can see links. Click Here To Register...]


resolution_settings fr

[Resolution]
1920=1080

[GameStart]
; Main Server "Enter" x=y
1828=973
; "CONNECT" x=y
1273=1043

[Fishing]
FishingStandby=708, 72, 1858, 88, 0xE4E4E4
FishingCurrently=766, 76, 1791, 84, 0xE4E4E4
FishingBite=916, 75, 1661, 88, 0xE4E4E4
PressIt=1096,, 497, 1478, 501, 0xFFFFFF
ReelIn=1326, 551, 1454, 551, 0x5A87C8
LootWindow=1538, 594, 1540, 638, 46

[Restock]
NPCSearchIcon=1555, 26
MapRegion=1820, 48, 1835, 50
SellAllButton=1777, 755
Horse=36, 122
Boat=94, 121

[WorkerSettings]
WorkerListPosition=1530, 294

same for me