Register for your free account! | Forgot your password?

Go Back   elitepvpers > New Arrivals > Black Desert
You last visited: Today at 17:01

  • Please register to post and access all features, it's quick, easy and FREE!

 

[AutoIt] CrayonCode Bot Project (OpenSource & Free)

Reply
 
Old   #961
 
elite*gold: 20
Join Date: Feb 2006
Posts: 1,936
Received Thanks: 1,857
Quote:
Originally Posted by Rodent11 View Post

Edit the "CrayonCode_Fishing.au3" file, and go to line 378, it should be:

Code:
        $IS = _ImageSearchArea("res/reference_inventory.png", 0, $Res[0], $Res[1], $Res[2], $Res[3], $C[0], $C[1], 10, 0)
I changed it to this:

Code:
        $IS = _ImageSearchArea("res/reference_inventory.png", 0, $Res[0], $Res[1], $Res[2], $Res[3], $C[0], $C[1], 15, 0)
works like a charm for me, incl. scrolling (github version)



Vyndariel is offline  
Old   #962
 
elite*gold: 0
Join Date: Mar 2011
Posts: 97
Received Thanks: 4
So whats the difference between v.20 and github version what can be the reason for not scrolling down any ideas?


s3anlike is offline  
Old   #963
 
elite*gold: 0
Join Date: Jul 2017
Posts: 14
Received Thanks: 11
Quote:
Originally Posted by s3anlike View Post
Hey Nice work detection work, but mousewheeling is not working this is not 100% the fix of it?!
I have no issues with scrolling without changing anything else. What happens when it gets to the point where it tries to scroll? Watch the mouse, does it get all the way over into the inventory? If not, the scrolling isn't going to be sent into the inventory to actually move it.

Are you able to manually scroll the inventory? If not, there's something else going on.

Also, can you include the log from when you run the script (new start) to when it fails?
Rodent11 is offline  
Old   #964
 
elite*gold: 0
Join Date: Mar 2011
Posts: 97
Received Thanks: 4
I can scroll down self .. i think the log will nothing show im at work >,< post it later


s3anlike is offline  
Old   #965
 
elite*gold: 0
Join Date: Jul 2010
Posts: 3
Received Thanks: 0
Quote:
Originally Posted by Rodent11 View Post
I got this to work by changing the tolerance of the inventory search.
Nice work, Rodent! This explains why my efforts weren't working.
91280 is offline  
Old   #966
 
elite*gold: 0
Join Date: May 2014
Posts: 216
Received Thanks: 2
detection rate in terms of bans?
LoL-PaxJax Sale is offline  
Old   #967
 
elite*gold: 0
Join Date: Mar 2011
Posts: 97
Received Thanks: 4
No bann use it there no memory injection!

Quote:
Originally Posted by Rodent11 View Post
I have no issues with scrolling without changing anything else. What happens when it gets to the point where it tries to scroll? Watch the mouse, does it get all the way over into the inventory? If not, the scrolling isn't going to be sent into the inventory to actually move it.

Are you able to manually scroll the inventory? If not, there's something else going on.

Also, can you include the log from when you run the script (new start) to when it fails?
Im on v.20 not the github version i need the relog snd restock function

PS: Join to Discord
s3anlike is offline  
Old   #968
 
elite*gold: 0
Join Date: May 2014
Posts: 216
Received Thanks: 2
is crayon still working on this project?
LoL-PaxJax Sale is offline  
Old   #969
 
elite*gold: 0
Join Date: Jul 2017
Posts: 14
Received Thanks: 11
Quote:
Originally Posted by s3anlike View Post
I can scroll down self .. i think the log will nothing show im at work >,< post it later
Might as well, at least we can see what's it doing. If you watch the mouse when it tries to scroll, is it making it all the way into the inventory? What if you move the mouse a bit to the right (shouldn't matter if you move over an item)?

