[AutoIt] CrayonCode Bot Project (OpenSource & Free)

05/13/2017 13:54 imedbox#466
Quote:
Originally Posted by †Deadly† View Post
thank you, but there is some picture on the folder that use english, maybe it gonna be a problem with the french client no ?
:D I change nothing and it works perfectly

Quote:
Originally Posted by imedbox View Post
@[Only registered and activated users can see links. Click Here To Register...], pls how to config the Func FastFindBidBuy for Fr client? the marketplace not work in Fr client i need to change something?
ty
pls help for this CrayonCode
05/13/2017 13:59 †Deadly†#467
Quote:
Originally Posted by imedbox View Post
:D I change nothing and it works perfectly



pls help for this CrayonCode
you have to edit picture in the folder of the bot... And it's annoying lol that's why I prefer keep english client for that bot...
05/13/2017 16:12 imedbox#468
Quote:
Originally Posted by †Deadly† View Post
you have to edit picture in the folder of the bot... And it's annoying lol that's why I prefer keep english client for that bot...
The bot with my resolution_settings.ini in Fr bdo client work very well i dont need change pic in res folder, the only problems is Marketplace the bot wont work in Fr Client, he dont see Buy/Bid/BidR in Fr language.

marketplace pic 1920/1080 BMP format in FR client 11.07MB in 7zip file :

[Only registered and activated users can see links. Click Here To Register...]
05/13/2017 16:25 CrayonCode#469
Yeah sorry for the marketplace. Since the window positions are sometimes context driven and there is only text on buttons instead of images I can use as anchor, I went mostly with searches. And I also used relative coordinates to get better performance on the Bid/Buy part.

At least the marketplace should support all resolutions as long as the client is English.

So I would have to do quite a lot of rework. But this is a problem for another time.
05/13/2017 16:47 ahmedwork#470
Code:
Func AH()

$AH = Not $AH

If $AH = False Then

SetGUIStatus("Pausing AH")

Else

SetGUIStatus("Starting AH")

EndIf



While $AH = True

GetStateAH()

WEnd

EndFunc   ;==>AH



Func DetectStateAH(ByRef $C)

Local $SSN = 1

FFSnapShot(1273 + $ResOffset[0], 326 + $ResOffset[2], 1326 + $ResOffset[0], 736 + $ResOffset[1], $SSN)
; buttons region
$FF3 = FFColorCount($C[4], 10, True, $C[0], $C[1], $C[2], $C[3], $SSN)



Return $FF3



EndFunc   ;==>DetectStateAH



Func GetStateAH()

Local Const $PurpleBags = "res/marketplace_purplebags.bmp"

Local $x, $y, $IS

Local $auctionbid[5] = [1289, 340, 1315, 354, 0xB8B8B8] ;first button

Local $offsetbuy = 62 ;offset between buy-bid buttons

Local $SSN = 1, $FF



$ResOffset = DetectFullscreenToWindowedOffset()

$IS = _ImageSearchArea($PurpleBags, 1, $ResOffset[0], $ResOffset[1], $ResOffset[2], $ResOffset[3], $x, $y, 0, 0)

If $IS = False Then

SetGUIStatus("No PurpleBags found. Stopping.")

$AH = False

EndIf



While $AH = True

SetGUIStatus("Marketplace is working")

Sleep(Random(400, 600))

MouseClick("left", 793, 775, 1, 1)

FFSnapShot(1275, 330, 1327, 860, $SSN)

$count = 0

For $j = 0 To 6 ; number of checks

$FF = FFColorCount($auctionbid[4], 10, True, $auctionbid[0], $auctionbid[1] + $offsetbuy * $j, $auctionbid[2], $auctionbid[3] + $offsetbuy * $j, $SSN)

If $FF > 5 Then

$count += 1

EndIf

Next

If $count >= 1 Then

Bid($auctionbid, $count)

EndIf



WEnd

EndFunc   ;==>GetStateAH



Func Bid($coords, $number)

Cr(@CRLF + $number)

For $i = 0 To $number - 1

MouseMove(Int($coords[0]), Int($coords[1]) + 62 * $i, 0)

Sleep(200)

MouseDown("left")

Sleep(200)

MouseUp("left")

Sleep(200)

CoSe("{ENTER}")

CoSe("{ENTER}")

Next

EndFunc   ;==>Bid
a simpler coder for ah to make it easy on ppl who wants to change or modify anything

Sent from my Redmi 4 using Tapatalk
05/13/2017 17:11 imedbox#471
wat can i do with this replace Func Marketplace code or just add them?

can you explane wat meane this code pls :

Func FastFindBidBuy($x, $y)
Local $Valid[2] = [0x979292, 0xB8B8B8]
Local $SSN = 1, $FF
Local $BidR[3] = [21, 12, 21]
Local $Buy[3] = [3, 12, 21]
Local $Bid[3] = [4, 12, 21]
Local $BuyOffset[3] = [78, 54, 62] ; x, y, height 7

i can change that to make marketplace work in fr client?
05/13/2017 17:44 ahmedwork#472
Quote:
Originally Posted by imedbox View Post
wat can i do with this replace Func Marketplace code or just add them?

can you explane wat meane this code pls :

Func FastFindBidBuy($x, $y)
Local $Valid[2] = [0x979292, 0xB8B8B8]
Local $SSN = 1, $FF
Local $BidR[3] = [21, 12, 21]
Local $Buy[3] = [3, 12, 21]
Local $Bid[3] = [4, 12, 21]
Local $BuyOffset[3] = [78, 54, 62] ; x, y, height 7

i can change that to make marketplace work in fr client?
try the attached script, extract it inside ur current bot folder then use f5 to start the market place and btw it only works for single item
p.s resolution 1920*1080
05/13/2017 17:49 imedbox#473
Quote:
Originally Posted by ahmedwork View Post
try the attached script, extract it inside ur current bot folder then use f5 to start the market place and btw it only works for single item
p.s resolution 1920*1080

:D ty loot of man it work 100% ;)
05/13/2017 21:36 †Deadly†#474
Quote:
Originally Posted by ahmedwork View Post
try the attached script, extract it inside ur current bot folder then use f5 to start the market place and btw it only works for single item
p.s resolution 1920*1080
I don't understand, how are you able to fix market place if the script use imagesearch ?
By the way, how can we add that our character have to dry everything ? also golden fish
05/14/2017 03:08 imedbox#475
Quote:
Originally Posted by †Deadly† View Post
I don't understand, how are you able to fix market place if the script use imagesearch ?
By the way, how can we add that our character have to dry everything ? also golden fish
Tray this it for Fr Lang + AZERTY keyboard 1920/1080 and the market place work nice (ty to AH) ^^

[Only registered and activated users can see links. Click Here To Register...]
05/14/2017 05:46 ahmedwork#476
Quote:
Originally Posted by †Deadly† View Post
I don't understand, how are you able to fix market place if the script use imagesearch ?
By the way, how can we add that our character have to dry everything ? also golden fish
i'm only using imagesearch to know if ure on the correct window or not you can even remove that line if u want it's kinda useless and instead of using a specific color on a specific coords i'm counting a color on an area that's why it will work for most of the languages
05/14/2017 12:31 †Deadly†#477
Quote:
Originally Posted by ahmedwork View Post
i'm only using imagesearch to know if ure on the correct window or not you can even remove that line if u want it's kinda useless and instead of using a specific color on a specific coords i'm counting a color on an area that's why it will work for most of the languages
Thanks for answer,
And is there a way to dry gold fish too ? Max dry rarity is gold as I see
05/14/2017 13:19 ahmedwork#478
Quote:
Originally Posted by †Deadly† View Post
Thanks for answer,
And is there a way to dry gold fish too ? Max dry rarity is gold as I see
the current bot is already drying golden fish no problem here
05/14/2017 17:56 †Deadly†#479
Quote:
Originally Posted by ahmedwork View Post
the current bot is already drying golden fish no problem here
When I put max rarity golden fish, golden is in ? I tought he keep golden instead of Dry them :p
05/14/2017 20:38 CrayonCode#480
Quote:
Originally Posted by †Deadly† View Post
When I put max rarity golden fish, golden is in ? I tought he keep golden instead of Dry them :p
For Looting there is the Min Rarity, which means pick up everything that is of equal or higher rarity.
For Drying it is Max Rarity, which means dry everything that is of equal or lower rarity.