Quote:
Originally Posted by s3anlike View Post
Im on v.20 not the github version i need the relog snd restock function
I'll see if I can take a look at the v.20, I have only used the github version myself.

Quote:
Originally Posted by LoL-PaxJax Sale View Post
detection rate in terms of bans?
Hard to say I guess (who really knows), but I would say it's very safe. Doesn't read/inject any memory, it just looks at pixels on the screen and sends mouse movements/ keyboard inputs into the game. As far as the game can tell their human inputs (besides being linear/ repetitive)

Quote:
Originally Posted by LoL-PaxJax Sale View Post
is crayon still working on this project?
No updates on github and hasn't been here in a month, no idea but here to hoping
Rodent11 is offline  
Old   #970
 
elite*gold: 0
Join Date: Jul 2017
Posts: 14
Received Thanks: 11
Well, @s3anlike, take a look at my attached screenshot (Or this link, since the attached image is small: http://i.epvpimg.com/geeEcab.png). We can see what's different here, mostly the offset value.

I would try out a change like this (replace your v.20's OCInventory function with this, should be line 859 in v.20 source):

Code:
Func OCInventory($open = True)
	Local Const $Offset[2] = [-298, 30] ; Offset from reference_inventory to left border of first Inventory Slot. For future use.
	Local $IS = False
	Local $C[2]
	Local $timer = TimerInit()
	While Not $IS And $Fish
		Sleep(250)
		$IS = _ImageSearchArea("res/reference_inventory.bmp", 0, $ResOffset[0], $ResOffset[1], $ResOffset[2], $ResOffset[3], $C[0], $C[1], 15, 0)
		Sleep(250)
		If $IS = True Then
			If $open = True Then
				$C[0] += $Offset[0]
				$C[1] += $Offset[1]
				Return ($C)
			ElseIf $open = False Then
				CoSe("i")
				Sleep(500)
			EndIf
		ElseIf $IS = False Then
			If $open = True Then
				CoSe("i")
				MouseMove($ResOffset[0] + 30, $ResOffset[1] + 30)
				Sleep(500)
			ElseIf $open = False Then
				SetGUIStatus("Inventory closed")
				Return False
			EndIf
		EndIf
		If TimerDiff($timer) / 1000 >= 6 Then
			SetGUIStatus("OCInventory Timeout")
			Return False
		EndIf
	WEnd
EndFunc   ;==>OCInventory
This pretty much aligns it with how it is in the current version, leave the true/false on line 26 alone, in v.20 it is expecting False. The differences in line 8 and 22 don't matter. Line 8 is just different variable names (they're basically the same value), line 22 is just a different position for the mouse, which is in the top left corner of the game window to make sure it's out of the way.

Let me know if that works, if not, the results of testing from my last post.
Attached Images
File Type: jpg Screenshot_8.jpg (21.1 KB, 40 views)
Rodent11 is offline  
Old   #971
 
elite*gold: 0
Join Date: Mar 2006
Posts: 1,564
Received Thanks: 314
Why not fork the Github Version and continue the feature from there? @Rodent11
killzone is offline  
Old   #972
 
elite*gold: 0
Join Date: Jul 2017
Posts: 14
Received Thanks: 11


I haven't had a chance yet to really look over the whole thing, I still don't understand enough of it to start making (big) changes. I was thinking about it if I get more time and @CrayonCode doesn't come back.
Rodent11 is offline  
Old   #973
 
elite*gold: 0
Join Date: Mar 2011
Posts: 97
Received Thanks: 4
Quote:
Originally Posted by Rodent11 View Post
Well, @s3anlike, take a look at my attached screenshot (Or this link, since the attached image is small: http://i.epvpimg.com/geeEcab.png). We can see what's different here, mostly the offset value.

I would try out a change like this (replace your v.20's OCInventory function with this, should be line 859 in v.20 source):

Code:
Func OCInventory($open = True)
	Local Const $Offset[2] = [-298, 30] ; Offset from reference_inventory to left border of first Inventory Slot. For future use.
	Local $IS = False
	Local $C[2]
	Local $timer = TimerInit()
	While Not $IS And $Fish
		Sleep(250)
		$IS = _ImageSearchArea("res/reference_inventory.bmp", 0, $ResOffset[0], $ResOffset[1], $ResOffset[2], $ResOffset[3], $C[0], $C[1], 15, 0)
		Sleep(250)
		If $IS = True Then
			If $open = True Then
				$C[0] += $Offset[0]
				$C[1] += $Offset[1]
				Return ($C)
			ElseIf $open = False Then
				CoSe("i")
				Sleep(500)
			EndIf
		ElseIf $IS = False Then
			If $open = True Then
				CoSe("i")
				MouseMove($ResOffset[0] + 30, $ResOffset[1] + 30)
				Sleep(500)
			ElseIf $open = False Then
				SetGUIStatus("Inventory closed")
				Return False
			EndIf
		EndIf
		If TimerDiff($timer) / 1000 >= 6 Then
			SetGUIStatus("OCInventory Timeout")
			Return False
		EndIf
	WEnd
EndFunc   ;==>OCInventory
This pretty much aligns it with how it is in the current version, leave the true/false on line 26 alone, in v.20 it is expecting False. The differences in line 8 and 22 don't matter. Line 8 is just different variable names (they're basically the same value), line 22 is just a different position for the mouse, which is in the top left corner of the game window to make sure it's out of the way.

Let me know if that works, if not, the results of testing from my last post.
Nothing changes Scroll down function is not working.. :S maybe its not enough to change only OCInventory maybe we need to change DetectFreeInventory too?

Func DetectFreeInventory()
Local $Free, $IS, $x, $y
SetGUIStatus("Detecting free inventory space")
OCInventory(False)
Local $InvA = OCInventory(True)
If IsArray($InvA) = False Then Return False
For $L = 0 To 2 Step 1
If MouseGetPos(0) >= $InvA[0] And MouseGetPos(0) <= $InvA[0] + 500 And MouseGetPos(1) >= $InvA[1] And MouseGetPos(1) <= $InvA[1] + 500 Then MouseMove($InvA[0] - 50, $InvA[1]) ; Keep mouse out of detection range
For $j = 0 To 7 Step 1
For $i = 0 To 7 Step 1
$IS = _ImageSearchArea("res/reference_empty.bmp", 0, $InvA[0] + $i * 48, $InvA[1] - 24 + $j * 48, $InvA[0] + 48 + $i * 48, $InvA[1] + 24 + $j * 48, $x, $y, 10, 0)
If $IS Then
$Free += 1
EndIf
Next
Next
If $L < 2 Then
MouseMove($InvA[0], $InvA[1])
Sleep(50)
MouseWheel("down", 8)
EndIf
Sleep(150)
Next
OCInventory(False)
SetGUIStatus($Free & " empty slots")
Return ($Free)
EndFunc ;==>DetectFreeInventory
s3anlike is offline  
Old   #974
 
elite*gold: 0
Join Date: Jul 2017
Posts: 14
Received Thanks: 11
Quote:
Originally Posted by s3anlike View Post
Nothing changes Scroll down function is not working.. :S maybe its not enough to change only OCInventory maybe we need to change DetectFreeInventory too?
Sorry, it was still early for me, that will probably need to be changed too. Try this:

Code:
Func DetectFreeInventory()
	Local $Free, $IS, $x, $y
	SetGUIStatus("Detecting free inventory space")
	OCInventory(False)
	Local $InvA = OCInventory(True)
	If IsArray($InvA) = False Then Return False
	For $L = 0 To 2 Step 1
		If MouseGetPos(0) >= $InvA[0] And MouseGetPos(0) <= $InvA[0] + 500 And MouseGetPos(1) >= $InvA[1] And MouseGetPos(1) <= $InvA[1] + 500 Then MouseMove($InvA[0] - 50, $InvA[1]) ; Keep mouse out of detection range
		For $j = 0 To 7 Step 1
			For $i = 0 To 7 Step 1
				$IS = _ImageSearchArea("res/reference_empty.bmp", 0, $InvA[0] + $i * 48, $InvA[1] - 24 + $j * 48, $InvA[0] + 48 + $i * 48, $InvA[1] + 24 + $j * 48, $x, $y, 20, 0)
				If $IS Then
					$Free += 1
				EndIf
			Next
		Next
		If $L < 2 Then
			MouseMove($InvA[0] + 5, $InvA[1])
			Sleep(50)
			For $mw = 0 To 7
				MouseWheel("down")
				Sleep(50)
			Next
		EndIf
		Sleep(150)
	Next
	OCInventory(False)
	SetGUIStatus($Free & " empty slots")
	Return ($Free)
EndFunc   ;==>DetectFreeInventory
Specifically there are two changes. First, we're adding 5 pixels to the 'MouseMove' in the X direction (moving it to the right), to make sure it's going into the inventory. Second, changing the 'MouseWheel' to match the current version, which should help if the game isn't running smoothly and misses inputs.

See this screenshot: http://i.epvpimg.com/QaCxdab.png. It should look about like that.

If that doesn't help, again, watch the mouse as it tries to do the 'MouseWheel' event. Is the mouse far enough over into the inventory window? If not, try increasing that "+ 5" (should be on line 1405) to + 10, or something.
Rodent11 is offline  
Old   #975
 
elite*gold: 0
Join Date: Mar 2011
Posts: 97
Received Thanks: 4
Got it now thanks

Func DetectFreeInventory()
Local $Free, $IS, $x, $y
SetGUIStatus("Detecting free inventory space")
OCInventory(False)
Local $InvA = OCInventory(True)
If IsArray($InvA) = False Then Return False
For $L = 0 To 2 Step 1
If MouseGetPos(0) >= $InvA[0] And MouseGetPos(0) <= $InvA[0] + 500 And MouseGetPos(1) >= $InvA[1] And MouseGetPos(1) <= $InvA[1] + 500 Then MouseMove($InvA[0] - 50, $InvA[1]) ; Keep mouse out of detection range
For $j = 0 To 7 Step 1
For $i = 0 To 7 Step 1
$IS = _ImageSearchArea("res/reference_empty.bmp", 0, $InvA[0] + $i * 48, $InvA[1] - 24 + $j * 48, $InvA[0] + 48 + $i * 48, $InvA[1] + 24 + $j * 48, $x, $y, 20, 0)
If $IS Then
$Free += 1
EndIf
Next
Next
If $L < 2 Then
MouseMove($InvA[0] + 8, $InvA[1]) // +8 is correct here
Sleep(50)
For $mw = 0 To 7
MouseWheel("down")
Sleep(50)
Next
EndIf
Sleep(150)
Next
OCInventory(False)
SetGUIStatus($Free & " empty slots")
Return ($Free)
EndFunc ;==>DetectFreeInventory


now its working like a charm like before the update cames

PS: join Discord let us make the Github version more comfortable


s3anlike is offline  
Thanks
1 User
Reply



« Previous Thread | Next Thread »

Similar Threads
[Opensource] PokeMMO Autoit bots
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...
117 Replies - Pokemon
[OPENSOURCE PROJECT] BROWSERGAME
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...
8 Replies - Web Development
[OpenSource Project] C++ CoCore
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#....
59 Replies - CO2 PServer - Discussions / Questions
Farmville Automatizer OPENSOURCE free bot [AutoIT]
Farmville Automatizer released! Open Source >>> Download <<<
2 Replies - Facebook



All times are GMT +1. The time now is 17:01.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Abuse
Copyright ©2017 elitepvpers All Rights Reserved.